diff --git a/.gitignore b/.gitignore index 0ee3af7b..e8201dcc 100644 --- a/.gitignore +++ b/.gitignore @@ -123,6 +123,7 @@ Makefile.in /tests/elfstrmerge /tests/elfstrtab /tests/emptyfile +/tests/fillfile /tests/find-prologues /tests/funcretval /tests/funcscopes @@ -134,11 +135,11 @@ Makefile.in /tests/hash /tests/line2addr /tests/low_high_pc -/tests/md5-sha1-test /tests/msg_tst /tests/newdata /tests/newfile /tests/newscn +/tests/peel_type /tests/rdwrmmap /tests/rerequest_tag /tests/saridx diff --git a/ChangeLog b/ChangeLog index 48185c36..45418a0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,97 @@ +2018-07-04 Ross Burton + + * configure.ac: Check for gawk. + +2018-06-11 Mark Wielaard + + * configure.ac: Set version to 0.172. + * NEWS: Mention bug fixes. + +2018-06-01 Mark Wielaard + + * configure.ac: Set version to 0.171. + * NEWS: Mention DWARF5, split-dwarf and GNU DebugFission support. + +2018-03-17 Mark Wielaard + + * configure.ac (CHECK_FUNCS): Check for process_vm_readv. + +2018-02-09 Joshua Watt + + * configure.ac (HAVE_FALLTHROUGH): New define. + +2017-10-16 Mark Wielaard + + * .gitignore: Remove tests/md5-sha1-test. + +2017-08-18 Ulf Hermann + + * configure.ac: Check if the compiler supports + __attribute__((gcc_struct)). + +2017-09-19 Mark Wielaard + + * README: Add basic build instructions. + +2017-05-03 Ulf Hermann + + * configure.ac: Test if symbol versioning is supported. + +2017-04-27 Ulf Hermann + + * configure.ac: Check if the compiler supports + __attribute__((visibility(...))). + +2017-04-27 Ulf Hermann + + * configure.ac: Check if -fPIC, -fPIE, -Wl,-z,defs, + and -Wl,-z,relro are supported by the compiler. + +2017-08-02 Mark Wielaard + + * configure.ac: Set version to 0.170. + * NEWS: Mention new libdw dwarf_line_file function. + +2017-07-26 Mark Wielaard + + * NEWS: Mention dwarf_getmacros handling version 5 .debug_macro. + +2017-07-26 Mark Wielaard + + * NEWS: Mention dwarf_peel_type DWARF5 tags improvement. + +2017-07-26 Mark Wielaard + + * NEWS: Mention new DWARF5 calling conventions and defaulted member + function. + +2017-07-26 Mark Wielaard + + * NEWS: Mention new dwarf_default_lower_bound function. + +2017-07-25 Mark Wielaard + + * NEWS: Mention new DWARF5 attributes, tags, character encodings + and language codes in dwarf.h. + +2017-07-18 Mark Wielaard + + * configure.ac: Don't check for linux/bpf.h. + * NEWS: Mention always build bpf backend. + +2017-07-14 Mark Wielaard + + * NEWS: Add 0.170 section and new strip options. + +2017-05-05 Mark Wielaard + + * configure.ac: Set version to 0.169. Update copyright year. + * NEWS: Add 0.169 section. + +2017-04-21 Ulf Hermann + + * .gitignore: Add fillfile and peel_type tests. + 2017-02-15 Ulf Hermann * configure.ac: Add check for mempcpy. diff --git a/NEWS b/NEWS index fbb2c632..065e995c 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,88 @@ +Version 0.173 + +More fixes for crashes and hangs found by afl-fuzz. In particular various +functions now detect and break infinite loops caused by bad DIE tree cycles. + +readelf: Will now lookup the size and signedness of constant value types + to display them correctly (and not just how they were encoded). + +libdw: New function dwarf_next_lines to read CU-less .debug_line data. + dwarf_begin_elf now accepts ELF files containing just .debug_line + or .debug_frame sections (which can be read without needing a DIE + tree from the .debug_info section). + Removed dwarf_getscn_info, which was never implemented. + +backends: Handle BPF simple relocations. + The RISCV backends now handles ABI specific CFI and knows about + RISCV register types and names. + +Version 0.172 + +No functional changes compared to 0.171. + +Various bug fixes in libdw and eu-readelf dealing with bad DWARF5 data. +Thanks to running the afl fuzzer on eu-readelf and various testcases. + +eu-readelf -N is ~15% faster. + +Version 0.171 + +DWARF5 and split dwarf, including GNU DebugFission, are supported now. +Data can be read from the new DWARF sections .debug_addr, .debug_line_str, +.debug_loclists, .debug_str_offsets and .debug_rnglists. Plus the new +DWARF5 and GNU DebugFission encodings of the existing .debug sections. +Also in split DWARF .dwo (DWARF object) files. This support is mostly +handled by existing functions (dwarf_getlocation*, dwarf_getsrclines, +dwarf_ranges, dwarf_form*, etc.) now returning the data from the new +sections and data formats. But some new functions have been added +to more easily get information about skeleton and split compile units +(dwarf_get_units and dwarf_cu_info), handle new attribute data +(dwarf_getabbrevattr_data) and to keep references to Dwarf_Dies +that might come from different sections or files (dwarf_die_addr_die). + +Not yet supported are .dwp (Dwarf Package) and .sup (Dwarf Supplementary) +files, the .debug_names index, the .debug_cu_index and .debug_tu_index +sections. Only a single .debug_info (and .debug_types) section are +currently handled. + +readelf: Handle all new DWARF5 sections. + --debug-dump=info+ will show split unit DIEs when found. + --dwarf-skeleton can be used when inspecting a .dwo file. + Recognizes GNU locviews with --debug-dump=loc. + +libdw: New functions dwarf_die_addr_die, dwarf_get_units, + dwarf_getabbrevattr_data and dwarf_cu_info. + libdw will now try to resolve the alt file on first use of + an alt attribute FORM when not set yet with dwarf_set_alt. + dwarf_aggregate_size() now works with multi-dimensional arrays. + +libdwfl: Use process_vm_readv when available instead of ptrace. + +backends: Add a RISC-V backend. + +There were various improvements to build on Windows. +The sha1 and md5 implementations have been removed, they weren't used. + +Version 0.170 + +libdw: Added new DWARF5 attribute, tag, character encoding, language code, + calling convention, defaulted member function and macro constants + to dwarf.h. + New functions dwarf_default_lower_bound and dwarf_line_file. + dwarf_peel_type now handles DWARF5 immutable, packed and shared tags. + dwarf_getmacros now handles DWARF5 .debug_macro sections. + +strip: Add -R, --remove-section=SECTION and --keep-section=SECTION. + +backends: The bpf disassembler is now always build on all platforms. + +Version 0.169 + +backends: Add support for EM_PPC64 GNU_ATTRIBUTES. + Frame pointer unwinding fallback support for i386, x86_64, aarch64. + +translations: Update Polish translation. + Version 0.168 http://elfutils.org/ is now hosted at http://sourceware.org/elfutils/ diff --git a/README b/README index 9e55d75a..0e15bae6 100644 --- a/README +++ b/README @@ -5,11 +5,20 @@ The project home is http://elfutils.org/ Releases are published at ftp://sourceware.org/pub/elfutils/ Which can also be found at https://sourceware.org/elfutils/ftp/ +To build a release do: ./configure && make && make check +Please check the configure summary to make sure all recommended +features are enabled. There should be no failures after make check. + Please reports bugs at https://sourceware.org/bugzilla/ The current elfutils source code can be checked out with git clone git://sourceware.org/git/elfutils.git +To build a git checkout do: + autoreconf -i -f && \ + ./configure --enable-maintainer-mode && \ + make && make check + The developer mailinglist to send patches to is elfutils-devel@sourceware.org. https://sourceware.org/ml/elfutils-devel/ diff --git a/backends/ChangeLog b/backends/ChangeLog index 39390cb8..52149482 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,172 @@ +2018-07-21 Andreas Schwab + + * Makefile.am (m68k_SRCS): Add m68k_cfi.c and m68k_initreg.c. + * m68k_cfi.c: New file. + * m68k_initreg.c: New file. + * m68k_init.c (m68k_init): Hook abi_cfi and + set_initial_registers_tid. + +2018-07-19 Andreas Schwab + + * riscv_regs.c (riscv_register_info): Fix typo. + +2018-07-17 Andreas Schwab + + * Makefile.am (riscv_SRCS): Add riscv_corenote.c. + * riscv_corenote.c: New file. + * riscv_init.c (riscv_init): Hook core_note. + +2018-07-11 Andreas Schwab + + * Makefile.am (riscv_SRCS): Add riscv_initreg.c. + * riscv_initreg.c: New file. + * riscv_init.c (riscv_init): Hook set_initial_registers_tid. + +2018-06-16 Yonghong Song + + * Makefile.am (bpf_SRCS): Add bpf_symbol.c. + * bpf_init.c (bpf_init): Add reloc_simple_type HOOK. + * bpf_reloc.def: Add RELOC_TYPE 64_64 and 64_32. + * bpf_symbol.c: New file. + +2018-06-21 Mark Wielaard + + * bpf_reloc.def: Remove MAP_FD. + +2018-06-13 Andreas Schwab + + * Makefile.am (riscv_SRCS): Add riscv_cfi.c and riscv_regs.c. + * riscv_cfi.c: New file. + * riscv_regs.c: Likewise. + * riscv_init.c (riscv_init): Hook register_info and abi_cfi. + +2018-05-15 Andreas Schwab + + * riscv_init.c (riscv_init): Hook check_special_symbol. + * riscv_symbol.c (riscv_check_special_symbol): New function. + +2018-04-19 Andreas Schwab + + * Makefile.am (modules): Add riscv. + * riscv_init.c: New file. + * riscv_reloc.def: New file. + * riscv_symbol.c: New file. + +2018-04-11 Mark Wielaard + + * aarch64_cfi.c (aarch64_abi_cfi): Add rule for restoring SP from + CFA address. + +2018-02-15 Mark Wielaard + + * ppc_initreg.c: Include ptrace.h before system.h and sys/user.h. + +2018-02-09 Joshua Watt + + * aarch64_retval.c (aarch64_return_value_location): Use FALLTHROUGH + macro instead of comment. + * alpha_retval.c (alpha_return_value_location): Likewise. + * arm_regs.c (arm_register_info): Likewise. + * arm_retval.c (arm_return_value_location): Likewise. + * i386_regs.c (i386_register_info): Likewise. + * i386_retval.c (i386_return_value_location): Likewise. + * ia64_retval.c (ia64_return_value_location): Likewise. + * linux-core-note.c (core_note): Likewise. + * m68k_retval.c (m68k_return_value_location): Likewise. + * ppc64_retval.c (ppc64_return_value_location): Likewise. + * ppc_regs.c (ppc_register_info): Likewise. + * ppc_retval.c (ppc_return_value_location): Likewise. + * s390_retval.c (s390_return_value_location): Likewise. + * sh_retval.c (sh_return_value_location): Likewise. + * sparc_retval.c (sparc_return_value_location): Likewise. + * tilegx_retval.c (tilegx_return_value_location): Likewise. + * x86_64_regs.c (x86_64_register_info): Likewise. + * x86_64_retval.c (x86_64_return_value_location): Likewise. + +2017-10-24 Mark Wielaard + + * Makefile.am (m68k_corenote_no_Wpacked_not_aligned): New variable. + +2017-08-18 Ulf Hermann + + * linux-core-note.c: Use attribute_packed. + +2017-04-27 Ulf Hermann + + * Makefile.am: Use dso_LDFLAGS. + +2017-07-27 Mark Wielaard + + * sparc_reloc.def: GOTDATA_OP_HIX22, GOTDATA_OP_LOX10 and + GOTDATA_OP can be used in ET_REL files. + +2017-07-19 Gustavo Romero + + * ppc_corenote.c: Add offsets for ppc64 HTM SPRs: thfar, tfiar, + and texasr. + * ppc_regs.c: Add names for ppc64 HTM SPRs mappings. + +2017-07-20 Mark Wielaard + + * aarch64_init.c (aarch64_init): Hook data_marker_symbol. + * aarch64_symbol.c (aarch64_data_marker_symbol): New function. + * arm_init.c (arm_init): Hook data_marker_symbol. + * arm_symbol.c (aarch64_data_marker_symbol): New function. + +2017-07-18 Mark Wielaard + + * Makefile.am (cpu_bpf): Always define. + * bpf_init.c (disasm): Always hook. + * bpf_regs.c: Include bpf.h instead of linux/bpf.h. Don't define + MAX_BPF_REG. + +2017-02-17 Ulf Hermann + + * Makefile.am: Add libeu. + (libebl_%so): Link with --no-undefined,-z,defs,-z,relro + and libeu.a. + +2017-06-17 Mark Wielaard + + * s390_initreg.c: Swap sys/ptrace.h and asm/ptrace.h include order. + +2017-06-15 Andreas Schwab + + * ppc_symbol.c (ppc_machine_flag_check): New function. + * ppc_init.c (ppc_init): Hook it. + +2017-05-30 Mark Wielaard + + * ppc64_unwind.c: New file. + * ppc64_init.c (pcc64_init): Hook unwind. + * Makefile.am (ppc64_SRCS): Add ppc64_unwind.c + +2017-04-06 Mark Wielaard + + * i386_unwind.c: New file. + * i386_init.c: Hook i386_unwind. + * Makefile.am (i386_SRCS): Add i386_unwind.c + +2017-02-09 Ulf Hermann + + * aarch64_unwind.c: New file + * Makefile.am (aarch64_SRCS): Add aarch64_unwind.c + * aarch64_init.c (aarch64_init): Hook aarch64_unwind + +2017-02-09 Ulf Hermann + + * x86_64_unwind.c: New file + * Makefile.am (x86_64_SRCS): Add x86_64_unwind.c + * x86_64_init.c (x86_64_init): Hook x86_64_unwind + +2017-04-20 Ulf Hermann + + * aarch64_initreg.c: Compile register initialization only on linux. + * arm_initreg.c: Likewise. + * ppc_initreg.c: Likewise. + * s390_initreg.c: Likewise. + * x86_64_initreg.c: Likewise. + 2017-02-15 Mark Wielaard * ppc64_init.c (ppc64_init): Add check_object_attribute HOOK. diff --git a/backends/Makefile.am b/backends/Makefile.am index b553ec34..9d340425 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -33,22 +33,23 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \ - tilegx m68k bpf + tilegx m68k bpf riscv libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a \ libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a \ libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \ libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \ - libebl_m68k_pic.a libebl_bpf_pic.a + libebl_m68k_pic.a libebl_bpf_pic.a libebl_riscv_pic.a noinst_LIBRARIES = $(libebl_pic) noinst_DATA = $(libebl_pic:_pic.a=.so) libelf = ../libelf/libelf.so libdw = ../libdw/libdw.so +libeu = ../lib/libeu.a i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \ i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c \ - i386_initreg.c + i386_initreg.c i386_unwind.c cpu_i386 = ../libcpu/libcpu_i386.a libebl_i386_pic_a_SOURCES = $(i386_SRCS) am_libebl_i386_pic_a_OBJECTS = $(i386_SRCS:.c=.os) @@ -59,7 +60,7 @@ am_libebl_sh_pic_a_OBJECTS = $(sh_SRCS:.c=.os) x86_64_SRCS = x86_64_init.c x86_64_symbol.c x86_64_corenote.c x86_64_cfi.c \ x86_64_retval.c x86_64_regs.c i386_auxv.c x86_64_syscall.c \ - x86_64_initreg.c x32_corenote.c + x86_64_initreg.c x86_64_unwind.c x32_corenote.c cpu_x86_64 = ../libcpu/libcpu_x86_64.a libebl_x86_64_pic_a_SOURCES = $(x86_64_SRCS) am_libebl_x86_64_pic_a_OBJECTS = $(x86_64_SRCS:.c=.os) @@ -80,7 +81,7 @@ am_libebl_arm_pic_a_OBJECTS = $(arm_SRCS:.c=.os) aarch64_SRCS = aarch64_init.c aarch64_regs.c aarch64_symbol.c \ aarch64_corenote.c aarch64_retval.c aarch64_cfi.c \ - aarch64_initreg.c + aarch64_initreg.c aarch64_unwind.c libebl_aarch64_pic_a_SOURCES = $(aarch64_SRCS) am_libebl_aarch64_pic_a_OBJECTS = $(aarch64_SRCS:.c=.os) @@ -98,7 +99,7 @@ am_libebl_ppc_pic_a_OBJECTS = $(ppc_SRCS:.c=.os) ppc64_SRCS = ppc64_init.c ppc64_symbol.c ppc64_retval.c \ ppc64_corenote.c ppc_regs.c ppc_auxv.c ppc_attrs.c ppc_syscall.c \ - ppc_cfi.c ppc_initreg.c ppc64_resolve_sym.c + ppc_cfi.c ppc_initreg.c ppc64_unwind.c ppc64_resolve_sym.c libebl_ppc64_pic_a_SOURCES = $(ppc64_SRCS) am_libebl_ppc64_pic_a_OBJECTS = $(ppc64_SRCS:.c=.os) @@ -114,29 +115,36 @@ libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS) am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os) m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c \ - m68k_retval.c m68k_corenote.c + m68k_retval.c m68k_corenote.c m68k_cfi.c m68k_initreg.c libebl_m68k_pic_a_SOURCES = $(m68k_SRCS) am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os) -bpf_SRCS = bpf_init.c bpf_regs.c -# The disam hook depends on this if we have linux/bpf.h. -if HAVE_LINUX_BPF_H +# m68k prstatus core notes are described by a packed structure +# which has not naturally aligned fields. Since we don't access +# these fields directly, but take their offset to be used later +# to extract the data through elfxx_xlatetom/memmove, this isn't +# an issue. +m68k_corenote_no_Wpacked_not_aligned = yes + +bpf_SRCS = bpf_init.c bpf_regs.c bpf_symbol.c cpu_bpf = ../libcpu/libcpu_bpf.a -else -cpu_bpf = -endif libebl_bpf_pic_a_SOURCES = $(bpf_SRCS) am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os) +riscv_SRCS = riscv_init.c riscv_symbol.c riscv_cfi.c riscv_regs.c \ + riscv_initreg.c riscv_corenote.c +libebl_riscv_pic_a_SOURCES = $(riscv_SRCS) +am_libebl_riscv_pic_a_OBJECTS = $(riscv_SRCS:.c=.os) + -libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) +libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) $(libeu) @rm -f $(@:.so=.map) $(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ > $(@:.so=.map) - $(AM_V_CCLD)$(LINK) -shared -o $(@:.map=.so) \ + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $(@:.map=.so) \ -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ - -Wl,--version-script,$(@:.so=.map) \ - -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) + -Wl,--version-script,$(@:.so=.map),--no-undefined \ + -Wl,--as-needed $(libelf) $(libdw) $(libeu) @$(textrel_check) libebl_i386.so: $(cpu_i386) diff --git a/backends/aarch64_cfi.c b/backends/aarch64_cfi.c index acbb9b69..a5579ab1 100644 --- a/backends/aarch64_cfi.c +++ b/backends/aarch64_cfi.c @@ -1,5 +1,5 @@ -/* arm ABI-specified defaults for DWARF CFI. - Copyright (C) 2013 Red Hat, Inc. +/* arm64 ABI-specified defaults for DWARF CFI. + Copyright (C) 2013, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -62,6 +62,9 @@ aarch64_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info) /* The Frame Pointer (FP, r29) and Link Register (LR, r30). */ SV (29), SV (30), + /* The Stack Pointer (r31) is restored from CFA address by default. */ + DW_CFA_val_offset, ULEB128_7 (31), ULEB128_7 (0), + /* Callee-saved fpregs v8-v15. v0 == 64. */ SV (72), SV (73), SV (74), SV (75), SV (76), SV (77), SV (78), SV (79), diff --git a/backends/aarch64_init.c b/backends/aarch64_init.c index 6395f117..fad923fa 100644 --- a/backends/aarch64_init.c +++ b/backends/aarch64_init.c @@ -1,5 +1,5 @@ /* Initialization of AArch64 specific backend library. - Copyright (C) 2013 Red Hat, Inc. + Copyright (C) 2013, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -56,6 +56,7 @@ aarch64_init (Elf *elf __attribute__ ((unused)), HOOK (eh, reloc_simple_type); HOOK (eh, return_value_location); HOOK (eh, check_special_symbol); + HOOK (eh, data_marker_symbol); HOOK (eh, abi_cfi); /* X0-X30 (31 regs) + SP + 1 Reserved + ELR, 30 Reserved regs (34-43) @@ -63,6 +64,7 @@ aarch64_init (Elf *elf __attribute__ ((unused)), + ALT_FRAME_RETURN_COLUMN (used when LR isn't used) = 97 DWARF regs. */ eh->frame_nregs = 97; HOOK (eh, set_initial_registers_tid); + HOOK (eh, unwind); return MODVERSION; } diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c index 9706205e..daf6f375 100644 --- a/backends/aarch64_initreg.c +++ b/backends/aarch64_initreg.c @@ -32,7 +32,7 @@ #include "system.h" #include -#ifdef __aarch64__ +#if defined(__aarch64__) && defined(__linux__) # include # include # include @@ -51,7 +51,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), ebl_tid_registers_t *setfunc __attribute__ ((unused)), void *arg __attribute__ ((unused))) { -#ifndef __aarch64__ +#if !defined(__aarch64__) || !defined(__linux__) return false; #else /* __aarch64__ */ diff --git a/backends/aarch64_retval.c b/backends/aarch64_retval.c index 68de307e..1308340b 100644 --- a/backends/aarch64_retval.c +++ b/backends/aarch64_retval.c @@ -292,7 +292,7 @@ aarch64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) assert (count > 0); if (count <= 4) return pass_hfa (locp, base_size, count); - /* Fall through. */ + FALLTHROUGH; case 1: /* Not a HFA. */ diff --git a/backends/aarch64_symbol.c b/backends/aarch64_symbol.c index 76999e4b..da3382e9 100644 --- a/backends/aarch64_symbol.c +++ b/backends/aarch64_symbol.c @@ -1,5 +1,5 @@ /* AArch64 specific symbolic name handling. - Copyright (C) 2013, 2015 Red Hat, Inc. + Copyright (C) 2013, 2015, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -90,3 +90,15 @@ aarch64_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, return false; } + +/* A data mapping symbol is a symbol with "$d" name or "$d." name, + STT_NOTYPE, STB_LOCAL and st_size of zero. The indicate the stat of a + sequence of data items. */ +bool +aarch64_data_marker_symbol (const GElf_Sym *sym, const char *sname) +{ + return (sym != NULL && sname != NULL + && sym->st_size == 0 && GELF_ST_BIND (sym->st_info) == STB_LOCAL + && GELF_ST_TYPE (sym->st_info) == STT_NOTYPE + && (strcmp (sname, "$d") == 0 || strncmp (sname, "$d.", 3) == 0)); +} diff --git a/backends/aarch64_unwind.c b/backends/aarch64_unwind.c new file mode 100644 index 00000000..e0a7e96e --- /dev/null +++ b/backends/aarch64_unwind.c @@ -0,0 +1,83 @@ +/* Get previous frame state for an existing frame state. + Copyright (C) 2016 The Qt Company Ltd. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#define BACKEND aarch64_ +#define FP_REG 29 +#define LR_REG 30 +#define SP_REG 31 +#define FP_OFFSET 0 +#define LR_OFFSET 8 +#define SP_OFFSET 16 + +#include "libebl_CPU.h" + +/* There was no CFI. Maybe we happen to have a frame pointer and can unwind from that? */ + +bool +EBLHOOK(unwind) (Ebl *ebl __attribute__ ((unused)), Dwarf_Addr pc __attribute__ ((unused)), + ebl_tid_registers_t *setfunc, ebl_tid_registers_get_t *getfunc, + ebl_pid_memory_read_t *readfunc, void *arg, + bool *signal_framep __attribute__ ((unused))) +{ + Dwarf_Word fp, lr, sp; + + if (!getfunc(LR_REG, 1, &lr, arg)) + return false; + + if (lr == 0 || !setfunc(-1, 1, &lr, arg)) + return false; + + if (!getfunc(FP_REG, 1, &fp, arg)) + fp = 0; + + if (!getfunc(SP_REG, 1, &sp, arg)) + sp = 0; + + Dwarf_Word newLr, newFp, newSp; + + if (!readfunc(fp + LR_OFFSET, &newLr, arg)) + newLr = 0; + + if (!readfunc(fp + FP_OFFSET, &newFp, arg)) + newFp = 0; + + newSp = fp + SP_OFFSET; + + // These are not fatal if they don't work. They will just prevent unwinding at the next frame. + setfunc(LR_REG, 1, &newLr, arg); + setfunc(FP_REG, 1, &newFp, arg); + setfunc(SP_REG, 1, &newSp, arg); + + // If the fp is invalid, we might still have a valid lr. + // But if the fp is valid, then the stack should be moving in the right direction. + return fp == 0 || newSp > sp; +} diff --git a/backends/alpha_retval.c b/backends/alpha_retval.c index 53dbfa45..d9bae3bc 100644 --- a/backends/alpha_retval.c +++ b/backends/alpha_retval.c @@ -85,7 +85,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: @@ -131,7 +131,7 @@ alpha_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) } } - /* Else fall through. */ + FALLTHROUGH; case DW_TAG_structure_type: case DW_TAG_class_type: diff --git a/backends/arm_init.c b/backends/arm_init.c index caadac65..f2b1b11e 100644 --- a/backends/arm_init.c +++ b/backends/arm_init.c @@ -1,5 +1,5 @@ /* Initialization of Arm specific backend library. - Copyright (C) 2002, 2005, 2009, 2013, 2014, 2015 Red Hat, Inc. + Copyright (C) 2002, 2005, 2009, 2013, 2014, 2015, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -64,6 +64,7 @@ arm_init (Elf *elf __attribute__ ((unused)), HOOK (eh, abi_cfi); HOOK (eh, check_reloc_target_type); HOOK (eh, symbol_type_name); + HOOK (eh, data_marker_symbol); /* We only unwind the core integer registers. */ eh->frame_nregs = 16; diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c index a0a9be94..efcabaf6 100644 --- a/backends/arm_initreg.c +++ b/backends/arm_initreg.c @@ -30,6 +30,7 @@ # include #endif +#ifdef __linux__ #if defined __arm__ # include # include @@ -45,6 +46,7 @@ # define user_regs_struct user_pt_regs # endif #endif +#endif #define BACKEND arm_ #include "libebl_CPU.h" @@ -54,7 +56,7 @@ arm_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), ebl_tid_registers_t *setfunc __attribute__ ((unused)), void *arg __attribute__ ((unused))) { -#if !defined __arm__ && !defined __aarch64__ +#if !defined(__linux__) || (!defined __arm__ && !defined __aarch64__) return false; #else /* __arm__ || __aarch64__ */ #if defined __arm__ diff --git a/backends/arm_regs.c b/backends/arm_regs.c index 21c5ad3a..a46a4c99 100644 --- a/backends/arm_regs.c +++ b/backends/arm_regs.c @@ -77,7 +77,7 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)), case 16 + 0 ... 16 + 7: regno += 96 - 16; - /* Fall through. */ + FALLTHROUGH; case 96 + 0 ... 96 + 7: *setname = "FPA"; *type = DW_ATE_float; diff --git a/backends/arm_retval.c b/backends/arm_retval.c index 7aced742..1c28f016 100644 --- a/backends/arm_retval.c +++ b/backends/arm_retval.c @@ -82,7 +82,7 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c index da4a50a7..3edda724 100644 --- a/backends/arm_symbol.c +++ b/backends/arm_symbol.c @@ -1,5 +1,5 @@ /* Arm specific symbolic name handling. - Copyright (C) 2002-2009, 2014, 2015 Red Hat, Inc. + Copyright (C) 2002-2009, 2014, 2015, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -32,6 +32,7 @@ #include #include +#include #define BACKEND arm_ #include "libebl_CPU.h" @@ -142,3 +143,15 @@ arm_symbol_type_name (int type, } return NULL; } + +/* A data mapping symbol is a symbol with "$d" name or "$d." name, + * STT_NOTYPE, STB_LOCAL and st_size of zero. The indicate the stat of a + * sequence of data items. */ +bool +arm_data_marker_symbol (const GElf_Sym *sym, const char *sname) +{ + return (sym != NULL && sname != NULL + && sym->st_size == 0 && GELF_ST_BIND (sym->st_info) == STB_LOCAL + && GELF_ST_TYPE (sym->st_info) == STT_NOTYPE + && (strcmp (sname, "$d") == 0 || strncmp (sname, "$d.", 3) == 0)); +} diff --git a/backends/bpf_init.c b/backends/bpf_init.c index 22842e26..a046e069 100644 --- a/backends/bpf_init.c +++ b/backends/bpf_init.c @@ -52,9 +52,8 @@ bpf_init (Elf *elf __attribute__ ((unused)), eh->name = "BPF"; bpf_init_reloc (eh); HOOK (eh, register_info); -#ifdef HAVE_LINUX_BPF_H HOOK (eh, disasm); -#endif + HOOK (eh, reloc_simple_type); return MODVERSION; } diff --git a/backends/bpf_regs.c b/backends/bpf_regs.c index 180af83b..1863a164 100644 --- a/backends/bpf_regs.c +++ b/backends/bpf_regs.c @@ -32,11 +32,7 @@ #include #include -#ifdef HAVE_LINUX_BPF_H -#include -#else -#define MAX_BPF_REG 10 -#endif +#include "bpf.h" #define BACKEND bpf_ #include "libebl_CPU.h" diff --git a/backends/bpf_reloc.def b/backends/bpf_reloc.def index a410da97..59f519b5 100644 --- a/backends/bpf_reloc.def +++ b/backends/bpf_reloc.def @@ -28,4 +28,5 @@ /* NAME, REL|EXEC|DYN */ RELOC_TYPE (NONE, EXEC|DYN) -RELOC_TYPE (MAP_FD, REL|EXEC|DYN) +RELOC_TYPE (64_64, REL) +RELOC_TYPE (64_32, REL) diff --git a/backends/bpf_symbol.c b/backends/bpf_symbol.c new file mode 100644 index 00000000..c9856f26 --- /dev/null +++ b/backends/bpf_symbol.c @@ -0,0 +1,54 @@ +/* BPF specific symbolic name handling. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#define BACKEND bpf_ +#include "libebl_CPU.h" + + +/* Check for the simple reloc types. */ +Elf_Type +bpf_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +{ + switch (type) + { + case R_BPF_64_64: + return ELF_T_XWORD; + case R_BPF_64_32: + return ELF_T_WORD; + default: + return ELF_T_NUM; + } +} diff --git a/backends/i386_init.c b/backends/i386_init.c index 515d5ac0..fc1587a9 100644 --- a/backends/i386_init.c +++ b/backends/i386_init.c @@ -1,5 +1,5 @@ /* Initialization of i386 specific backend library. - Copyright (C) 2000-2009, 2013 Red Hat, Inc. + Copyright (C) 2000-2009, 2013, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -65,6 +65,7 @@ i386_init (Elf *elf __attribute__ ((unused)), /* gcc/config/ #define DWARF_FRAME_REGISTERS. For i386 it is 17, why? */ eh->frame_nregs = 9; HOOK (eh, set_initial_registers_tid); + HOOK (eh, unwind); return MODVERSION; } diff --git a/backends/i386_regs.c b/backends/i386_regs.c index fd963a62..7ec93bb9 100644 --- a/backends/i386_regs.c +++ b/backends/i386_regs.c @@ -92,7 +92,7 @@ i386_register_info (Ebl *ebl __attribute__ ((unused)), case 5: case 8: *type = DW_ATE_address; - /* Fallthrough */ + FALLTHROUGH; case 0 ... 3: case 6 ... 7: name[0] = 'e'; diff --git a/backends/i386_retval.c b/backends/i386_retval.c index 4aa646fe..32fec728 100644 --- a/backends/i386_retval.c +++ b/backends/i386_retval.c @@ -85,7 +85,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: @@ -123,7 +123,7 @@ i386_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) if (size <= 8) return nloc_intregpair; } - /* Fallthrough */ + FALLTHROUGH; case DW_TAG_structure_type: case DW_TAG_class_type: diff --git a/backends/i386_unwind.c b/backends/i386_unwind.c new file mode 100644 index 00000000..5c9a5de0 --- /dev/null +++ b/backends/i386_unwind.c @@ -0,0 +1,84 @@ +/* Get previous frame state for an existing frame state using frame pointers. + Copyright (C) 2017 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#define BACKEND i386_ +#include "libebl_CPU.h" + +/* Register numbers for frame and stack pointers. We take advantage of + them being next to each other when calling getfunc and setfunc. */ +#define ESP 4 +#define EBP (ESP + 1) + +/* Most basic frame pointer chasing with EBP as frame pointer. + PC = *(FP + 4), SP = FP + 8, FP = *FP. */ +bool +i386_unwind (Ebl *ebl __attribute__ ((unused)), + Dwarf_Addr pc __attribute__ ((unused)), + ebl_tid_registers_t *setfunc, ebl_tid_registers_get_t *getfunc, + ebl_pid_memory_read_t *readfunc, void *arg, + bool *signal_framep __attribute__ ((unused))) +{ + /* sp = 0, fp = 1 */ + Dwarf_Word regs[2]; + + /* Get current stack and frame pointers. */ + if (! getfunc (ESP, 2, regs, arg)) + return false; + + Dwarf_Word sp = regs[0]; + Dwarf_Word fp = regs[1]; + + /* Sanity check. We only support traditional stack frames. */ + if (fp == 0 || sp == 0 || fp < sp) + return false; + + /* Get the return address from the stack, it is our new pc. */ + Dwarf_Word ret_addr; + if (! readfunc (fp + 4, &ret_addr, arg) || ret_addr == 0) + return false; + + /* Get new sp and fp. Sanity check again. */ + sp = fp + 8; + if (! readfunc (fp, &fp, arg) || fp == 0 || sp >= fp) + return false; + + /* Set new sp, fp and pc. */ + regs[0] = sp; + regs[1] = fp; + if (! setfunc (ESP, 2, regs, arg) || ! setfunc (-1, 1, &ret_addr, arg)) + return false; + + return true; +} diff --git a/backends/ia64_retval.c b/backends/ia64_retval.c index dcd5f28d..03ea4d89 100644 --- a/backends/ia64_retval.c +++ b/backends/ia64_retval.c @@ -260,7 +260,7 @@ ia64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c index 67638d70..9faae4c3 100644 --- a/backends/linux-core-note.c +++ b/backends/linux-core-note.c @@ -111,7 +111,7 @@ struct EBLHOOK(prstatus) FIELD (INT, pr_fpvalid); } #ifdef ALIGN_PRSTATUS - __attribute__ ((packed, aligned (ALIGN_PRSTATUS))) + attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS))) #endif ; @@ -226,7 +226,7 @@ EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name, if (memcmp (name, "CORE", nhdr->n_namesz) == 0) break; /* Buggy old Linux kernels didn't terminate "LINUX". */ - /* Fall through. */ + FALLTHROUGH; case sizeof "LINUX": if (memcmp (name, "LINUX", nhdr->n_namesz) == 0) diff --git a/backends/m68k_cfi.c b/backends/m68k_cfi.c new file mode 100644 index 00000000..9303fb22 --- /dev/null +++ b/backends/m68k_cfi.c @@ -0,0 +1,58 @@ +/* m68k ABI-specified defaults for DWARF CFI. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#define BACKEND m68k_ +#include "libebl_CPU.h" + +int +m68k_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info) +{ + static const uint8_t abi_cfi[] = + { +#define SV(n) DW_CFA_same_value, ULEB128_7 (n) + /* Call-saved registers %d2-%d7, %a2-%a6. */ + SV (2), SV (3), SV (4), SV (5), SV (6), SV (7), + SV (10), SV (11), SV (12), SV (13), SV (14), + + /* The CFA is the SP. */ + DW_CFA_val_offset, ULEB128_7 (15), ULEB128_7 (0), + }; + + abi_info->initial_instructions = abi_cfi; + abi_info->initial_instructions_end = &abi_cfi[sizeof abi_cfi]; + abi_info->data_alignment_factor = -4; + + abi_info->return_address_register = 24; /* %pc */ + + return 0; +} diff --git a/backends/m68k_init.c b/backends/m68k_init.c index 943478fb..8cae710b 100644 --- a/backends/m68k_init.c +++ b/backends/m68k_init.c @@ -55,6 +55,10 @@ m68k_init (Elf *elf __attribute__ ((unused)), HOOK (eh, return_value_location); HOOK (eh, register_info); HOOK (eh, core_note); + HOOK (eh, abi_cfi); + /* gcc/config/ #define DWARF_FRAME_REGISTERS. */ + eh->frame_nregs = 25; + HOOK (eh, set_initial_registers_tid); return MODVERSION; } diff --git a/backends/m68k_initreg.c b/backends/m68k_initreg.c new file mode 100644 index 00000000..61f260f6 --- /dev/null +++ b/backends/m68k_initreg.c @@ -0,0 +1,82 @@ +/* Fetch live process registers from TID. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined __m68k__ && defined __linux__ +# include +# include +# include +#endif + +#define BACKEND m68k_ +#include "libebl_CPU.h" + +bool +m68k_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), + ebl_tid_registers_t *setfunc __attribute__ ((unused)), + void *arg __attribute__ ((unused))) +{ +#if !defined __m68k__ || !defined __linux__ + return false; +#else /* __m68k__ */ + struct user_regs_struct user_regs; + if (ptrace (PTRACE_GETREGS, tid, NULL, &user_regs) != 0) + return false; + + Dwarf_Word dwarf_regs[16]; + dwarf_regs[0] = user_regs.d0; + dwarf_regs[1] = user_regs.d1; + dwarf_regs[2] = user_regs.d2; + dwarf_regs[3] = user_regs.d3; + dwarf_regs[4] = user_regs.d4; + dwarf_regs[5] = user_regs.d5; + dwarf_regs[6] = user_regs.d6; + dwarf_regs[7] = user_regs.d7; + dwarf_regs[8] = user_regs.a0; + dwarf_regs[9] = user_regs.a1; + dwarf_regs[10] = user_regs.a2; + dwarf_regs[11] = user_regs.a3; + dwarf_regs[12] = user_regs.a4; + dwarf_regs[13] = user_regs.a5; + dwarf_regs[14] = user_regs.a6; + dwarf_regs[15] = user_regs.usp; + + /* D0..D7, A0..A7. */ + if (! setfunc (0, 16, dwarf_regs, arg)) + return false; + + /* PC. */ + dwarf_regs[0] = user_regs.pc; + if (! setfunc (24, 1, dwarf_regs, arg)) + return false; + + return true; +#endif /* __m68k__ */ +} diff --git a/backends/m68k_retval.c b/backends/m68k_retval.c index c68ed022..a653ba3a 100644 --- a/backends/m68k_retval.c +++ b/backends/m68k_retval.c @@ -92,7 +92,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: @@ -135,7 +135,7 @@ m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) if (size <= 8) return nloc_intregpair; } - /* Fallthrough */ + FALLTHROUGH; case DW_TAG_structure_type: case DW_TAG_class_type: case DW_TAG_union_type: diff --git a/backends/ppc64_init.c b/backends/ppc64_init.c index 11d3a77f..e5670338 100644 --- a/backends/ppc64_init.c +++ b/backends/ppc64_init.c @@ -73,6 +73,7 @@ ppc64_init (Elf *elf __attribute__ ((unused)), eh->frame_nregs = (114 - 1) + 32; HOOK (eh, set_initial_registers_tid); HOOK (eh, dwarf_to_regno); + HOOK (eh, unwind); HOOK (eh, resolve_sym_value); /* Find the function descriptor .opd table for resolve_sym_value. */ diff --git a/backends/ppc64_retval.c b/backends/ppc64_retval.c index a2519839..eb1c11ec 100644 --- a/backends/ppc64_retval.c +++ b/backends/ppc64_retval.c @@ -96,7 +96,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: @@ -141,7 +141,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) return nloc_intreg; } - /* Else fall through. */ + FALLTHROUGH; case DW_TAG_structure_type: case DW_TAG_class_type: case DW_TAG_union_type: @@ -161,7 +161,7 @@ ppc64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) return nloc_vmxreg; } } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_string_type: if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 8) diff --git a/backends/ppc64_unwind.c b/backends/ppc64_unwind.c new file mode 100644 index 00000000..4fa0b5a9 --- /dev/null +++ b/backends/ppc64_unwind.c @@ -0,0 +1,76 @@ +/* Get previous frame state for an existing frame state. + Copyright (C) 2017 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#define BACKEND ppc64_ + +#define LR_REG 65 /* Not 108, see ppc_dwarf_to_regno. */ +#define SP_REG 1 + +#define LR_OFFSET 16 + +#include "libebl_CPU.h" + +/* Simplistic fallback frame unwinder. SP points to the backchain (contains + address of previous stack pointer). At SP offset 16 is the LR save area + (contains the value of the previous LR). */ + +bool +EBLHOOK(unwind) (Ebl *ebl __attribute__ ((unused)), + Dwarf_Addr pc __attribute__ ((unused)), + ebl_tid_registers_t *setfunc, ebl_tid_registers_get_t *getfunc, + ebl_pid_memory_read_t *readfunc, void *arg, + bool *signal_framep __attribute__ ((unused))) +{ + Dwarf_Word sp, newSp, lr, newLr; + + /* Stack pointer points to the backchain which contains the previous sp. */ + if (! getfunc (SP_REG, 1, &sp, arg)) + sp = 0; + + /* Link register contains previous program counter. */ + if (! getfunc (LR_REG, 1, &lr, arg) + || lr == 0 + || ! setfunc (-1, 1, &lr, arg)) + return false; + + if (! readfunc(sp, &newSp, arg)) + newSp = 0; + + if (! readfunc(newSp + LR_OFFSET, &newLr, arg)) + newLr = 0; + + setfunc(SP_REG, 1, &newSp, arg); + setfunc(LR_REG, 1, &newLr, arg); + + /* Sanity check the stack grows down. */ + return newSp > sp; +} diff --git a/backends/ppc_corenote.c b/backends/ppc_corenote.c index 9ac88712..2b4ada7a 100644 --- a/backends/ppc_corenote.c +++ b/backends/ppc_corenote.c @@ -94,9 +94,20 @@ static const Ebl_Register_Location spe_regs[] = { .offset = 34 * 4, .regno = 612, .count = 1, .bits = 32 } }; +static const Ebl_Register_Location tm_spr_regs[] = + { + /* tfhar */ + { .offset = 0, .regno = 114, .count = 1, .bits = 64 }, + /* texasr */ + { .offset = 8, .regno = 116, .count = 1, .bits = 64 }, + /* tfiar */ + { .offset = 16, .regno = 115, .count = 1, .bits = 64 } + }; + #define EXTRA_NOTES \ EXTRA_REGSET (NT_PPC_VMX, 34 * 16, altivec_regs) \ - EXTRA_REGSET (NT_PPC_SPE, 35 * 4, spe_regs) + EXTRA_REGSET (NT_PPC_SPE, 35 * 4, spe_regs) \ + EXTRA_REGSET (NT_PPC_TM_SPR, 3 * 8, tm_spr_regs) #if BITS == 32 # define ULONG uint32_t diff --git a/backends/ppc_init.c b/backends/ppc_init.c index c3e3ca36..aea9f2d7 100644 --- a/backends/ppc_init.c +++ b/backends/ppc_init.c @@ -53,6 +53,7 @@ ppc_init (Elf *elf __attribute__ ((unused)), eh->name = "PowerPC"; ppc_init_reloc (eh); HOOK (eh, reloc_simple_type); + HOOK (eh, machine_flag_check); HOOK (eh, dynamic_tag_name); HOOK (eh, dynamic_tag_check); HOOK (eh, check_special_symbol); diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c index 64f53793..3e4432f6 100644 --- a/backends/ppc_initreg.c +++ b/backends/ppc_initreg.c @@ -30,13 +30,14 @@ # include #endif -#include "system.h" #include -#ifdef __powerpc__ -# include +#if defined(__powerpc__) && defined(__linux__) # include +# include #endif +#include "system.h" + #define BACKEND ppc_ #include "libebl_CPU.h" @@ -70,7 +71,7 @@ ppc_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), ebl_tid_registers_t *setfunc __attribute__ ((unused)), void *arg __attribute__ ((unused))) { -#ifndef __powerpc__ +#if !defined(__powerpc__) || !defined(__linux__) return false; #else /* __powerpc__ */ union diff --git a/backends/ppc_regs.c b/backends/ppc_regs.c index bcf4f7a3..43d2534f 100644 --- a/backends/ppc_regs.c +++ b/backends/ppc_regs.c @@ -140,7 +140,7 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)), case 100: if (*bits == 32) return stpcpy (name, "mq") + 1 - name; - /* Fallthrough */ + FALLTHROUGH; case 102 ... 107: name[0] = 's'; name[1] = 'p'; @@ -149,7 +149,15 @@ ppc_register_info (Ebl *ebl __attribute__ ((unused)), namelen = 4; break; - case 110 ... 117: + case 114: + return stpcpy (name, "tfhar") + 1 - name; + case 115: + return stpcpy (name, "tfiar") + 1 - name; + case 116: + return stpcpy (name, "texasr") + 1 - name; + + case 110 ... 113: + case 117: case 120 ... 121: case 123 ... 199: name[0] = 's'; diff --git a/backends/ppc_retval.c b/backends/ppc_retval.c index b14a99f1..39b42da1 100644 --- a/backends/ppc_retval.c +++ b/backends/ppc_retval.c @@ -108,7 +108,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: @@ -172,7 +172,7 @@ ppc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) return nloc_intregquad; } } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_structure_type: case DW_TAG_class_type: diff --git a/backends/ppc_symbol.c b/backends/ppc_symbol.c index 1273c1d2..4b32003a 100644 --- a/backends/ppc_symbol.c +++ b/backends/ppc_symbol.c @@ -57,6 +57,16 @@ ppc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) } +/* Check whether machine flags are valid. */ +bool +ppc_machine_flag_check (GElf_Word flags) +{ + return ((flags &~ (EF_PPC_EMB + | EF_PPC_RELOCATABLE + | EF_PPC_RELOCATABLE_LIB)) == 0); +} + + const char * ppc_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)), size_t len __attribute__ ((unused))) diff --git a/backends/riscv_cfi.c b/backends/riscv_cfi.c new file mode 100644 index 00000000..1a84a382 --- /dev/null +++ b/backends/riscv_cfi.c @@ -0,0 +1,75 @@ +/* RISC-V ABI-specified defaults for DWARF CFI. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#define BACKEND aarch64_ +#include "libebl_CPU.h" + + +int +riscv_abi_cfi (Ebl *ebl __attribute__ ((unused)), Dwarf_CIE *abi_info) +{ + static const uint8_t abi_cfi[] = + { + /* The initial Canonical Frame Address is the value of the + Stack Pointer (r2) as setup in the previous frame. */ + DW_CFA_def_cfa, ULEB128_7 (2), ULEB128_7 (0), + + /* The Stack Pointer (r2) is restored from CFA address by default. */ + DW_CFA_val_offset, ULEB128_7 (2), ULEB128_7 (0), + +#define SV(n) DW_CFA_same_value, ULEB128_7 (n) + /* The return address register contains the return address setup by + caller. */ + SV (1), + + /* Callee-saved registers s0-s11, fs0-fs11. */ + SV(8), SV (9), SV (18), SV (19), SV (20), SV (21), + SV (22), SV (23), SV (24), SV (25), SV (26), SV (27), + + SV (40), SV (41), SV (50), SV (51), SV (52), SV (53), + SV (54), SV (55), SV (56), SV (57), SV (58), SV (59), +#undef SV + + /* XXX Note: registers intentionally unused by the program, + for example as a consequence of the procedure call standard + should be initialized as if by DW_CFA_same_value. */ + }; + + abi_info->initial_instructions = abi_cfi; + abi_info->initial_instructions_end = &abi_cfi[sizeof abi_cfi]; + abi_info->data_alignment_factor = -4; + + abi_info->return_address_register = 1; /* ra. */ + + return 0; +} diff --git a/backends/riscv_corenote.c b/backends/riscv_corenote.c new file mode 100644 index 00000000..37cce7e3 --- /dev/null +++ b/backends/riscv_corenote.c @@ -0,0 +1,60 @@ +/* RISC-V specific core note handling. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include + +#define BACKEND riscv_ +#include "libebl_CPU.h" + +#define ULONG uint64_t +#define PID_T int32_t +#define UID_T uint32_t +#define GID_T uint32_t +#define ALIGN_ULONG 8 +#define ALIGN_PID_T 4 +#define ALIGN_UID_T 4 +#define ALIGN_GID_T 4 +#define TYPE_ULONG ELF_T_XWORD +#define TYPE_PID_T ELF_T_SWORD +#define TYPE_UID_T ELF_T_WORD +#define TYPE_GID_T ELF_T_WORD + +static const Ebl_Register_Location prstatus_regs[] = + { + { .offset = 1, .regno = 1, .count = 31, .bits = 64 } /* x1..x31 */ + }; +#define PRSTATUS_REGS_SIZE (32 * 8) + +#include "linux-core-note.c" diff --git a/backends/riscv_init.c b/backends/riscv_init.c new file mode 100644 index 00000000..8b7ce8b5 --- /dev/null +++ b/backends/riscv_init.c @@ -0,0 +1,64 @@ +/* Initialization of RISC-V specific backend library. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#define BACKEND riscv_ +#define RELOC_PREFIX R_RISCV_ +#include "libebl_CPU.h" + +/* This defines the common reloc hooks based on riscv_reloc.def. */ +#include "common-reloc.c" + + +const char * +riscv_init (Elf *elf __attribute__ ((unused)), + GElf_Half machine __attribute__ ((unused)), + Ebl *eh, + size_t ehlen) +{ + /* Check whether the Elf_BH object has a sufficent size. */ + if (ehlen < sizeof (Ebl)) + return NULL; + + /* We handle it. */ + eh->name = "RISC-V"; + riscv_init_reloc (eh); + HOOK (eh, reloc_simple_type); + HOOK (eh, register_info); + HOOK (eh, abi_cfi); + /* gcc/config/ #define DWARF_FRAME_REGISTERS. */ + eh->frame_nregs = 66; + HOOK (eh, check_special_symbol); + HOOK (eh, machine_flag_check); + HOOK (eh, set_initial_registers_tid); + HOOK (eh, core_note); + + return MODVERSION; +} diff --git a/backends/riscv_initreg.c b/backends/riscv_initreg.c new file mode 100644 index 00000000..e31a4dfd --- /dev/null +++ b/backends/riscv_initreg.c @@ -0,0 +1,77 @@ +/* Fetch live process registers from TID. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "system.h" +#include +#if defined __riscv && defined __linux__ +# include +# include +# include +#endif + +#define BACKEND riscv_ +#include "libebl_CPU.h" + +bool +riscv_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), + ebl_tid_registers_t *setfunc __attribute__ ((unused)), + void *arg __attribute__ ((unused))) +{ +#if !defined __riscv || !defined __linux__ + return false; +#else /* __riscv */ + + /* General registers. */ + elf_gregset_t gregs; + struct iovec iovec; + iovec.iov_base = &gregs; + iovec.iov_len = sizeof (gregs); + if (ptrace (PTRACE_GETREGSET, tid, NT_PRSTATUS, &iovec) != 0) + return false; + + /* X0 is constant 0. */ + Dwarf_Word zero = 0; + if (! setfunc (0, 1, &zero, arg)) + return false; + + /* X1..X31. */ + if (! setfunc (1, 32, (Dwarf_Word *) &gregs[1], arg)) + return false; + + /* PC. */ + if (! setfunc (-1, 1, (Dwarf_Word *) &gregs[0], arg)) + return false; + + /* FP registers not yet supported. */ + + return true; +#endif /* __riscv */ +} diff --git a/backends/riscv_regs.c b/backends/riscv_regs.c new file mode 100644 index 00000000..d5961ad5 --- /dev/null +++ b/backends/riscv_regs.c @@ -0,0 +1,177 @@ +/* Register names and numbers for RISC-V DWARF. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#define BACKEND riscv_ +#include "libebl_CPU.h" + +ssize_t +riscv_register_info (Ebl *ebl, int regno, char *name, size_t namelen, + const char **prefix, const char **setname, + int *bits, int *type) +{ + if (name == NULL) + return 64; + + *prefix = ""; + + if (regno < 32) + { + *setname = "integer"; + *type = DW_ATE_signed; + *bits = ebl->class == ELFCLASS64 ? 64 : 32; + } + else + { + *setname = "FPU"; + *type = DW_ATE_float; + *bits = 64; + } + + switch (regno) + { + case 0: + return stpcpy (name, "zero") + 1 - name; + + case 1: + *type = DW_ATE_address; + return stpcpy (name, "ra") + 1 - name; + + case 2: + *type = DW_ATE_address; + return stpcpy (name, "sp") + 1 - name; + + case 3: + *type = DW_ATE_address; + return stpcpy (name, "gp") + 1 - name; + + case 4: + *type = DW_ATE_address; + return stpcpy (name, "tp") + 1 - name; + + case 5 ... 7: + name[0] = 't'; + name[1] = regno - 5 + '0'; + namelen = 2; + break; + + case 8 ... 9: + name[0] = 's'; + name[1] = regno - 8 + '0'; + namelen = 2; + break; + + case 10 ... 17: + name[0] = 'a'; + name[1] = regno - 10 + '0'; + namelen = 2; + break; + + case 18 ... 25: + name[0] = 's'; + name[1] = regno - 18 + '2'; + namelen = 2; + break; + + case 26 ... 27: + name[0] = 's'; + name[1] = '1'; + name[2] = regno - 26 + '0'; + namelen = 3; + break; + + case 28 ... 31: + name[0] = 't'; + name[1] = regno - 28 + '3'; + namelen = 2; + break; + + case 32 ... 39: + name[0] = 'f'; + name[1] = 't'; + name[2] = regno - 32 + '0'; + namelen = 3; + break; + + case 40 ... 41: + name[0] = 'f'; + name[1] = 's'; + name[2] = regno - 40 + '0'; + namelen = 3; + break; + + case 42 ... 49: + name[0] = 'f'; + name[1] = 'a'; + name[2] = regno - 42 + '0'; + namelen = 3; + break; + + case 50 ... 57: + name[0] = 'f'; + name[1] = 's'; + name[2] = regno - 50 + '2'; + namelen = 3; + break; + + case 58 ... 59: + name[0] = 'f'; + name[1] = 's'; + name[2] = '1'; + name[3] = regno - 58 + '0'; + namelen = 4; + break; + + case 60 ... 61: + name[0] = 'f'; + name[1] = 't'; + name[2] = regno - 60 + '8'; + namelen = 3; + break; + + case 62 ... 63: + name[0] = 'f'; + name[1] = 't'; + name[2] = '1'; + name[3] = regno - 62 + '0'; + namelen = 4; + break; + + default: + *setname = NULL; + return 0; + } + + name[namelen++] = '\0'; + return namelen; +} diff --git a/backends/riscv_reloc.def b/backends/riscv_reloc.def new file mode 100644 index 00000000..2bd3513e --- /dev/null +++ b/backends/riscv_reloc.def @@ -0,0 +1,83 @@ +/* List the relocation types for RISC-V. -*- C -*- + 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 . */ + +/* NAME, REL|EXEC|DYN */ + +RELOC_TYPE (NONE, EXEC|DYN) +RELOC_TYPE (32, REL|EXEC|DYN) +RELOC_TYPE (64, REL|EXEC|DYN) +RELOC_TYPE (RELATIVE, EXEC|DYN) +RELOC_TYPE (COPY, EXEC|DYN) +RELOC_TYPE (JUMP_SLOT, EXEC|DYN) +RELOC_TYPE (TLS_DTPMOD32, EXEC|DYN) +RELOC_TYPE (TLS_DTPMOD64, EXEC|DYN) +RELOC_TYPE (TLS_DTPREL32, EXEC|DYN) +RELOC_TYPE (TLS_DTPREL64, EXEC|DYN) +RELOC_TYPE (TLS_TPREL32, EXEC|DYN) +RELOC_TYPE (TLS_TPREL64, EXEC|DYN) +RELOC_TYPE (BRANCH, REL) +RELOC_TYPE (JAL, REL) +RELOC_TYPE (CALL, REL) +RELOC_TYPE (CALL_PLT, REL) +RELOC_TYPE (GOT_HI20, REL) +RELOC_TYPE (TLS_GOT_HI20, REL) +RELOC_TYPE (TLS_GD_HI20, REL) +RELOC_TYPE (PCREL_HI20, REL) +RELOC_TYPE (PCREL_LO12_I, REL) +RELOC_TYPE (PCREL_LO12_S, REL) +RELOC_TYPE (HI20, REL) +RELOC_TYPE (LO12_I, REL) +RELOC_TYPE (LO12_S, REL) +RELOC_TYPE (TPREL_HI20, REL) +RELOC_TYPE (TPREL_LO12_I, REL) +RELOC_TYPE (TPREL_LO12_S, REL) +RELOC_TYPE (TPREL_ADD, REL) +RELOC_TYPE (ADD8, REL) +RELOC_TYPE (ADD16, REL) +RELOC_TYPE (ADD32, REL) +RELOC_TYPE (ADD64, REL) +RELOC_TYPE (SUB8, REL) +RELOC_TYPE (SUB16, REL) +RELOC_TYPE (SUB32, REL) +RELOC_TYPE (SUB64, REL) +RELOC_TYPE (GNU_VTINHERIT, REL) +RELOC_TYPE (GNU_VTENTRY, REL) +RELOC_TYPE (ALIGN, REL) +RELOC_TYPE (RVC_BRANCH, REL) +RELOC_TYPE (RVC_JUMP, REL) +RELOC_TYPE (RVC_LUI, REL) +RELOC_TYPE (GPREL_I, REL) +RELOC_TYPE (GPREL_S, REL) +RELOC_TYPE (TPREL_I, REL) +RELOC_TYPE (TPREL_S, REL) +RELOC_TYPE (RELAX, REL) +RELOC_TYPE (SUB6, REL) +RELOC_TYPE (SET6, REL) +RELOC_TYPE (SET8, REL) +RELOC_TYPE (SET16, REL) +RELOC_TYPE (SET32, REL) +RELOC_TYPE (32_PCREL, REL) diff --git a/backends/riscv_symbol.c b/backends/riscv_symbol.c new file mode 100644 index 00000000..dce8e358 --- /dev/null +++ b/backends/riscv_symbol.c @@ -0,0 +1,94 @@ +/* RISC-V specific symbolic name handling. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include + +#define BACKEND riscv_ +#include "libebl_CPU.h" + + +/* Check for the simple reloc types. */ +Elf_Type +riscv_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type) +{ + switch (type) + { + case R_RISCV_32: + return ELF_T_WORD; + case R_RISCV_64: + return ELF_T_XWORD; + default: + return ELF_T_NUM; + } +} + +/* Check whether machine flags are valid. */ +bool +riscv_machine_flag_check (GElf_Word flags) +{ + return ((flags &~ (EF_RISCV_RVC + | EF_RISCV_FLOAT_ABI)) == 0); +} + +/* Check whether given symbol's st_value and st_size are OK despite failing + normal checks. */ +bool +riscv_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, + const char *name, const GElf_Shdr *destshdr) +{ + if (name == NULL) + return false; + + const char *sname = elf_strptr (elf, ehdr->e_shstrndx, destshdr->sh_name); + if (sname == NULL) + return false; + + /* _GLOBAL_OFFSET_TABLE_ points to the start of the .got section, but it + is preceded by the .got.plt section in the output .got section. */ + if (strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0) + return (strcmp (sname, ".got") == 0 + && sym->st_value >= destshdr->sh_addr + && sym->st_value < destshdr->sh_addr + destshdr->sh_size); + + /* __global_pointer$ points to the .sdata section with an offset of + 0x800. It might however fall in the .got section, in which case we + cannot check the offset. The size always should be zero. */ + if (strcmp (name, "__global_pointer$") == 0) + return (((strcmp (sname, ".sdata") == 0 + && sym->st_value == destshdr->sh_addr + 0x800) + || strcmp (sname, ".got") == 0) + && sym->st_size == 0); + + return false; +} diff --git a/backends/s390_initreg.c b/backends/s390_initreg.c index b4c4b67c..23bf8edc 100644 --- a/backends/s390_initreg.c +++ b/backends/s390_initreg.c @@ -32,10 +32,10 @@ #include "system.h" #include -#ifdef __s390__ +#if defined(__s390__) && defined(__linux__) # include -# include # include +# include #endif #define BACKEND s390_ @@ -46,7 +46,7 @@ s390_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), ebl_tid_registers_t *setfunc __attribute__ ((unused)), void *arg __attribute__ ((unused))) { -#ifndef __s390__ +#if !defined(__s390__) || !defined(__linux__) return false; #else /* __s390__ */ struct user user_regs; diff --git a/backends/s390_retval.c b/backends/s390_retval.c index a927d46a..2043f985 100644 --- a/backends/s390_retval.c +++ b/backends/s390_retval.c @@ -87,7 +87,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: @@ -127,7 +127,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) return size <= asize ? nloc_intreg : nloc_intregpair; } } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_structure_type: case DW_TAG_class_type: diff --git a/backends/sh_retval.c b/backends/sh_retval.c index d44f2601..33d7d964 100644 --- a/backends/sh_retval.c +++ b/backends/sh_retval.c @@ -84,7 +84,7 @@ sh_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: diff --git a/backends/sparc_reloc.def b/backends/sparc_reloc.def index ce0b5556..7cd5ce96 100644 --- a/backends/sparc_reloc.def +++ b/backends/sparc_reloc.def @@ -110,9 +110,9 @@ RELOC_TYPE (TLS_TPOFF32, DYN) RELOC_TYPE (TLS_TPOFF64, DYN) RELOC_TYPE (GOTDATA_HIX22, REL) RELOC_TYPE (GOTDATA_LOX10, REL) -RELOC_TYPE (GOTDATA_OP_HIX22, DYN) -RELOC_TYPE (GOTDATA_OP_LOX10, DYN) -RELOC_TYPE (GOTDATA_OP, DYN) +RELOC_TYPE (GOTDATA_OP_HIX22, REL|DYN) +RELOC_TYPE (GOTDATA_OP_LOX10, REL|DYN) +RELOC_TYPE (GOTDATA_OP, REL|DYN) RELOC_TYPE (H34, REL) RELOC_TYPE (SIZE32, REL) RELOC_TYPE (SIZE64, REL) diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c index e1b17753..fb81cdce 100644 --- a/backends/sparc_retval.c +++ b/backends/sparc_retval.c @@ -91,7 +91,7 @@ sparc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: diff --git a/backends/tilegx_retval.c b/backends/tilegx_retval.c index db81a20b..7f7d24b0 100644 --- a/backends/tilegx_retval.c +++ b/backends/tilegx_retval.c @@ -79,7 +79,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: @@ -113,7 +113,7 @@ tilegx_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) return nloc_intreg; } - /* Else fall through. */ + FALLTHROUGH; case DW_TAG_structure_type: case DW_TAG_class_type: case DW_TAG_union_type: diff --git a/backends/x86_64_init.c b/backends/x86_64_init.c index cfd0158c..adfa4791 100644 --- a/backends/x86_64_init.c +++ b/backends/x86_64_init.c @@ -68,6 +68,7 @@ x86_64_init (Elf *elf __attribute__ ((unused)), /* gcc/config/ #define DWARF_FRAME_REGISTERS. */ eh->frame_nregs = 17; HOOK (eh, set_initial_registers_tid); + HOOK (eh, unwind); return MODVERSION; } diff --git a/backends/x86_64_initreg.c b/backends/x86_64_initreg.c index db9216ed..50e90020 100644 --- a/backends/x86_64_initreg.c +++ b/backends/x86_64_initreg.c @@ -31,7 +31,7 @@ #endif #include -#ifdef __x86_64__ +#if defined(__x86_64__) && defined(__linux__) # include # include #endif diff --git a/backends/x86_64_regs.c b/backends/x86_64_regs.c index 84304407..ef987daf 100644 --- a/backends/x86_64_regs.c +++ b/backends/x86_64_regs.c @@ -87,7 +87,7 @@ x86_64_register_info (Ebl *ebl __attribute__ ((unused)), case 6 ... 7: *type = DW_ATE_address; - /* Fallthrough */ + FALLTHROUGH; case 0 ... 5: name[0] = 'r'; name[1] = baseregs[regno][0]; diff --git a/backends/x86_64_retval.c b/backends/x86_64_retval.c index b3799ae0..f9114cb1 100644 --- a/backends/x86_64_retval.c +++ b/backends/x86_64_retval.c @@ -100,7 +100,7 @@ x86_64_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp) typedie = dwarf_formref_die (attr, &die_mem); tag = DWARF_TAG_OR_RETURN (typedie); } - /* Fall through. */ + FALLTHROUGH; case DW_TAG_base_type: case DW_TAG_enumeration_type: diff --git a/backends/x86_64_unwind.c b/backends/x86_64_unwind.c new file mode 100644 index 00000000..ade64c01 --- /dev/null +++ b/backends/x86_64_unwind.c @@ -0,0 +1,86 @@ +/* Get previous frame state for an existing frame state. + Copyright (C) 2016 The Qt Company Ltd. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#define BACKEND x86_64_ +#include "libebl_CPU.h" + +/* There was no CFI. Maybe we happen to have a frame pointer and can unwind from that? */ + +bool +x86_64_unwind (Ebl *ebl __attribute__ ((unused)), + Dwarf_Addr pc __attribute__ ((unused)), + ebl_tid_registers_t *setfunc, ebl_tid_registers_get_t *getfunc, + ebl_pid_memory_read_t *readfunc, void *arg, + bool *signal_framep __attribute__ ((unused))) +{ + // Register 6 is supposed to be rbp, thus the conventional frame pointer + const int fpReg = 6; + const int spReg = 7; + + Dwarf_Word fp; + if (!getfunc(fpReg, 1, &fp, arg) || fp == 0) + return false; + + // Try to read old sp, so that we can avoid infinite loops below + Dwarf_Word sp; + if (!getfunc(spReg, 1, &sp, arg)) + sp = 0; + + Dwarf_Word prev_fp; + if (!readfunc(fp, &prev_fp, arg)) + prev_fp = 0; + + Dwarf_Word ret; + if (!readfunc(fp + 8, &ret, arg)) + return false; + + if (!setfunc(fpReg, 1, &prev_fp, arg)) + return false; + + fp += 16; // Pop fp and return address and write result to sp + if (!setfunc(spReg, 1, &fp, arg)) + return false; + + if (!setfunc(-1, 1, &ret, arg)) + return false; + + // If the sp didn't move up we don't actually have a new stack + // frame but rather some random data that doesn't include frame + // pointers. Break the unwinding then. + if (sp >= fp) + return false; + + return true; +} diff --git a/config/ChangeLog b/config/ChangeLog index 8a39e982..f281eb27 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,40 @@ +2018-07-04 Mark Wielaard + + * upload-release.sh: New file. + +2018-06-11 Mark Wielaard + + * elfutils.spec.in: Update for 0.172. + +2018-06-01 Mark Wielaard + + * elfutils.spec.in: Update for 0.171. + +2018-02-09 Joshua Watt + + * eu.am (IMPLICIT_FALLTHROUGH_WARNING): Set to 5. + +2017-11-02 Mark Wielaard + + * elfutils.spec.in: Config files under /usr/lib/sysctl.d (_sysctldir) + aren't %config. + +2017-10-24 Mark Wielaard + + * eu.am (AM_CFLAGS): Handle -Wno-packed-not-aligned. + +2017-04-27 Ulf Hermann + + * eu.am: Use fpic_CFLAGS. + +2016-08-02 Mark Wielaard + + * elfutils.spec.in: Update for 0.170. + +2017-05-05 Mark Wielaard + + * elfutils.spec.in: Update for 0.169. + 2016-12-27 Mark Wielaard * elfutils.spec.in: Update for 0.168 and new project location. diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in index c9dd6248..b64cc287 100644 --- a/config/elfutils.spec.in +++ b/config/elfutils.spec.in @@ -224,9 +224,60 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libelf.a %files default-yama-scope -%config(noreplace) %{_sysctldir}/10-default-yama-scope.conf +%{_sysctldir}/10-default-yama-scope.conf %changelog +* Fri Jun 29 2018 Mark Wielaard,,, 0.173-1 +- More fixes for crashes and hangs found by afl-fuzz. In particular + various functions now detect and break infinite loops caused by bad + DIE tree cycles. +- readelf: Will now lookup the size and signedness of constant value + types to display them correctly (and not just how they were encoded). +- libdw: New function dwarf_next_lines to read CU-less .debug_line data. + dwarf_begin_elf now accepts ELF files containing just .debug_line + or .debug_frame sections (which can be read without needing a DIE + tree from the .debug_info section). + Removed dwarf_getscn_info, which was never implemented. +- backends: Handle BPF simple relocations. + The RISCV backends now handles ABI specific CFI and knows about + RISCV register types and names. + +* Mon Jun 11 2018 Mark Wielaard 0.172-1 +- No functional changes compared to 0.171. +- Various bug fixes in libdw and eu-readelf dealing with bad DWARF5 + data. Thanks to running the afl fuzzer on eu-readelf and various + testcases. +- eu-readelf -N is ~15% faster. + +* Fri Jun 01 2018 Mark Wielaard 0.171-1 +- DWARF5 and split dwarf, including GNU DebugFission, support. +- readelf: Handle all new DWARF5 sections. + --debug-dump=info+ will show split unit DIEs when found. + --dwarf-skeleton can be used when inspecting a .dwo file. + Recognizes GNU locviews with --debug-dump=loc. +- libdw: New functions dwarf_die_addr_die, dwarf_get_units, + dwarf_getabbrevattr_data and dwarf_cu_info. + libdw will now try to resolve the alt file on first use + when not set yet with dwarf_set_alt. + dwarf_aggregate_size() now works with multi-dimensional arrays. +- libdwfl: Use process_vm_readv when available instead of ptrace. +- backends: Add a RISC-V backend. + +* Wed Aug 2 2017 Mark Wielaard 0.170-1 +- libdw: Added new DWARF5 attribute, tag, character encoding, + language code, calling convention, defaulted member function + and macro constants to dwarf.h. + New functions dwarf_default_lower_bound and dwarf_line_file. + dwarf_peel_type now handles DWARF5 immutable, packed and shared tags. + dwarf_getmacros now handles DWARF5 .debug_macro sections. +- strip: Add -R, --remove-section=SECTION and --keep-section=SECTION. +- backends: The bpf disassembler is now always build on all platforms. + +* Fri May 5 2017 Mark Wielaard 0.169-1 +- backends: Add support for EM_PPC64 GNU_ATTRIBUTES. + Frame pointer unwinding fallback support for i386, x86_64, aarch64. +- translations: Update Polish translation. + * Tue Dec 27 2016 Mark Wielaard 0.168-1 - http://elfutils.org/ is now hosted at http://sourceware.org/elfutils/ - libelf: gelf_newehdr and gelf_newehdr now return void *. diff --git a/config/eu.am b/config/eu.am index 8fe1e259..c2cc349c 100644 --- a/config/eu.am +++ b/config/eu.am @@ -62,7 +62,9 @@ NULL_DEREFERENCE_WARNING= endif if HAVE_IMPLICIT_FALLTHROUGH_WARNING -IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough +# Use strict fallthrough. Only __attribute__((fallthrough)) will prevent the +# warning +IMPLICIT_FALLTHROUGH_WARNING=-Wimplicit-fallthrough=5 else IMPLICIT_FALLTHROUGH_WARNING= endif @@ -74,6 +76,7 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ $(if $($(*F)_no_Werror),,-Werror) \ $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \ + $(if $($(*F)_no_Wpacked_not_aligned),-Wno-packed-not-aligned,) \ $($(*F)_CFLAGS) COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) @@ -86,14 +89,14 @@ endif %.os: %.c %.o if AMDEP - $(AM_V_CC)if $(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) -MT $@ -MD -MP \ + $(AM_V_CC)if $(COMPILE.os) -c -o $@ $(fpic_CFLAGS) $(DEFS.os) -MT $@ -MD -MP \ -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ rm -f "$(DEPDIR)/$*.Tpo"; \ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ fi else - $(AM_V_CC)$(COMPILE.os) -c -o $@ -fPIC $(DEFS.os) $< + $(AM_V_CC)$(COMPILE.os) -c -o $@ $(fpic_CFLAGS) $(DEFS.os) $< endif CLEANFILES = *.gcno *.gcda diff --git a/config/upload-release.sh b/config/upload-release.sh new file mode 100755 index 00000000..320d1ada --- /dev/null +++ b/config/upload-release.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Any error is fatal +set -e + +# We take one arguent, the version (e.g. 0.173) +if [ $# -ne 1 ]; then + echo "$0 (e.g. 0.169)" + exit 1 +fi + +VERSION="$1" + +# Check we are in the build dir already configured. +ELFUTILS_VERSION=$(echo $VERSION | cut -f2 -d\.) +grep $ELFUTILS_VERSION version.h \ + || (echo "Must be run in configured build dir for $VERSION"; exit -1) + +make dist + +mkdir $VERSION +cp elfutils-$VERSION.tar.bz2 $VERSION/ +cd $VERSION/ +gpg -b elfutils-$VERSION.tar.bz2 +cd .. +scp -r $VERSION sourceware.org:/sourceware/ftp/pub/elfutils/ + +ssh sourceware.org "(cd /sourceware/ftp/pub/elfutils \ + && ln -sf $VERSION/elfutils-$VERSION.tar.bz2 elfutils-latest.tar.bz2 \ + && ln -sf $VERSION/elfutils-$VERSION.tar.bz2.sig elfutils-latest.tar.bz2.sig \ + && ls -lah elfutils-latest*)" diff --git a/configure.ac b/configure.ac index 3c35dac5..a3b29939 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Configure input file for elfutils. -*-autoconf-*- dnl -dnl Copyright (C) 1996-2016 Red Hat, Inc. +dnl Copyright (C) 1996-2018 Red Hat, Inc. dnl dnl This file is part of elfutils. dnl @@ -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 . -AC_INIT([elfutils],[0.168],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/]) +AC_INIT([elfutils],[0.173],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/]) dnl Workaround for older autoconf < 2.64 m4_ifndef([AC_PACKAGE_URL], @@ -41,7 +41,7 @@ fi AC_CONFIG_AUX_DIR([config]) AC_CONFIG_FILES([config/Makefile]) -AC_COPYRIGHT([Copyright (C) 1996-2016 The elfutils developers.]) +AC_COPYRIGHT([Copyright (C) 1996-2018 The elfutils developers.]) AC_PREREQ(2.63) dnl Minimum Autoconf version required. dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. @@ -127,13 +127,94 @@ CFLAGS="$old_CFLAGS"]) AS_IF([test "x$ac_cv_c99" != xyes], AC_MSG_ERROR([gcc with GNU99 support required])) +AC_CACHE_CHECK([whether gcc supports __attribute__((visibility()))], + ac_cv_visibility, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$save_CFLAGS -Werror" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl +int __attribute__((visibility("hidden"))) +foo (int a) +{ + return a; +}])], ac_cv_visibility=yes, ac_cv_visibility=no) +CFLAGS="$save_CFLAGS"]) +if test "$ac_cv_visibility" = "yes"; then + AC_DEFINE([HAVE_VISIBILITY], [1], + [Defined if __attribute__((visibility())) is supported]) +fi + +AC_CACHE_CHECK([whether gcc supports __attribute__((gcc_struct))], + ac_cv_gcc_struct, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$save_CFLAGS -Werror" +AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl +struct test { int x; } __attribute__((gcc_struct)); +])], ac_cv_gcc_struct=yes, ac_cv_gcc_struct=no) +CFLAGS="$save_CFLAGS"]) +if test "$ac_cv_gcc_struct" = "yes"; then + AC_DEFINE([HAVE_GCC_STRUCT], [1], + [Defined if __attribute__((gcc_struct)) is supported]) +fi + +AC_CACHE_CHECK([whether gcc supports -fPIC], ac_cv_fpic, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$save_CFLAGS -fPIC -Werror" +AC_COMPILE_IFELSE([AC_LANG_SOURCE()], ac_cv_fpic=yes, ac_cv_fpic=no) +CFLAGS="$save_CFLAGS" +]) +if test "$ac_cv_fpic" = "yes"; then + fpic_CFLAGS="-fPIC" +else + fpic_CFLAGS="" +fi +AC_SUBST([fpic_CFLAGS]) + +AC_CACHE_CHECK([whether gcc supports -fPIE], ac_cv_fpie, [dnl +save_CFLAGS="$CFLAGS" +CFLAGS="$save_CFLAGS -fPIE -Werror" +AC_COMPILE_IFELSE([AC_LANG_SOURCE()], ac_cv_fpie=yes, ac_cv_fpie=no) +CFLAGS="$save_CFLAGS" +]) +if test "$ac_cv_fpie" = "yes"; then + fpie_CFLAGS="-fPIE" +else + fpie_CFLAGS="" +fi +AC_SUBST([fpie_CFLAGS]) + +dso_LDFLAGS="-shared" + +ZDEFS_LDFLAGS="-Wl,-z,defs" +AC_CACHE_CHECK([whether gcc supports $ZDEFS_LDFLAGS], ac_cv_zdefs, [dnl +save_LDFLAGS="$LDFLAGS" +LDFLAGS="$ZDEFS_LDFLAGS $save_LDFLAGS" +AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_cv_zdefs=yes, ac_cv_zdefs=no) +LDFLAGS="$save_LDFLAGS" +]) +if test "$ac_cv_zdefs" = "yes"; then + dso_LDFLAGS="$dso_LDFLAGS $ZDEFS_LDFLAGS" +fi + +ZRELRO_LDFLAGS="-Wl,-z,relro" +AC_CACHE_CHECK([whether gcc supports $ZRELRO_LDFLAGS], ac_cv_zrelro, [dnl +save_LDFLAGS="$LDFLAGS" +LDFLAGS="$ZRELRO_LDFLAGS $save_LDFLAGS" +AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_cv_zrelro=yes, ac_cv_zrelro=no) +LDFLAGS="$save_LDFLAGS" +]) +if test "$ac_cv_zrelro" = "yes"; then + dso_LDFLAGS="$dso_LDFLAGS $ZRELRO_LDFLAGS" +fi + +AC_SUBST([dso_LDFLAGS]) + AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl # Use the same flags that we use for our DSOs, so the test is representative. # Some old compiler/linker/libc combinations fail some ways and not others. save_CFLAGS="$CFLAGS" save_LDFLAGS="$LDFLAGS" -CFLAGS="-fPIC $CFLAGS" -LDFLAGS="-shared -Wl,-z,defs,-z,relro $LDFLAGS" +CFLAGS="$fpic_CFLAGS $CFLAGS" +LDFLAGS="$dso_LDFLAGS $LDFLAGS" AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([[#include #undef __thread @@ -289,6 +370,8 @@ AC_CHECK_DECLS([mempcpy],[],[], [#define _GNU_SOURCE #include ]) +AC_CHECK_FUNCS([process_vm_readv]) + AC_CHECK_LIB([stdc++], [__cxa_demangle], [dnl AC_DEFINE([USE_DEMANGLE], [1], [Defined if demangling is enabled])]) AM_CONDITIONAL(DEMANGLE, test "x$ac_cv_lib_stdcpp___cxa_demangle" = "xyes") @@ -305,6 +388,21 @@ AS_IF([test "x$enable_textrelcheck" != "xno"], AC_ARG_ENABLE([symbol-versioning], AS_HELP_STRING([--disable-symbol-versioning], [Disable symbol versioning in shared objects])) + +AC_CACHE_CHECK([whether symbol versioning is supported], ac_cv_symbol_versioning, [dnl +AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl +#define NEW_VERSION(name, version) \ + asm (".symver " #name "," #name "@@@" #version); +int foo(int x) { return x + 1; } +NEW_VERSION (foo, ELFUTILS_12.12) +])], ac_cv_symbol_versioning=yes, ac_cv_symbol_versioning=no)]) +if test "$ac_cv_symbol_versioning" = "no"; then + if test "x$enable_symbol_versioning" != "xno"; then + AC_MSG_ERROR([Symbol versioning is not supported. + Use --disable-symbol-versioning to build without.]) + fi +fi + AM_CONDITIONAL(SYMBOL_VERSIONING, [test "x$enable_symbol_versioning" != "xno"]) AS_IF([test "x$enable_symbol_versioning" = "xno"], [AC_MSG_WARN([Disabling symbol versioning breaks ABI compatibility.]) @@ -360,6 +458,12 @@ CFLAGS="$old_CFLAGS"]) AM_CONDITIONAL(HAVE_IMPLICIT_FALLTHROUGH_WARNING, [test "x$ac_cv_implicit_fallthrough" != "xno"]) +# Assume the fallthrough attribute is supported if -Wimplict-fallthrough is supported +if test "$ac_cv_implicit_fallthrough" = "yes"; then + AC_DEFINE([HAVE_FALLTHROUGH], [1], + [Defined if __attribute__((fallthrough)) is supported]) +fi + dnl Check if we have argp available from our libc AC_LINK_IFELSE( [AC_LANG_PROGRAM( @@ -385,10 +489,6 @@ else fi AC_SUBST([argp_LDADD]) -dnl Check if we have for EM_BPF disassembly. -AC_CHECK_HEADERS(linux/bpf.h) -AM_CONDITIONAL(HAVE_LINUX_BPF_H, [test "x$ac_cv_header_linux_bpf_h" = "xyes"]) - dnl The directories with content. dnl Documentation. @@ -518,6 +618,10 @@ if test "x$enable_maintainer_mode" = xyes; then if test "$HAVE_BISON" = "no"; then AC_MSG_ERROR([bison needed in maintainer mode]) fi + AC_CHECK_PROG(HAVE_GAWK, gawk, yes, no) + if test "$HAVE_GAWK" = "no"; then + AC_MSG_ERROR([gawk needed in maintainer mode]) + fi else if test ! -f ${srcdir}/libdw/known-dwarf.h; then AC_MSG_ERROR([No libdw/known-dwarf.h. configure --enable-maintainer-mode]) diff --git a/lib/ChangeLog b/lib/ChangeLog index 84290f79..86a53d2c 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,52 @@ +2018-07-04 Ross Burton + + * color.c: Remove error.h, add system.h include. + * system.h: Add error.h include. + * xmalloc.c: Remove error.h include. + +2018-06-01 Mark Wielaard + + * printversion.c (print_version): Update copyright year. + +2018-02-09 Joshua Watt + + * eu-config.h (FALLTHROUGH): New macro. + +2017-10-16 Mark Wielaard + + * md5.{c,h}: Removed. + * sha1.{c,h}: Likewise. + * Makefile.am (libeu_a_SOURCES): Remove md5.c and sha1.c. + (noinst_HEADERS): Remove md5.h and sha1.h. + +2017-08-18 Ulf Hermann + + * eu-config.h: Define attribute_packed to either + __attribute__((packed)) or __attribute__((packed, gcc_struct)). + +2017-04-27 Ulf Hermann + + * eu-config.h: Define attribute_hidden to be empty if the compiler + doesn't support it. + +2017-04-27 Ulf Hermann + + * Makefile.am: Use fpic_CFLAGS. + +2017-07-18 Mark Wielaard + + * bpf.h: New file. + * Makefile.am (noinst_HEADERS): Add bpf.h + +2017-05-05 Mark Wielaard + + * printversion.c (print_version): Update copyright year. + +2017-04-20 Ulf Hermann + + * crc32.c: include config.h. + * system.h: Don't include config.h. + 2017-02-16 Ulf Hermann * Makefile.am (libeu_a_SOURCES): Remove version.c, add printversion.c diff --git a/lib/Makefile.am b/lib/Makefile.am index 7a65eb91..36d21a07 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -28,17 +28,17 @@ ## not, see . ## include $(top_srcdir)/config/eu.am -AM_CFLAGS += -fPIC +AM_CFLAGS += $(fpic_CFLAGS) AM_CPPFLAGS += -I$(srcdir)/../libelf noinst_LIBRARIES = libeu.a libeu_a_SOURCES = xstrdup.c xstrndup.c xmalloc.c next_prime.c \ - crc32.c crc32_file.c md5.c sha1.c \ + crc32.c crc32_file.c \ color.c printversion.c noinst_HEADERS = fixedsizehash.h libeu.h system.h dynamicsizehash.h list.h \ - md5.h sha1.h eu-config.h color.h printversion.h + eu-config.h color.h printversion.h bpf.h EXTRA_DIST = dynamicsizehash.c if !GPROF diff --git a/lib/bpf.h b/lib/bpf.h new file mode 100644 index 00000000..db80a51e --- /dev/null +++ b/lib/bpf.h @@ -0,0 +1,82 @@ +/* Minimal extended BPF constants as alternative for linux/bpf.h. */ + +#ifndef _ELFUTILS_BPF_H +#define _ELFUTILS_BPF_H 1 + +#include + +#define BPF_CLASS(code) ((code) & 0x07) + +#define BPF_LD 0x00 +#define BPF_LDX 0x01 +#define BPF_ST 0x02 +#define BPF_STX 0x03 +#define BPF_ALU 0x04 +#define BPF_JMP 0x05 +#define BPF_RET 0x06 +#define BPF_MISC 0x07 + +#define BPF_ALU64 0x07 + +#define BPF_JNE 0x50 +#define BPF_JSGT 0x60 +#define BPF_JSGE 0x70 +#define BPF_CALL 0x80 +#define BPF_EXIT 0x90 + +#define BPF_W 0x00 +#define BPF_H 0x08 +#define BPF_B 0x10 + +#define BPF_IMM 0x00 +#define BPF_ABS 0x20 +#define BPF_IND 0x40 +#define BPF_MEM 0x60 +#define BPF_LEN 0x80 +#define BPF_MSH 0xa0 + +#define BPF_DW 0x18 +#define BPF_XADD 0xc0 + +#define BPF_ADD 0x00 +#define BPF_SUB 0x10 +#define BPF_MUL 0x20 +#define BPF_DIV 0x30 +#define BPF_OR 0x40 +#define BPF_AND 0x50 +#define BPF_LSH 0x60 +#define BPF_RSH 0x70 +#define BPF_NEG 0x80 +#define BPF_MOD 0x90 +#define BPF_XOR 0xa0 + +#define BPF_MOV 0xb0 +#define BPF_ARSH 0xc0 + +#define BPF_JA 0x00 +#define BPF_JEQ 0x10 +#define BPF_JGT 0x20 +#define BPF_JGE 0x30 +#define BPF_JSET 0x40 + +#define BPF_K 0x00 +#define BPF_X 0x08 + +#define BPF_END 0xd0 +#define BPF_TO_LE 0x00 +#define BPF_TO_BE 0x08 + +#define BPF_PSEUDO_MAP_FD 1 + +#define MAX_BPF_REG 10 + +struct bpf_insn +{ + uint8_t code; + uint8_t dst_reg:4; + uint8_t src_reg:4; + int16_t off; + int32_t imm; +}; + +#endif diff --git a/lib/color.c b/lib/color.c index f62389d5..9ffbf55f 100644 --- a/lib/color.c +++ b/lib/color.c @@ -32,11 +32,11 @@ #endif #include -#include #include #include #include #include +#include "system.h" #include "libeu.h" #include "color.h" diff --git a/lib/crc32.c b/lib/crc32.c index 1a76b1b3..758602ea 100644 --- a/lib/crc32.c +++ b/lib/crc32.c @@ -25,6 +25,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#if HAVE_CONFIG_H +#include +#endif + #include #include "system.h" diff --git a/lib/eu-config.h b/lib/eu-config.h index 400cdc6e..84b22d7c 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -68,8 +68,20 @@ #define internal_strong_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((alias (#name))) internal_function; +#ifdef HAVE_VISIBILITY #define attribute_hidden \ __attribute__ ((visibility ("hidden"))) +#else +#define attribute_hidden /* empty */ +#endif + +#ifdef HAVE_GCC_STRUCT +#define attribute_packed \ + __attribute__ ((packed, gcc_struct)) +#else +#define attribute_packed \ + __attribute__ ((packed)) +#endif /* Define ALLOW_UNALIGNED if the architecture allows operations on unaligned memory locations. */ @@ -186,5 +198,12 @@ asm (".section predict_data, \"aw\"; .previous\n" # define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING" #endif +#ifndef FALLTHROUGH +# ifdef HAVE_FALLTHROUGH +# define FALLTHROUGH __attribute__ ((fallthrough)) +# else +# define FALLTHROUGH ((void) 0) +# endif +#endif #endif /* eu-config.h */ diff --git a/lib/md5.c b/lib/md5.c deleted file mode 100644 index 40f30449..00000000 --- a/lib/md5.c +++ /dev/null @@ -1,438 +0,0 @@ -/* Functions to compute MD5 message digest of files or memory blocks. - according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995-2011, 2015 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 1995. - - This file is free software; you can redistribute it and/or modify - it under the terms of either - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at - your option) any later version - - or - - * the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at - your option) any later version - - or both in parallel, as here. - - elfutils is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received copies of the GNU General Public License and - the GNU Lesser General Public License along with this program. If - not, see . */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include "md5.h" -#include "system.h" - -#define SWAP(n) LE32 (n) - -/* This array contains the bytes used to pad the buffer to the next - 64-byte boundary. (RFC 1321, 3.1: Step 1) */ -static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; - - -/* Initialize structure containing state of computation. - (RFC 1321, 3.3: Step 3) */ -void -md5_init_ctx (struct md5_ctx *ctx) -{ - ctx->A = 0x67452301; - ctx->B = 0xefcdab89; - ctx->C = 0x98badcfe; - ctx->D = 0x10325476; - - ctx->total[0] = ctx->total[1] = 0; - ctx->buflen = 0; -} - -/* Put result from CTX in first 16 bytes following RESBUF. The result - must be in little endian byte order. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) -{ - ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); - ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); - ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C); - ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D); - - return resbuf; -} - -static void -le64_copy (char *dest, uint64_t x) -{ - for (size_t i = 0; i < 8; ++i) - { - dest[i] = (uint8_t) x; - x >>= 8; - } -} - -/* Process the remaining bytes in the internal buffer and the usual - prolog according to the standard and write the result to RESBUF. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) -{ - /* Take yet unprocessed bytes into account. */ - md5_uint32 bytes = ctx->buflen; - size_t pad; - - /* Now count remaining bytes. */ - ctx->total[0] += bytes; - if (ctx->total[0] < bytes) - ++ctx->total[1]; - - pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; - memcpy (&ctx->buffer[bytes], fillbuf, pad); - - /* Put the 64-bit file length in *bits* at the end of the buffer. */ - const uint64_t bit_length = ((ctx->total[0] << 3) - + ((uint64_t) ((ctx->total[1] << 3) | - (ctx->total[0] >> 29)) << 32)); - le64_copy (&ctx->buffer[bytes + pad], bit_length); - - /* Process last bytes. */ - md5_process_block (ctx->buffer, bytes + pad + 8, ctx); - - return md5_read_ctx (ctx, resbuf); -} - - -#ifdef NEED_MD5_STREAM -/* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ -int -md5_stream (FILE *stream, void *resblock) -{ - /* Important: BLOCKSIZE must be a multiple of 64. */ -#define BLOCKSIZE 4096 - struct md5_ctx ctx; - char buffer[BLOCKSIZE + 72]; - size_t sum; - - /* Initialize the computation context. */ - md5_init_ctx (&ctx); - - /* Iterate over full file contents. */ - while (1) - { - /* We read the file in blocks of BLOCKSIZE bytes. One call of the - computation function processes the whole buffer so that with the - next round of the loop another block can be read. */ - size_t n; - sum = 0; - - /* Read block. Take care for partial reads. */ - do - { - n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); - - sum += n; - } - while (sum < BLOCKSIZE && n != 0); - if (n == 0 && ferror (stream)) - return 1; - - /* If end of file is reached, end the loop. */ - if (n == 0) - break; - - /* Process buffer with BLOCKSIZE bytes. Note that - BLOCKSIZE % 64 == 0 - */ - md5_process_block (buffer, BLOCKSIZE, &ctx); - } - - /* Add the last bytes if necessary. */ - if (sum > 0) - md5_process_bytes (buffer, sum, &ctx); - - /* Construct result in desired memory. */ - md5_finish_ctx (&ctx, resblock); - return 0; -} -#endif - - -#ifdef NEED_MD5_BUFFER -/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The - result is always in little endian byte order, so that a byte-wise - output yields to the wanted ASCII representation of the message - digest. */ -void * -md5_buffer (const char *buffer, size_t len, void *resblock) -{ - struct md5_ctx ctx; - - /* Initialize the computation context. */ - md5_init_ctx (&ctx); - - /* Process whole buffer but last len % 64 bytes. */ - md5_process_bytes (buffer, len, &ctx); - - /* Put result in desired memory area. */ - return md5_finish_ctx (&ctx, resblock); -} -#endif - - -void -md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) -{ - /* When we already have some bits in our internal buffer concatenate - both inputs first. */ - if (ctx->buflen != 0) - { - size_t left_over = ctx->buflen; - size_t add = 128 - left_over > len ? len : 128 - left_over; - - memcpy (&ctx->buffer[left_over], buffer, add); - ctx->buflen += add; - - if (ctx->buflen > 64) - { - md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx); - - ctx->buflen &= 63; - /* The regions in the following copy operation cannot overlap. */ - memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63], - ctx->buflen); - } - - buffer = (const char *) buffer + add; - len -= add; - } - - /* Process available complete blocks. */ - if (len >= 64) - { -#if !_STRING_ARCH_unaligned -/* To check alignment gcc has an appropriate operator. Other - compilers don't. */ -# if __GNUC__ >= 2 -# define UNALIGNED_P(p) (((md5_uintptr) p) % __alignof__ (md5_uint32) != 0) -# else -# define UNALIGNED_P(p) (((md5_uintptr) p) % sizeof (md5_uint32) != 0) -# endif - if (UNALIGNED_P (buffer)) - while (len > 64) - { - md5_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); - buffer = (const char *) buffer + 64; - len -= 64; - } - else -#endif - { - md5_process_block (buffer, len & ~63, ctx); - buffer = (const char *) buffer + (len & ~63); - len &= 63; - } - } - - /* Move remaining bytes in internal buffer. */ - if (len > 0) - { - size_t left_over = ctx->buflen; - - memcpy (&ctx->buffer[left_over], buffer, len); - left_over += len; - if (left_over >= 64) - { - md5_process_block (ctx->buffer, 64, ctx); - left_over -= 64; - memcpy (ctx->buffer, &ctx->buffer[64], left_over); - } - ctx->buflen = left_over; - } -} - - -/* These are the four functions used in the four steps of the MD5 algorithm - and defined in the RFC 1321. The first function is a little bit optimized - (as found in Colin Plumbs public domain implementation). */ -/* #define FF(b, c, d) ((b & c) | (~b & d)) */ -#define FF(b, c, d) (d ^ (b & (c ^ d))) -#define FG(b, c, d) FF (d, b, c) -#define FH(b, c, d) (b ^ c ^ d) -#define FI(b, c, d) (c ^ (b | ~d)) - -/* Process LEN bytes of BUFFER, accumulating context into CTX. - It is assumed that LEN % 64 == 0. */ - -void -md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) -{ - md5_uint32 correct_words[16]; - const md5_uint32 *words = buffer; - size_t nwords = len / sizeof (md5_uint32); - const md5_uint32 *endp = words + nwords; - md5_uint32 A = ctx->A; - md5_uint32 B = ctx->B; - md5_uint32 C = ctx->C; - md5_uint32 D = ctx->D; - - /* First increment the byte count. RFC 1321 specifies the possible - length of the file up to 2^64 bits. Here we only compute the - number of bytes. Do a double word increment. */ - ctx->total[0] += len; - if (ctx->total[0] < len) - ++ctx->total[1]; - - /* Process all bytes in the buffer with 64 bytes in each round of - the loop. */ - while (words < endp) - { - md5_uint32 *cwp = correct_words; - md5_uint32 A_save = A; - md5_uint32 B_save = B; - md5_uint32 C_save = C; - md5_uint32 D_save = D; - - /* First round: using the given function, the context and a constant - the next context is computed. Because the algorithms processing - unit is a 32-bit word and it is determined to work on words in - little endian byte order we perhaps have to change the byte order - before the computation. To reduce the work for the next steps - we store the swapped words in the array CORRECT_WORDS. */ - -#define OP(a, b, c, d, s, T) \ - do \ - { \ - a += FF (b, c, d) + (*cwp++ = SWAP (*words)) + T; \ - ++words; \ - CYCLIC (a, s); \ - a += b; \ - } \ - while (0) - - /* It is unfortunate that C does not provide an operator for - cyclic rotation. Hope the C compiler is smart enough. */ -#define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) - - /* Before we start, one word to the strange constants. - They are defined in RFC 1321 as - - T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64 - */ - - /* Round 1. */ - OP (A, B, C, D, 7, 0xd76aa478); - OP (D, A, B, C, 12, 0xe8c7b756); - OP (C, D, A, B, 17, 0x242070db); - OP (B, C, D, A, 22, 0xc1bdceee); - OP (A, B, C, D, 7, 0xf57c0faf); - OP (D, A, B, C, 12, 0x4787c62a); - OP (C, D, A, B, 17, 0xa8304613); - OP (B, C, D, A, 22, 0xfd469501); - OP (A, B, C, D, 7, 0x698098d8); - OP (D, A, B, C, 12, 0x8b44f7af); - OP (C, D, A, B, 17, 0xffff5bb1); - OP (B, C, D, A, 22, 0x895cd7be); - OP (A, B, C, D, 7, 0x6b901122); - OP (D, A, B, C, 12, 0xfd987193); - OP (C, D, A, B, 17, 0xa679438e); - OP (B, C, D, A, 22, 0x49b40821); - - /* For the second to fourth round we have the possibly swapped words - in CORRECT_WORDS. Redefine the macro to take an additional first - argument specifying the function to use. */ -#undef OP -#define OP(f, a, b, c, d, k, s, T) \ - do \ - { \ - a += f (b, c, d) + correct_words[k] + T; \ - CYCLIC (a, s); \ - a += b; \ - } \ - while (0) - - /* Round 2. */ - OP (FG, A, B, C, D, 1, 5, 0xf61e2562); - OP (FG, D, A, B, C, 6, 9, 0xc040b340); - OP (FG, C, D, A, B, 11, 14, 0x265e5a51); - OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); - OP (FG, A, B, C, D, 5, 5, 0xd62f105d); - OP (FG, D, A, B, C, 10, 9, 0x02441453); - OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); - OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); - OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); - OP (FG, D, A, B, C, 14, 9, 0xc33707d6); - OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); - OP (FG, B, C, D, A, 8, 20, 0x455a14ed); - OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); - OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); - OP (FG, C, D, A, B, 7, 14, 0x676f02d9); - OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); - - /* Round 3. */ - OP (FH, A, B, C, D, 5, 4, 0xfffa3942); - OP (FH, D, A, B, C, 8, 11, 0x8771f681); - OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); - OP (FH, B, C, D, A, 14, 23, 0xfde5380c); - OP (FH, A, B, C, D, 1, 4, 0xa4beea44); - OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); - OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); - OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); - OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); - OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); - OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); - OP (FH, B, C, D, A, 6, 23, 0x04881d05); - OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); - OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); - OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); - OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); - - /* Round 4. */ - OP (FI, A, B, C, D, 0, 6, 0xf4292244); - OP (FI, D, A, B, C, 7, 10, 0x432aff97); - OP (FI, C, D, A, B, 14, 15, 0xab9423a7); - OP (FI, B, C, D, A, 5, 21, 0xfc93a039); - OP (FI, A, B, C, D, 12, 6, 0x655b59c3); - OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); - OP (FI, C, D, A, B, 10, 15, 0xffeff47d); - OP (FI, B, C, D, A, 1, 21, 0x85845dd1); - OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); - OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); - OP (FI, C, D, A, B, 6, 15, 0xa3014314); - OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); - OP (FI, A, B, C, D, 4, 6, 0xf7537e82); - OP (FI, D, A, B, C, 11, 10, 0xbd3af235); - OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); - OP (FI, B, C, D, A, 9, 21, 0xeb86d391); - - /* Add the starting values of the context. */ - A += A_save; - B += B_save; - C += C_save; - D += D_save; - } - - /* Put checksum in context given as argument. */ - ctx->A = A; - ctx->B = B; - ctx->C = C; - ctx->D = D; -} diff --git a/lib/md5.h b/lib/md5.h deleted file mode 100644 index f2d0f306..00000000 --- a/lib/md5.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Declaration of functions and data types used for MD5 sum computing - library functions. - Copyright (C) 1995,1996,1997,1999-2001,2004,2005,2008 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 1995. - - 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 . */ - -#ifndef _MD5_H -#define _MD5_H 1 - -#include -#include -#include - -#define MD5_DIGEST_SIZE 16 -#define MD5_BLOCK_SIZE 64 - -typedef uint32_t md5_uint32; -typedef uintptr_t md5_uintptr; - -/* Structure to save state of computation between the single steps. */ -struct md5_ctx -{ - md5_uint32 A; - md5_uint32 B; - md5_uint32 C; - md5_uint32 D; - - md5_uint32 total[2]; - md5_uint32 buflen; - char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32)))); -}; - -/* - * The following three functions are build up the low level used in - * the functions `md5_stream' and `md5_buffer'. - */ - -/* Initialize structure containing state of computation. - (RFC 1321, 3.3: Step 3) */ -extern void md5_init_ctx (struct md5_ctx *ctx); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is necessary that LEN is a multiple of 64!!! */ -extern void md5_process_block (const void *buffer, size_t len, - struct md5_ctx *ctx); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is NOT required that LEN is a multiple of 64. */ -extern void md5_process_bytes (const void *buffer, size_t len, - struct md5_ctx *ctx); - -/* Process the remaining bytes in the buffer and put result from CTX - in first 16 bytes following RESBUF. The result is always in little - endian byte order, so that a byte-wise output yields to the wanted - ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *md5_finish_ctx (struct md5_ctx *ctx, void *resbuf); - - -/* Put result from CTX in first 16 bytes following RESBUF. The result is - always in little endian byte order, so that a byte-wise output yields - to the wanted ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *md5_read_ctx (const struct md5_ctx *ctx, void *resbuf); - - -/* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ -extern int md5_stream (FILE *stream, void *resblock); - -/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The - result is always in little endian byte order, so that a byte-wise - output yields to the wanted ASCII representation of the message - digest. */ -extern void *md5_buffer (const char *buffer, size_t len, void *resblock); - -#endif /* md5.h */ diff --git a/lib/printversion.c b/lib/printversion.c index 4056b938..17832f40 100644 --- a/lib/printversion.c +++ b/lib/printversion.c @@ -1,5 +1,5 @@ /* Common argp_print_version_hook for all tools. - Copyright (C) 2016 Red Hat, Inc. + Copyright (C) 2016, 2017, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -41,5 +41,5 @@ print_version (FILE *stream, struct argp_state *state) Copyright (C) %s The elfutils developers <%s>.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2016", PACKAGE_URL); +"), "2018", PACKAGE_URL); } diff --git a/lib/sha1.c b/lib/sha1.c deleted file mode 100644 index 6a9b61f8..00000000 --- a/lib/sha1.c +++ /dev/null @@ -1,380 +0,0 @@ -/* Functions to compute SHA1 message digest of files or memory blocks. - according to the definition of SHA1 in FIPS 180-1 from April 1997. - Copyright (C) 2008-2011, 2015 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2008. - - This file is free software; you can redistribute it and/or modify - it under the terms of either - - * the GNU Lesser General Public License as published by the Free - Software Foundation; either version 3 of the License, or (at - your option) any later version - - or - - * the GNU General Public License as published by the Free - Software Foundation; either version 2 of the License, or (at - your option) any later version - - or both in parallel, as here. - - elfutils is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received copies of the GNU General Public License and - the GNU Lesser General Public License along with this program. If - not, see . */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include "sha1.h" -#include "system.h" - -#define SWAP(n) BE32 (n) - -/* This array contains the bytes used to pad the buffer to the next - 64-byte boundary. */ -static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; - - -/* Initialize structure containing state of computation. */ -void -sha1_init_ctx (struct sha1_ctx *ctx) -{ - ctx->A = 0x67452301; - ctx->B = 0xefcdab89; - ctx->C = 0x98badcfe; - ctx->D = 0x10325476; - ctx->E = 0xc3d2e1f0; - - ctx->total[0] = ctx->total[1] = 0; - ctx->buflen = 0; -} - -/* Put result from CTX in first 20 bytes following RESBUF. The result - must be in little endian byte order. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf) -{ - ((sha1_uint32 *) resbuf)[0] = SWAP (ctx->A); - ((sha1_uint32 *) resbuf)[1] = SWAP (ctx->B); - ((sha1_uint32 *) resbuf)[2] = SWAP (ctx->C); - ((sha1_uint32 *) resbuf)[3] = SWAP (ctx->D); - ((sha1_uint32 *) resbuf)[4] = SWAP (ctx->E); - - return resbuf; -} - -static void -be64_copy (char *dest, uint64_t x) -{ - for (size_t i = 8; i-- > 0; x >>= 8) - dest[i] = (uint8_t) x; -} - -/* Process the remaining bytes in the internal buffer and the usual - prolog according to the standard and write the result to RESBUF. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf) -{ - /* Take yet unprocessed bytes into account. */ - sha1_uint32 bytes = ctx->buflen; - size_t pad; - - /* Now count remaining bytes. */ - ctx->total[0] += bytes; - if (ctx->total[0] < bytes) - ++ctx->total[1]; - - pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; - memcpy (&ctx->buffer[bytes], fillbuf, pad); - - /* Put the 64-bit file length in *bits* at the end of the buffer. */ - const uint64_t bit_length = ((ctx->total[0] << 3) - + ((uint64_t) ((ctx->total[1] << 3) | - (ctx->total[0] >> 29)) << 32)); - be64_copy (&ctx->buffer[bytes + pad], bit_length); - - /* Process last bytes. */ - sha1_process_block (ctx->buffer, bytes + pad + 8, ctx); - - return sha1_read_ctx (ctx, resbuf); -} - - -void -sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) -{ - /* When we already have some bits in our internal buffer concatenate - both inputs first. */ - if (ctx->buflen != 0) - { - size_t left_over = ctx->buflen; - size_t add = 128 - left_over > len ? len : 128 - left_over; - - memcpy (&ctx->buffer[left_over], buffer, add); - ctx->buflen += add; - - if (ctx->buflen > 64) - { - sha1_process_block (ctx->buffer, ctx->buflen & ~63, ctx); - - ctx->buflen &= 63; - /* The regions in the following copy operation cannot overlap. */ - memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63], - ctx->buflen); - } - - buffer = (const char *) buffer + add; - len -= add; - } - - /* Process available complete blocks. */ - if (len >= 64) - { -#if !_STRING_ARCH_unaligned -/* To check alignment gcc has an appropriate operator. Other - compilers don't. */ -# if __GNUC__ >= 2 -# define UNALIGNED_P(p) (((sha1_uintptr) p) % __alignof__ (sha1_uint32) != 0) -# else -# define UNALIGNED_P(p) (((sha1_uintptr) p) % sizeof (sha1_uint32) != 0) -# endif - if (UNALIGNED_P (buffer)) - while (len > 64) - { - sha1_process_block (memcpy (ctx->buffer, buffer, 64), 64, ctx); - buffer = (const char *) buffer + 64; - len -= 64; - } - else -#endif - { - sha1_process_block (buffer, len & ~63, ctx); - buffer = (const char *) buffer + (len & ~63); - len &= 63; - } - } - - /* Move remaining bytes in internal buffer. */ - if (len > 0) - { - size_t left_over = ctx->buflen; - - memcpy (&ctx->buffer[left_over], buffer, len); - left_over += len; - if (left_over >= 64) - { - sha1_process_block (ctx->buffer, 64, ctx); - left_over -= 64; - memcpy (ctx->buffer, &ctx->buffer[64], left_over); - } - ctx->buflen = left_over; - } -} - - -/* These are the four functions used in the four steps of the SHA1 algorithm - and defined in the FIPS 180-1. */ -/* #define FF(b, c, d) ((b & c) | (~b & d)) */ -#define FF(b, c, d) (d ^ (b & (c ^ d))) -#define FG(b, c, d) (b ^ c ^ d) -/* define FH(b, c, d) ((b & c) | (b & d) | (c & d)) */ -#define FH(b, c, d) (((b | c) & d) | (b & c)) - -/* It is unfortunate that C does not provide an operator for cyclic - rotation. Hope the C compiler is smart enough. */ -#define CYCLIC(w, s) (((w) << s) | ((w) >> (32 - s))) - -/* Magic constants. */ -#define K0 0x5a827999 -#define K1 0x6ed9eba1 -#define K2 0x8f1bbcdc -#define K3 0xca62c1d6 - - -/* Process LEN bytes of BUFFER, accumulating context into CTX. - It is assumed that LEN % 64 == 0. */ - -void -sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) -{ - sha1_uint32 computed_words[16]; -#define W(i) computed_words[(i) % 16] - const sha1_uint32 *words = buffer; - size_t nwords = len / sizeof (sha1_uint32); - const sha1_uint32 *endp = words + nwords; - sha1_uint32 A = ctx->A; - sha1_uint32 B = ctx->B; - sha1_uint32 C = ctx->C; - sha1_uint32 D = ctx->D; - sha1_uint32 E = ctx->E; - - /* First increment the byte count. FIPS 180-1 specifies the possible - length of the file up to 2^64 bits. Here we only compute the - number of bytes. Do a double word increment. */ - ctx->total[0] += len; - if (ctx->total[0] < len) - ++ctx->total[1]; - - /* Process all bytes in the buffer with 64 bytes in each round of - the loop. */ - while (words < endp) - { - sha1_uint32 A_save = A; - sha1_uint32 B_save = B; - sha1_uint32 C_save = C; - sha1_uint32 D_save = D; - sha1_uint32 E_save = E; - - /* First round: using the given function, the context and a constant - the next context is computed. Because the algorithms processing - unit is a 32-bit word and it is determined to work on words in - little endian byte order we perhaps have to change the byte order - before the computation. */ - -#define OP(i, a, b, c, d, e) \ - do \ - { \ - W (i) = SWAP (*words); \ - e = CYCLIC (a, 5) + FF (b, c, d) + e + W (i) + K0; \ - ++words; \ - b = CYCLIC (b, 30); \ - } \ - while (0) - - /* Steps 0 to 15. */ - OP (0, A, B, C, D, E); - OP (1, E, A, B, C, D); - OP (2, D, E, A, B, C); - OP (3, C, D, E, A, B); - OP (4, B, C, D, E, A); - OP (5, A, B, C, D, E); - OP (6, E, A, B, C, D); - OP (7, D, E, A, B, C); - OP (8, C, D, E, A, B); - OP (9, B, C, D, E, A); - OP (10, A, B, C, D, E); - OP (11, E, A, B, C, D); - OP (12, D, E, A, B, C); - OP (13, C, D, E, A, B); - OP (14, B, C, D, E, A); - OP (15, A, B, C, D, E); - - /* For the remaining 64 steps we have a more complicated - computation of the input data-derived values. Redefine the - macro to take an additional second argument specifying the - function to use and a new last parameter for the magic - constant. */ -#undef OP -#define OP(i, f, a, b, c, d, e, K) \ - do \ - { \ - W (i) = CYCLIC (W (i - 3) ^ W (i - 8) ^ W (i - 14) ^ W (i - 16), 1);\ - e = CYCLIC (a, 5) + f (b, c, d) + e + W (i) + K; \ - b = CYCLIC (b, 30); \ - } \ - while (0) - - /* Steps 16 to 19. */ - OP (16, FF, E, A, B, C, D, K0); - OP (17, FF, D, E, A, B, C, K0); - OP (18, FF, C, D, E, A, B, K0); - OP (19, FF, B, C, D, E, A, K0); - - /* Steps 20 to 39. */ - OP (20, FG, A, B, C, D, E, K1); - OP (21, FG, E, A, B, C, D, K1); - OP (22, FG, D, E, A, B, C, K1); - OP (23, FG, C, D, E, A, B, K1); - OP (24, FG, B, C, D, E, A, K1); - OP (25, FG, A, B, C, D, E, K1); - OP (26, FG, E, A, B, C, D, K1); - OP (27, FG, D, E, A, B, C, K1); - OP (28, FG, C, D, E, A, B, K1); - OP (29, FG, B, C, D, E, A, K1); - OP (30, FG, A, B, C, D, E, K1); - OP (31, FG, E, A, B, C, D, K1); - OP (32, FG, D, E, A, B, C, K1); - OP (33, FG, C, D, E, A, B, K1); - OP (34, FG, B, C, D, E, A, K1); - OP (35, FG, A, B, C, D, E, K1); - OP (36, FG, E, A, B, C, D, K1); - OP (37, FG, D, E, A, B, C, K1); - OP (38, FG, C, D, E, A, B, K1); - OP (39, FG, B, C, D, E, A, K1); - - /* Steps 40 to 59. */ - OP (40, FH, A, B, C, D, E, K2); - OP (41, FH, E, A, B, C, D, K2); - OP (42, FH, D, E, A, B, C, K2); - OP (43, FH, C, D, E, A, B, K2); - OP (44, FH, B, C, D, E, A, K2); - OP (45, FH, A, B, C, D, E, K2); - OP (46, FH, E, A, B, C, D, K2); - OP (47, FH, D, E, A, B, C, K2); - OP (48, FH, C, D, E, A, B, K2); - OP (49, FH, B, C, D, E, A, K2); - OP (50, FH, A, B, C, D, E, K2); - OP (51, FH, E, A, B, C, D, K2); - OP (52, FH, D, E, A, B, C, K2); - OP (53, FH, C, D, E, A, B, K2); - OP (54, FH, B, C, D, E, A, K2); - OP (55, FH, A, B, C, D, E, K2); - OP (56, FH, E, A, B, C, D, K2); - OP (57, FH, D, E, A, B, C, K2); - OP (58, FH, C, D, E, A, B, K2); - OP (59, FH, B, C, D, E, A, K2); - - /* Steps 60 to 79. */ - OP (60, FG, A, B, C, D, E, K3); - OP (61, FG, E, A, B, C, D, K3); - OP (62, FG, D, E, A, B, C, K3); - OP (63, FG, C, D, E, A, B, K3); - OP (64, FG, B, C, D, E, A, K3); - OP (65, FG, A, B, C, D, E, K3); - OP (66, FG, E, A, B, C, D, K3); - OP (67, FG, D, E, A, B, C, K3); - OP (68, FG, C, D, E, A, B, K3); - OP (69, FG, B, C, D, E, A, K3); - OP (70, FG, A, B, C, D, E, K3); - OP (71, FG, E, A, B, C, D, K3); - OP (72, FG, D, E, A, B, C, K3); - OP (73, FG, C, D, E, A, B, K3); - OP (74, FG, B, C, D, E, A, K3); - OP (75, FG, A, B, C, D, E, K3); - OP (76, FG, E, A, B, C, D, K3); - OP (77, FG, D, E, A, B, C, K3); - OP (78, FG, C, D, E, A, B, K3); - OP (79, FG, B, C, D, E, A, K3); - - /* Add the starting values of the context. */ - A += A_save; - B += B_save; - C += C_save; - D += D_save; - E += E_save; - } - - /* Put checksum in context given as argument. */ - ctx->A = A; - ctx->B = B; - ctx->C = C; - ctx->D = D; - ctx->E = E; -} diff --git a/lib/sha1.h b/lib/sha1.h deleted file mode 100644 index 05301c80..00000000 --- a/lib/sha1.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Declaration of functions and data types used for SHA1 sum computing - library functions. - Copyright (C) 2008 Red Hat, Inc. - This file is part of elfutils. - Written by Ulrich Drepper , 2008. - - 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 . */ - -#ifndef _SHA1_H -#define _SHA1_H 1 - -#include -#include -#include - -#define SHA1_DIGEST_SIZE 20 -#define SHA1_BLOCK_SIZE 64 - -typedef uint32_t sha1_uint32; -typedef uintptr_t sha1_uintptr; - -/* Structure to save state of computation between the single steps. */ -struct sha1_ctx -{ - sha1_uint32 A; - sha1_uint32 B; - sha1_uint32 C; - sha1_uint32 D; - sha1_uint32 E; - - sha1_uint32 total[2]; - sha1_uint32 buflen; - char buffer[128] __attribute__ ((__aligned__ (__alignof__ (sha1_uint32)))); -}; - -/* Initialize structure containing state of computation. */ -extern void sha1_init_ctx (struct sha1_ctx *ctx); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is necessary that LEN is a multiple of 64!!! */ -extern void sha1_process_block (const void *buffer, size_t len, - struct sha1_ctx *ctx); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is NOT required that LEN is a multiple of 64. */ -extern void sha1_process_bytes (const void *buffer, size_t len, - struct sha1_ctx *ctx); - -/* Process the remaining bytes in the buffer and put result from CTX - in first 20 bytes following RESBUF. The result is always in little - endian byte order, so that a byte-wise output yields to the wanted - ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf); - - -/* Put result from CTX in first 20 bytes following RESBUF. The result is - always in little endian byte order, so that a byte-wise output yields - to the wanted ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf); - -#endif /* sha1.h */ diff --git a/lib/system.h b/lib/system.h index 2d057025..292082bd 100644 --- a/lib/system.h +++ b/lib/system.h @@ -29,11 +29,8 @@ #ifndef LIB_SYSTEM_H #define LIB_SYSTEM_H 1 -#ifdef HAVE_CONFIG_H -# include -#endif - #include +#include #include #include #include diff --git a/lib/xmalloc.c b/lib/xmalloc.c index 0cde384f..0424afc8 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -30,7 +30,6 @@ # include #endif -#include #include #include #include diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 16568422..2efd85fa 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,30 @@ +2018-07-04 Ross Burton + + * asm_end.c: Remove error.h include. + * asm_newscn.c: Likewise. + * i386_gendis.c: Likewise and add system.h include. + * i386_lex.l: Likewise. + * i386_parse.y: Likewise. + +2017-02-27 Ulf Hermann + + * Makefile.am: Use dso_LDFLAGS. + +2017-02-17 Ulf Hermann + + * Makefile.am: Add libasm_so_DEPS to specify external libraries + that have to be linked in, and libasm_so_LIBS to specify the + archives libasm consists of. The dependencies include libeu.a. + (libasm_so_LDLIBS): Add $(libasm_so_DEPS). + (libasm_so$(EXEEXT): Use $(libasm_so_LIBS), + add --no-undefined,-z,defs,-z,relro, + drop the manual enumeration of dependencies, + specify the correct path for libasm.map. + +2017-04-27 Ulf Hermann + + * asm_end.c (binary_end): Fix nesting of braces. + 2017-02-12 Mark Wielaard * asm_newsym.c (asm_newsym): Increase TEMPSYMLEN to 13. diff --git a/libasm/Makefile.am b/libasm/Makefile.am index 8094b05c..19fef508 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -55,17 +55,19 @@ libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \ libasm_pic_a_SOURCES = am_libasm_pic_a_OBJECTS = $(libasm_a_SOURCES:.c=.os) -libasm_so_LDLIBS = +libasm_so_DEPS = ../lib/libeu.a ../libebl/libebl.a ../libelf/libelf.so ../libdw/libdw.so +libasm_so_LDLIBS = $(libasm_so_DEPS) if USE_LOCKS libasm_so_LDLIBS += -lpthread endif +libasm_so_LIBS = libasm_pic.a libasm_so_SOURCES = -libasm.so$(EXEEXT): libasm_pic.a libasm.map - $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ - -Wl,--version-script,$(srcdir)/libasm.map,--no-undefined \ +libasm.so$(EXEEXT): $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS) + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ -Wl,--soname,$@.$(VERSION) \ - ../libebl/libebl.a ../libelf/libelf.so ../libdw/libdw.so \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(libasm_so_LIBS) -Wl,--no-whole-archive \ $(libasm_so_LDLIBS) @$(textrel_check) $(AM_V_at)ln -fs $@ $@.$(VERSION) diff --git a/libasm/asm_end.c b/libasm/asm_end.c index 191a535a..5aab8dfa 100644 --- a/libasm/asm_end.c +++ b/libasm/asm_end.c @@ -32,7 +32,6 @@ #endif #include -#include #include #include #include @@ -464,7 +463,7 @@ binary_end (AsmCtx_t *ctx) gelf_update_ehdr (ctx->out.elf, ehdr); /* Write out the ELF file. */ - if (unlikely (elf_update (ctx->out.elf, ELF_C_WRITE_MMAP)) < 0) + if (unlikely (elf_update (ctx->out.elf, ELF_C_WRITE_MMAP) < 0)) { __libasm_seterrno (ASM_E_LIBELF); result = -1; diff --git a/libasm/asm_newscn.c b/libasm/asm_newscn.c index ddbb25df..7cdf484f 100644 --- a/libasm/asm_newscn.c +++ b/libasm/asm_newscn.c @@ -32,7 +32,6 @@ #endif #include -#include #include #include #include diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index 79110c22..86d29478 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -1,3 +1,30 @@ +2018-02-09 Joshua Watt + + * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of + comment. + +2017-08-18 Ulf Hermann + + * memory-access.h: Use attribute_packed. + +2017-02-27 Ulf Hermann + + * Makefile.am: Use fpic_CFLAGS. + +2017-07-18 Mark Wielaard + + * Makefile.am: Don't check HAVE_LINUX_BPF_H, just define libcpu_bpf. + * bpf_disasm.c: Include bpf.h instead of linux/bpf.h. Don't define + BPF_PSEUDO_MAP_FD. + +2017-04-20 Ulf Hermann + + * Makefile.am: Add EXEEXT to gendis. + +2017-04-20 Ulf Hermann + + * i386_parse.y: Eliminate comparison_fn_t. + 2016-11-02 Mark Wielaard * i386_disasm.c (i386_disasm): Add fallthrough comment. diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am index b98b5838..4c8778d1 100644 --- a/libcpu/Makefile.am +++ b/libcpu/Makefile.am @@ -30,7 +30,7 @@ include $(top_srcdir)/config/eu.am AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libasm -AM_CFLAGS += -fPIC -fdollars-in-identifiers +AM_CFLAGS += $(fpic_CFLAGS) -fdollars-in-identifiers LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$( $@T @@ -58,10 +56,10 @@ endif if MAINTAINER_MODE noinst_HEADERS = memory-access.h i386_parse.h i386_data.h -noinst_PROGRAMS = i386_gendis +noinst_PROGRAMS = i386_gendis$(EXEEXT) -$(srcdir)/%_dis.h: %_defs i386_gendis - $(AM_V_GEN)./i386_gendis $< > $@T +$(srcdir)/%_dis.h: %_defs i386_gendis$(EXEEXT) + $(AM_V_GEN)./i386_gendis$(EXEEXT) $< > $@T $(AM_V_at)mv -f $@T $@ else diff --git a/libcpu/bpf_disasm.c b/libcpu/bpf_disasm.c index e4bbae4a..054aba2b 100644 --- a/libcpu/bpf_disasm.c +++ b/libcpu/bpf_disasm.c @@ -35,16 +35,11 @@ #include #include #include -#include +#include "bpf.h" #include "../libelf/common.h" #include "../libebl/libeblP.h" -/* BPF_PSEUDO_MAP_FD was only introduced in linux 3.20. */ -#ifndef BPF_PSEUDO_MAP_FD - #define BPF_PSEUDO_MAP_FD 1 -#endif - static const char class_string[8][8] = { [BPF_LD] = "ld", [BPF_LDX] = "ldx", diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c index 831afbe2..a7e03f95 100644 --- a/libcpu/i386_disasm.c +++ b/libcpu/i386_disasm.c @@ -819,7 +819,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)), ++param_start; break; } - /* Fallthrough */ + FALLTHROUGH; default: assert (! "INVALID not handled"); } diff --git a/libcpu/i386_gendis.c b/libcpu/i386_gendis.c index aae5eae6..37d2ecd6 100644 --- a/libcpu/i386_gendis.c +++ b/libcpu/i386_gendis.c @@ -31,12 +31,11 @@ # include #endif -#include #include #include #include #include - +#include "system.h" extern int i386_parse (void); diff --git a/libcpu/i386_lex.l b/libcpu/i386_lex.l index ef1b53b6..a4705aa9 100644 --- a/libcpu/i386_lex.l +++ b/libcpu/i386_lex.l @@ -31,10 +31,10 @@ #endif #include -#include #include #include +#include "system.h" #include "i386_parse.h" diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y index 15a72b1f..910d5458 100644 --- a/libcpu/i386_parse.y +++ b/libcpu/i386_parse.y @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -309,10 +308,10 @@ instr: bytes ':' bitfieldopt kID bitfieldopt optargs newp->mnemonic = $4; if (newp->mnemonic != (void *) -1l && tfind ($4, &mnemonics, - (comparison_fn_t) strcmp) == NULL) + (int (*)(const void *, const void *)) strcmp) == NULL) { if (tsearch ($4, &mnemonics, - (comparison_fn_t) strcmp) == NULL) + (int (*)(const void *, const void *)) strcmp) == NULL) error (EXIT_FAILURE, errno, "tsearch"); ++nmnemonics; } diff --git a/libcpu/memory-access.h b/libcpu/memory-access.h index 44210e2f..779825fa 100644 --- a/libcpu/memory-access.h +++ b/libcpu/memory-access.h @@ -90,7 +90,7 @@ union unaligned int16_t s2; int32_t s4; int64_t s8; - } __attribute__ ((packed)); + } attribute_packed; static inline uint16_t read_2ubyte_unaligned (const void *p) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 978b9913..7cb25923 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,834 @@ +2018-08-18 Mark Wielaard + + * dwarf_getabbrev.c (__libdw_getabbrev): Continue until both name + and form are zero. + * dwarf_hasattr.c (dwarf_hasattr): Stop when both name and form + are zero. + +2018-08-18 Mark Wielaard + + * dwarf_getaranges.c (dwarf_getaranges.c): Make sure there is enough + data to read the address and segment size. + +2018-07-04 Ross Burton + + * libdw_alloc.c: Remove error.h include. + +2018-06-28 Mark Wielaard + + * dwarf_next_cfi.c (dwarf_next_cfi): Check whether length is zero. + +2018-06-27 Mark Wielaard + + * dwarf_begin_elf.c (check_section): Allow a single .debug_frame + section. + +2018-06-26 Mark Wielaard + + * libdw.h (dwarf_getscn_info): Remove. + * libdw.map (ELFUTILS_0.122): Remove dwarf_getscn_info. + +2018-06-25 Mark Wielaard + + * Makefile.am (libdw_a_SOURCES): Add dwarf_next_lines.c. + * libdw.h (dwarf_next_lines): New function declaration. + * libdw.map (ELFUTILS_0.173): New section. + * dwarf_next_lines.c: New files. + * dwarf_begin_elf.c (check_section): Don't error out when elf + decompression fails. + (valid_p): Allow just a single .debug_line section. + * dwarf_getsrclines.c (read_srclines): Keep files relative if comp_dir + is missing. + +2018-06-22 Mark Wielaard + + * dwarf_nextcu.c (__libdw_next_unit): Set next_off to -1 when it would + wrap around. + +2018-06-18 Mark Wielaard + + * dwarf_aggregate_size.c (array_size): New depth argument. Use + aggregate_size instead of dwarf_aggregate_size and pass depth. + (aggregate_size): New depth argument. Check depth isn't bigger + than MAX_DEPTH (256). Pass depth to recursive calls. + (dwarf_aggregate_size): ass zero as depth to aggregate_size. + +2018-06-18 Mark Wielaard + + * dwarf_peel_type.c (dwarf_peel_type): Limit modifier chain to 64. + +2018-06-18 Mark Wielaard + + * dwarf_aggregate_size.c (aggregate_size): Check die is not NULL. + +2018-06-17 Luiz Angelo Daros de Luca + + * dwarf_getsrclines.c (read_srclines): Intialize filelist early. + +2018-06-15 Mark Wielaard + + * dwarf_getlocation.c (check_constant_offset): Clarify DW_FORM_data16 + isn't really a constant. + (dwarf_getlocation): Don't handle DW_FORM_data16 as block. + (dwarf_getlocation_addr): Likewise. + (dwarf_getlocations): Likewise. + +2018-06-12 Mark Wielaard + + * memory-access.h (read_3ubyte_unaligned_inc): New define. + +2018-06-12 Mark Wielaard + + * libdw.h (__libdw_dieabbrev): Set die->abbrev to DWARF_END_ABBREV + on failure. + +2018-06-10 Mark Wielaard + + * dwarf_attr_integrate.c (dwarf_attr_integrate): Stop after 16 DIE + ref chains. + * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise. + +2018-06-08 Mark Wielaard + + * dwarf_getabbrev.c (dwarf_getabbrev): Check die and offset. + +2018-06-08 Mark Wielaard + + * dwarf_get_units.c (dwarf_get_units): Handle existing error, no + dwarf. + +2018-06-08 Mark Wielaard + + * dwarf_getlocation.c (store_implicit_value): Return error when + seeing bad DWARF or when tsearch runs out of memory. + (__libdw_intern_expression): Report error when store_implicit_value + reported an error. + +2018-06-08 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Sanity check ndirs and nfiles. + +2018-06-08 Mark Wielaard + + * dwarf_getlocation_attr.c (addr_valp): Set error and return NULL + when there is no .debug_addr section. + (dwarf_getlocation_attr): If addr_valp returns NULL, then return -1. + +2018-06-07 Mark Wielaard + + * libdw_findcu.c (__libdw_intern_next_unit): Report DWARF_E_VERSION, + not DWARF_E_INVALID_DWARF on unknown version. Set address_size and + offset_size to 8 when unknown. + +2018-06-06 Mark Wielaard + + * libdwP.h (__libdw_dieabbrev): Check DIE addr falls in cu. + +2018-06-06 Mark Wielaard + + * dwarf_getlocation_die.c (dwarf_getlocation_die): Check offset + falls inside cu data. + +2018-06-05 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Explicitly set diridx to -1 + in case dwarf_formudata fails. + +2018-06-05 Mark Wielaard + + * dwarf_getaranges (dwarf_getaranges): Free new_arange if + __libdw_findcu fails. + +2018-06-05 Mark Wielaard + + * dwarf_getsrclines.c (read_srclines): Define dirarray early and + check whether or not it is equal to dirstack on exit/out before + cleanup. + +2018-06-05 Mark Wielaard + + * dwarf_getalt.c (find_debug_altlink): id_path array should be 2 + larger to contain MAX_BUILD_ID_BYTES. + +2018-05-31 Mark Wielaard + + * libdw_find_split_unit.c (try_split_file): New function extracted + from... + (__libdw_find_split_unit): ... here. Try both the relative and + absolute paths to find a .dwo file. + +2018-05-30 Mark Wielaard + + * libdw/dwarf_getsrclines.c (read_srclines): Change ndir and + ndirlist to size_t. Add check to see ndirlist doesn't overflow. + +2018-05-31 Mark Wielaard + + * dwarf_dieoffset.c: Check die->cu != NULL. Return -1, not ~0ul + on failure. + +2018-05-29 Mark Wielaard + + * dwarf_cuoffset.c (dwarf_cuoffset): Check die->cu is not NULL. + * dwarf_die_addr_die.c (dwarf_die_addr_die): Also search split + Dwarfs. + * libdwP.h (struct Dwarf): Add split_tree field. + (__libdw_find_split_dbg_addr): New internal function definition. + (__libdw_finddbg_cb): Likewise. + * libdw_find_split_unit.c (__libdw_find_split_unit): Insert split + Dwarf into skeleton dbg split_tree. + * libdw_findcu.c (__libdw_finddbg_cb): New function. + (__libdw_find_split_dbg_addr): Likewise. + * dwarf_end (dwarf_end): Destroy split_tree. + +2018-05-29 Mark Wielaard + + * dwarf.h: Add GNU DebugFission list entry encodings + DW_LLE_GNU_end_of_list_entry, + DW_LLE_GNU_base_address_selection_entry, + DW_LLE_GNU_start_end_entry and DW_LLE_GNU_start_length_entry. + * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle + GNU DebugFission list entries. + +2018-05-28 Mark Wielaard + + * libdw_find_split_unit.c (__libdw_find_split_unit): End split_dwarf + only after we tried every unit id in it. + +2018-04-07 Mark Wielaard + + * libdwP.h (struct Dwarf_CU): Add locs_base. + (__libdw_cu_locs_base): New static inline function. + * libdw_findcu.c (__libdw_intern_next_unit): Initialize locs_base. + * dwarf_begin_elf.c (valid_p): Create fake_loclists_cu if necessary. + * dwarf_end.c (dwarf_end): Clean up fake_loclists_cu. + * dwarf_getlocation.c (initial_offset): Handle .debug_loclists. + (getlocations_addr): Likewise. + (dwarf_getlocation_addr): Likewise. + * dwarf_getlocation_attr.c (attr_form_cu): Use fake_loclists_cu for + DWARF5. + (initial_offset): Handle DW_FORM_loclistx. + * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Handle + .debug_loclists. + * libdwP.h (struct Dwarf): Add fake_loclists_cu. + +2018-04-12 Mark Wielaard + + * dwarf.h: Add DWARF5 location list entry DW_LLE encodings. + * begin_elf.c (dwarf_scnnames): Add IDX_debug_loclists. + * dwarf_error.c (errmsgs): Remove DWARF_E_NO_LOCLIST. And replace + with DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and + DWARF_E_NO_LOC_VALUE. + * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_loclists_base + and DW_FORM_loclistx. + * dwarf_getlocation.c (attr_ok): Use DWARF_E_NO_LOC_VALUE. + (initial_offset): Use DWARF_E_NO_DEBUG_LOC. + * libdwP.h: Add IDX_debug_rnglists. Remove DWARF_E_NO_LOCLIST. + Add DWARF_E_NO_DEBUG_LOC, DWARF_E_NO_DEBUG_LOCLISTS and + DWARF_E_NO_LOC_VALUE. + +2018-05-25 Mark Wielaard + + * libdw_find_split_unit.c (__libdw_find_split_unit): Extract linking + skeleton and split compile units code into... + * libdwP (__libdw_link_skel_split): ...this new function. + +2018-04-06 Mark Wielaard + + * dwarf_formaddr.c (__libdw_addrx): New function, extracted from... + (dwarf_formaddr): here. Use __libdw_addrx. + * dwarf_getlocation.c (getlocations_addr): Pass cu to + __libdw_read_begin_end_pair_inc. + * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Take cu as + argument. Handle .debug_rnglists. + (initial_offset): Handle .debug_rnglists and DW_FORM_rnglistx. + (dwarf_ranges): Likewise. Check cu isn't NULL before use. Pass cu to + __libdw_read_begin_end_pair_inc. + * libdwP.h (__libdw_read_begin_end_pair_inc): Take cu as argument. + (__libdw_cu_ranges_base): Handle DW_AT_rnglists_base. + (__libdw_addrx): New function definition. + +2018-04-11 Mark Wielaard + + * dwarf.h: Add DWARF5 range list entry DW_RLE encodings. + * begin_elf.c (dwarf_scnnames): Add IDX_debug_rnglists. + * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_RNGLISTS. + * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_rnglists_base + and DW_FORM_rnglistx. + * dwarf_getscopes.c (pc_match): Also check for + DWARF_E_NO_DEBUG_RNGLISTS. + * libdwP.h: Add IDX_debug_rnglists. + +2018-05-25 Mark Wielaard + + * dwarf_getlocation_attr.c (__libdw_cu_addr_base): Cast offset to + uintptr_t before returning as pointer. + +2018-05-22 Mark Wielaard + + * dwarf_getlocation.c (__libdw_cu_base_address): Treat errors of + getting lowpc or entrypc the same as missing base address (zero). + * dwarf_highpc (dwarf_highpc): Handle any address form. Always set + error when attribute could not be found. + +2018-05-21 Mark Wielaard + + * dwarf_begin_elf.c (valid_p): Add a fake_addr_cu to the result. + * dwarf_end.c (cu_free): Disconnect the fake_addr_cu from the split + dwarf if shared with skeleton. + (dwarf_end): release fake_addr_cu. + * dwarf_formaddr.c (__libdw_cu_addr_base): Move to... + * libdwP.h (__libdw_cu_addr_base): ... here. + (struct Dwarf): Add fake_addr_cu field. + * dwarf_formudata.c (dwarf_formudata): Handle + DW_FORM_GNU_addr_index and DW_FORM_addrx[1234]. + * dwarf_getlocation_attr.c (addr_valp): New static function. + (dwarf_getlocation_attr): Create attribute for values of + DW_OP_GNU_const_index, DW_OP_constx and DW_OP_GNU_addr_index and + DW_OP_addrx. + * libdw_find_split_unit.c (__libdw_find_split_unit): Connect + IDX_debug_addr sectiondata and fake_addr_cu between split and + skeleton. + +2018-05-20 Mark Wielaard + + * dwarf_cu_info.c: New file. + * Makefile.am (libdw_a_SOURCES): Add dwarf_cu_info.c. + * libdw.h (dwarf_cu_info): New function declaration. + * libdw.map (ELFUTILS_0.171): Add dwarf_cu_info. + +2018-05-24 Mark Wielaard + + * dwarf_ranges.c (dwarf_ranges): Check for NULL cu. + * libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base. + +2018-05-18 Mark Wielaard + + * dwarf_formudata.c (__libdw_formptr): Handle the special case + of IDX_debug_ranges for DW_UT_split_compile with version < 5. + * dwarf_highpc.c (dwarf_highpc): Use dwarf_lowpc, check for + split compile cudie. + * dwarf_lowpc.c (dwarf_lowpc): Check for split compile cudie. + * dwarf_ranges.c (dwarf_ranges): Switch cu and sectiondata for + split compile units. + * libdwP.h (struct Dwarf_CU): Add ranges_base field. + (__libdw_cu_ranges_base): New static inline function. + +2018-05-18 Mark Wielaard + + * libdw_findcu.c (__libdw_intern_next_unit): Init files to NULL. + * dwarf_getsrclines.c (dwarf_getsrclines): Handle split units by + taking the line table from the skeleton. + * dwarf_getsrcfiles.c (dwarf_getsrcfiles): Handle split units by + only taking the files from .debug_line offset zero (if it exists), + otherwise fall back to the skeleton. + +2018-05-17 Mark Wielaard + + * dwarf_begin_elf.c (__libdw_debugdir): New function. + (valid_p): Call __libdw_debugdir. + * dwarf_end.c (dwarf_end.c): Free debugdir. + * dwarf_getalt.c (__libdw_filepath): Extract __libdw_debugdir logic. + take debugdir as argument instead of fd. + (find_debug_altlink): Call __libdw_filepath with debugdir. + * libdwP.h (struct Dwarf): Add debugdir field. + (__libdw_debugdir): New function prototype. + (__libdw_filepath): Adjust prototype to take a const char * instead of + an int. + * libdw_find_split_unit.c (__libdw_find_split_unit): Call + __libdw_filepath with debugdir. + +2018-05-17 Mark Wielaard + + * dwarf_attr_integrate.c (dwarf_attr_integrate): Handle split_compile + unit DIE, search skeleton_compile unit DIE. + * dwarf_hasattr_integrate.c (dwarf_hasattr_integrate): Likewise. + * libdwP.h (is_cudie): Check cu is not NULL. + +2018-05-19 Mark Wielaard + + * libdwP.h (__libdw_find_split_unit): Mark as internal_function. + +2018-05-15 Mark Wielaard + + * Makefile.am (libdw_a_SOURCES): Add libdw_find_split_unit.c. + * dwarf_end.c (cu_free): Free split Dwarf. + * dwarf_get_units.c (dwarf_get_units): Handle DW_UT_skeleton by + calling __libdw_find_split_unit. + * libdwP.h (struct Dwarf_CU): Add split Dwarf_CU field. + (__libdw_find_split_unit): New function prototype. + (str_offsets_base_off): Use cu Dwarf if dbg is NULL. + (filepath): Rename to ... + (__libdw_filepath): This. Which is the actual function name in + dwarf_getalt.c. + (libdw_find_split_unit.c): New file. + * libdw_findcu.c (__libdw_intern_next_unit): Initialize split to -1. + +2018-05-15 Mark Wielaard + + * libdwP.h (__libdw_first_die_from_cu_start): Adjust commented out + asserts. + * libdw_findcu.c (__libdw_intern_next_unit): For version 4 DWARF if + the cudie has a DW_AT_GNU_dwi_id set the unit_id8 and unit_type to + DW_UT_skeleton or DW_UT_split_compile based on whether the cudie has + child DIEs and a DW_AT_GNU_dwo_name attribute. + +2018-05-14 Mark Wielaard + + * dwarf.h: Add GNU Debug Fission extensions. DW_AT_GNU_dwo_name, + DW_AT_GNU_dwo_id, DW_AT_GNU_ranges_base, DW_AT_GNU_addr_base, + DW_AT_GNU_pubnames, DW_AT_GNU_pubtypes. DW_FORM_GNU_addr_index, + DW_FORM_GNU_str_index. DW_OP_GNU_addr_index, DW_OP_GNU_const_index. + * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_GNU_addr_index + as DW_FORM_addrx. + (__libdw_cu_addr_base): Check for both DW_AT_GNU_addr_base and + DW_AT_addr_base. + * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_GNU_str_index + as DW_FORM_strx. + * dwarf_formudata.c (dwarf_formudata): Recognize DW_AT_GNU_addr_base + as addrptr. Recognize DW_AT_GNU_ranges_base as rangelistptr. + * dwarf_getlocation.c (__libdw_intern_expression): Handle + DW_OP_GNU_addr_index as DW_OP_addrx and DW_OP_GNU_const_index as + DW_OP_constx. + * libdw_form.c (__libdw_form_val_compute_len): Handle + DW_FORM_GNU_addr_index and DW_FORM_GNU_str_index taking an uleb128. + +2018-05-12 Mark Wielaard + + * dwarf_begin_elf.c (check_section): Also recognize .dwo section + name variants. + +2018-05-11 Mark Wielaard + + * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_macros as macptr. + * dwarf_getmacros.c (get_table_for_offset): Add DW_MACRO_define_sup, + DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx and + DW_MACRO_undef_strx. Add str_offsets_base_off to fake CU. Deal with + DW_AT_macros. Use libdw_valid_user_form. + +2018-05-09 Mark Wielaard + + * dwarf_formstring.c (__libdw_cu_str_off_base): Moved to... + * libdwP.h (__libdw_cu_str_off_base): ...here. Make static inline. + (str_offsets_base_off): New internal function that also parses + .debug_str_offsets header if necessary. + +2018-05-11 Mark Wielaard + + * dwarf_siblingof.c (dwarf_siblingof): Don't reference cu till it is + known the Dwarf_Die is came from is valid. + * libdwP.h (__libdw_dieabbrev): Check cu is not NULL. + +2018-05-08 Mark Wielaard + + * dwarf_formref.c (__libdw_formref): Explicitly don't handle + DW_FORM_ref_sup4 and DW_FORM_ref_sup8. + * dwarf_formref_die.c (dwarf_formref_die): Handle DW_FORM_ref_sup4 + and DW_FORM_ref_sup8. + * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strp_sup + as DW_FORM_GNU_strp_alt. + +2018-05-05 Mark Wielaard + + * dwarf.h: Add DWARF line content descriptions. + * libdwP.h (libdw_valid_user_form): New static function. + * dwarf_getsrclines.c (read_srclines): Check and parse version 5 + DWARF header, dir and file tables separately from older versions + where different. + +2018-04-24 Mark Wielaard + + * dwarf_begin_elf.c (dwarf_scnnames): Add ".debug_line_str". + * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_STR and + DWARF_E_NO_DEBUG_LINE_STR. + * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_line_strp. + Get data from either .debug_str or .debug_line_str. + * libdwP.h: Add IDX_debug_line_str, DWARF_E_NO_DEBUG_STR and + DWARF_E_NO_DEBUG_LINE_STR. + +2018-04-03 Mark Wielaard + + * dwarf_formudata.c (__libdw_formptr): Take and return const + unsigned char pointers. + * dwarf_getlocation.c (attr_base_address): Rename to... + (__libdw_cu_base_address): this. Take Dwarf_CU, check and set + base_address. + (initial_offset_base): Renamed to... + (initial_offset): this. Only provide offset. + (getlocations_addr): Move data size check and + address base addition into __libdw_read_begin_end_pair_inc. Use + __libdw_cu_base_address and initial_offset. Drop Elf_Data NULL + check (already done by initial_offset, through __libdw_formptr). + (dwarf_getlocations): Use __libdw_cu_base_address and initial_offset. + Drop Elf_Data NULL check. + * dwarf_ranges.c (__libdw_read_begin_end_pair_inc): Change argument + type of readp to Add readend argument. Check data size. Include base + in begin and end result. + (initial_offset): New static function. + (dwarf_ranges): Don't check Elf_Data being NULL (already done by + initial_offset, through __libdw_formptr). Use __libdw_cu_base_address + and initial_offset. Remove base check and addition (already done by + __libdw_read_begin_end_pair_inc. + * libdwP.h (Dwarf_CU): Add base_address field. + (__libdw_read_begin_end_pair_inc): Change argument type of readp to + const. Add readend argument. + (__libdw_formptr): Take and return const unsigned char pointers. + * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU + base_address. + +2018-04-04 Mark Wielaard + + * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU + addr_base and str_off_base. + +2018-03-23 Mark Wielaard + + * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_str_offsets, + increase size. + * dwarf_error.c (errmsgs): Add DWARF_E_NO_STR_OFFSETS. + * dwarf_formstring.c (dwarf_formstring): Handle DW_FORM_strx[1234]. + (__libdw_cu_str_off_base): New function. + * dwarf_formudata.c (dwarf_formudata): Handle IDX_debug_str_offsets + as stroffsetsptr. + * libdwP.h: Add IDX_debug_str_offsets and DWARF_E_NO_STR_OFFSETS. + (struct Dwarf_CU): Add str_off_base field. + (__libdw_cu_str_off_base): New function declaration. + +2018-03-22 Mark Wielaard + + * dwarf_begin_elf.c (dwarf_scnnames): Add IDX_debug_addr. + * dwarf_error.c (errmsgs): Add DWARF_E_NO_DEBUG_ADDR. + * dwarf_formaddr.c (dwarf_formaddr): Handle DW_FORM_addrx[1234]. + (__libdw_cu_addr_base): New function. + * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_addr_base as + addrptr. + * libdwP.h: Add IDX_debug_addr and DWARF_E_NO_DEBUG_ADDR. + (struct Dwarf_CU): Add addr_base field. + (__libdw_cu_addr_base): New function definition. + * memory-access.h (file_byte_order): New static function. + (read_3ubyte_unaligned): New inline function. + +2018-03-29 Mark Wielaard + + * libdw.h (dwarf_decl_file): Extend documentation. + (dwarf_linesrc): Likewise. + (dwarf_filesrc): Likewise. + +2018-03-06 Mark Wielaard + + * dwarf.h: Add DW_OP_implicit_pointer, DW_OP_addrx, DW_OP_constx, + DW_OP_entry_value, DW_OP_const_type, DW_OP_regval_type, + DW_OP_deref_type, DW_OP_xderef_type, DW_OP_convert and + DW_OP_reinterpret. + * dwarf_getlocation.c (__libdw_intern_expression): Handle + DW_OP_convert, DW_OP_reinterpret, DW_OP_addrx, DW_OP_constx, + DW_OP_regval_type, DW_OP_entry_value, DW_OP_implicit_pointer, + DW_OP_deref_type, DW_OP_xderef_type and DW_OP_const_type. + * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Handle + DW_OP_entry_value, DW_OP_const_type and DW_OP_implicit_pointer. + * dwarf_getlocation_die.c (dwarf_getlocation_die): Handle + DW_OP_implicit_pointer, DW_OP_convert, DW_OP_reinterpret, + DW_OP_const_type, DW_OP_regval_type, DW_OP_deref_type and + DW_OP_xderef_type. + * dwarf_getlocation_implicit_pointer.c + (dwarf_getlocation_implicit_pointer): Handle DW_OP_implicit_pointer. + +2018-03-01 Mark Wielaard + + * dwarf.h: Add DW_AT_GNU_locviews and DW_AT_GNU_entry_view. + * dwarf_formudata.c (dwarf_formudata): Handle DW_AT_GNU_locviews + as a loclistptr. + +2018-02-09 Mark Wielaard + + * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a + 16 byte block. + +2018-02-09 Mark Wielaard + + * dwarf_child.c (__libdw_find_attr): Handle DW_FORM_implicit_const. + * dwarf_formsdata.c (dwarf_formsdata): Likewise. + * dwarf_formudata.c (dwarf_formudata): Likewise. + * dwarf_getabbrev.c (__libdw_getabbrev): Likewise. + * dwarf_getattrs.c (dwarf_getattrs): Likewise. + * dwarf_hasattr.c (dwarf_hasattr): Likewise. + * dwarf_getabbrevattr.c (dwarf_getabbrevattr_data): New function + that will also return any data associated with the abbrev. Which + currently is only for DW_FORM_implicit_const. Based on... + (dwarf_getabbrevattr): ... this function. Which now just calls + dwarf_getabbrevattr_data. + * libdw.h (dwarf_getabbrevattr_data): Declare new function. + * libdw.map (ELFUTILS_0.170): Add dwarf_getabbrevattr_data. + * libdwP.h (dwarf_getabbrevattr_data): INTDECL. + * memory-access.h (__libdw_get_sleb128_unchecked): New inlined + function based on __libdw_get_uleb128_unchecked. + +2018-02-08 Mark Wielaard + + * dwarf.h: Add DWARF5 DW_FORMs. + * libdwP.h (__libdw_form_val_compute_len): Handle fix length + DW_FORM_implicit_const, DW_FORM_addrx[1234], DW_FORM_strx[1234], + DW_FORM_ref_sup[48] and DW_FORM_data16. + * libdw_form.c (__libdw_form_val_compute_len): DW_FORM_strp_sup + and DW_FORM_line_strp are offset_size. DW_FORM_addrx, DW_FORM_strx, + DW_FORM_loclistx and DW_FORM_rnglistx are uleb128. + +2018-01-30 Mark Wielaard + + * Makefile.am (libdw_a_SOURCES): Add dwarf_get_units.c. + * dwarf_get_units.c: New file. + * libdw.h (dwarf_get_units): New function declaration. + * libdw.map (ELFUTILS_0.170): Add dwarf_get_units. + +2018-01-29 Mark Wielaard + + * dwarf.h (DW_UT_*): Add DWARF Unit Header Types. + * dwarf_cu_die.c (dwarf_cu_die): Rename arguments. type_signaturep + is now called unit_idp. type_offsetp is now called subdie_offsetp. + * dwarf_formref_die.c (dwarf_formref_die): Scan both .debug_info + and .debug_types sections for type units when type signature ref + not found. + * dwarf_getaranges.c (dwarf_getaranges): Use __libdw_findcu and + __libdw_first_die_off_from_cu instead of trying by hand. + * dwarf_getlocation_die.c (dwarf_getlocation_die): Use ISV4TU + instead of checking type_offset by hand. + * dwarf_getlocation_implicit_pointer.c + (dwarf_getlocation_implicit_pointer): Likewise. + * dwarf_nextcu.c (dwarf_next_unit): Call __libdw_next_unit. + (__libdw_next_unit): New function based on dwarf_next_unit with + DWARF5 header support. + * libdwP.h (struct Dwarf_CU): Renamed type_offset to subdie_offset + and type_sig8 to unit_id8. + (ISV4TU): New macro to determine whether a CU is a version 4 type + unit (which comes from the .debug_types section). + (DIE_OFFSET_FROM_CU_OFFSET): Replaced macro by real function... + (__libdw_first_die_from_cu_start): ... that also handles DWARF5 + unit headers. + (__libdw_first_die_off_from_cu): New function that calls the above + using the CU fields. + (CUDIE): Use __libdw_first_die_off_from_cu. + (SUBDIE): New macro that provides the DIE for a CU using the + subdie_offset. + (__libdw_next_unit): New internal function declaration. + * libdw_findcu.c (__libdw_intern_next_unit): Use __libdw_next_unit. + Accept DWARF version 5 headers. Setup unit_type. + (__libdw_findcu): Rename debug_types argument to v4_debug_types + argument (to indicate that we are looking in the .debug_types + section). Support finding the exact offset (unit header start). + +2018-01-25 Mark Wielaard + + * Makefile.am (libdw_a_SOURCES): Add dwarf_die_addr_die.c. + * dwarf_die_addr_die.c: New file. + * libdw.h (dwarf_die_addr_die): New function declaration. + * libdw.map (ELFUTILS_0.171): New section with dwarf_die_addr_die. + * libdwP.h (__libdw_findcu_addr): New internal function declaration. + * libdw_findcu.c (__libdw_findcu_addr): New internal function. + +2018-02-09 Joshua Watt + + * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment. + * dwarf_frame_register.c (dwarf_frame_register): Likewise. + +2018-01-22 Mark Wielaard + + * Makefile.am (AM_CPPFLAGS): Add -I libdwelf. + * dwarf_begin_elf.c (dwarf_begin_elf): Initialize Dwarf alt_fd to -1. + * dwarf_end.c (dwarf_end): Call dwarf_end and close on the alt_dwarf + and alt_fd if we allocated them. + * dwarf_fromref_die.c (dwarf_formref_die): Call dwarf_getalt. + * dwarf_formstring.c (dwarf_formstring): Likewise. + * dwarf_getalt.c (__libdw_filepath): New internal function. + (find_debug_altlink): New static function. + (dwarf_getalt): Check Dwarf alt_dwarf and call find_debug_altlink. + Cache result. + * dwarf_setalt.c (dwarf_setalt): Clean up Dwarf alt_dwarf and alt_fd + if we allocated. + * libdw.h (dwarf_getalt): Extend documentation. + (dwarf_setalt): Likewise. + * libdwP.h (struct Dwarf): Add alt_fd field. + (filepath): Declare new internal function. + +2018-01-14 Petr Machata + + * dwarf_formsdata.c (dwarf_formsdata): + : Cast to signed char. + : Use read_*sbyte_unaligned instead of + read_*ubyte_unaligned. + +2017-12-26 Mark Wielaard + + * libdwP.h (struct Dwarf_Abbrev): Pack struct. Remove attrcnt, + use bitfields for has_children and code. + * dwarf_getabbrev.c (__libdw_getabbrev): Don't count attrs. + * dwarf_getattrcnt.c (dwarf_getattrcnt): Count attrs. + +2017-12-26 Mark Wielaard + + * memory-access.h (__libdw_get_uleb128_unchecked): New function. + (get_uleb128_unchecked): New define. + * dwarf_child.c (__libdw_find_attr): Use get_uleb128_unchecked to + read attr name and form. + * dwarf_getabbrevattr.c (dwarf_getabbrevattr): Likewise. + * dwarf_getattrs.c (dwarf_getattrs): Likewise. + * dwarf_hasattr.c (dwarf_hasattr): Likewise. + +2017-12-28 Mark Wielaard + + * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists. + +2017-05-09 Ulf Hermann + Mark Wielaard + + * libdwP.h (__libdw_in_section): Fix check for the upper border of + the range. + (__libdw_offset_in_section): Likewise. + +2017-12-20 Mark Wielaard + + * libdwP.h (struct Dwarf_CU): Add sec_idx field. + (cu_sec_idx): Return cu->sec_idx. + * libdw_findcu.c (__libdw_intern_next_unit): Set cu sec_idx to + IDX_debug_info or IDX_debug_types. + * dwarf_begin_elf.c (valid_p): Set fake_loc_cu->sec_idx to + IDX_debug_loc. + * dwarf_getmacros.c (read_macros): Set fake_cu->sec_idx to + IDX_debug_macro or IDX_debug_macinfo. + +2017-12-12 Mark Wielaard + + * dwarf_aggregate_size.c (dwarf_aggregate_size): Don't peel the + given DIE. Reserve memory for a new DIE first. + +2017-12-11 Dima Kogan + + * dwarf_aggregate_size.c (array_size): Handle multi-dimensional + arrays properly. + +2017-11-03 Mark Wielaard + + * dwarf_getlocation.c (__libdw_intern_expression): Handle + DW_OP_GNU_variable_value. + * dwarf_getlocation_attr.c (dwarf_getlocation_attr): Likewise. + * dwarf_getlocation_die.c (dwarf_getlocation_die): Likewise. + +2017-11-03 Mark Wielaard + + * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc. + Update list of acceptable attribute codes based on DWARF5. + +2017-11-03 Mark Wielaard + + * dwarf.h: Add DW_OP_GNU_variable_value. + +2017-10-03 Mark Wielaard + + * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p. + +2017-08-18 Ulf Hermann + + * memory-access.h: Use attribute_packed. + +2017-02-27 Ulf Hermann + + * libdwP.h: Use attribute_hidden. + * libdw_alloc.c: Likewise. + +2017-02-27 Ulf Hermann + + * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS. + +2017-07-26 Mark Wielaard + + * dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*. + * dwarf_getmacros.c (get_table_for_offset): Accept either version + 4 or 5. Use DW_MACRO names instead of DW_MACRO_GNU names. + (read_macros): Use table version for fake_cu. + +2017-07-26 Mark Wielaard + + * dwarf_peel_type.c (dwarf_peel_type): Handle DW_TAG_immutable_type, + DW_TAG_packed_type and DW_TAG_shared_type. + * libdw.h (dwarf_peel_type): Extend documentation. + +2017-07-26 Mark Wielaard + + * dwarf.h: Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and + DW_DEFAULTED_out_of_class. + +2017-07-26 Mark Wielaard + + * dwarf.h: Add DW_CC_pass_by_reference and DW_CC_pass_by_reference. + +2017-07-26 Mark Wielaard + + * dwarf_default_lower_bound.c: New file. + * Makefile.am (libdw_a_SOURCES): Add dwarf_default_lower_bound.c. + * dwarf_aggregate_size.c (array_size): Use dwarf_default_lower_bound. + * dwarf_error.c (errmsgs): Add DWARF_E_UNKNOWN_LANGUAGE. + * libdw.h: Add dwarf_default_lower_bound. + * libdw.map (ELFUTILS_0.170): Add dwarf_default_lower_bound. + * libdwP.h: Add DWARF_E_UNKNOWN_LANGUAGE and + dwarf_default_lower_bound INTDECL. + +2017-07-26 Mark Wielaard + + * dwarf.h: Add DW_LANG_OpenCL, DW_LANG_Modula3, + DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift, + DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_BLISS. + * dwarf_aggregate_size.c (array_size): Add lower bound for + DW_LANG_C_plus_plus_03, DW_LANG_Python, DW_LANG_OpenCL, + DW_LANG_Haskell, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift, + DW_LANG_Dylan, DW_LANG_RenderScript, DW_LANG_Modula3, + DW_LANG_Julia and DW_LANG_BLISS. + +2017-07-26 Mark Wielaard + + * dwarf.h: Add DW_ATE_UCS and DW_ATE_ASCII. + +2017-07-25 Mark Wielaard + + * dwarf.h: Add DW_TAG_coarray_type, DW_TAG_generic_subrange, + DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter, + DW_TAG_skeleton_unit, DW_TAG_immutable_type. Add reserved comments + for currently unused numbers. + +2017-07-25 Mark Wielaard + + * dwarf.h (DWARF attributes enum): Remove DW_AT_subscr_data, + DW_AT_element_list and DW_AT_member. Add DWARF5 attribute constants. + (DW_AT_subscr_data, DW_AT_element_list, DW_AT_member): New defines. + +2017-07-21 Mark Wielaard + + * dwarf_line_file.c: New file. + * Makefile.am (libdw_a_SOURCES): Add dwarf_line_file.c. + * libdw.h (dwarf_line_file): New function declaration. + * libdw.map (ELFUTILS_0.170): New. Add dwarf_line_file. + +2017-02-17 Ulf Hermann + + * Makefile.am: Add libdw_so_LIBS to specify the archives libdw is is + made of, libdw_so_DEPS for libraries it depends on (including + libeu.a), libdw_so_LDLIBS to specify libraries libdw links against. + (libdw.so$(EXEEXT)): Add $(libdw_so_LDLIBS), remove enumeration of + library dependencies, use libdw_so_LIBS rather than relying on the + order of dependencies specified, add -z,relro. + +2017-04-20 Ulf Hermann + + * libdw.h: Remove attribute macro declarations and use + __noreturn_attribute__ as defined in libelf.h. + +2017-04-20 Ulf Hermann + + * dwarf_begin_elf.c: Include endian.h. + +2017-03-30 Mark Wielaard + + * dwarf_peel_type.c (dwarf_peel_type): Call dwarf_attr_integrate on + result. + 2016-10-22 Mark Wielaard * dwarf.h: Correct spelling of DW_LANG_PLI. Add compatibility define. diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 082d96c7..7a3d5322 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2002-2010, 2012, 2014 Red Hat, Inc. +## Copyright (C) 2002-2010, 2012, 2014, 2016, 2018 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -29,9 +29,9 @@ ## include $(top_srcdir)/config/eu.am if BUILD_STATIC -AM_CFLAGS += -fPIC +AM_CFLAGS += $(fpic_CFLAGS) endif -AM_CPPFLAGS += -I$(srcdir)/../libelf +AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdwelf VERSION = 1 lib_LIBRARIES = libdw.a @@ -65,7 +65,7 @@ libdw_a_SOURCES = dwarf_begin.c dwarf_begin_elf.c dwarf_end.c dwarf_getelf.c \ dwarf_lineendsequence.c dwarf_lineblock.c \ dwarf_lineprologueend.c dwarf_lineepiloguebegin.c \ dwarf_lineisa.c dwarf_linediscriminator.c \ - dwarf_lineop_index.c \ + dwarf_lineop_index.c dwarf_line_file.c \ dwarf_onesrcline.c dwarf_formblock.c \ dwarf_getsrcfiles.c dwarf_filesrc.c dwarf_getsrcdirs.c \ dwarf_getlocation.c dwarf_getstring.c dwarf_offabbrev.c \ @@ -89,7 +89,10 @@ 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_peel_type.c + dwarf_cu_die.c dwarf_peel_type.c dwarf_default_lower_bound.c \ + dwarf_die_addr_die.c dwarf_get_units.c \ + libdw_find_split_unit.c dwarf_cu_info.c \ + dwarf_next_lines.c if MAINTAINER_MODE BUILT_SOURCES = $(srcdir)/known-dwarf.h @@ -102,17 +105,20 @@ endif libdw_pic_a_SOURCES = am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os) +libdw_so_LIBS = libdw_pic.a ../libdwelf/libdwelf_pic.a \ + ../libdwfl/libdwfl_pic.a ../libebl/libebl.a +libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so +libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) libdw_so_SOURCES = -libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \ - ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \ - ../libelf/libelf.so +libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS) # The rpath is necessary for libebl because its $ORIGIN use will # not fly in a setuid executable that links in libdw. - $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--soname,$@.$(VERSION),-z,defs \ + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ + -Wl,--soname,$@.$(VERSION) \ -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ -Wl,--version-script,$<,--no-undefined \ - -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ - -ldl -lz $(argp_LDADD) $(zip_LIBS) + -Wl,--whole-archive $(libdw_so_LIBS) -Wl,--no-whole-archive \ + $(libdw_so_LDLIBS) @$(textrel_check) $(AM_V_at)ln -fs $@ $@.$(VERSION) diff --git a/libdw/cfi.c b/libdw/cfi.c index daa845f3..341e055b 100644 --- a/libdw/cfi.c +++ b/libdw/cfi.c @@ -138,7 +138,7 @@ execute_cfi (Dwarf_CFI *cache, case DW_CFA_advance_loc1: operand = *program++; - /* Fallthrough */ + FALLTHROUGH; case DW_CFA_advance_loc + 0 ... DW_CFA_advance_loc + CFI_PRIMARY_MAX: advance_loc: loc += operand * cie->code_alignment_factor; @@ -301,7 +301,7 @@ execute_cfi (Dwarf_CFI *cache, case DW_CFA_restore_extended: get_uleb128 (operand, program, end); - /* Fallthrough */ + FALLTHROUGH; case DW_CFA_restore + 0 ... DW_CFA_restore + CFI_PRIMARY_MAX: if (unlikely (abi_cfi) && likely (opcode == DW_CFA_restore)) diff --git a/libdw/dwarf.h b/libdw/dwarf.h index 169b53e5..dc597335 100644 --- a/libdw/dwarf.h +++ b/libdw/dwarf.h @@ -1,5 +1,5 @@ /* This file defines standard DWARF types, structures, and macros. - Copyright (C) 2000-2011, 2014, 2016 Red Hat, Inc. + Copyright (C) 2000-2011, 2014, 2016, 2017, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -29,6 +29,20 @@ #ifndef _DWARF_H #define _DWARF_H 1 +/* DWARF Unit Header Types. */ +enum + { + DW_UT_compile = 0x01, + DW_UT_type = 0x02, + DW_UT_partial = 0x03, + DW_UT_skeleton = 0x04, + DW_UT_split_compile = 0x05, + DW_UT_split_type = 0x06, + + DW_UT_lo_user = 0x80, + DW_UT_hi_user = 0xff + }; + /* DWARF tags. */ enum { @@ -37,15 +51,21 @@ enum DW_TAG_entry_point = 0x03, DW_TAG_enumeration_type = 0x04, DW_TAG_formal_parameter = 0x05, + /* 0x06 reserved. */ + /* 0x07 reserved. */ DW_TAG_imported_declaration = 0x08, + /* 0x09 reserved. */ DW_TAG_label = 0x0a, DW_TAG_lexical_block = 0x0b, + /* 0x0c reserved. */ DW_TAG_member = 0x0d, + /* 0x0e reserved. */ DW_TAG_pointer_type = 0x0f, DW_TAG_reference_type = 0x10, DW_TAG_compile_unit = 0x11, DW_TAG_string_type = 0x12, DW_TAG_structure_type = 0x13, + /* 0x14 reserved. */ DW_TAG_subroutine_type = 0x15, DW_TAG_typedef = 0x16, DW_TAG_union_type = 0x17, @@ -87,15 +107,20 @@ enum DW_TAG_unspecified_type = 0x3b, DW_TAG_partial_unit = 0x3c, DW_TAG_imported_unit = 0x3d, - /* 0x3e reserved. */ + /* 0x3e reserved. Was DW_TAG_mutable_type. */ DW_TAG_condition = 0x3f, DW_TAG_shared_type = 0x40, DW_TAG_type_unit = 0x41, DW_TAG_rvalue_reference_type = 0x42, DW_TAG_template_alias = 0x43, - - /* DWARF 5. */ + DW_TAG_coarray_type = 0x44, + DW_TAG_generic_subrange = 0x45, + DW_TAG_dynamic_type = 0x46, DW_TAG_atomic_type = 0x47, + DW_TAG_call_site = 0x48, + DW_TAG_call_site_parameter = 0x49, + DW_TAG_skeleton_unit = 0x4a, + DW_TAG_immutable_type = 0x4b, DW_TAG_lo_user = 0x4080, @@ -131,17 +156,23 @@ enum DW_AT_sibling = 0x01, DW_AT_location = 0x02, DW_AT_name = 0x03, + /* 0x04 reserved. */ + /* 0x05 reserved. */ + /* 0x06 reserved. */ + /* 0x07 reserved. */ + /* 0x08 reserved. */ DW_AT_ordering = 0x09, - DW_AT_subscr_data = 0x0a, + /* 0x0a reserved. */ DW_AT_byte_size = 0x0b, - DW_AT_bit_offset = 0x0c, + DW_AT_bit_offset = 0x0c, /* Deprecated in DWARF4. */ DW_AT_bit_size = 0x0d, - DW_AT_element_list = 0x0f, + /* 0x0e reserved. */ + /* 0x0f reserved. */ DW_AT_stmt_list = 0x10, DW_AT_low_pc = 0x11, DW_AT_high_pc = 0x12, DW_AT_language = 0x13, - DW_AT_member = 0x14, + /* 0x14 reserved. */ DW_AT_discr = 0x15, DW_AT_discr_value = 0x16, DW_AT_visibility = 0x17, @@ -152,15 +183,24 @@ enum DW_AT_const_value = 0x1c, DW_AT_containing_type = 0x1d, DW_AT_default_value = 0x1e, + /* 0x1f reserved. */ DW_AT_inline = 0x20, DW_AT_is_optional = 0x21, DW_AT_lower_bound = 0x22, + /* 0x23 reserved. */ + /* 0x24 reserved. */ DW_AT_producer = 0x25, + /* 0x26 reserved. */ DW_AT_prototyped = 0x27, + /* 0x28 reserved. */ + /* 0x29 reserved. */ DW_AT_return_addr = 0x2a, + /* 0x2b reserved. */ DW_AT_start_scope = 0x2c, + /* 0x2d reserved. */ DW_AT_bit_stride = 0x2e, DW_AT_upper_bound = 0x2f, + /* 0x30 reserved. */ DW_AT_abstract_origin = 0x31, DW_AT_accessibility = 0x32, DW_AT_address_class = 0x33, @@ -179,7 +219,7 @@ enum DW_AT_frame_base = 0x40, DW_AT_friend = 0x41, DW_AT_identifier_case = 0x42, - DW_AT_macro_info = 0x43, + DW_AT_macro_info = 0x43, /* Deprecated in DWARF5. */ DW_AT_namelist_item = 0x44, DW_AT_priority = 0x45, DW_AT_segment = 0x46, @@ -223,9 +263,36 @@ enum DW_AT_const_expr = 0x6c, DW_AT_enum_class = 0x6d, DW_AT_linkage_name = 0x6e, - - /* DWARF5 attribute values. */ + DW_AT_string_length_bit_size = 0x6f, + DW_AT_string_length_byte_size = 0x70, + DW_AT_rank = 0x71, + DW_AT_str_offsets_base = 0x72, + DW_AT_addr_base = 0x73, + DW_AT_rnglists_base = 0x74, + /* 0x75 reserved. */ + DW_AT_dwo_name = 0x76, + DW_AT_reference = 0x77, + DW_AT_rvalue_reference = 0x78, + DW_AT_macros = 0x79, + DW_AT_call_all_calls = 0x7a, + DW_AT_call_all_source_calls = 0x7b, + DW_AT_call_all_tail_calls = 0x7c, + DW_AT_call_return_pc = 0x7d, + DW_AT_call_value = 0x7e, + DW_AT_call_origin = 0x7f, + DW_AT_call_parameter = 0x80, + DW_AT_call_pc = 0x81, + DW_AT_call_tail_call = 0x82, + DW_AT_call_target = 0x83, + DW_AT_call_target_clobbered = 0x84, + DW_AT_call_data_location = 0x85, + DW_AT_call_data_value = 0x86, DW_AT_noreturn = 0x87, + DW_AT_alignment = 0x88, + DW_AT_export_symbols = 0x89, + DW_AT_deleted = 0x8a, + DW_AT_defaulted = 0x8b, + DW_AT_loclists_base = 0x8c, DW_AT_lo_user = 0x2000, @@ -272,12 +339,30 @@ enum DW_AT_GNU_all_tail_call_sites = 0x2116, DW_AT_GNU_all_call_sites = 0x2117, DW_AT_GNU_all_source_call_sites = 0x2118, + DW_AT_GNU_locviews = 0x2137, + DW_AT_GNU_entry_view = 0x2138, DW_AT_GNU_macros = 0x2119, DW_AT_GNU_deleted = 0x211a, + /* GNU Debug Fission extensions. */ + DW_AT_GNU_dwo_name = 0x2130, + DW_AT_GNU_dwo_id = 0x2131, + DW_AT_GNU_ranges_base = 0x2132, + DW_AT_GNU_addr_base = 0x2133, + DW_AT_GNU_pubnames = 0x2134, + DW_AT_GNU_pubtypes = 0x2135, DW_AT_hi_user = 0x3fff }; +/* Old unofficially attribute names. Should not be used. + Will not appear in known-dwarf.h */ + +/* DWARF1 array subscripts and element data types. */ +#define DW_AT_subscr_data 0x0a +/* DWARF1 enumeration literals. */ +#define DW_AT_element_list 0x0f +/* DWARF1 reference for variable to member structure, class or union. */ +#define DW_AT_member 0x14 /* DWARF form encodings. */ enum @@ -306,7 +391,29 @@ enum DW_FORM_sec_offset = 0x17, DW_FORM_exprloc = 0x18, DW_FORM_flag_present = 0x19, + DW_FORM_strx = 0x1a, + DW_FORM_addrx = 0x1b, + DW_FORM_ref_sup4 = 0x1c, + DW_FORM_strp_sup = 0x1d, + DW_FORM_data16 = 0x1e, + DW_FORM_line_strp = 0x1f, DW_FORM_ref_sig8 = 0x20, + DW_FORM_implicit_const = 0x21, + DW_FORM_loclistx = 0x22, + DW_FORM_rnglistx = 0x23, + DW_FORM_ref_sup8 = 0x24, + DW_FORM_strx1 = 0x25, + DW_FORM_strx2 = 0x26, + DW_FORM_strx3 = 0x27, + DW_FORM_strx4 = 0x28, + DW_FORM_addrx1 = 0x29, + DW_FORM_addrx2 = 0x2a, + DW_FORM_addrx3 = 0x2b, + DW_FORM_addrx4 = 0x2c, + + /* GNU Debug Fission extensions. */ + DW_FORM_GNU_addr_index = 0x1f01, + DW_FORM_GNU_str_index = 0x1f02, DW_FORM_GNU_ref_alt = 0x1f20, /* offset in alternate .debuginfo. */ DW_FORM_GNU_strp_alt = 0x1f21 /* offset in alternate .debug_str. */ @@ -471,6 +578,17 @@ enum DW_OP_implicit_value = 0x9e, /* DW_FORM_block follows opcode. */ DW_OP_stack_value = 0x9f, /* No operands, special like DW_OP_piece. */ + DW_OP_implicit_pointer = 0xa0, + DW_OP_addrx = 0xa1, + DW_OP_constx = 0xa2, + DW_OP_entry_value = 0xa3, + DW_OP_const_type = 0xa4, + DW_OP_regval_type = 0xa5, + DW_OP_deref_type = 0xa6, + DW_OP_xderef_type = 0xa7, + DW_OP_convert = 0xa8, + DW_OP_reinterpret = 0xa9, + /* GNU extensions. */ DW_OP_GNU_push_tls_address = 0xe0, DW_OP_GNU_uninit = 0xf0, @@ -484,6 +602,12 @@ enum DW_OP_GNU_reinterpret = 0xf9, DW_OP_GNU_parameter_ref = 0xfa, + /* GNU Debug Fission extensions. */ + DW_OP_GNU_addr_index = 0xfb, + DW_OP_GNU_const_index = 0xfc, + + DW_OP_GNU_variable_value = 0xfd, + DW_OP_lo_user = 0xe0, /* Implementation-defined range start. */ DW_OP_hi_user = 0xff /* Implementation-defined range end. */ }; @@ -509,6 +633,8 @@ enum DW_ATE_unsigned_fixed = 0xe, DW_ATE_decimal_float = 0xf, DW_ATE_UTF = 0x10, + DW_ATE_UCS = 0x11, + DW_ATE_ASCII = 0x12, DW_ATE_lo_user = 0x80, DW_ATE_hi_user = 0xff @@ -588,14 +714,23 @@ enum DW_LANG_UPC = 0x0012, /* Unified Parallel C */ DW_LANG_D = 0x0013, /* D */ DW_LANG_Python = 0x0014, /* Python */ + DW_LANG_OpenCL = 0x0015, /* OpenCL */ DW_LANG_Go = 0x0016, /* Go */ + DW_LANG_Modula3 = 0x0017, /* Modula-3 */ DW_LANG_Haskell = 0x0018, /* Haskell */ + DW_LANG_C_plus_plus_03 = 0x0019, /* ISO C++:2003 */ DW_LANG_C_plus_plus_11 = 0x001a, /* ISO C++:2011 */ + DW_LANG_OCaml = 0x001b, /* OCaml */ + DW_LANG_Rust = 0x001c, /* Rust */ DW_LANG_C11 = 0x001d, /* ISO C:2011 */ + DW_LANG_Swift = 0x001e, /* Swift */ + DW_LANG_Julia = 0x001f, /* Julia */ + DW_LANG_Dylan = 0x0020, /* Dylan */ DW_LANG_C_plus_plus_14 = 0x0021, /* ISO C++:2014 */ DW_LANG_Fortran03 = 0x0022, /* ISO/IEC 1539-1:2004 */ DW_LANG_Fortran08 = 0x0023, /* ISO/IEC 1539-1:2010 */ - + DW_LANG_RenderScript = 0x0024, /* RenderScript Kernal Language */ + DW_LANG_BLISS = 0x0025, /* BLISS */ DW_LANG_lo_user = 0x8000, DW_LANG_Mips_Assembler = 0x8001, /* Assembler */ @@ -615,12 +750,17 @@ enum }; -/* DWARF calling conventions encodings. */ +/* DWARF calling conventions encodings. + Used as values of DW_AT_calling_convention for subroutines + (normal, program or nocall) or structures, unions and class types + (normal, reference or value). */ enum { DW_CC_normal = 0x1, DW_CC_program = 0x2, DW_CC_nocall = 0x3, + DW_CC_pass_by_reference = 0x4, + DW_CC_pass_by_value = 0x5, DW_CC_lo_user = 0x40, DW_CC_hi_user = 0xff }; @@ -651,6 +791,25 @@ enum DW_DSC_range = 1 }; +/* DWARF defaulted member function encodings. */ +enum + { + DW_DEFAULTED_no = 0, + DW_DEFAULTED_in_class = 1, + DW_DEFAULTED_out_of_class = 2 + }; + +/* DWARF line content descriptions. */ +enum + { + DW_LNCT_path = 0x1, + DW_LNCT_directory_index = 0x2, + DW_LNCT_timestamp = 0x3, + DW_LNCT_size = 0x4, + DW_LNCT_MD5 = 0x5, + DW_LNCT_lo_user = 0x2000, + DW_LNCT_hi_user = 0x3fff + }; /* DWARF standard opcode encodings. */ enum @@ -694,18 +853,75 @@ enum }; -/* DWARF debug_macro type encodings. GNU/DWARF5 extension. */ +/* DWARF debug_macro type encodings. */ +enum + { + DW_MACRO_define = 0x01, + DW_MACRO_undef = 0x02, + DW_MACRO_start_file = 0x03, + DW_MACRO_end_file = 0x04, + DW_MACRO_define_strp = 0x05, + DW_MACRO_undef_strp = 0x06, + DW_MACRO_import = 0x07, + DW_MACRO_define_sup = 0x08, + DW_MACRO_undef_sup = 0x09, + DW_MACRO_import_sup = 0x0a, + DW_MACRO_define_strx = 0x0b, + DW_MACRO_undef_strx = 0x0c, + DW_MACRO_lo_user = 0xe0, + DW_MACRO_hi_user = 0xff + }; + +/* Old GNU extension names for DWARF5 debug_macro type encodings. + There are no equivalents for the supplementary object file (sup) + and indirect string references (strx). */ +#define DW_MACRO_GNU_define DW_MACRO_define +#define DW_MACRO_GNU_undef DW_MACRO_undef +#define DW_MACRO_GNU_start_file DW_MACRO_start_file +#define DW_MACRO_GNU_end_file DW_MACRO_end_file +#define DW_MACRO_GNU_define_indirect DW_MACRO_define_strp +#define DW_MACRO_GNU_undef_indirect DW_MACRO_undef_strp +#define DW_MACRO_GNU_transparent_include DW_MACRO_import +#define DW_MACRO_GNU_lo_user DW_MACRO_lo_user +#define DW_MACRO_GNU_hi_user DW_MACRO_hi_user + + +/* Range list entry encoding. */ +enum + { + DW_RLE_end_of_list = 0x0, + DW_RLE_base_addressx = 0x1, + DW_RLE_startx_endx = 0x2, + DW_RLE_startx_length = 0x3, + DW_RLE_offset_pair = 0x4, + DW_RLE_base_address = 0x5, + DW_RLE_start_end = 0x6, + DW_RLE_start_length = 0x7 + }; + + +/* Location list entry encoding. */ +enum + { + DW_LLE_end_of_list = 0x0, + DW_LLE_base_addressx = 0x1, + DW_LLE_startx_endx = 0x2, + DW_LLE_startx_length = 0x3, + DW_LLE_offset_pair = 0x4, + DW_LLE_default_location = 0x5, + DW_LLE_base_address = 0x6, + DW_LLE_start_end = 0x7, + DW_LLE_start_length = 0x8 + }; + + +/* GNU DebugFission list entry encodings (.debug_loc.dwo). */ enum { - DW_MACRO_GNU_define = 0x01, - DW_MACRO_GNU_undef = 0x02, - DW_MACRO_GNU_start_file = 0x03, - DW_MACRO_GNU_end_file = 0x04, - DW_MACRO_GNU_define_indirect = 0x05, - DW_MACRO_GNU_undef_indirect = 0x06, - DW_MACRO_GNU_transparent_include = 0x07, - DW_MACRO_GNU_lo_user = 0xe0, - DW_MACRO_GNU_hi_user = 0xff + DW_LLE_GNU_end_of_list_entry = 0x0, + DW_LLE_GNU_base_address_selection_entry = 0x1, + DW_LLE_GNU_start_end_entry = 0x2, + DW_LLE_GNU_start_length_entry = 0x3 }; diff --git a/libdw/dwarf_aggregate_size.c b/libdw/dwarf_aggregate_size.c index 52ef0067..75105e4d 100644 --- a/libdw/dwarf_aggregate_size.c +++ b/libdw/dwarf_aggregate_size.c @@ -46,13 +46,17 @@ get_type (Dwarf_Die *die, Dwarf_Attribute *attr_mem, Dwarf_Die *type_mem) return type; } +static int aggregate_size (Dwarf_Die *die, Dwarf_Word *size, + Dwarf_Die *type_mem, int depth); + static int array_size (Dwarf_Die *die, Dwarf_Word *size, - Dwarf_Attribute *attr_mem, Dwarf_Die *type_mem) + Dwarf_Attribute *attr_mem, int depth) { Dwarf_Word eltsize; - if (INTUSE(dwarf_aggregate_size) (get_type (die, attr_mem, type_mem), - &eltsize) != 0) + Dwarf_Die type_mem, aggregate_type_mem; + if (aggregate_size (get_type (die, attr_mem, &type_mem), &eltsize, + &aggregate_type_mem, depth) != 0) return -1; /* An array can have DW_TAG_subrange_type or DW_TAG_enumeration_type @@ -63,7 +67,7 @@ array_size (Dwarf_Die *die, Dwarf_Word *size, return -1; bool any = false; - Dwarf_Word total = 0; + Dwarf_Word count_total = 1; do { Dwarf_Word count; @@ -95,45 +99,11 @@ array_size (Dwarf_Die *die, Dwarf_Word *size, } else { - /* Determine default lower bound from language, - as per "4.12 Subrange Type Entries". */ Dwarf_Die cu = CUDIE (die->cu); - switch (INTUSE(dwarf_srclang) (&cu)) - { - 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; - - case DW_LANG_Ada83: - case DW_LANG_Ada95: - case DW_LANG_Cobol74: - case DW_LANG_Cobol85: - case DW_LANG_Fortran77: - case DW_LANG_Fortran90: - case DW_LANG_Fortran95: - case DW_LANG_Fortran03: - case DW_LANG_Fortran08: - case DW_LANG_Pascal83: - case DW_LANG_Modula2: - case DW_LANG_PLI: - lower = 1; - break; - - default: - return -1; - } + int lang = INTUSE(dwarf_srclang) (&cu); + if (lang == -1 + || INTUSE(dwarf_default_lower_bound) (lang, &lower) != 0) + return -1; } if (unlikely (lower > upper)) return -1; @@ -168,53 +138,63 @@ array_size (Dwarf_Die *die, Dwarf_Word *size, continue; } - /* This is a subrange_type or enumeration_type and we've set COUNT. - Now determine the stride for this array dimension. */ - Dwarf_Word stride = eltsize; - if (INTUSE(dwarf_attr_integrate) (&child, DW_AT_byte_stride, - attr_mem) != NULL) - { - if (INTUSE(dwarf_formudata) (attr_mem, &stride) != 0) - return -1; - } - else if (INTUSE(dwarf_attr_integrate) (&child, DW_AT_bit_stride, - attr_mem) != NULL) - { - if (INTUSE(dwarf_formudata) (attr_mem, &stride) != 0) - return -1; - if (stride % 8) /* XXX maybe compute in bits? */ - return -1; - stride /= 8; - } + count_total *= count; any = true; - total += stride * count; } while (INTUSE(dwarf_siblingof) (&child, &child) == 0); if (!any) return -1; - *size = total; + /* This is a subrange_type or enumeration_type and we've set COUNT. + Now determine the stride for this array. */ + Dwarf_Word stride = eltsize; + if (INTUSE(dwarf_attr_integrate) (die, DW_AT_byte_stride, + attr_mem) != NULL) + { + if (INTUSE(dwarf_formudata) (attr_mem, &stride) != 0) + return -1; + } + else if (INTUSE(dwarf_attr_integrate) (die, DW_AT_bit_stride, + attr_mem) != NULL) + { + if (INTUSE(dwarf_formudata) (attr_mem, &stride) != 0) + return -1; + if (stride % 8) /* XXX maybe compute in bits? */ + return -1; + stride /= 8; + } + + *size = count_total * stride; return 0; } static int -aggregate_size (Dwarf_Die *die, Dwarf_Word *size, Dwarf_Die *type_mem) +aggregate_size (Dwarf_Die *die, Dwarf_Word *size, + Dwarf_Die *type_mem, int depth) { Dwarf_Attribute attr_mem; +/* Arrays of arrays of subrange types of arrays... Don't recurse too deep. */ +#define MAX_DEPTH 256 + if (die == NULL || depth++ >= MAX_DEPTH) + return -1; + if (INTUSE(dwarf_attr_integrate) (die, DW_AT_byte_size, &attr_mem) != NULL) return INTUSE(dwarf_formudata) (&attr_mem, size); switch (INTUSE(dwarf_tag) (die)) { case DW_TAG_subrange_type: - return aggregate_size (get_type (die, &attr_mem, type_mem), - size, type_mem); /* Tail call. */ + { + Dwarf_Die aggregate_type_mem; + return aggregate_size (get_type (die, &attr_mem, type_mem), + size, &aggregate_type_mem, depth); + } case DW_TAG_array_type: - return array_size (die, size, &attr_mem, type_mem); + return array_size (die, size, &attr_mem, depth); /* Assume references and pointers have pointer size if not given an explicit DW_AT_byte_size. */ @@ -232,12 +212,12 @@ aggregate_size (Dwarf_Die *die, Dwarf_Word *size, Dwarf_Die *type_mem) int dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size) { - Dwarf_Die type_mem; + Dwarf_Die die_mem, type_mem; - if (INTUSE (dwarf_peel_type) (die, die) != 0) + if (INTUSE (dwarf_peel_type) (die, &die_mem) != 0) return -1; - return aggregate_size (die, size, &type_mem); + return aggregate_size (&die_mem, size, &type_mem, 0); } INTDEF (dwarf_aggregate_size) OLD_VERSION (dwarf_aggregate_size, ELFUTILS_0.144) diff --git a/libdw/dwarf_attr_integrate.c b/libdw/dwarf_attr_integrate.c index 812d74b9..fc068638 100644 --- a/libdw/dwarf_attr_integrate.c +++ b/libdw/dwarf_attr_integrate.c @@ -1,5 +1,5 @@ /* Return specific DWARF attribute of a DIE, integrating indirections. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -38,7 +38,7 @@ dwarf_attr_integrate (Dwarf_Die *die, unsigned int search_name, Dwarf_Attribute *result) { Dwarf_Die die_mem; - + int chain = 16; /* Largest DIE ref chain we will follow. */ do { Dwarf_Attribute *attr = INTUSE(dwarf_attr) (die, search_name, result); @@ -53,8 +53,21 @@ dwarf_attr_integrate (Dwarf_Die *die, unsigned int search_name, die = INTUSE(dwarf_formref_die) (attr, &die_mem); } - while (die != NULL); + while (die != NULL && chain-- != 0); + /* Not NULL if it didn't have abstract_origin and specification + attributes. If it is a split CU then see if the skeleton + has it. */ + if (die != NULL && is_cudie (die) + && die->cu->unit_type == DW_UT_split_compile) + { + Dwarf_CU *skel_cu = __libdw_find_split_unit (die->cu); + if (skel_cu != NULL) + { + Dwarf_Die skel_die = CUDIE (skel_cu); + return INTUSE(dwarf_attr) (&skel_die, search_name, result); + } + } return NULL; } INTDEF (dwarf_attr_integrate) diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c index 6f25e429..184a6dc9 100644 --- a/libdw/dwarf_begin_elf.c +++ b/libdw/dwarf_begin_elf.c @@ -1,7 +1,6 @@ /* Create descriptor from ELF descriptor for processing file. - Copyright (C) 2002-2011, 2014, 2015 Red Hat, Inc. + Copyright (C) 2002-2011, 2014, 2015, 2017, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2002. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -41,25 +40,32 @@ #include #include #include +#include +#include "libelfP.h" #include "libdwP.h" -/* Section names. */ -static const char dwarf_scnnames[IDX_last][18] = +/* Section names. (Note .debug_str_offsets is the largest 19 chars.) */ +static const char dwarf_scnnames[IDX_last][19] = { [IDX_debug_info] = ".debug_info", [IDX_debug_types] = ".debug_types", [IDX_debug_abbrev] = ".debug_abbrev", + [IDX_debug_addr] = ".debug_addr", [IDX_debug_aranges] = ".debug_aranges", [IDX_debug_line] = ".debug_line", + [IDX_debug_line_str] = ".debug_line_str", [IDX_debug_frame] = ".debug_frame", [IDX_debug_loc] = ".debug_loc", + [IDX_debug_loclists] = ".debug_loclists", [IDX_debug_pubnames] = ".debug_pubnames", [IDX_debug_str] = ".debug_str", + [IDX_debug_str_offsets] = ".debug_str_offsets", [IDX_debug_macinfo] = ".debug_macinfo", [IDX_debug_macro] = ".debug_macro", [IDX_debug_ranges] = ".debug_ranges", + [IDX_debug_rnglists] = ".debug_rnglists", [IDX_gnu_debugaltlink] = ".gnu_debugaltlink" }; #define ndwarf_scnnames (sizeof (dwarf_scnnames) / sizeof (dwarf_scnnames[0])) @@ -112,14 +118,26 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) size_t cnt; bool gnu_compressed = false; for (cnt = 0; cnt < ndwarf_scnnames; ++cnt) - if (strcmp (scnname, dwarf_scnnames[cnt]) == 0) - break; - else if (scnname[0] == '.' && scnname[1] == 'z' - && strcmp (&scnname[2], &dwarf_scnnames[cnt][1]) == 0) - { - gnu_compressed = true; - break; - } + { + size_t dbglen = strlen (dwarf_scnnames[cnt]); + size_t scnlen = strlen (scnname); + if (strncmp (scnname, dwarf_scnnames[cnt], dbglen) == 0 + && (dbglen == scnlen + || (scnlen == dbglen + 4 + && strstr (scnname, ".dwo") == scnname + dbglen))) + break; + else if (scnname[0] == '.' && scnname[1] == 'z' + && (strncmp (&scnname[2], &dwarf_scnnames[cnt][1], + dbglen - 1) == 0 + && (scnlen == dbglen + 1 + || (scnlen == dbglen + 5 + && strstr (scnname, + ".dwo") == scnname + dbglen + 1)))) + { + gnu_compressed = true; + break; + } + } if (cnt >= ndwarf_scnnames) /* Not a debug section; ignore it. */ @@ -138,17 +156,9 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) { if (elf_compress (scn, 0, 0) < 0) { - /* If we failed to decompress the section and it's the - debug_info section, then fail with specific error rather - than the generic NO_DWARF. Without debug_info we can't do - anything (see also valid_p()). */ - if (cnt == IDX_debug_info) - { - Dwarf_Sig8_Hash_free (&result->sig8_hash); - __libdw_seterrno (DWARF_E_COMPRESSED_ERROR); - free (result); - return NULL; - } + /* It would be nice if we could fail with a specific error. + But we don't know if this was an essential section or not. + So just continue for now. See also valid_p(). */ return result; } } @@ -169,6 +179,26 @@ check_section (Dwarf *result, GElf_Ehdr *ehdr, Elf_Scn *scn, bool inscngrp) } +/* Helper function to set debugdir field. We want to cache the dir + where we found this Dwarf ELF file to locate alt and dwo files. */ +char * +__libdw_debugdir (int fd) +{ + /* strlen ("/proc/self/fd/") = 14 + strlen () = 10 + 1 = 25. */ + char devfdpath[25]; + sprintf (devfdpath, "/proc/self/fd/%u", fd); + char *fdpath = realpath (devfdpath, NULL); + char *fddir; + if (fdpath != NULL && fdpath[0] == '/' + && (fddir = strrchr (fdpath, '/')) != NULL) + { + *++fddir = '\0'; + return fdpath; + } + return NULL; +} + + /* Check whether all the necessary DWARF information is available. */ static Dwarf * valid_p (Dwarf *result) @@ -176,11 +206,11 @@ valid_p (Dwarf *result) /* We looked at all the sections. Now determine whether all the sections with debugging information we need are there. - XXX Which sections are absolutely necessary? Add tests if - necessary. For now we require only .debug_info. Hopefully this - is correct. */ + Require at least one section that can be read "standalone". */ if (likely (result != NULL) - && unlikely (result->sectiondata[IDX_debug_info] == NULL)) + && unlikely (result->sectiondata[IDX_debug_info] == NULL + && result->sectiondata[IDX_debug_line] == NULL + && result->sectiondata[IDX_debug_frame] == NULL)) { Dwarf_Sig8_Hash_free (&result->sig8_hash); __libdw_seterrno (DWARF_E_NO_DWARF); @@ -188,6 +218,9 @@ valid_p (Dwarf *result) result = NULL; } + /* For dwarf_location_attr () we need a "fake" CU to indicate + where the "fake" attribute data comes from. This is a block + inside the .debug_loc or .debug_loclists section. */ if (result != NULL && result->sectiondata[IDX_debug_loc] != NULL) { result->fake_loc_cu = (Dwarf_CU *) calloc (1, sizeof (Dwarf_CU)); @@ -200,6 +233,7 @@ valid_p (Dwarf *result) } else { + result->fake_loc_cu->sec_idx = IDX_debug_loc; result->fake_loc_cu->dbg = result; result->fake_loc_cu->startp = result->sectiondata[IDX_debug_loc]->d_buf; @@ -209,6 +243,60 @@ valid_p (Dwarf *result) } } + if (result != NULL && result->sectiondata[IDX_debug_loclists] != NULL) + { + result->fake_loclists_cu = (Dwarf_CU *) calloc (1, sizeof (Dwarf_CU)); + if (unlikely (result->fake_loclists_cu == NULL)) + { + Dwarf_Sig8_Hash_free (&result->sig8_hash); + __libdw_seterrno (DWARF_E_NOMEM); + free (result->fake_loc_cu); + free (result); + result = NULL; + } + else + { + result->fake_loclists_cu->sec_idx = IDX_debug_loclists; + result->fake_loclists_cu->dbg = result; + result->fake_loclists_cu->startp + = result->sectiondata[IDX_debug_loclists]->d_buf; + result->fake_loclists_cu->endp + = (result->sectiondata[IDX_debug_loclists]->d_buf + + result->sectiondata[IDX_debug_loclists]->d_size); + } + } + + /* For DW_OP_constx/GNU_const_index and DW_OP_addrx/GNU_addr_index + the dwarf_location_attr () will need a "fake" address CU to + indicate where the attribute data comes from. This is a just + inside the .debug_addr section, if it exists. */ + if (result != NULL && result->sectiondata[IDX_debug_addr] != NULL) + { + result->fake_addr_cu = (Dwarf_CU *) calloc (1, sizeof (Dwarf_CU)); + if (unlikely (result->fake_addr_cu == NULL)) + { + Dwarf_Sig8_Hash_free (&result->sig8_hash); + __libdw_seterrno (DWARF_E_NOMEM); + free (result->fake_loc_cu); + free (result->fake_loclists_cu); + free (result); + result = NULL; + } + else + { + result->fake_addr_cu->sec_idx = IDX_debug_addr; + result->fake_addr_cu->dbg = result; + result->fake_addr_cu->startp + = result->sectiondata[IDX_debug_addr]->d_buf; + result->fake_addr_cu->endp + = (result->sectiondata[IDX_debug_addr]->d_buf + + result->sectiondata[IDX_debug_addr]->d_size); + } + } + + if (result != NULL) + result->debugdir = __libdw_debugdir (result->elf->fildes); + return result; } @@ -324,6 +412,7 @@ dwarf_begin_elf (Elf *elf, Dwarf_Cmd cmd, Elf_Scn *scngrp) result->other_byte_order = true; result->elf = elf; + result->alt_fd = -1; /* Initialize the memory handling. */ result->mem_default_size = mem_default_size; diff --git a/libdw/dwarf_child.c b/libdw/dwarf_child.c index cc95fb3f..9446b880 100644 --- a/libdw/dwarf_child.c +++ b/libdw/dwarf_child.c @@ -1,5 +1,5 @@ /* Return child of current DIE. - Copyright (C) 2003-2011, 2014 Red Hat, Inc. + Copyright (C) 2003-2011, 2014, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -43,36 +43,27 @@ internal_function __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; /* Find the abbreviation entry. */ Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, &readp); if (unlikely (abbrevp == DWARF_END_ABBREV)) { - invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); return NULL; } - /* Search the name attribute. */ - unsigned char *const endp - = ((unsigned char *) dbg->sectiondata[IDX_debug_abbrev]->d_buf - + dbg->sectiondata[IDX_debug_abbrev]->d_size); - + /* Search the name attribute. Attribute has been checked when + Dwarf_Abbrev was created, we can read unchecked. */ const unsigned char *attrp = abbrevp->attrp; while (1) { /* Get attribute name and form. */ - if (unlikely (attrp >= endp)) - goto invalid_dwarf; unsigned int attr_name; - get_uleb128 (attr_name, attrp, endp); + get_uleb128_unchecked (attr_name, attrp); - if (unlikely (attrp >= endp)) - goto invalid_dwarf; unsigned int attr_form; - get_uleb128 (attr_form, attrp, endp); + get_uleb128_unchecked (attr_form, attrp); /* We can stop if we found the attribute with value zero. */ if (attr_name == 0 && attr_form == 0) @@ -86,7 +77,12 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, if (formp != NULL) *formp = attr_form; - return (unsigned char *) readp; + /* Normally the attribute data comes from the DIE/info, + except for implicit_form, where it comes from the abbrev. */ + if (attr_form == DW_FORM_implicit_const) + return (unsigned char *) attrp; + else + return (unsigned char *) readp; } /* Skip over the rest of this attribute (if there is any). */ @@ -101,6 +97,13 @@ __libdw_find_attr (Dwarf_Die *die, unsigned int search_name, // __libdw_form_val_len will have done a bounds check. readp += len; + + // If the value is in the abbrev data, skip it. + if (attr_form == DW_FORM_implicit_const) + { + int64_t attr_value __attribute__((__unused__)); + get_sleb128_unchecked (attr_value, attrp); + } } } diff --git a/libdw/dwarf_cu_die.c b/libdw/dwarf_cu_die.c index 194da58b..7594e7dc 100644 --- a/libdw/dwarf_cu_die.c +++ b/libdw/dwarf_cu_die.c @@ -37,8 +37,8 @@ Dwarf_Die * dwarf_cu_die (Dwarf_CU *cu, Dwarf_Die *result, Dwarf_Half *versionp, Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep, - uint8_t *offset_sizep, uint64_t *type_signaturep, - Dwarf_Off *type_offsetp) + uint8_t *offset_sizep, uint64_t *unit_idp, + Dwarf_Off *subdie_offsetp) { if (cu == NULL) return NULL; @@ -53,10 +53,10 @@ dwarf_cu_die (Dwarf_CU *cu, Dwarf_Die *result, Dwarf_Half *versionp, *address_sizep = cu->address_size; if (offset_sizep != NULL) *offset_sizep = cu->offset_size; - if (type_signaturep != NULL) - *type_signaturep = cu->type_sig8; - if (type_offsetp != NULL) - *type_offsetp = cu->type_offset; + if (unit_idp != NULL) + *unit_idp = cu->unit_id8; + if (subdie_offsetp != NULL) + *subdie_offsetp = cu->subdie_offset; return result; } diff --git a/libdw/dwarf_cu_info.c b/libdw/dwarf_cu_info.c new file mode 100644 index 00000000..30aee6c7 --- /dev/null +++ b/libdw/dwarf_cu_info.c @@ -0,0 +1,103 @@ +/* Provides information and DIEs associated with the Dwarf_CU unit. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "libdwP.h" + + +int +dwarf_cu_info (Dwarf_CU *cu, + Dwarf_Half *version, uint8_t *unit_type, + Dwarf_Die *cudie, Dwarf_Die *subdie, + uint64_t *unit_id, + uint8_t *address_size, uint8_t *offset_size) +{ + if (cu == NULL) + return -1; + + if (version != NULL) + *version = cu->version; + + if (unit_type != NULL) + *unit_type = cu->unit_type; + + if (cudie != NULL) + { + if (cu->version >= 2 && cu->version <= 5 + && cu->unit_type >= DW_UT_compile + && cu->unit_type <= DW_UT_split_type) + *cudie = CUDIE (cu); + else + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + } + + if (subdie != NULL) + { + if (cu->version >= 2 && cu->version <= 5) + { + /* For types, return the actual type DIE. For skeletons, + find the associated split compile unit and return its + DIE. */ + if (cu->unit_type == DW_UT_type + || cu->unit_type == DW_UT_split_type) + *subdie = SUBDIE(cu); + else if (cu->unit_type == DW_UT_skeleton) + { + Dwarf_CU *split_cu = __libdw_find_split_unit (cu); + if (split_cu != NULL) + *subdie = CUDIE(split_cu); + else + memset (subdie, '\0', sizeof (Dwarf_Die)); + } + else + memset (subdie, '\0', sizeof (Dwarf_Die)); + } + else + goto invalid; + } + + if (unit_id != NULL) + *unit_id = cu->unit_id8; + + if (address_size != NULL) + *address_size = cu->address_size; + + if (offset_size != NULL) + *offset_size = cu->offset_size; + + return 0; +} diff --git a/libdw/dwarf_cuoffset.c b/libdw/dwarf_cuoffset.c index ba376486..f13b02fd 100644 --- a/libdw/dwarf_cuoffset.c +++ b/libdw/dwarf_cuoffset.c @@ -38,7 +38,7 @@ Dwarf_Off dwarf_cuoffset (Dwarf_Die *die) { - return (die == NULL + return ((die == NULL || die->cu == NULL) ? (Dwarf_Off) -1l : (Dwarf_Off) (die->addr - die->cu->startp)); } diff --git a/libdw/dwarf_default_lower_bound.c b/libdw/dwarf_default_lower_bound.c new file mode 100644 index 00000000..a33a3433 --- /dev/null +++ b/libdw/dwarf_default_lower_bound.c @@ -0,0 +1,91 @@ +/* Get the default subrange lower bound for a given language. + Copyright (C) 2016 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "libdwP.h" + +/* Determine default lower bound from language, as per the DWARF5 + "Subrange Type Entries" table. */ +int +dwarf_default_lower_bound (int lang, Dwarf_Sword *result) +{ + switch (lang) + { + 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_03: + 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_Python: + case DW_LANG_UPC: + case DW_LANG_OpenCL: + case DW_LANG_Go: + case DW_LANG_Haskell: + case DW_LANG_OCaml: + case DW_LANG_Rust: + case DW_LANG_Swift: + case DW_LANG_Dylan: + case DW_LANG_RenderScript: + case DW_LANG_BLISS: + *result = 0; + return 0; + + case DW_LANG_Ada83: + case DW_LANG_Ada95: + case DW_LANG_Cobol74: + case DW_LANG_Cobol85: + case DW_LANG_Fortran77: + case DW_LANG_Fortran90: + case DW_LANG_Fortran95: + case DW_LANG_Fortran03: + case DW_LANG_Fortran08: + case DW_LANG_Pascal83: + case DW_LANG_Modula2: + case DW_LANG_Modula3: + case DW_LANG_PLI: + case DW_LANG_Julia: + *result = 1; + return 0; + + default: + __libdw_seterrno (DWARF_E_UNKNOWN_LANGUAGE); + return -1; + } +} +INTDEF (dwarf_default_lower_bound) diff --git a/libdw/dwarf_die_addr_die.c b/libdw/dwarf_die_addr_die.c new file mode 100644 index 00000000..65729166 --- /dev/null +++ b/libdw/dwarf_die_addr_die.c @@ -0,0 +1,70 @@ +/* Return offset of DIE. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include "libdwP.h" + + +Dwarf_Die * +dwarf_die_addr_die (Dwarf *dbg, void *addr, Dwarf_Die *result) +{ + if (dbg == NULL) + return NULL; + + Dwarf_CU *cu = __libdw_findcu_addr (dbg, addr); + + if (cu == NULL) + { + Dwarf *alt = INTUSE (dwarf_getalt) (dbg); + if (alt != NULL) + cu = __libdw_findcu_addr (alt, addr); + } + + if (cu == NULL) + { + Dwarf *split = __libdw_find_split_dbg_addr (dbg, addr); + if (split != NULL) + cu = __libdw_findcu_addr (split, addr); + } + + if (cu == NULL) + { + memset (result, '\0', sizeof (Dwarf_Die)); + return NULL; + } + + *result = (Dwarf_Die) { .addr = addr, .cu = cu }; + + return result; +} diff --git a/libdw/dwarf_dieoffset.c b/libdw/dwarf_dieoffset.c index 8028f6dd..3a8e2cb6 100644 --- a/libdw/dwarf_dieoffset.c +++ b/libdw/dwarf_dieoffset.c @@ -38,8 +38,8 @@ Dwarf_Off dwarf_dieoffset (Dwarf_Die *die) { - return (die == NULL - ? ~0ul + return ((die == NULL || die->cu == NULL) + ? (Dwarf_Off) -1 : (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 6c6d985a..29795c10 100644 --- a/libdw/dwarf_end.c +++ b/libdw/dwarf_end.c @@ -1,5 +1,5 @@ /* Release debugging handling context. - Copyright (C) 2002-2011, 2014 Red Hat, Inc. + Copyright (C) 2002-2011, 2014, 2018 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -35,6 +35,7 @@ #include #include #include +#include #include "libdwP.h" #include "cfi.h" @@ -54,6 +55,16 @@ cu_free (void *arg) Dwarf_Abbrev_Hash_free (&p->abbrev_hash); tdestroy (p->locs, noop_free); + + /* Free split dwarf one way (from skeleton to split). */ + if (p->unit_type == DW_UT_skeleton + && p->split != NULL && p->split != (void *)-1) + { + /* The fake_addr_cu might be shared, only release one. */ + if (p->dbg->fake_addr_cu == p->split->dbg->fake_addr_cu) + p->split->dbg->fake_addr_cu = NULL; + INTUSE(dwarf_end) (p->split->dbg); + } } @@ -80,6 +91,9 @@ dwarf_end (Dwarf *dwarf) /* Search tree for decoded .debug_lines units. */ tdestroy (dwarf->files_lines, noop_free); + /* And the split Dwarf. */ + tdestroy (dwarf->split_tree, noop_free); + struct libdw_memblock *memp = dwarf->mem_tail; /* The first block is allocated together with the Dwarf object. */ while (memp->prev != NULL) @@ -102,6 +116,26 @@ dwarf_end (Dwarf *dwarf) cu_free (dwarf->fake_loc_cu); free (dwarf->fake_loc_cu); } + if (dwarf->fake_loclists_cu != NULL) + { + cu_free (dwarf->fake_loclists_cu); + free (dwarf->fake_loclists_cu); + } + if (dwarf->fake_addr_cu != NULL) + { + cu_free (dwarf->fake_addr_cu); + free (dwarf->fake_addr_cu); + } + + /* Did we find and allocate the alt Dwarf ourselves? */ + if (dwarf->alt_fd != -1) + { + INTUSE(dwarf_end) (dwarf->alt_dwarf); + close (dwarf->alt_fd); + } + + /* The cached dir we found the Dwarf ELF file in. */ + free (dwarf->debugdir); /* Free the context descriptor. */ free (dwarf); diff --git a/libdw/dwarf_error.c b/libdw/dwarf_error.c index 66fdc81a..46ea16b3 100644 --- a/libdw/dwarf_error.c +++ b/libdw/dwarf_error.c @@ -1,7 +1,6 @@ /* Retrieve ELF descriptor used for DWARF access. - Copyright (C) 2002, 2003, 2004, 2005, 2009, 2014, 2015 Red Hat, Inc. + Copyright (C) 2002-2005, 2009, 2014, 2015, 2017, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2002. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -73,6 +72,9 @@ static const char *errmsgs[] = [DWARF_E_NO_ENTRY] = N_("no entries found"), [DWARF_E_INVALID_DWARF] = N_("invalid DWARF"), [DWARF_E_NO_STRING] = N_("no string data"), + [DWARF_E_NO_DEBUG_STR] = N_(".debug_str section missing"), + [DWARF_E_NO_DEBUG_LINE_STR] = N_(".debug_line_str section missing"), + [DWARF_E_NO_STR_OFFSETS] = N_(".debug_str_offsets section missing"), [DWARF_E_NO_ADDR] = N_("no address value"), [DWARF_E_NO_CONSTANT] = N_("no constant value"), [DWARF_E_NO_REFERENCE] = N_("no reference value"), @@ -83,7 +85,9 @@ static const char *errmsgs[] = [DWARF_E_VERSION] = N_("invalid DWARF version"), [DWARF_E_INVALID_DIR_IDX] = N_("invalid directory index"), [DWARF_E_ADDR_OUTOFRANGE] = N_("address out of range"), - [DWARF_E_NO_LOCLIST] = N_("no location list value"), + [DWARF_E_NO_DEBUG_LOC] = N_(".debug_loc section missing"), + [DWARF_E_NO_DEBUG_LOCLISTS] = N_(".debug_loclists section missing"), + [DWARF_E_NO_LOC_VALUE] = N_("not a location list value"), [DWARF_E_NO_BLOCK] = N_("no block data"), [DWARF_E_INVALID_LINE_IDX] = N_("invalid line index"), [DWARF_E_INVALID_ARANGE_IDX] = N_("invalid address range index"), @@ -91,10 +95,13 @@ static const char *errmsgs[] = [DWARF_E_NO_FLAG] = N_("no flag value"), [DWARF_E_INVALID_OFFSET] = N_("invalid offset"), [DWARF_E_NO_DEBUG_RANGES] = N_(".debug_ranges section missing"), + [DWARF_E_NO_DEBUG_RNGLISTS] = N_(".debug_rnglists section missing"), [DWARF_E_INVALID_CFI] = N_("invalid CFI section"), [DWARF_E_NO_ALT_DEBUGLINK] = N_("no alternative debug link found"), [DWARF_E_INVALID_OPCODE] = N_("invalid opcode"), [DWARF_E_NOT_CUDIE] = N_("not a CU (unit) DIE"), + [DWARF_E_UNKNOWN_LANGUAGE] = N_("unknown language code"), + [DWARF_E_NO_DEBUG_ADDR] = N_(".debug_addr section missing"), }; #define nerrmsgs (sizeof (errmsgs) / sizeof (errmsgs[0])) diff --git a/libdw/dwarf_formaddr.c b/libdw/dwarf_formaddr.c index ddc48382..9cd3d200 100644 --- a/libdw/dwarf_formaddr.c +++ b/libdw/dwarf_formaddr.c @@ -1,7 +1,6 @@ /* Return address represented by attribute. - Copyright (C) 2003-2010 Red Hat, Inc. + Copyright (C) 2003-2010, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2003. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -35,21 +34,113 @@ #include "libdwP.h" +int +__libdw_addrx (Dwarf_CU *cu, Dwarf_Word idx, Dwarf_Addr *addr) +{ + Dwarf_Off addr_off = __libdw_cu_addr_base (cu); + if (addr_off == (Dwarf_Off) -1) + return -1; + + Dwarf *dbg = cu->dbg; + if (dbg->sectiondata[IDX_debug_addr] == NULL) + { + __libdw_seterrno (DWARF_E_NO_DEBUG_ADDR); + return -1; + } + + /* The section should at least contain room for one address. */ + int address_size = cu->address_size; + if (cu->address_size > dbg->sectiondata[IDX_debug_addr]->d_size) + { + invalid_offset: + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return -1; + } + + if (addr_off > (dbg->sectiondata[IDX_debug_addr]->d_size + - address_size)) + goto invalid_offset; + + idx *= address_size; + if (idx > (dbg->sectiondata[IDX_debug_addr]->d_size + - address_size - addr_off)) + goto invalid_offset; + + const unsigned char *datap; + datap = dbg->sectiondata[IDX_debug_addr]->d_buf + addr_off + idx; + if (address_size == 4) + *addr = read_4ubyte_unaligned (dbg, datap); + else + *addr = read_8ubyte_unaligned (dbg, datap); + + return 0; +} + int dwarf_formaddr (Dwarf_Attribute *attr, Dwarf_Addr *return_addr) { if (attr == NULL) return -1; - if (unlikely (attr->form != DW_FORM_addr)) + Dwarf_Word idx; + Dwarf_CU *cu = attr->cu; + Dwarf *dbg = cu->dbg; + const unsigned char *datap = attr->valp; + const unsigned char *endp = attr->cu->endp; + switch (attr->form) { - __libdw_seterrno (DWARF_E_NO_ADDR); - return -1; + /* There is one form that just encodes the whole address. */ + case DW_FORM_addr: + if (__libdw_read_address (dbg, cu_sec_idx (cu), datap, + cu->address_size, return_addr)) + return -1; + return 0; + + /* All others encode an index into the .debug_addr section where + the address can be found. */ + case DW_FORM_GNU_addr_index: + case DW_FORM_addrx: + if (datap >= endp) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + get_uleb128 (idx, datap, endp); + break; + + case DW_FORM_addrx1: + if (datap >= endp - 1) + goto invalid; + idx = *datap; + break; + + case DW_FORM_addrx2: + if (datap >= endp - 2) + goto invalid; + idx = read_2ubyte_unaligned (dbg, datap); + break; + + case DW_FORM_addrx3: + if (datap >= endp - 3) + goto invalid; + idx = read_3ubyte_unaligned (dbg, datap); + break; + + case DW_FORM_addrx4: + if (datap >= endp - 4) + goto invalid; + idx = read_4ubyte_unaligned (dbg, datap); + break; + + default: + __libdw_seterrno (DWARF_E_NO_ADDR); + return -1; } - if (__libdw_read_address (attr->cu->dbg, - cu_sec_idx (attr->cu), attr->valp, - attr->cu->address_size, return_addr)) + /* So we got an index. Lets see if it is valid and we can get the actual + address. */ + if (__libdw_addrx (cu, idx, return_addr) != 0) return -1; return 0; diff --git a/libdw/dwarf_formblock.c b/libdw/dwarf_formblock.c index 13f9e72a..924baf45 100644 --- a/libdw/dwarf_formblock.c +++ b/libdw/dwarf_formblock.c @@ -1,5 +1,5 @@ /* Return block represented by attribute. - Copyright (C) 2004-2010, 2014 Red Hat, Inc. + Copyright (C) 2004-2010, 2014, 2018 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -75,6 +75,16 @@ dwarf_formblock (Dwarf_Attribute *attr, Dwarf_Block *return_block) return_block->data = (unsigned char *) datap; break; + case DW_FORM_data16: + /* The DWARFv5 spec calls this constant class, but we interpret + it as a block that the user will need to interpret when + converting to a value. */ + if (unlikely (endp - datap < 16)) + goto invalid; + return_block->length = 16; + return_block->data = (unsigned char *) datap; + break; + default: __libdw_seterrno (DWARF_E_NO_BLOCK); return -1; diff --git a/libdw/dwarf_formref.c b/libdw/dwarf_formref.c index 2240a258..2bae2a44 100644 --- a/libdw/dwarf_formref.c +++ b/libdw/dwarf_formref.c @@ -86,6 +86,8 @@ __libdw_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset) case DW_FORM_ref_addr: case DW_FORM_ref_sig8: case DW_FORM_GNU_ref_alt: + case DW_FORM_ref_sup4: + case DW_FORM_ref_sup8: /* These aren't handled by dwarf_formref, only by dwarf_formref_die. */ __libdw_seterrno (DWARF_E_INVALID_REFERENCE); return -1; diff --git a/libdw/dwarf_formref_die.c b/libdw/dwarf_formref_die.c index 7e2b11a2..f196331a 100644 --- a/libdw/dwarf_formref_die.c +++ b/libdw/dwarf_formref_die.c @@ -1,5 +1,5 @@ /* Look up the DIE in a reference-form attribute. - Copyright (C) 2005-2010 Red Hat, Inc. + Copyright (C) 2005-2010, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -44,16 +44,23 @@ dwarf_formref_die (Dwarf_Attribute *attr, Dwarf_Die *result) struct Dwarf_CU *cu = attr->cu; Dwarf_Off offset; - if (attr->form == DW_FORM_ref_addr || attr->form == DW_FORM_GNU_ref_alt) + if (attr->form == DW_FORM_ref_addr || attr->form == DW_FORM_GNU_ref_alt + || attr->form == DW_FORM_ref_sup4 || attr->form == DW_FORM_ref_sup8) { /* This has an absolute offset. */ - uint8_t ref_size = (cu->version == 2 && attr->form == DW_FORM_ref_addr - ? cu->address_size - : cu->offset_size); + uint8_t ref_size; + if (cu->version == 2 && attr->form == DW_FORM_ref_addr) + ref_size = cu->address_size; + else if (attr->form == DW_FORM_ref_sup4) + ref_size = 4; + else if (attr->form == DW_FORM_ref_sup8) + ref_size = 8; + else + ref_size = cu->offset_size; Dwarf *dbg_ret = (attr->form == DW_FORM_GNU_ref_alt - ? cu->dbg->alt_dwarf : cu->dbg); + ? INTUSE(dwarf_getalt) (cu->dbg) : cu->dbg); if (dbg_ret == NULL) { @@ -73,27 +80,38 @@ dwarf_formref_die (Dwarf_Attribute *attr, Dwarf_Die *result) if (attr->form == DW_FORM_ref_sig8) { /* This doesn't have an offset, but instead a value we - have to match in the .debug_types type unit headers. */ + have to match in the type unit headers. */ uint64_t sig = read_8ubyte_unaligned (cu->dbg, attr->valp); cu = Dwarf_Sig8_Hash_find (&cu->dbg->sig8_hash, sig, NULL); if (cu == NULL) - /* Not seen before. We have to scan through the type units. */ - do - { - cu = __libdw_intern_next_unit (attr->cu->dbg, true); - if (cu == NULL) - { - __libdw_seterrno (INTUSE(dwarf_errno) () - ?: DWARF_E_INVALID_REFERENCE); - return NULL; - } - } - while (cu->type_sig8 != sig); - - datap = cu->dbg->sectiondata[IDX_debug_types]->d_buf; - size = cu->dbg->sectiondata[IDX_debug_types]->d_size; - offset = cu->start + cu->type_offset; + { + /* Not seen before. We have to scan through the type units. + Since DWARFv5 these can (also) be found in .debug_info, + so scan that first. */ + bool scan_debug_types = false; + do + { + cu = __libdw_intern_next_unit (attr->cu->dbg, scan_debug_types); + if (cu == NULL) + { + if (scan_debug_types == false) + scan_debug_types = true; + else + { + __libdw_seterrno (INTUSE(dwarf_errno) () + ?: DWARF_E_INVALID_REFERENCE); + return NULL; + } + } + } + while (cu == NULL || cu->unit_id8 != sig); + } + + int secid = cu_sec_idx (cu); + datap = cu->dbg->sectiondata[secid]->d_buf; + size = cu->dbg->sectiondata[secid]->d_size; + offset = cu->start + cu->subdie_offset; } else { diff --git a/libdw/dwarf_formsdata.c b/libdw/dwarf_formsdata.c index e7deaee1..def32c9d 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, 2014 Red Hat, Inc. + Copyright (C) 2003, 2005, 2014, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -53,25 +53,25 @@ dwarf_formsdata (Dwarf_Attribute *attr, Dwarf_Sword *return_sval) __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1; } - *return_sval = *attr->valp; + *return_sval = (signed char) *attr->valp; break; case DW_FORM_data2: if (datap + 2 > endp) goto invalid; - *return_sval = read_2ubyte_unaligned (attr->cu->dbg, attr->valp); + *return_sval = read_2sbyte_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); + *return_sval = read_4sbyte_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); + *return_sval = read_8sbyte_unaligned (attr->cu->dbg, attr->valp); break; case DW_FORM_sdata: @@ -86,6 +86,11 @@ dwarf_formsdata (Dwarf_Attribute *attr, Dwarf_Sword *return_sval) get_uleb128 (*return_sval, datap, endp); break; + case DW_FORM_implicit_const: + // The data comes from the abbrev, which has been bounds checked. + get_sleb128_unchecked (*return_sval, datap); + break; + default: __libdw_seterrno (DWARF_E_NO_CONSTANT); return -1; diff --git a/libdw/dwarf_formstring.c b/libdw/dwarf_formstring.c index 83abd53d..c3e892a8 100644 --- a/libdw/dwarf_formstring.c +++ b/libdw/dwarf_formstring.c @@ -1,7 +1,6 @@ /* Return string associated with given attribute. - Copyright (C) 2003-2010, 2013 Red Hat, Inc. + Copyright (C) 2003-2010, 2013, 2017, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2003. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -47,8 +46,11 @@ dwarf_formstring (Dwarf_Attribute *attrp) /* A simple inlined string. */ return (const char *) attrp->valp; - Dwarf *dbg = attrp->cu->dbg; - Dwarf *dbg_ret = attrp->form == DW_FORM_GNU_strp_alt ? dbg->alt_dwarf : dbg; + Dwarf_CU *cu = attrp->cu; + Dwarf *dbg = cu->dbg; + Dwarf *dbg_ret = ((attrp->form == DW_FORM_GNU_strp_alt + || attrp->form == DW_FORM_strp_sup) + ? INTUSE(dwarf_getalt) (dbg) : dbg); if (unlikely (dbg_ret == NULL)) { @@ -56,20 +58,123 @@ dwarf_formstring (Dwarf_Attribute *attrp) return NULL; } - - if (unlikely (attrp->form != DW_FORM_strp - && attrp->form != DW_FORM_GNU_strp_alt) - || dbg_ret->sectiondata[IDX_debug_str] == NULL) + Elf_Data *data = ((attrp->form == DW_FORM_line_strp) + ? dbg_ret->sectiondata[IDX_debug_line_str] + : dbg_ret->sectiondata[IDX_debug_str]); + if (data == NULL) { - __libdw_seterrno (DWARF_E_NO_STRING); + __libdw_seterrno ((attrp->form == DW_FORM_line_strp) + ? DWARF_E_NO_DEBUG_LINE_STR + : DWARF_E_NO_DEBUG_STR); return NULL; } uint64_t off; - if (__libdw_read_offset (dbg, dbg_ret, cu_sec_idx (attrp->cu), attrp->valp, - attrp->cu->offset_size, &off, IDX_debug_str, 1)) - return NULL; + if (attrp->form == DW_FORM_strp + || attrp->form == DW_FORM_GNU_strp_alt + || attrp->form == DW_FORM_strp_sup) + { + if (__libdw_read_offset (dbg, dbg_ret, cu_sec_idx (cu), + attrp->valp, cu->offset_size, &off, + IDX_debug_str, 1)) + return NULL; + } + else if (attrp->form == DW_FORM_line_strp) + { + if (__libdw_read_offset (dbg, dbg_ret, cu_sec_idx (cu), + attrp->valp, cu->offset_size, &off, + IDX_debug_line_str, 1)) + return NULL; + } + else + { + Dwarf_Word idx; + const unsigned char *datap = attrp->valp; + const unsigned char *endp = cu->endp; + switch (attrp->form) + { + case DW_FORM_strx: + case DW_FORM_GNU_str_index: + if (datap >= endp) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return NULL; + } + get_uleb128 (idx, datap, endp); + break; + + case DW_FORM_strx1: + if (datap >= endp - 1) + goto invalid; + idx = *datap; + break; + + case DW_FORM_strx2: + if (datap >= endp - 2) + goto invalid; + idx = read_2ubyte_unaligned (dbg, datap); + break; + + case DW_FORM_strx3: + if (datap >= endp - 3) + goto invalid; + idx = read_3ubyte_unaligned (dbg, datap); + break; + + case DW_FORM_strx4: + if (datap >= endp - 4) + goto invalid; + idx = read_4ubyte_unaligned (dbg, datap); + break; + + default: + __libdw_seterrno (DWARF_E_NO_STRING); + return NULL; + } + + /* So we got an index in the .debug_str_offsets. Lets see if it + is valid and we can get the actual .debug_str offset. */ + Dwarf_Off str_off = __libdw_cu_str_off_base (cu); + if (str_off == (Dwarf_Off) -1) + return NULL; + + if (dbg->sectiondata[IDX_debug_str_offsets] == NULL) + { + __libdw_seterrno (DWARF_E_NO_STR_OFFSETS); + return NULL; + } + + /* The section should at least contain room for one offset. */ + int offset_size = cu->offset_size; + if (cu->offset_size > dbg->sectiondata[IDX_debug_str_offsets]->d_size) + { + invalid_offset: + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return NULL; + } + + /* And the base offset should be at least inside the section. */ + if (str_off > (dbg->sectiondata[IDX_debug_str_offsets]->d_size + - offset_size)) + goto invalid_offset; + + size_t max_idx = (dbg->sectiondata[IDX_debug_str_offsets]->d_size + - offset_size - str_off) / offset_size; + if (idx > max_idx) + goto invalid_offset; + + datap = (dbg->sectiondata[IDX_debug_str_offsets]->d_buf + + str_off + (idx * offset_size)); + if (offset_size == 4) + off = read_4ubyte_unaligned (dbg, datap); + else + off = read_8ubyte_unaligned (dbg, datap); + + if (off > dbg->sectiondata[IDX_debug_str]->d_size) + goto invalid_offset; + } - return (const char *) dbg_ret->sectiondata[IDX_debug_str]->d_buf + off; + return (const char *) data->d_buf + off; } INTDEF(dwarf_formstring) diff --git a/libdw/dwarf_formudata.c b/libdw/dwarf_formudata.c index e41981a4..26f86f12 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, 2014 Red Hat, Inc. + Copyright (C) 2003-2012, 2014, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -34,15 +34,26 @@ #include #include "libdwP.h" -internal_function unsigned char * +internal_function const unsigned char * __libdw_formptr (Dwarf_Attribute *attr, int sec_index, - int err_nodata, unsigned char **endpp, + int err_nodata, const unsigned char **endpp, Dwarf_Off *offsetp) { if (attr == NULL) return NULL; const Elf_Data *d = attr->cu->dbg->sectiondata[sec_index]; + Dwarf_CU *skel = NULL; /* See below, needed for GNU DebugFission. */ + if (unlikely (d == NULL + && sec_index == IDX_debug_ranges + && attr->cu->version < 5 + && attr->cu->unit_type == DW_UT_split_compile)) + { + skel = __libdw_find_split_unit (attr->cu); + if (skel != NULL) + d = skel->dbg->sectiondata[IDX_debug_ranges]; + } + if (unlikely (d == NULL)) { __libdw_seterrno (err_nodata); @@ -52,10 +63,41 @@ __libdw_formptr (Dwarf_Attribute *attr, int sec_index, Dwarf_Word offset; if (attr->form == DW_FORM_sec_offset) { - if (__libdw_read_offset (attr->cu->dbg, attr->cu->dbg, - cu_sec_idx (attr->cu), attr->valp, - attr->cu->offset_size, &offset, sec_index, 0)) - return NULL; + /* GNU DebugFission is slightly odd. It uses DW_FORM_sec_offset + in split units, but they are really (unrelocated) offsets + from the skeleton DW_AT_GNU_ranges_base (which is only used + for the split unit, not the skeleton ranges itself, see also + DW_AT_rnglists_base, which is used in DWARF5 for both, but + points to the offsets index). So it isn't really a formptr, + but an offset + base calculation. */ + if (unlikely (skel != NULL)) + { + Elf_Data *data = attr->cu->dbg->sectiondata[cu_sec_idx (attr->cu)]; + const unsigned char *datap = attr->valp; + size_t size = attr->cu->offset_size; + if (unlikely (data == NULL + || datap < (const unsigned char *) data->d_buf + || data->d_size < size + || ((size_t) (datap + - (const unsigned char *) data->d_buf) + > data->d_size - size))) + goto invalid; + + if (size == 4) + offset = read_4ubyte_unaligned (attr->cu->dbg, datap); + else + offset = read_8ubyte_unaligned (attr->cu->dbg, datap); + + offset += __libdw_cu_ranges_base (skel); + } + else + { + if (__libdw_read_offset (attr->cu->dbg, attr->cu->dbg, + cu_sec_idx (attr->cu), attr->valp, + attr->cu->offset_size, &offset, + sec_index, 0)) + return NULL; + } } else if (attr->cu->version > 3) goto invalid; @@ -141,11 +183,24 @@ dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval) case DW_AT_string_length: case DW_AT_use_location: case DW_AT_vtable_elem_location: - /* loclistptr */ - if (__libdw_formptr (attr, IDX_debug_loc, - DWARF_E_NO_LOCLIST, NULL, - return_uval) == NULL) - return -1; + case DW_AT_GNU_locviews: + case DW_AT_loclists_base: + if (attr->cu->version < 5) + { + /* loclistptr */ + if (__libdw_formptr (attr, IDX_debug_loc, + DWARF_E_NO_DEBUG_LOC, NULL, + return_uval) == NULL) + return -1; + } + else + { + /* loclist, loclistsptr */ + if (__libdw_formptr (attr, IDX_debug_loclists, + DWARF_E_NO_DEBUG_LOCLISTS, NULL, + return_uval) == NULL) + return -1; + } break; case DW_AT_macro_info: @@ -157,6 +212,7 @@ dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval) break; case DW_AT_GNU_macros: + case DW_AT_macros: /* macptr into .debug_macro */ if (__libdw_formptr (attr, IDX_debug_macro, DWARF_E_NO_ENTRY, NULL, @@ -166,11 +222,24 @@ dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval) case DW_AT_ranges: case DW_AT_start_scope: - /* rangelistptr */ - if (__libdw_formptr (attr, IDX_debug_ranges, - DWARF_E_NO_DEBUG_RANGES, NULL, - return_uval) == NULL) - return -1; + case DW_AT_GNU_ranges_base: + case DW_AT_rnglists_base: + if (attr->cu->version < 5) + { + /* rangelistptr */ + if (__libdw_formptr (attr, IDX_debug_ranges, + DWARF_E_NO_DEBUG_RANGES, NULL, + return_uval) == NULL) + return -1; + } + else + { + /* rnglistsptr */ + if (__libdw_formptr (attr, IDX_debug_rnglists, + DWARF_E_NO_DEBUG_RNGLISTS, NULL, + return_uval) == NULL) + return -1; + } break; case DW_AT_stmt_list: @@ -181,6 +250,23 @@ dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval) return -1; break; + case DW_AT_addr_base: + case DW_AT_GNU_addr_base: + /* addrptr */ + if (__libdw_formptr (attr, IDX_debug_addr, + DWARF_E_NO_DEBUG_ADDR, NULL, + return_uval) == NULL) + return -1; + break; + + case DW_AT_str_offsets_base: + /* stroffsetsptr */ + if (__libdw_formptr (attr, IDX_debug_str_offsets, + DWARF_E_NO_STR_OFFSETS, NULL, + return_uval) == NULL) + return -1; + break; + default: /* sec_offset can only be used by one of the above attrs. */ if (attr->form == DW_FORM_sec_offset) @@ -216,11 +302,51 @@ dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval) break; case DW_FORM_udata: + case DW_FORM_rnglistx: + case DW_FORM_loclistx: if (datap + 1 > endp) goto invalid; get_uleb128 (*return_uval, datap, endp); break; + case DW_FORM_implicit_const: + // The data comes from the abbrev, which has been bounds checked. + get_sleb128_unchecked (*return_uval, datap); + break; + + /* These are indexes into the .debug_addr section, normally resolved + with dwarf_formaddr. Here treat as constants. */ + case DW_FORM_GNU_addr_index: + case DW_FORM_addrx: + if (datap >= endp) + goto invalid; + get_uleb128 (*return_uval, datap, endp); + break; + + case DW_FORM_addrx1: + if (datap >= endp - 1) + goto invalid; + *return_uval = *datap; + break; + + case DW_FORM_addrx2: + if (datap >= endp - 2) + goto invalid; + *return_uval = read_2ubyte_unaligned (attr->cu->dbg, datap); + break; + + case DW_FORM_addrx3: + if (datap >= endp - 3) + goto invalid; + *return_uval = read_3ubyte_unaligned (attr->cu->dbg, datap); + break; + + case DW_FORM_addrx4: + if (datap >= endp - 4) + goto invalid; + *return_uval = read_4ubyte_unaligned (attr->cu->dbg, datap); + break; + default: __libdw_seterrno (DWARF_E_NO_CONSTANT); return -1; diff --git a/libdw/dwarf_frame_register.c b/libdw/dwarf_frame_register.c index 37e8e917..d0159fb8 100644 --- a/libdw/dwarf_frame_register.c +++ b/libdw/dwarf_frame_register.c @@ -62,7 +62,7 @@ dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem, /* Use the default rule for registers not yet mentioned in CFI. */ if (fs->cache->default_same_value) goto same_value; - /*FALLTHROUGH*/ + FALLTHROUGH; case reg_undefined: /* The value is known to be unavailable. */ break; diff --git a/libdw/dwarf_get_units.c b/libdw/dwarf_get_units.c new file mode 100644 index 00000000..6215bf4b --- /dev/null +++ b/libdw/dwarf_get_units.c @@ -0,0 +1,131 @@ +/* Iterate through the CU units for a given Dwarf. + Copyright (C) 2016, 2017 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include "libdwP.h" + +int +dwarf_get_units (Dwarf *dwarf, Dwarf_CU *cu, Dwarf_CU **next_cu, + Dwarf_Half *version, uint8_t *unit_type, + Dwarf_Die *cudie, Dwarf_Die *subdie) +{ + /* Handle existing error. */ + if (dwarf == NULL) + return -1; + + Dwarf_Off off; + bool v4type; + if (cu == NULL) + { + off = 0; + v4type = false; + } + else + { + off = cu->end; + v4type = cu->sec_idx != IDX_debug_info; + + /* Make sure we got a real (not fake) CU. */ + if (cu->sec_idx != IDX_debug_info && cu->sec_idx != IDX_debug_types) + { + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return -1; + } + + /* Do we have to switch to the other section, or are we at the end? */ + if (! v4type) + { + if (off >= cu->dbg->sectiondata[IDX_debug_info]->d_size) + { + if (cu->dbg->sectiondata[IDX_debug_types] == NULL) + return 1; + + off = 0; + v4type = true; + } + } + else + if (off >= cu->dbg->sectiondata[IDX_debug_types]->d_size) + return 1; + } + + *next_cu = __libdw_findcu (dwarf, off, v4type); + if (*next_cu == NULL) + return -1; + + Dwarf_CU *next = (*next_cu); + + if (version != NULL) + *version = next->version; + + if (unit_type != NULL) + *unit_type = next->unit_type; + + if (cudie != NULL) + { + if (next->version >= 2 && next->version <= 5 + && next->unit_type >= DW_UT_compile + && next->unit_type <= DW_UT_split_type) + *cudie = CUDIE (next); + else + memset (cudie, '\0', sizeof (Dwarf_Die)); + } + + if (subdie != NULL) + { + if (next->version >= 2 && next->version <= 5) + { + /* For types, return the actual type DIE. For skeletons, + find the associated split compile unit and return its + DIE. */ + if (next->unit_type == DW_UT_type + || next->unit_type == DW_UT_split_type) + *subdie = SUBDIE(next); + else if (next->unit_type == DW_UT_skeleton) + { + Dwarf_CU *split_cu = __libdw_find_split_unit (next); + if (split_cu != NULL) + *subdie = CUDIE(split_cu); + else + memset (subdie, '\0', sizeof (Dwarf_Die)); + } + else + memset (subdie, '\0', sizeof (Dwarf_Die)); + } + else + memset (subdie, '\0', sizeof (Dwarf_Die)); + } + + return 0; +} diff --git a/libdw/dwarf_getabbrev.c b/libdw/dwarf_getabbrev.c index ef51b847..6a7e981b 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, 2014 Red Hat, Inc. + Copyright (C) 2003, 2004, 2005, 2006, 2014, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -121,8 +121,7 @@ __libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Off offset, abb->attrp = (unsigned char *) abbrevp; abb->offset = offset; - /* Skip over all the attributes and count them while doing so. */ - abb->attrcnt = 0; + /* Skip over all the attributes and check rest of the abbrev is valid. */ unsigned int attrname; unsigned int attrform; do @@ -133,8 +132,15 @@ __libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Off offset, if (abbrevp >= end) goto invalid; get_uleb128 (attrform, abbrevp, end); + if (attrform == DW_FORM_implicit_const) + { + int64_t formval __attribute__((__unused__)); + if (abbrevp >= end) + goto invalid; + get_sleb128 (formval, abbrevp, end); + } } - while (attrname != 0 && attrform != 0 && ++abb->attrcnt); + while (attrname != 0 || attrform != 0); /* Return the length to the caller if she asked for it. */ if (lengthp != NULL) @@ -152,7 +158,21 @@ __libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Off offset, Dwarf_Abbrev * dwarf_getabbrev (Dwarf_Die *die, Dwarf_Off offset, size_t *lengthp) { - return __libdw_getabbrev (die->cu->dbg, die->cu, - die->cu->orig_abbrev_offset + offset, lengthp, - NULL); + if (die == NULL || die->cu == NULL) + return NULL; + + Dwarf_CU *cu = die->cu; + Dwarf *dbg = cu->dbg; + Dwarf_Off abbrev_offset = cu->orig_abbrev_offset; + Elf_Data *data = dbg->sectiondata[IDX_debug_abbrev]; + if (data == NULL) + return NULL; + + if (offset >= data->d_size - abbrev_offset) + { + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return NULL; + } + + return __libdw_getabbrev (dbg, cu, abbrev_offset + offset, lengthp, NULL); } diff --git a/libdw/dwarf_getabbrevattr.c b/libdw/dwarf_getabbrevattr.c index 3b4da99c..54ff604f 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, 2014 Red Hat, Inc. + Copyright (C) 2003, 2004, 2005, 2014, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -37,8 +37,9 @@ int -dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep, - unsigned int *formp, Dwarf_Off *offsetp) +dwarf_getabbrevattr_data (Dwarf_Abbrev *abbrev, size_t idx, + unsigned int *namep, unsigned int *formp, + Dwarf_Sword *datap, Dwarf_Off *offsetp) { if (abbrev == NULL) return -1; @@ -48,15 +49,21 @@ dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep, const unsigned char *start_attrp; unsigned int name; unsigned int form; + Dwarf_Word data; do { start_attrp = 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)); + /* Attribute code and form are encoded as ULEB128 values. + Already checked when Dwarf_Abbrev was created, read unchecked. */ + get_uleb128_unchecked (name, attrp); + get_uleb128_unchecked (form, attrp); + + if (form == DW_FORM_implicit_const) + get_sleb128_unchecked (data, attrp); + else + data = 0; /* If both values are zero the index is out of range. */ if (name == 0 && form == 0) @@ -69,8 +76,19 @@ dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep, *namep = name; if (formp != NULL) *formp = form; + if (datap != NULL) + *datap = data; if (offsetp != NULL) *offsetp = (start_attrp - abbrev->attrp) + abbrev->offset; return 0; } +INTDEF(dwarf_getabbrevattr_data) + +int +dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep, + unsigned int *formp, Dwarf_Off *offsetp) +{ + return INTUSE(dwarf_getabbrevattr_data) (abbrev, idx, namep, formp, + NULL, offsetp); +} diff --git a/libdw/dwarf_getalt.c b/libdw/dwarf_getalt.c index cc434f03..0a12dfae 100644 --- a/libdw/dwarf_getalt.c +++ b/libdw/dwarf_getalt.c @@ -1,5 +1,5 @@ /* Retrieves the DWARF descriptor for debugaltlink data. - Copyright (C) 2014 Red Hat, Inc. + Copyright (C) 2014, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -31,12 +31,154 @@ #endif #include "libdwP.h" +#include "libelfP.h" +#include "libdwelfP.h" +#include "system.h" + +#include +#include +#include +#include +#include +#include +#include +#include + + +char * +internal_function +__libdw_filepath (const char *debugdir, const char *dir, const char *file) +{ + if (file == NULL) + return NULL; + + if (file[0] == '/') + return strdup (file); + + if (dir != NULL && dir[0] == '/') + { + size_t dirlen = strlen (dir); + size_t filelen = strlen (file); + size_t len = dirlen + 1 + filelen + 1; + char *path = malloc (len); + if (path != NULL) + { + char *c = mempcpy (path, dir, dirlen); + if (dir[dirlen - 1] != '/') + *c++ = '/'; + mempcpy (c, file, filelen + 1); + } + return path; + } + + if (debugdir != NULL) + { + size_t debugdirlen = strlen (debugdir); + size_t dirlen = dir != NULL ? strlen (dir) : 0; + size_t filelen = strlen (file); + size_t len = debugdirlen + 1 + dirlen + 1 + filelen + 1; + char *path = malloc (len); + if (path != NULL) + { + char *c = mempcpy (path, debugdir, debugdirlen); + if (dirlen > 0) + { + c = mempcpy (c, dir, dirlen); + if (dir[dirlen - 1] != '/') + *c++ = '/'; + } + mempcpy (c, file, filelen + 1); + return path; + } + } + + return NULL; +} + +static void +find_debug_altlink (Dwarf *dbg) +{ + const char *altname; + const void *build_id; + ssize_t build_id_len = INTUSE(dwelf_dwarf_gnu_debugaltlink) (dbg, + &altname, + &build_id); + + /* Couldn't even get the debugaltlink. It probably doesn't exist. */ + if (build_id_len <= 0) + return; + + const uint8_t *id = (const uint8_t *) build_id; + size_t id_len = build_id_len; + int fd = -1; + + /* We only look in the standard path. And relative to the dbg file. */ +#define DEBUGINFO_PATH "/usr/lib/debug" + + /* We don't handle very short or really large build-ids. We need at + at least 3 and allow for up to 64 (normally ids are 20 long). */ +#define MIN_BUILD_ID_BYTES 3 +#define MAX_BUILD_ID_BYTES 64 + if (id_len >= MIN_BUILD_ID_BYTES && id_len <= MAX_BUILD_ID_BYTES) + { + /* Note sizeof a string literal includes the trailing zero. */ + char id_path[sizeof DEBUGINFO_PATH - 1 + sizeof "/.build-id/" - 1 + + 2 + 1 + (MAX_BUILD_ID_BYTES - 1) * 2 + sizeof ".debug"]; + sprintf (&id_path[0], "%s%s", DEBUGINFO_PATH, "/.build-id/"); + sprintf (&id_path[sizeof DEBUGINFO_PATH - 1 + sizeof "/.build-id/" - 1], + "%02" PRIx8 "/", (uint8_t) id[0]); + for (size_t i = 1; i < id_len; ++i) + sprintf (&id_path[sizeof DEBUGINFO_PATH - 1 + sizeof "/.build-id/" - 1 + + 3 + (i - 1) * 2], "%02" PRIx8, (uint8_t) id[i]); + strcpy (&id_path[sizeof DEBUGINFO_PATH - 1 + sizeof "/.build-id/" - 1 + + 3 + (id_len - 1) * 2], ".debug"); + + fd = TEMP_FAILURE_RETRY (open (id_path, O_RDONLY)); + } + + /* Fall back on (possible relative) alt file path. */ + if (fd < 0) + { + char *altpath = __libdw_filepath (dbg->debugdir, NULL, altname); + if (altpath != NULL) + { + fd = TEMP_FAILURE_RETRY (open (altpath, O_RDONLY)); + free (altpath); + } + } + + if (fd >= 0) + { + Dwarf *alt = dwarf_begin (fd, O_RDONLY); + if (alt != NULL) + { + dbg->alt_dwarf = alt; + dbg->alt_fd = fd; + } + else + close (fd); + } +} Dwarf * dwarf_getalt (Dwarf *main) { - if (main == NULL) + /* Only try once. */ + if (main == NULL || main->alt_dwarf == (void *) -1) return NULL; + + if (main->alt_dwarf != NULL) + return main->alt_dwarf; + + find_debug_altlink (main); + + /* If we found nothing, make sure we don't try again. */ + if (main->alt_dwarf == NULL) + { + main->alt_dwarf = (void *) -1; + return NULL; + } + return main->alt_dwarf; } INTDEF (dwarf_getalt) diff --git a/libdw/dwarf_getaranges.c b/libdw/dwarf_getaranges.c index 4252746e..de5b81ba 100644 --- a/libdw/dwarf_getaranges.c +++ b/libdw/dwarf_getaranges.c @@ -1,5 +1,5 @@ /* Return list address ranges. - Copyright (C) 2000-2010 Red Hat, Inc. + Copyright (C) 2000-2010, 2016, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -148,6 +148,10 @@ dwarf_getaranges (Dwarf *dbg, Dwarf_Aranges **aranges, size_t *naranges) length_bytes, &offset, IDX_debug_info, 4)) goto fail; + /* Next up two bytes for address and segment size. */ + if (readp + 2 > readendp) + goto invalid; + unsigned int address_size = *readp++; if (unlikely (address_size != 4 && address_size != 8)) goto invalid; @@ -195,16 +199,15 @@ dwarf_getaranges (Dwarf *dbg, Dwarf_Aranges **aranges, size_t *naranges) new_arange->arange.length = range_length; /* We store the actual CU DIE offset, not the CU header offset. */ - const char *cu_header = (dbg->sectiondata[IDX_debug_info]->d_buf - + offset); - unsigned int offset_size; - if (read_4ubyte_unaligned_noncvt (cu_header) == DWARF3_LENGTH_64_BIT) - offset_size = 8; - else - offset_size = 4; - new_arange->arange.offset = DIE_OFFSET_FROM_CU_OFFSET (offset, - offset_size, - false); + Dwarf_CU *cu = __libdw_findcu (dbg, offset, false); + if (unlikely (cu == NULL)) + { + /* We haven't gotten a chance to link in the new_arange + into the arangelist, don't leak it. */ + free (new_arange); + goto fail; + } + new_arange->arange.offset = __libdw_first_die_off_from_cu (cu); new_arange->next = arangelist; arangelist = new_arange; diff --git a/libdw/dwarf_getattrcnt.c b/libdw/dwarf_getattrcnt.c index 2bfb4ac5..a05976d4 100644 --- a/libdw/dwarf_getattrcnt.c +++ b/libdw/dwarf_getattrcnt.c @@ -1,5 +1,5 @@ /* Get number of attributes of abbreviation. - Copyright (C) 2003, 2004 Red Hat, Inc. + Copyright (C) 2003, 2004, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -40,7 +40,22 @@ dwarf_getattrcnt (Dwarf_Abbrev *abbrev, size_t *attrcntp) if (abbrev == NULL) return -1; - *attrcntp = abbrev->attrcnt; + const unsigned char *abbrevp = abbrev->attrp; + + /* Skip over all the attributes and count them while doing so. */ + int attrcnt = 0; + unsigned int attrname; + unsigned int attrform; + do + { + /* We can use unchecked since they were checked when the Dwrf_Abbrev + was created. */ + get_uleb128_unchecked (attrname, abbrevp); + get_uleb128_unchecked (attrform, abbrevp); + } + while (attrname != 0 && attrform != 0 && ++attrcnt); + + *attrcntp = attrcnt; return 0; } diff --git a/libdw/dwarf_getattrs.c b/libdw/dwarf_getattrs.c index 0da8b5ba..50faf988 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, 2014 Red Hat, Inc. + Copyright (C) 2004, 2005, 2008, 2009, 2014, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2004. @@ -51,7 +51,6 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), if (unlikely (abbrevp == DWARF_END_ABBREV)) { - invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1l; } @@ -61,24 +60,15 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), 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 >= endp)) - goto invalid_dwarf; - - /* Get attribute name and form. */ + /* Get attribute name and form. Dwarf_Abbrev was checked when + created, so we can read unchecked. */ Dwarf_Attribute attr; const unsigned char *remembered_attrp = attrp; - get_uleb128 (attr.code, attrp, endp); - if (unlikely (attrp >= endp)) - goto invalid_dwarf; - get_uleb128 (attr.form, attrp, endp); + get_uleb128_unchecked (attr.code, attrp); + get_uleb128_unchecked (attr.form, attrp); /* We can stop if we found the attribute with value zero. */ if (attr.code == 0 && attr.form == 0) @@ -93,7 +83,10 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), if (remembered_attrp >= offset_attrp) { /* Fill in the rest. */ - attr.valp = (unsigned char *) die_addr; + if (attr.form == DW_FORM_implicit_const) + attr.valp = (unsigned char *) attrp; + else + attr.valp = (unsigned char *) die_addr; attr.cu = die->cu; /* Now call the callback function. */ @@ -114,6 +107,12 @@ dwarf_getattrs (Dwarf_Die *die, int (*callback) (Dwarf_Attribute *, void *), // __libdw_form_val_len will have done a bounds check. die_addr += len; + + if (attr.form == DW_FORM_implicit_const) + { + int64_t attr_value __attribute__((__unused__)); + get_sleb128_unchecked (attr_value, attrp); + } } } /* NOTREACHED */ diff --git a/libdw/dwarf_getlocation.c b/libdw/dwarf_getlocation.c index a4a2761e..fc59a2ab 100644 --- a/libdw/dwarf_getlocation.c +++ b/libdw/dwarf_getlocation.c @@ -1,7 +1,6 @@ /* Return location expression list. - Copyright (C) 2000-2010, 2013-2015 Red Hat, Inc. + Copyright (C) 2000-2010, 2013-2015, 2017, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2000. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -45,10 +44,34 @@ attr_ok (Dwarf_Attribute *attr) if (attr == NULL) return false; - /* Must be one of the attributes listed below. */ + /* If it is an exprloc, it is obviously OK. */ + if (dwarf_whatform (attr) == DW_FORM_exprloc) + return true; + + /* Otherwise must be one of the attributes listed below. Older + DWARF versions might have encoded the exprloc as block, and we + cannot easily distinquish attributes in the loclist class because + the same forms are used for different classes. */ switch (attr->code) { case DW_AT_location: + case DW_AT_byte_size: + case DW_AT_bit_offset: + case DW_AT_bit_size: + case DW_AT_lower_bound: + case DW_AT_bit_stride: + case DW_AT_upper_bound: + case DW_AT_count: + case DW_AT_allocated: + case DW_AT_associated: + case DW_AT_data_location: + case DW_AT_byte_stride: + case DW_AT_rank: + case DW_AT_call_value: + case DW_AT_call_target: + case DW_AT_call_target_clobbered: + case DW_AT_call_data_location: + case DW_AT_call_data_value: case DW_AT_data_member_location: case DW_AT_vtable_elem_location: case DW_AT_string_length: @@ -64,7 +87,7 @@ attr_ok (Dwarf_Attribute *attr) break; default: - __libdw_seterrno (DWARF_E_NO_LOCLIST); + __libdw_seterrno (DWARF_E_NO_LOC_VALUE); return false; } @@ -97,19 +120,23 @@ loc_compare (const void *p1, const void *p2) } /* For each DW_OP_implicit_value, we store a special entry in the cache. - This points us directly to the block data for later fetching. */ -static void + This points us directly to the block data for later fetching. + Returns zero on success, -1 on bad DWARF or 1 if tsearch failed. */ +static int 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; - // Ignored, equal to op->number. And data length already checked. - (void) __libdw_get_uleb128 (&data, data + len_leb128 (Dwarf_Word)); + uint64_t len = __libdw_get_uleb128 (&data, data + len_leb128 (Dwarf_Word)); + if (unlikely (len != op->number)) + return -1; block->addr = op; block->data = (unsigned char *) data; block->length = op->number; - (void) tsearch (block, cache, loc_compare); + if (unlikely (tsearch (block, cache, loc_compare) == NULL)) + return 1; + return 0; } int @@ -147,6 +174,8 @@ check_constant_offset (Dwarf_Attribute *attr, default: return 1; + /* Note, we don't regard DW_FORM_data16 as a constant form, + even though technically it is according to the standard. */ case DW_FORM_data1: case DW_FORM_data2: case DW_FORM_data4: @@ -299,6 +328,7 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, break; case DW_OP_call_ref: + case DW_OP_GNU_variable_value: /* DW_FORM_ref_addr, depends on offset size of CU. */ if (dbg == NULL || __libdw_read_offset_inc (dbg, sec_index, &data, ref_size, @@ -427,8 +457,14 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, case DW_OP_plus_uconst: case DW_OP_regx: case DW_OP_piece: + case DW_OP_convert: case DW_OP_GNU_convert: + case DW_OP_reinterpret: case DW_OP_GNU_reinterpret: + case DW_OP_addrx: + case DW_OP_GNU_addr_index: + case DW_OP_constx: + case DW_OP_GNU_const_index: get_uleb128 (newloc->number, data, end_data); break; @@ -446,6 +482,7 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, break; case DW_OP_bit_piece: + case DW_OP_regval_type: case DW_OP_GNU_regval_type: get_uleb128 (newloc->number, data, end_data); if (unlikely (data >= end_data)) @@ -454,6 +491,7 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, break; case DW_OP_implicit_value: + case DW_OP_entry_value: case DW_OP_GNU_entry_value: /* This cannot be used in a CFI expression. */ if (unlikely (dbg == NULL)) @@ -467,6 +505,7 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, data += newloc->number; /* Skip the block. */ break; + case DW_OP_implicit_pointer: case DW_OP_GNU_implicit_pointer: /* DW_FORM_ref_addr, depends on offset size of CU. */ if (dbg == NULL || __libdw_read_offset_inc (dbg, sec_index, &data, @@ -479,13 +518,16 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, get_uleb128 (newloc->number2, data, end_data); /* Byte offset. */ break; + case DW_OP_deref_type: case DW_OP_GNU_deref_type: + case DW_OP_xderef_type: if (unlikely (data + 1 >= end_data)) goto invalid; newloc->number = *data++; get_uleb128 (newloc->number2, data, end_data); break; + case DW_OP_const_type: case DW_OP_GNU_const_type: { size_t size; @@ -553,7 +595,16 @@ __libdw_intern_expression (Dwarf *dbg, bool other_byte_order, result[n].offset = loclist->offset; if (result[n].atom == DW_OP_implicit_value) - store_implicit_value (dbg, cache, &result[n]); + { + int store = store_implicit_value (dbg, cache, &result[n]); + if (unlikely (store != 0)) + { + if (store < 0) + goto invalid; + else + goto nomem; + } + } struct loclist *loc = loclist; loclist = loclist->next; @@ -616,7 +667,13 @@ dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **llbuf, size_t *listlen) if (result != 1) return result; - /* If it has a block form, it's a single location expression. */ + /* If it has a block form, it's a single location expression. + Except for DW_FORM_data16, which is a 128bit constant. */ + if (attr->form == DW_FORM_data16) + { + __libdw_seterrno (DWARF_E_NO_BLOCK); + return -1; + } Dwarf_Block block; if (INTUSE(dwarf_formblock) (attr, &block) != 0) return -1; @@ -624,47 +681,113 @@ dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **llbuf, size_t *listlen) return getlocation (attr->cu, &block, llbuf, listlen, cu_sec_idx (attr->cu)); } -static int -attr_base_address (Dwarf_Attribute *attr, Dwarf_Addr *basep) +Dwarf_Addr +__libdw_cu_base_address (Dwarf_CU *cu) { - /* Fetch the CU's base address. */ - Dwarf_Die cudie = CUDIE (attr->cu); - - /* Find the base address of the compilation unit. It will - normally be specified by DW_AT_low_pc. In DWARF-3 draft 4, - the base address could be overridden by DW_AT_entry_pc. It's - been removed, but GCC emits DW_AT_entry_pc and not DW_AT_lowpc - for compilation units with discontinuous ranges. */ - Dwarf_Attribute attr_mem; - if (unlikely (INTUSE(dwarf_lowpc) (&cudie, basep) != 0) - && INTUSE(dwarf_formaddr) (INTUSE(dwarf_attr) (&cudie, - DW_AT_entry_pc, - &attr_mem), - basep) != 0) + if (cu->base_address == (Dwarf_Addr) -1) { - if (INTUSE(dwarf_errno) () != 0) - return -1; - - /* The compiler provided no base address when it should - have. Buggy GCC does this when it used absolute - addresses in the location list and no DW_AT_ranges. */ - *basep = 0; + Dwarf_Addr base; + + /* Fetch the CU's base address. */ + Dwarf_Die cudie = CUDIE (cu); + + /* Find the base address of the compilation unit. It will + normally be specified by DW_AT_low_pc. In DWARF-3 draft 4, + the base address could be overridden by DW_AT_entry_pc. It's + been removed, but GCC emits DW_AT_entry_pc and not DW_AT_lowpc + for compilation units with discontinuous ranges. */ + Dwarf_Attribute attr_mem; + if (INTUSE(dwarf_lowpc) (&cudie, &base) != 0 + && INTUSE(dwarf_formaddr) (INTUSE(dwarf_attr) (&cudie, + DW_AT_entry_pc, + &attr_mem), + &base) != 0) + { + /* The compiler provided no base address when it should + have. Buggy GCC does this when it used absolute + addresses in the location list and no DW_AT_ranges. */ + base = 0; + } + cu->base_address = base; } - return 0; + + return cu->base_address; } static int -initial_offset_base (Dwarf_Attribute *attr, ptrdiff_t *offset, - Dwarf_Addr *basep) +initial_offset (Dwarf_Attribute *attr, ptrdiff_t *offset) { - if (attr_base_address (attr, basep) != 0) - return -1; + size_t secidx = (attr->cu->version < 5 + ? IDX_debug_loc : IDX_debug_loclists); Dwarf_Word start_offset; - if (__libdw_formptr (attr, IDX_debug_loc, - DWARF_E_NO_LOCLIST, - NULL, &start_offset) == NULL) - return -1; + if (attr->form == DW_FORM_loclistx) + { + Dwarf_Word idx; + Dwarf_CU *cu = attr->cu; + const unsigned char *datap = attr->valp; + const unsigned char *endp = cu->endp; + if (datap >= endp) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + get_uleb128 (idx, datap, endp); + + Elf_Data *data = cu->dbg->sectiondata[secidx]; + if (data == NULL && cu->unit_type == DW_UT_split_compile) + { + cu = __libdw_find_split_unit (cu); + if (cu != NULL) + data = cu->dbg->sectiondata[secidx]; + } + + if (data == NULL) + { + __libdw_seterrno (secidx == IDX_debug_loc + ? DWARF_E_NO_DEBUG_LOC + : DWARF_E_NO_DEBUG_LOCLISTS); + return -1; + } + + Dwarf_Off loc_base_off = __libdw_cu_locs_base (cu); + + /* The section should at least contain room for one offset. */ + size_t sec_size = cu->dbg->sectiondata[secidx]->d_size; + size_t offset_size = cu->offset_size; + if (offset_size > sec_size) + { + invalid_offset: + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return -1; + } + + /* And the base offset should be at least inside the section. */ + if (loc_base_off > (sec_size - offset_size)) + goto invalid_offset; + + size_t max_idx = (sec_size - offset_size - loc_base_off) / offset_size; + if (idx > max_idx) + goto invalid_offset; + + datap = (cu->dbg->sectiondata[secidx]->d_buf + + loc_base_off + (idx * offset_size)); + if (offset_size == 4) + start_offset = read_4ubyte_unaligned (cu->dbg, datap); + else + start_offset = read_8ubyte_unaligned (cu->dbg, datap); + + start_offset += loc_base_off; + } + else + { + if (__libdw_formptr (attr, secidx, + (secidx == IDX_debug_loc + ? DWARF_E_NO_DEBUG_LOC + : DWARF_E_NO_DEBUG_LOCLISTS), + NULL, &start_offset) == NULL) + return -1; + } *offset = start_offset; return 0; @@ -676,22 +799,19 @@ getlocations_addr (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr address, const Elf_Data *locs, Dwarf_Op **expr, size_t *exprlen) { - unsigned char *readp = locs->d_buf + offset; - unsigned char *readendp = locs->d_buf + locs->d_size; - - next: - if (readendp - readp < attr->cu->address_size * 2) - { - invalid: - __libdw_seterrno (DWARF_E_INVALID_DWARF); - return -1; - } + Dwarf_CU *cu = attr->cu; + Dwarf *dbg = cu->dbg; + size_t secidx = cu->version < 5 ? IDX_debug_loc : IDX_debug_loclists; + const unsigned char *readp = locs->d_buf + offset; + const unsigned char *readendp = locs->d_buf + locs->d_size; Dwarf_Addr begin; Dwarf_Addr end; - switch (__libdw_read_begin_end_pair_inc (attr->cu->dbg, IDX_debug_loc, - &readp, attr->cu->address_size, + next: + switch (__libdw_read_begin_end_pair_inc (cu, secidx, + &readp, readendp, + cu->address_size, &begin, &end, basep)) { case 0: /* got location range. */ @@ -704,25 +824,38 @@ getlocations_addr (Dwarf_Attribute *attr, ptrdiff_t offset, return -1; } - if (readendp - readp < 2) - goto invalid; - /* We have a location expression. */ Dwarf_Block block; - block.length = read_2ubyte_unaligned_inc (attr->cu->dbg, readp); - block.data = readp; + if (secidx == IDX_debug_loc) + { + if (readendp - readp < 2) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + block.length = read_2ubyte_unaligned_inc (dbg, readp); + } + else + { + if (readendp - readp < 1) + goto invalid; + get_uleb128 (block.length, readp, readendp); + } + block.data = (unsigned char *) readp; if (readendp - readp < (ptrdiff_t) block.length) goto invalid; readp += block.length; - *startp = *basep + begin; - *endp = *basep + end; + /* Note these addresses include any base (if necessary) already. */ + *startp = begin; + *endp = end; /* If address is minus one we want them all, otherwise only matching. */ if (address != (Dwarf_Word) -1 && (address < *startp || address >= *endp)) goto next; - if (getlocation (attr->cu, &block, expr, exprlen, IDX_debug_loc) != 0) + if (getlocation (cu, &block, expr, exprlen, secidx) != 0) return -1; return readp - (unsigned char *) locs->d_buf; @@ -738,9 +871,11 @@ dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address, if (llbufs == NULL) maxlocs = SIZE_MAX; - /* If it has a block form, it's a single location expression. */ + /* If it has a block form, it's a single location expression. + Except for DW_FORM_data16, which is a 128bit constant. */ Dwarf_Block block; - if (INTUSE(dwarf_formblock) (attr, &block) == 0) + if (attr->form != DW_FORM_data16 + && INTUSE(dwarf_formblock) (attr, &block) == 0) { if (maxlocs == 0) return 0; @@ -751,11 +886,14 @@ dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address, return listlens[0] == 0 ? 0 : 1; } - int error = INTUSE(dwarf_errno) (); - if (unlikely (error != DWARF_E_NO_BLOCK)) + if (attr->form != DW_FORM_data16) { - __libdw_seterrno (error); - return -1; + int error = INTUSE(dwarf_errno) (); + if (unlikely (error != DWARF_E_NO_BLOCK)) + { + __libdw_seterrno (error); + return -1; + } } int result = check_constant_offset (attr, &llbufs[0], &listlens[0]); @@ -769,19 +907,19 @@ dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address, size_t got = 0; /* This is a true loclistptr, fetch the initial base address and offset. */ - if (initial_offset_base (attr, &off, &base) != 0) + base = __libdw_cu_base_address (attr->cu); + if (base == (Dwarf_Addr) -1) return -1; - const Elf_Data *d = attr->cu->dbg->sectiondata[IDX_debug_loc]; - if (d == NULL) - { - __libdw_seterrno (DWARF_E_NO_LOCLIST); - return -1; - } + if (initial_offset (attr, &off) != 0) + return -1; + + size_t secidx = attr->cu->version < 5 ? IDX_debug_loc : IDX_debug_loclists; + const Elf_Data *d = attr->cu->dbg->sectiondata[secidx]; while (got < maxlocs && (off = getlocations_addr (attr, off, &base, &start, &end, - address, d, &expr, &expr_len)) > 0) + address, d, &expr, &expr_len)) > 0) { /* This one matches the address. */ if (llbufs != NULL) @@ -813,9 +951,11 @@ dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep, if (offset == 0) { - /* If it has a block form, it's a single location expression. */ + /* If it has a block form, it's a single location expression. + Except for DW_FORM_data16, which is a 128bit constant. */ Dwarf_Block block; - if (INTUSE(dwarf_formblock) (attr, &block) == 0) + if (attr->form != DW_FORM_data16 + && INTUSE(dwarf_formblock) (attr, &block) == 0) { if (getlocation (attr->cu, &block, expr, exprlen, cu_sec_idx (attr->cu)) != 0) @@ -827,11 +967,14 @@ dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep, return 1; } - int error = INTUSE(dwarf_errno) (); - if (unlikely (error != DWARF_E_NO_BLOCK)) + if (attr->form != DW_FORM_data16) { - __libdw_seterrno (error); - return -1; + int error = INTUSE(dwarf_errno) (); + if (unlikely (error != DWARF_E_NO_BLOCK)) + { + __libdw_seterrno (error); + return -1; + } } int result = check_constant_offset (attr, expr, exprlen); @@ -849,17 +992,17 @@ dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep, /* We must be looking at a true loclistptr, fetch the initial base address and offset. */ - if (initial_offset_base (attr, &offset, basep) != 0) + *basep = __libdw_cu_base_address (attr->cu); + if (*basep == (Dwarf_Addr) -1) return -1; - } - const Elf_Data *d = attr->cu->dbg->sectiondata[IDX_debug_loc]; - if (d == NULL) - { - __libdw_seterrno (DWARF_E_NO_LOCLIST); - return -1; + if (initial_offset (attr, &offset) != 0) + return -1; } + size_t secidx = attr->cu->version < 5 ? IDX_debug_loc : IDX_debug_loclists; + const Elf_Data *d = attr->cu->dbg->sectiondata[secidx]; + return getlocations_addr (attr, offset, basep, startp, endp, (Dwarf_Word) -1, d, expr, exprlen); } diff --git a/libdw/dwarf_getlocation_attr.c b/libdw/dwarf_getlocation_attr.c index 8b6a4afd..99bcc828 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, 2014 Red Hat, Inc. + Copyright (C) 2013, 2014, 2017, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -38,7 +38,7 @@ 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. */ + the .debug_loc or .debug_loclists data section. */ switch (attr->form) { case DW_FORM_block1: @@ -48,10 +48,26 @@ attr_form_cu (Dwarf_Attribute *attr) case DW_FORM_exprloc: return attr->cu; default: - return attr->cu->dbg->fake_loc_cu; + return (attr->cu->version < 5 + ? attr->cu->dbg->fake_loc_cu + : attr->cu->dbg->fake_loclists_cu); } } +static unsigned char * +addr_valp (Dwarf_CU *cu, Dwarf_Word index) +{ + Elf_Data *debug_addr = cu->dbg->sectiondata[IDX_debug_addr]; + if (debug_addr == NULL) + { + __libdw_seterrno (DWARF_E_NO_DEBUG_ADDR); + return NULL; + } + + Dwarf_Word offset = __libdw_cu_addr_base (cu) + (index * cu->address_size); + return (unsigned char *) debug_addr->d_buf + offset; +} + int dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribute *result) { @@ -67,6 +83,7 @@ dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribu result->cu = attr_form_cu (attr); break; + case DW_OP_entry_value: case DW_OP_GNU_entry_value: result->code = DW_AT_location; result->form = DW_FORM_exprloc; @@ -74,6 +91,7 @@ dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribu result->cu = attr_form_cu (attr); break; + case DW_OP_const_type: case DW_OP_GNU_const_type: result->code = DW_AT_const_value; result->form = DW_FORM_block1; @@ -81,6 +99,29 @@ dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribu result->cu = attr_form_cu (attr); break; + case DW_OP_GNU_const_index: + case DW_OP_constx: + result->code = DW_AT_const_value; + if (attr->cu->address_size == 4) + result->form = DW_FORM_data4; + else + result->form = DW_FORM_data8; + result->valp = addr_valp (attr->cu, op->number); + if (result->valp == NULL) + return -1; + result->cu = attr->cu->dbg->fake_addr_cu; + break; + + case DW_OP_GNU_addr_index: + case DW_OP_addrx: + result->code = DW_AT_low_pc; + result->form = DW_FORM_addr; + result->valp = addr_valp (attr->cu, op->number); + if (result->valp == NULL) + return -1; + result->cu = attr->cu->dbg->fake_addr_cu; + break; + case DW_OP_call2: case DW_OP_call4: case DW_OP_call_ref: @@ -96,7 +137,9 @@ dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribu } break; + case DW_OP_implicit_pointer: case DW_OP_GNU_implicit_pointer: + case DW_OP_GNU_variable_value: { Dwarf_Die die; if (INTUSE(dwarf_getlocation_die) (attr, op, &die) != 0) diff --git a/libdw/dwarf_getlocation_die.c b/libdw/dwarf_getlocation_die.c index b4908d2b..673c61cf 100644 --- a/libdw/dwarf_getlocation_die.c +++ b/libdw/dwarf_getlocation_die.c @@ -1,5 +1,5 @@ /* Return DIE associated with a location expression op. - Copyright (C) 2013 Red Hat, Inc. + Copyright (C) 2013, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -43,32 +43,51 @@ dwarf_getlocation_die (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Off dieoff; switch (op->atom) { + case DW_OP_implicit_pointer: case DW_OP_GNU_implicit_pointer: case DW_OP_call_ref: + case DW_OP_GNU_variable_value: dieoff = op->number; break; case DW_OP_GNU_parameter_ref: + case DW_OP_convert: case DW_OP_GNU_convert: + case DW_OP_reinterpret: case DW_OP_GNU_reinterpret: + case DW_OP_const_type: case DW_OP_GNU_const_type: case DW_OP_call2: case DW_OP_call4: + if (op->number > (attr->cu->end - attr->cu->start)) + { + invalid_offset: + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return -1; + } dieoff = attr->cu->start + op->number; break; + case DW_OP_regval_type: case DW_OP_GNU_regval_type: + case DW_OP_deref_type: case DW_OP_GNU_deref_type: + if (op->number2 > (attr->cu->end - attr->cu->start)) + goto invalid_offset; dieoff = attr->cu->start + op->number2; break; + case DW_OP_xderef_type: + dieoff = op->number2; + break; + default: __libdw_seterrno (DWARF_E_INVALID_ACCESS); return -1; } if (__libdw_offdie (attr->cu->dbg, dieoff, result, - attr->cu->type_offset != 0) == NULL) + ISV4TU(attr->cu)) == NULL) return -1; return 0; diff --git a/libdw/dwarf_getlocation_implicit_pointer.c b/libdw/dwarf_getlocation_implicit_pointer.c index 95053820..0c1cd00a 100644 --- a/libdw/dwarf_getlocation_implicit_pointer.c +++ b/libdw/dwarf_getlocation_implicit_pointer.c @@ -1,5 +1,5 @@ /* Return associated attribute for DW_OP_GNU_implicit_pointer. - Copyright (C) 2010 Red Hat, Inc. + Copyright (C) 2010, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -55,7 +55,8 @@ dwarf_getlocation_implicit_pointer (Dwarf_Attribute *attr, const Dwarf_Op *op, if (attr == NULL) return -1; - if (unlikely (op->atom != DW_OP_GNU_implicit_pointer)) + if (unlikely (op->atom != DW_OP_implicit_pointer + && op->atom != DW_OP_GNU_implicit_pointer)) { __libdw_seterrno (DWARF_E_INVALID_ACCESS); return -1; @@ -63,7 +64,7 @@ dwarf_getlocation_implicit_pointer (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Die die; if (__libdw_offdie (attr->cu->dbg, op->number, &die, - attr->cu->type_offset != 0) == NULL) + ISV4TU(attr->cu)) == NULL) return -1; if (INTUSE(dwarf_attr) (&die, DW_AT_location, result) == NULL diff --git a/libdw/dwarf_getmacros.c b/libdw/dwarf_getmacros.c index eb505085..fd929669 100644 --- a/libdw/dwarf_getmacros.c +++ b/libdw/dwarf_getmacros.c @@ -1,7 +1,6 @@ /* Get macro information. - Copyright (C) 2002-2009, 2014 Red Hat, Inc. + Copyright (C) 2002-2009, 2014, 2017, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2002. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -158,7 +157,7 @@ get_table_for_offset (Dwarf *dbg, Dwarf_Word macoff, } uint16_t version = read_2ubyte_unaligned_inc (dbg, readp); - if (version != 4) + if (version != 4 && version != 5) { __libdw_seterrno (DWARF_E_INVALID_VERSION); return NULL; @@ -192,21 +191,26 @@ get_table_for_offset (Dwarf *dbg, Dwarf_Word macoff, 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_strsup, DW_FORM_udata, DW_FORM_strp_sup); + MACRO_PROTO (p_udata_strx, DW_FORM_udata, DW_FORM_strx); 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. */ + [DW_MACRO_define - 1] = p_udata_str, + [DW_MACRO_undef - 1] = p_udata_str, + [DW_MACRO_define_strp - 1] = p_udata_strp, + [DW_MACRO_undef_strp - 1] = p_udata_strp, + [DW_MACRO_start_file - 1] = p_udata_udata, + [DW_MACRO_end_file - 1] = p_none, + [DW_MACRO_import - 1] = p_secoffset, + [DW_MACRO_define_sup - 1] = p_udata_strsup, + [DW_MACRO_undef_sup - 1] = p_udata_strsup, + [DW_MACRO_import_sup - 1] = p_secoffset, /* XXX - but in sup!. */ + [DW_MACRO_define_strx - 1] = p_udata_strx, + [DW_MACRO_undef_strx - 1] = p_udata_strx, }; if ((flags & 0x4) != 0) @@ -354,11 +358,19 @@ read_macros (Dwarf *dbg, int sec_index, /* 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. */ + We pretend it is the same version as the actual table. + Version 4 for the old GNU extension, version 5 for DWARF5. + To handle DW_FORM_strx[1234] we set the .str_offsets_base + from the given CU. + XXX We will need to deal with DW_MACRO_import_sup and change + out the dbg somehow for the DW_FORM_sec_offset to make sense. */ Dwarf_CU fake_cu = { .dbg = dbg, - .version = 4, + .sec_idx = sec_index, + .version = table->version, .offset_size = table->is_64bit ? 8 : 4, + .str_off_base = str_offsets_base_off (dbg, (cudie != NULL + ? cudie->cu: NULL)), .startp = (void *) startp + offset, .endp = (void *) endp, }; @@ -381,14 +393,25 @@ read_macros (Dwarf *dbg, int sec_index, for (Dwarf_Word i = 0; i < proto->nforms; ++i) { - /* We pretend this is a DW_AT_GNU_macros attribute so that + /* 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; + offset into .debug_macro. XXX Deal with DW_MACRO_import_sup + (swap .dbg) for DW_FORM_sec_offset? */ + attributes[i].code = (fake_cu.version == 4 ? DW_AT_GNU_macros + : DW_AT_macros); attributes[i].form = proto->forms[i]; attributes[i].valp = (void *) readp; attributes[i].cu = &fake_cu; + /* We don't want forms that aren't allowed because they could + read from the "abbrev" like DW_FORM_implicit_const. */ + if (! libdw_valid_user_form (attributes[i].form)) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + free (attributesp); + return -1; + } + size_t len = __libdw_form_val_len (&fake_cu, proto->forms[i], readp); if (unlikely (len == (size_t) -1)) { @@ -558,7 +581,8 @@ dwarf_getmacros (Dwarf_Die *cudie, int (*callback) (Dwarf_Macro *, void *), { /* DW_AT_GNU_macros, DW_AT_macros */ Dwarf_Word macoff; - if (get_offset_from (cudie, DW_AT_GNU_macros, &macoff) != 0) + if (get_offset_from (cudie, DW_AT_GNU_macros, &macoff) != 0 + && get_offset_from (cudie, DW_AT_macros, &macoff) != 0) return -1; offset = gnu_macros_getmacros_off (cudie->cu->dbg, macoff, callback, arg, offset, accept_0xff, diff --git a/libdw/dwarf_getscopes.c b/libdw/dwarf_getscopes.c index df480d33..5662eecf 100644 --- a/libdw/dwarf_getscopes.c +++ b/libdw/dwarf_getscopes.c @@ -62,7 +62,9 @@ pc_match (unsigned int depth, struct Dwarf_Die_Chain *die, void *arg) if (result < 0) { int error = INTUSE(dwarf_errno) (); - if (error != DWARF_E_NOERROR && error != DWARF_E_NO_DEBUG_RANGES) + if (error != DWARF_E_NOERROR + && error != DWARF_E_NO_DEBUG_RANGES + && error != DWARF_E_NO_DEBUG_RNGLISTS) { __libdw_seterrno (error); return -1; diff --git a/libdw/dwarf_getsrcfiles.c b/libdw/dwarf_getsrcfiles.c index 5af6f68b..12fdabf2 100644 --- a/libdw/dwarf_getsrcfiles.c +++ b/libdw/dwarf_getsrcfiles.c @@ -1,7 +1,6 @@ /* Return source file information of CU. - Copyright (C) 2004, 2005, 2013, 2015 Red Hat, Inc. + Copyright (C) 2004, 2005, 2013, 2015, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2004. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -51,14 +50,47 @@ dwarf_getsrcfiles (Dwarf_Die *cudie, Dwarf_Files **files, size_t *nfiles) /* Get the information if it is not already known. */ struct Dwarf_CU *const cu = cudie->cu; - if (cu->lines == NULL) + if (cu->files == NULL) { - Dwarf_Lines *lines; - size_t nlines; - - /* Let the more generic function do the work. It'll create more - data but that will be needed in an real program anyway. */ - res = INTUSE(dwarf_getsrclines) (cudie, &lines, &nlines); + /* For split units there might be a simple file table (without lines). + If not, use the one from the skeleton. */ + if (cu->unit_type == DW_UT_split_compile + || cu->unit_type == DW_UT_split_type) + { + /* We tried, assume we fail... */ + cu->files = (void *) -1; + + /* See if there is a .debug_line section, for split CUs + the table is at offset zero. */ + if (cu->dbg->sectiondata[IDX_debug_line] != NULL) + { + /* We are only interested in the files, the lines will + always come from the skeleton. */ + res = __libdw_getsrclines (cu->dbg, 0, + __libdw_getcompdir (cudie), + cu->address_size, NULL, + &cu->files); + } + else + { + Dwarf_CU *skel = __libdw_find_split_unit (cu); + if (skel != NULL) + { + Dwarf_Die skeldie = CUDIE (skel); + res = INTUSE(dwarf_getsrcfiles) (&skeldie, files, nfiles); + cu->files = skel->files; + } + } + } + else + { + Dwarf_Lines *lines; + size_t nlines; + + /* Let the more generic function do the work. It'll create more + data but that will be needed in an real program anyway. */ + res = INTUSE(dwarf_getsrclines) (cudie, &lines, &nlines); + } } else if (cu->files != (void *) -1l) /* We already have the information. */ diff --git a/libdw/dwarf_getsrclines.c b/libdw/dwarf_getsrclines.c index d02c38db..1432b1db 100644 --- a/libdw/dwarf_getsrclines.c +++ b/libdw/dwarf_getsrclines.c @@ -1,7 +1,6 @@ /* Return line number information of CU. - Copyright (C) 2004-2010, 2013, 2014, 2015, 2016 Red Hat, Inc. + Copyright (C) 2004-2010, 2013, 2014, 2015, 2016, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2004. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -154,20 +153,9 @@ read_srclines (Dwarf *dbg, { int res = -1; + struct filelist *filelist = NULL; size_t nfilelist = 0; - unsigned int ndirlist = 0; - - struct filelist null_file = - { - .info = - { - .name = "???", - .mtime = 0, - .length = 0 - }, - .next = NULL - }; - struct filelist *filelist = &null_file; + size_t ndirlist = 0; /* If there are a large number of lines, files or dirs don't blow up the stack. Stack allocate some entries, only dynamically malloc @@ -177,16 +165,7 @@ read_srclines (Dwarf *dbg, #define MAX_STACK_FILES (MAX_STACK_ALLOC / 4) #define MAX_STACK_DIRS (MAX_STACK_ALLOC / 16) - struct dirlist - { - const char *dir; - size_t len; - }; - struct dirlist dirstack[MAX_STACK_DIRS]; - struct dirlist *dirarray = dirstack; - - /* We are about to process the statement program. Initialize the - state machine registers (see 6.2.2 in the v2.1 specification). */ + /* Initial statement program state (except for stmt_list, see below). */ struct line_state state = { .linelist = NULL, @@ -204,6 +183,17 @@ read_srclines (Dwarf *dbg, .discriminator = 0 }; + /* The dirs normally go on the stack, but if there are too many + we alloc them all. Set up stack storage early, so we can check on + error if we need to free them or not. */ + struct dirlist + { + const char *dir; + size_t len; + }; + struct dirlist dirstack[MAX_STACK_DIRS]; + struct dirlist *dirarray = dirstack; + if (unlikely (linep + 4 > lineendp)) { invalid_data: @@ -222,25 +212,45 @@ read_srclines (Dwarf *dbg, } /* Check whether we have enough room in the section. */ - if (unlikely (unit_length > (size_t) (lineendp - linep) - || unit_length < 2 + length + 5 * 1)) + if (unlikely (unit_length > (size_t) (lineendp - linep))) goto invalid_data; lineendp = linep + unit_length; /* The next element of the header is the version identifier. */ + if ((size_t) (lineendp - linep) < 2) + goto invalid_data; uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, linep); - if (unlikely (version < 2) || unlikely (version > 4)) + if (unlikely (version < 2) || unlikely (version > 5)) { __libdw_seterrno (DWARF_E_VERSION); goto out; } + /* DWARF5 explicitly lists address and segment_selector sizes. */ + if (version >= 5) + { + if ((size_t) (lineendp - linep) < 2) + goto invalid_data; + size_t line_address_size = *linep++; + size_t segment_selector_size = *linep++; + if (line_address_size != address_size || segment_selector_size != 0) + goto invalid_data; + } + /* Next comes the header length. */ Dwarf_Word header_length; if (length == 4) - header_length = read_4ubyte_unaligned_inc (dbg, linep); + { + if ((size_t) (lineendp - linep) < 4) + goto invalid_data; + header_length = read_4ubyte_unaligned_inc (dbg, linep); + } else - header_length = read_8ubyte_unaligned_inc (dbg, linep); + { + if ((size_t) (lineendp - linep) < 8) + goto invalid_data; + header_length = read_8ubyte_unaligned_inc (dbg, linep); + } const unsigned char *header_start = linep; /* Next the minimum instruction length. */ @@ -250,13 +260,17 @@ read_srclines (Dwarf *dbg, uint_fast8_t max_ops_per_instr = 1; if (version >= 4) { - if (unlikely (lineendp - linep < 5)) + if (unlikely ((size_t) (lineendp - linep) < 1)) goto invalid_data; max_ops_per_instr = *linep++; if (unlikely (max_ops_per_instr == 0)) goto invalid_data; } + /* 4 more bytes, is_stmt, line_base, line_range and opcode_base. */ + if ((size_t) (lineendp - linep) < 4) + goto invalid_data; + /* Then the flag determining the default value of the is_stmt register. */ uint_fast8_t default_is_stmt = *linep++; @@ -277,31 +291,85 @@ read_srclines (Dwarf *dbg, 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 comp_dir_elem = - { - .dir = comp_dir, - .len = comp_dir ? strlen (comp_dir) : 0, - }; - ndirlist = 1; + /* To read DWARF5 dir and file lists we need to know the forms. For + now we skip everything, except the DW_LNCT_path and + DW_LNCT_directory_index. */ + uint16_t forms[256]; + unsigned char nforms = 0; + unsigned char form_path = -1; /* Which forms is DW_LNCT_path. */ + unsigned char form_idx = -1; /* And which is DW_LNCT_directory_index. */ + + /* To read/skip form data. */ + Dwarf_CU fake_cu = { + .dbg = dbg, + .sec_idx = IDX_debug_line, + .version = 5, + .offset_size = length, + .address_size = address_size, + .startp = (void *) linep, + .endp = (void *) lineendp, + }; /* First count the entries. */ - const unsigned char *dirp = linep; - unsigned int ndirs = 0; - while (*dirp != 0) + size_t ndirs = 0; + if (version < 5) + { + const unsigned char *dirp = linep; + while (*dirp != 0) + { + uint8_t *endp = memchr (dirp, '\0', lineendp - dirp); + if (endp == NULL) + goto invalid_data; + ++ndirs; + dirp = endp + 1; + } + ndirs = ndirs + 1; /* There is always the "unknown" dir. */ + } + else { - uint8_t *endp = memchr (dirp, '\0', lineendp - dirp); - if (endp == NULL) + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + nforms = *linep++; + for (int i = 0; i < nforms; i++) + { + uint16_t desc, form; + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (desc, linep, lineendp); + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (form, linep, lineendp); + + if (! libdw_valid_user_form (form)) + goto invalid_data; + + forms[i] = form; + if (desc == DW_LNCT_path) + form_path = i; + } + + if (nforms > 0 && form_path == (unsigned char) -1) + goto invalid_data; + + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (ndirs, linep, lineendp); + + if (nforms == 0 && ndirs != 0) + goto invalid_data; + + /* Assume there is at least 1 byte needed per form to describe + the directory. Filters out insanely large ndirs. */ + if (nforms != 0 && ndirs > (size_t) (lineendp - linep) / nforms) goto invalid_data; - ++ndirs; - dirp = endp + 1; } - ndirlist += ndirs; /* Arrange the list in array form. */ + ndirlist = ndirs; if (ndirlist >= MAX_STACK_DIRS) { + if (ndirlist > SIZE_MAX / sizeof (*dirarray)) + goto no_mem; dirarray = (struct dirlist *) malloc (ndirlist * sizeof (*dirarray)); if (unlikely (dirarray == NULL)) { @@ -310,20 +378,82 @@ read_srclines (Dwarf *dbg, goto out; } } - dirarray[0] = comp_dir_elem; - for (unsigned int n = 1; n < ndirlist; n++) + + /* Entry zero is implicit for older versions, but explicit for 5+. */ + struct dirlist comp_dir_elem; + if (version < 5) { - dirarray[n].dir = (char *) linep; - uint8_t *endp = memchr (linep, '\0', lineendp - linep); - assert (endp != NULL); - dirarray[n].len = endp - linep; - linep = endp + 1; + /* First comes the list of directories. Add the compilation + directory first since the index zero is used for it. */ + comp_dir_elem.dir = comp_dir; + comp_dir_elem.len = comp_dir ? strlen (comp_dir) : 0, + dirarray[0] = comp_dir_elem; + for (unsigned int n = 1; n < ndirlist; n++) + { + dirarray[n].dir = (char *) linep; + uint8_t *endp = memchr (linep, '\0', lineendp - linep); + assert (endp != NULL); + dirarray[n].len = endp - linep; + linep = endp + 1; + } + /* Skip the final NUL byte. */ + ++linep; + } + else + { + Dwarf_Attribute attr; + attr.code = DW_AT_name; + attr.cu = &fake_cu; + for (unsigned int n = 0; n < ndirlist; n++) + { + const char *dir = NULL; + for (unsigned char m = 0; m < nforms; m++) + { + if (m == form_path) + { + attr.form = forms[m]; + attr.valp = (void *) linep; + dir = dwarf_formstring (&attr); + } + + size_t len = __libdw_form_val_len (&fake_cu, forms[m], linep); + if ((size_t) (lineendp - linep) < len) + goto invalid_data; + + linep += len; + } + + if (dir == NULL) + goto invalid_data; + + dirarray[n].dir = dir; + dirarray[n].len = strlen (dir); + } } - /* Skip the final NUL byte. */ - ++linep; + + /* File index zero doesn't exist for DWARF < 5. Files are indexed + starting from 1. But for DWARF5 they are indexed starting from + zero, but the default index is still 1. In both cases the + "first" file is special and refers to the main compile unit file, + equal to the DW_AT_name of the DW_TAG_compile_unit. */ + struct filelist null_file = + { + .info = + { + .name = "???", + .mtime = 0, + .length = 0 + }, + .next = NULL + }; + filelist = &null_file; + nfilelist = 1; /* Allocate memory for a new file. For the first MAX_STACK_FILES - entries just return a slot in the preallocated stack array. */ + entries just return a slot in the preallocated stack array. + This is slightly complicated because in DWARF < 5 new files could + be defined with DW_LNE_define_file after the normal file list was + read. */ struct filelist flstack[MAX_STACK_FILES]; #define NEW_FILE() ({ \ struct filelist *fl = (nfilelist < MAX_STACK_FILES \ @@ -337,69 +467,181 @@ read_srclines (Dwarf *dbg, fl; }) /* Now read the files. */ - nfilelist = 1; - - if (unlikely (linep >= lineendp)) - goto invalid_data; - while (*linep != 0) + if (version < 5) { - struct filelist *new_file = NEW_FILE (); - - /* 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; - get_uleb128 (diridx, linep, lineendp); - if (unlikely (diridx >= ndirlist)) + while (*linep != 0) { - __libdw_seterrno (DWARF_E_INVALID_DIR_IDX); - goto out; - } + struct filelist *new_file = NEW_FILE (); - 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; + /* 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 (dirarray[diridx].dir != NULL) + /* Then the index. */ + Dwarf_Word diridx; + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (diridx, linep, lineendp); + if (unlikely (diridx >= ndirlist)) { - /* 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); + __libdw_seterrno (DWARF_E_INVALID_DIR_IDX); + goto out; + } + + 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. + Just keep the file relative. */ + cp = stpcpy (cp, dirarray[diridx].dir); + *cp++ = '/'; + } + strcpy (cp, fname); + assert (strlen (new_file->info.name) + < dirarray[diridx].len + 1 + fnamelen + 1); } - *cp++ = '/'; - strcpy (cp, fname); - assert (strlen (new_file->info.name) - < dirarray[diridx].len + 1 + fnamelen + 1); + + /* Next comes the modification time. */ + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (new_file->info.mtime, linep, lineendp); + + /* Finally the length of the file. */ + if (unlikely (linep >= lineendp)) + goto invalid_data; + get_uleb128 (new_file->info.length, linep, lineendp); } + /* Skip the final NUL byte. */ + ++linep; + } + else + { + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + nforms = *linep++; + form_path = form_idx = -1; + for (int i = 0; i < nforms; i++) + { + uint16_t desc, form; + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (desc, linep, lineendp); + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (form, linep, lineendp); - /* Next comes the modification time. */ - if (unlikely (linep >= lineendp)) + if (! libdw_valid_user_form (form)) + goto invalid_data; + + forms[i] = form; + if (desc == DW_LNCT_path) + form_path = i; + else if (desc == DW_LNCT_directory_index) + form_idx = i; + } + + if (nforms > 0 && (form_path == (unsigned char) -1 + || form_idx == (unsigned char) -1)) goto invalid_data; - get_uleb128 (new_file->info.mtime, linep, lineendp); - /* Finally the length of the file. */ - if (unlikely (linep >= lineendp)) + size_t nfiles; + get_uleb128 (nfiles, linep, lineendp); + + if (nforms == 0 && nfiles != 0) + goto invalid_data; + + /* Assume there is at least 1 byte needed per form to describe + the file. Filters out insanely large nfiles. */ + if (nforms != 0 && nfiles > (size_t) (lineendp - linep) / nforms) goto invalid_data; - get_uleb128 (new_file->info.length, linep, lineendp); + + Dwarf_Attribute attr; + attr.cu = &fake_cu; + for (unsigned int n = 0; n < nfiles; n++) + { + const char *fname = NULL; + Dwarf_Word diridx = (Dwarf_Word) -1; + for (unsigned char m = 0; m < nforms; m++) + { + if (m == form_path) + { + attr.code = DW_AT_name; + attr.form = forms[m]; + attr.valp = (void *) linep; + fname = dwarf_formstring (&attr); + } + else if (m == form_idx) + { + attr.code = DW_AT_decl_file; /* Close enough. */ + attr.form = forms[m]; + attr.valp = (void *) linep; + if (dwarf_formudata (&attr, &diridx) != 0) + diridx = (Dwarf_Word) -1; + } + + size_t len = __libdw_form_val_len (&fake_cu, forms[m], linep); + if ((size_t) (lineendp - linep) < len) + goto invalid_data; + + linep += len; + } + + if (fname == NULL || diridx == (Dwarf_Word) -1) + goto invalid_data; + + size_t fnamelen = strlen (fname); + + if (unlikely (diridx >= ndirlist)) + { + __libdw_seterrno (DWARF_E_INVALID_DIR_IDX); + goto out; + } + + /* Yes, weird. Looks like an off-by-one in the spec. */ + struct filelist *new_file = n == 0 ? &null_file : NEW_FILE (); + + /* We follow the same rules as above for DWARF < 5, even + though the standard doesn't explicitly mention absolute + paths and ignoring the dir index. */ + if (*fname == '/') + /* It's an absolute path. */ + new_file->info.name = (char *) fname; + else + { + new_file->info.name = libdw_alloc (dbg, char, 1, + dirarray[diridx].len + 1 + + fnamelen + 1); + char *cp = new_file->info.name; + + /* In the DWARF >= 5 case, dir can never be NULL. */ + cp = stpcpy (cp, dirarray[diridx].dir); + *cp++ = '/'; + strcpy (cp, fname); + assert (strlen (new_file->info.name) + < dirarray[diridx].len + 1 + fnamelen + 1); + } + + /* For now we just ignore the modification time and file length. */ + new_file->info.mtime = 0; + new_file->info.length = 0; + } } - /* Skip the final NUL byte. */ - ++linep; /* Consistency check. */ if (unlikely (linep != header_start + header_length)) @@ -408,6 +650,9 @@ read_srclines (Dwarf *dbg, goto out; } + /* We are about to process the statement program. Most state machine + registers have already been initialize above. Just add the is_stmt + default. See 6.2.2 in the v2.1 specification. */ state.is_stmt = default_is_stmt; /* Apply the "operation advance" from a special opcode or @@ -557,11 +802,12 @@ read_srclines (Dwarf *dbg, 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++ = '/'; + cannot do much in this case. Just + keep the file relative. */ + { + cp = stpcpy (cp, dirarray[diridx].dir); + *cp++ = '/'; + } strcpy (cp, fname); } @@ -820,7 +1066,7 @@ read_srclines (Dwarf *dbg, free (state.linelist); state.linelist = ll; } - if (ndirlist >= MAX_STACK_DIRS) + if (dirarray != dirstack) free (dirarray); for (size_t i = MAX_STACK_FILES; i < nfilelist; i++) { @@ -918,6 +1164,31 @@ dwarf_getsrclines (Dwarf_Die *cudie, Dwarf_Lines **lines, size_t *nlines) struct Dwarf_CU *const cu = cudie->cu; if (cu->lines == NULL) { + /* For split units always pick the lines from the skeleton. */ + if (cu->unit_type == DW_UT_split_compile + || cu->unit_type == DW_UT_split_type) + { + /* We tries, assume we fail... */ + cu->lines = (void *) -1l; + + Dwarf_CU *skel = __libdw_find_split_unit (cu); + if (skel != NULL) + { + Dwarf_Die skeldie = CUDIE (skel); + int res = INTUSE(dwarf_getsrclines) (&skeldie, lines, nlines); + if (res == 0) + { + cu->lines = skel->lines; + *lines = cu->lines; + *nlines = cu->lines->nlines; + } + return res; + } + + __libdw_seterrno (DWARF_E_NO_DEBUG_LINE); + return -1; + } + /* Failsafe mode: no data found. */ cu->lines = (void *) -1l; cu->files = (void *) -1l; diff --git a/libdw/dwarf_hasattr.c b/libdw/dwarf_hasattr.c index 2bb8dc82..eca08394 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, 2014 Red Hat, Inc. + Copyright (C) 2003, 2005, 2014, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -45,39 +45,33 @@ dwarf_hasattr (Dwarf_Die *die, unsigned int search_name) Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL); if (unlikely (abbrevp == DWARF_END_ABBREV)) { - invalid_dwarf: __libdw_seterrno (DWARF_E_INVALID_DWARF); return 0; } - 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); - + /* Search the name attribute. Dwarf_Abbrev was checked when created, + so we can read unchecked here. */ 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); + get_uleb128_unchecked (attr_name, attrp); unsigned int attr_form; - if (unlikely (attrp >= endp)) - goto invalid_dwarf; - get_uleb128 (attr_form, attrp, endp); + get_uleb128_unchecked (attr_form, attrp); - /* We can stop if we found the attribute with value zero. */ - if (attr_name == 0 || attr_form == 0) + /* We can stop if we found the end of the attribute list. */ + if (attr_name == 0 && attr_form == 0) return 0; if (attr_name == search_name) return 1; + + if (attr_form == DW_FORM_implicit_const) + { + int64_t attr_value __attribute__ ((unused)); + get_sleb128_unchecked (attr_value, attrp); + } } } INTDEF (dwarf_hasattr) diff --git a/libdw/dwarf_hasattr_integrate.c b/libdw/dwarf_hasattr_integrate.c index 2d5348cf..1d946280 100644 --- a/libdw/dwarf_hasattr_integrate.c +++ b/libdw/dwarf_hasattr_integrate.c @@ -1,5 +1,5 @@ /* Check whether DIE has specific attribute, integrating DW_AT_abstract_origin. - Copyright (C) 2005 Red Hat, Inc. + Copyright (C) 2005, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -37,7 +37,7 @@ int dwarf_hasattr_integrate (Dwarf_Die *die, unsigned int search_name) { Dwarf_Die die_mem; - + int chain = 16; /* Largest DIE ref chain we will follow. */ do { if (INTUSE(dwarf_hasattr) (die, search_name)) @@ -53,7 +53,21 @@ dwarf_hasattr_integrate (Dwarf_Die *die, unsigned int search_name) die = INTUSE(dwarf_formref_die) (attr, &die_mem); } - while (die != NULL); + while (die != NULL && chain-- != 0); + + /* Not NULL if it didn't have abstract_origin and specification + attributes. If it is a split CU then see if the skeleton + has it. */ + if (die != NULL && is_cudie (die) + && die->cu->unit_type == DW_UT_split_compile) + { + Dwarf_CU *skel_cu = __libdw_find_split_unit (die->cu); + if (skel_cu != NULL) + { + Dwarf_Die skel_die = CUDIE (skel_cu); + return INTUSE(dwarf_hasattr) (&skel_die, search_name); + } + } return 0; } diff --git a/libdw/dwarf_highpc.c b/libdw/dwarf_highpc.c index 20702545..5b2f0fd6 100644 --- a/libdw/dwarf_highpc.c +++ b/libdw/dwarf_highpc.c @@ -1,7 +1,6 @@ /* Return high PC attribute of DIE. - Copyright (C) 2003, 2005, 2012 Red Hat, Inc. + Copyright (C) 2003, 2005, 2012, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2003. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -39,19 +38,22 @@ int dwarf_highpc (Dwarf_Die *die, Dwarf_Addr *return_addr) { Dwarf_Attribute attr_high_mem; - Dwarf_Attribute *attr_high = INTUSE(dwarf_attr) (die, DW_AT_high_pc, - &attr_high_mem); + Dwarf_Attribute *attr_high; + /* Split compile DIEs inherit high_pc from their skeleton DIE. */ + if (is_cudie (die) && die->cu->unit_type == DW_UT_split_compile) + attr_high = INTUSE(dwarf_attr_integrate) (die, DW_AT_high_pc, + &attr_high_mem); + else + attr_high = INTUSE(dwarf_attr) (die, DW_AT_high_pc, &attr_high_mem); + if (attr_high == NULL) - return -1; + goto no_addr; - if (attr_high->form == DW_FORM_addr) - return INTUSE(dwarf_formaddr) (attr_high, return_addr); + if (INTUSE(dwarf_formaddr) (attr_high, return_addr) == 0) + return 0; /* DWARF 4 allows high_pc to be a constant offset from low_pc. */ - Dwarf_Attribute attr_low_mem; - if (INTUSE(dwarf_formaddr) (INTUSE(dwarf_attr) (die, DW_AT_low_pc, - &attr_low_mem), - return_addr) == 0) + if (INTUSE(dwarf_lowpc) (die, return_addr) == 0) { Dwarf_Word uval; if (INTUSE(dwarf_formudata) (attr_high, &uval) == 0) @@ -59,8 +61,10 @@ dwarf_highpc (Dwarf_Die *die, Dwarf_Addr *return_addr) *return_addr += uval; return 0; } - __libdw_seterrno (DWARF_E_NO_ADDR); } + +no_addr: + __libdw_seterrno (DWARF_E_NO_ADDR); return -1; } INTDEF(dwarf_highpc) diff --git a/libdw/dwarf_line_file.c b/libdw/dwarf_line_file.c new file mode 100644 index 00000000..e2df642a --- /dev/null +++ b/libdw/dwarf_line_file.c @@ -0,0 +1,52 @@ +/* Find line information for address. + Copyright (C) 2017 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libdwP.h" + + +int +dwarf_line_file (Dwarf_Line *line, Dwarf_Files **files, size_t *idx) +{ + if (line == NULL) + return -1; + + if (line->file >= line->files->nfiles) + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + + *files = line->files; + *idx = line->file; + + return 0; +} diff --git a/libdw/dwarf_lowpc.c b/libdw/dwarf_lowpc.c index b3be2b0e..4d743a72 100644 --- a/libdw/dwarf_lowpc.c +++ b/libdw/dwarf_lowpc.c @@ -1,7 +1,6 @@ /* Return low PC attribute of DIE. - Copyright (C) 2003, 2005 Red Hat, Inc. + Copyright (C) 2003, 2005, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2003. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -38,10 +37,12 @@ int dwarf_lowpc (Dwarf_Die *die, Dwarf_Addr *return_addr) { - Dwarf_Attribute attr_mem; - - return INTUSE(dwarf_formaddr) (INTUSE(dwarf_attr) (die, DW_AT_low_pc, - &attr_mem), - return_addr); + Dwarf_Attribute attr_mem, *attr; + /* Split compile DIEs inherit low_pc from their skeleton DIE. */ + if (is_cudie (die) && die->cu->unit_type == DW_UT_split_compile) + attr = INTUSE(dwarf_attr_integrate) (die, DW_AT_low_pc, &attr_mem); + else + attr = INTUSE(dwarf_attr) (die, DW_AT_low_pc, &attr_mem); + return INTUSE(dwarf_formaddr) (attr, return_addr); } INTDEF(dwarf_lowpc) diff --git a/libdw/dwarf_next_cfi.c b/libdw/dwarf_next_cfi.c index 53fc3697..fa28d99b 100644 --- a/libdw/dwarf_next_cfi.c +++ b/libdw/dwarf_next_cfi.c @@ -54,6 +54,7 @@ dwarf_next_cfi (const unsigned char e_ident[], we don't know yet whether this is a 64-bit object or not. */ || unlikely (off + 4 >= data->d_size)) { + done: *next_off = (Dwarf_Off) -1l; return 1; } @@ -79,6 +80,13 @@ dwarf_next_cfi (const unsigned char e_ident[], } length = read_8ubyte_unaligned_inc (&dw, bytes); } + + /* Not explicitly in the DWARF spec, but mentioned in the LSB exception + frames (.eh_frame) spec. If Length contains the value 0, then this + CIE shall be considered a terminator and processing shall end. */ + if (length == 0) + goto done; + if (unlikely ((uint64_t) (limit - bytes) < length) || unlikely (length < offset_size + 1)) goto invalid; diff --git a/libdw/dwarf_next_lines.c b/libdw/dwarf_next_lines.c new file mode 100644 index 00000000..9b76b47e --- /dev/null +++ b/libdw/dwarf_next_lines.c @@ -0,0 +1,197 @@ +/* Iterate through the debug line table. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + + +int +dwarf_next_lines (Dwarf *dbg, Dwarf_Off off, + Dwarf_Off *next_off, Dwarf_CU **cu, + Dwarf_Files **srcfiles, size_t *nfiles, + Dwarf_Lines **srclines, size_t *nlines) +{ + /* Ignore existing errors. */ + if (dbg == NULL) + return -1; + + Elf_Data *lines = dbg->sectiondata[IDX_debug_line]; + if (lines == NULL) + { + __libdw_seterrno (DWARF_E_NO_DEBUG_LINE); + return -1; + } + + if (off == (Dwarf_Off) -1 + || lines->d_size < 4 + || off >= lines->d_size) + { + *next_off = (Dwarf_Off) -1; + return 1; + } + + /* Read enough of the header to know where the next table is and + whether we need to lookup the CU (version < 5). */ + const unsigned char *linep = lines->d_buf + off; + const unsigned char *lineendp = lines->d_buf + lines->d_size; + + if ((size_t) (lineendp - linep) < 4) + { + invalid_data: + __libdw_seterrno (DWARF_E_INVALID_DEBUG_LINE); + return -1; + } + + *next_off = off + 4; + Dwarf_Word unit_length = read_4ubyte_unaligned_inc (dbg, linep); + if (unit_length == DWARF3_LENGTH_64_BIT) + { + if ((size_t) (lineendp - linep) < 8) + goto invalid_data; + unit_length = read_8ubyte_unaligned_inc (dbg, linep); + *next_off += 8; + } + + if (unit_length > (size_t) (lineendp - linep)) + goto invalid_data; + + *next_off += unit_length; + lineendp = linep + unit_length; + + if ((size_t) (lineendp - linep) < 2) + goto invalid_data; + uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, linep); + + Dwarf_Die cudie; + if (version < 5) + { + /* We need to find the matching CU to get the comp_dir. Use the + given CU as hint where to start searching. Normally it will + be the next CU that has a statement list. */ + Dwarf_CU *given_cu = *cu; + Dwarf_CU *next_cu = given_cu; + bool found = false; + while (dwarf_get_units (dbg, next_cu, &next_cu, NULL, NULL, + &cudie, NULL) == 0) + { + if (dwarf_hasattr (&cudie, DW_AT_stmt_list)) + { + Dwarf_Attribute attr; + Dwarf_Word stmt_off; + if (dwarf_formudata (dwarf_attr (&cudie, DW_AT_stmt_list, &attr), + &stmt_off) == 0 + && stmt_off == off) + { + found = true; + break; + } + } + else if (off == 0 + && (next_cu->unit_type == DW_UT_split_compile + || next_cu->unit_type == DW_UT_split_type)) + { + /* For split units (in .dwo files) there is only one table + at offset zero (containing just the files, no lines). */ + found = true; + break; + } + } + + if (!found && given_cu != NULL) + { + /* The CUs might be in a different order from the line + tables. Need to do a linear search (but stop at the given + CU, since we already searched those. */ + next_cu = NULL; + while (dwarf_get_units (dbg, next_cu, &next_cu, NULL, NULL, + &cudie, NULL) == 0 + && next_cu != given_cu) + { + Dwarf_Attribute attr; + Dwarf_Word stmt_off; + if (dwarf_formudata (dwarf_attr (&cudie, DW_AT_stmt_list, &attr), + &stmt_off) == 0 + && stmt_off == off) + { + found = true; + break; + } + } + } + + if (found) + *cu = next_cu; + else + *cu = NULL; + } + else + *cu = NULL; + + const char *comp_dir; + unsigned address_size; + if (*cu != NULL) + { + comp_dir = __libdw_getcompdir (&cudie); + address_size = (*cu)->address_size; + } + else + { + comp_dir = NULL; + + size_t esize; + char *ident = elf_getident (dbg->elf, &esize); + if (ident == NULL || esize < EI_NIDENT) + goto invalid_data; + address_size = ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; + } + + if (__libdw_getsrclines (dbg, off, comp_dir, address_size, + srclines, srcfiles) != 0) + return -1; + + if (nlines != NULL) + { + if (srclines != NULL && *srclines != NULL) + *nlines = (*srclines)->nlines; + else + *nlines = 0; + } + + if (nfiles != NULL) + { + if (srcfiles != NULL && *srcfiles != NULL) + *nfiles = (*srcfiles)->nfiles; + else + *nfiles = 0; + } + + return 0; +} diff --git a/libdw/dwarf_nextcu.c b/libdw/dwarf_nextcu.c index fa9b0af3..be113270 100644 --- a/libdw/dwarf_nextcu.c +++ b/libdw/dwarf_nextcu.c @@ -1,5 +1,5 @@ /* Advance to next CU header. - Copyright (C) 2002-2010 Red Hat, Inc. + Copyright (C) 2002-2010, 2016, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -39,11 +39,31 @@ int dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, size_t *header_sizep, Dwarf_Half *versionp, Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep, - uint8_t *offset_sizep, uint64_t *type_signaturep, - Dwarf_Off *type_offsetp) + uint8_t *offset_sizep, uint64_t *v4_type_signaturep, + Dwarf_Off *v4_type_offsetp) { - const bool debug_types = type_signaturep != NULL; - const size_t sec_idx = debug_types ? IDX_debug_types : IDX_debug_info; + const bool v4_debug_types = v4_type_signaturep != NULL; + return __libdw_next_unit (dwarf, v4_debug_types, off, next_off, + header_sizep, versionp, NULL, + abbrev_offsetp, address_sizep, offset_sizep, + v4_type_signaturep, v4_type_offsetp); +} +INTDEF(dwarf_next_unit) + +int +internal_function +__libdw_next_unit (Dwarf *dwarf, bool v4_debug_types, Dwarf_Off off, + Dwarf_Off *next_off, size_t *header_sizep, + Dwarf_Half *versionp, uint8_t *unit_typep, + Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep, + uint8_t *offset_sizep, uint64_t *unit_id8p, + Dwarf_Off *subdie_offsetp) +{ + /* Note that debug_type units come from .debug_types in DWARF < 5 and + from .debug_info in DWARF >= 5. If the user requested the + v4_type_signature we return from .debug_types always. If no signature + is requested we return units (any type) from .debug_info. */ + const size_t sec_idx = v4_debug_types ? IDX_debug_types : IDX_debug_info; /* Maybe there has been an error before. */ if (dwarf == NULL) @@ -61,12 +81,14 @@ dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, return 1; } - /* This points into the .debug_info section to the beginning of the - CU entry. */ + /* This points into the .debug_info or .debug_types section to the + beginning of the CU entry. */ const unsigned char *data = dwarf->sectiondata[sec_idx]->d_buf; const unsigned char *bytes = data + off; - /* The format of the CU header is described in dwarf2p1 7.5.1: + /* The format of the CU header is described in dwarf2p1 7.5.1 and + changed in DWARFv5 (to include unit type, switch location of some + fields and add some optional fields). 1. A 4-byte or 12-byte unsigned integer representing the length of the .debug_info contribution for that compilation unit, not @@ -74,23 +96,58 @@ dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, this is a 4-byte unsigned integer (which must be less than 0xfffffff0); in the 64-bit DWARF format, this consists of the 4-byte value 0xffffffff followed by an 8-byte unsigned integer - that gives the actual length (see Section 7.2.2). + that gives the actual length (see Section 7.2.2). This field + indicates whether this unit is 32-bit of 64-bit DWARF, which + affects all other offset fields in this header. 2. A 2-byte unsigned integer representing the version of the DWARF information for that compilation unit. For DWARF Version - 2.1, the value in this field is 2. + 2.1, the value in this field is 2 (3 for v3, 4 for v4, 5 for v5). + This fields determines the order of the next fields and whether + there are any optional fields in this header. - 3. A 4-byte or 8-byte unsigned offset into the .debug_abbrev + 3. For DWARF 2, 3 and 4 (including v4 type units): + A 4-byte or 8-byte unsigned offset into the .debug_abbrev section. This offset associates the compilation unit with a particular set of debugging information entry abbreviations. In the 32-bit DWARF format, this is a 4-byte unsigned length; in the 64-bit DWARF format, this is an 8-byte unsigned length (see Section 7.4). - 4. A 1-byte unsigned integer representing the size in bytes of + For DWARF 5: + A 1-byte unsigned integer representing the unit (header) type. + This field determines what the optional fields in the header + represent. If this is an unknown unit type then we cannot + assume anything about the rest of the unit (header). + + 4. For all DWARF versions (including v4 type units): + A 1-byte unsigned integer representing the size in bytes of an address on the target architecture. If the system uses segmented addressing, this value represents the size of the - offset portion of an address. */ + offset portion of an address. This is the last field in the header + for DWARF versions 2, 3 and 4 (except for v4 type units). + + 5. For DWARF 5 only (this is field 3 for DWARF 2, 3, 4 and v4 types): + A 4-byte or 8-byte unsigned offset into the .debug_abbrev + section. This offset associates the compilation unit with a + particular set of debugging information entry abbreviations. In + the 32-bit DWARF format, this is a 4-byte unsigned length; in + the 64-bit DWARF format, this is an 8-byte unsigned length. + + 6. For v4 type units (this is really field 5 for v4 types) and + DWARF 5 optional (skeleton, split_compile, type and + split_type): An 8 byte (opaque) integer constant value. For + v4 and v5 type units this is the type signature. For skeleton + and split compile units this is the compilation ID. + + 7. For v4 type units (this is really field 6 for v4 types) and + DWARF 5 optional (type and split_type) and v4 type units: + A 4-byte or 8-byte unsigned offset. In the 32-bit DWARF format, + this is a 4-byte unsigned length; in the 64-bit DWARF format, + this is an 8-byte unsigned length. This is the type DIE offset + (which is not necessarily the first DIE in the unit). + */ + uint64_t length = read_4ubyte_unaligned_inc (dwarf, bytes); size_t offset_size = 4; /* Lengths of 0xfffffff0 - 0xffffffff are escape codes. Oxffffffff is @@ -106,14 +163,6 @@ dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, return -1; } - /* Now we know how large the header is. */ - if (unlikely (DIE_OFFSET_FROM_CU_OFFSET (off, offset_size, debug_types) - >= dwarf->sectiondata[sec_idx]->d_size)) - { - *next_off = -1; - return 1; - } - if (length == DWARF3_LENGTH_64_BIT) /* This is a 64-bit DWARF format. */ length = read_8ubyte_unaligned_inc (dwarf, bytes); @@ -121,41 +170,99 @@ dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, /* Read the version stamp. Always a 16-bit value. */ uint_fast16_t version = read_2ubyte_unaligned_inc (dwarf, bytes); + /* We keep unit_type at zero for older DWARF since we cannot + easily guess whether it is a compile or partial unit. */ + uint8_t unit_type = 0; + if (version >= 5) + unit_type = *bytes++; + + /* All these are optional. */ + Dwarf_Off subdie_off = 0; + uint64_t sig_id = 0; + Dwarf_Off abbrev_offset = 0; + uint8_t address_size = 0; + + if (version < 2 || version > 5 + || (version == 5 && ! (unit_type == DW_UT_compile + || unit_type == DW_UT_partial + || unit_type == DW_UT_skeleton + || unit_type == DW_UT_split_compile + || unit_type == DW_UT_type + || unit_type == DW_UT_split_type))) + { + /* We cannot really know more about the header. Just report + the length of the unit, version and unit type. */ + goto done; + } + + /* We have to guess the unit_type. But we don't have a real CUDIE. */ + if (version < 5) + unit_type = v4_debug_types ? DW_UT_type : DW_UT_compile; + + /* Now we know how large the header is (should be). */ + if (unlikely (__libdw_first_die_from_cu_start (off, offset_size, version, + unit_type) + >= dwarf->sectiondata[sec_idx]->d_size)) + { + *next_off = -1; + return 1; + } + + /* The address size. Always an 8-bit value. + Comes after abbrev_offset for version < 5, otherwise unit type + and address size (if a known unit type) comes before abbrev_offset. */ + if (version >= 5) + address_size = *bytes++; + /* Get offset in .debug_abbrev. Note that the size of the entry depends on whether this is a 32-bit or 64-bit DWARF definition. */ - uint64_t abbrev_offset; if (__libdw_read_offset_inc (dwarf, sec_idx, &bytes, offset_size, &abbrev_offset, IDX_debug_abbrev, 0)) return -1; - /* The address size. Always an 8-bit value. */ - uint8_t address_size = *bytes++; + if (version < 5) + address_size = *bytes++; - if (debug_types) + /* Extra fields, signature/id and type offset/padding. */ + if (v4_debug_types + || (version >= 5 + && (unit_type == DW_UT_skeleton || unit_type == DW_UT_split_compile + || unit_type == DW_UT_type || unit_type == DW_UT_split_type))) { - uint64_t type_sig8 = read_8ubyte_unaligned_inc (dwarf, bytes); - - Dwarf_Off type_offset; - if (__libdw_read_offset_inc (dwarf, sec_idx, &bytes, offset_size, - &type_offset, sec_idx, 0)) - return -1; + sig_id = read_8ubyte_unaligned_inc (dwarf, bytes); + + if ((v4_debug_types + || unit_type == DW_UT_type || unit_type == DW_UT_split_type)) + { + if (__libdw_read_offset_inc (dwarf, sec_idx, &bytes, offset_size, + &subdie_off, sec_idx, 0)) + return -1; + + /* Validate that the TYPE_OFFSET points past the header. */ + if (unlikely (subdie_off < (size_t) (bytes - (data + off)))) + goto invalid; + } + } - /* Validate that the TYPE_OFFSET points past the header. */ - if (unlikely (type_offset < (size_t) (bytes - (data + off)))) - goto invalid; + done: + if (unit_id8p != NULL) + *unit_id8p = sig_id; - *type_signaturep = type_sig8; - if (type_offsetp != NULL) - *type_offsetp = type_offset; - } + if (subdie_offsetp != NULL) + *subdie_offsetp = subdie_off; - /* Store the header length. */ + /* Store the header length. This is really how much we have read + from the header. If we didn't recognize the unit type the + header might actually be bigger. */ if (header_sizep != NULL) *header_sizep = bytes - (data + off); if (versionp != NULL) *versionp = version; + if (unit_typep != NULL) + *unit_typep = unit_type; + if (abbrev_offsetp != NULL) *abbrev_offsetp = abbrev_offset; @@ -166,13 +273,18 @@ dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, if (offset_sizep != NULL) *offset_sizep = offset_size; - /* See definition of DIE_OFFSET_FROM_CU_OFFSET macro - for an explanation of the trick in this expression. */ + /* The length of the unit doesn't include the length field itself. + The length field is either, with offset == 4: 2 * 4 - 4 == 4, + or with offset == 8: 2 * 8 - 4 == 12. */ *next_off = off + 2 * offset_size - 4 + length; + /* This means that the length field is bogus, but return the CU anyway. + We just won't return anything after this. */ + if (*next_off <= off) + *next_off = (Dwarf_Off) -1; + return 0; } -INTDEF(dwarf_next_unit) int dwarf_nextcu (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, diff --git a/libdw/dwarf_offdie.c b/libdw/dwarf_offdie.c index 15f55c22..883720de 100644 --- a/libdw/dwarf_offdie.c +++ b/libdw/dwarf_offdie.c @@ -1,5 +1,5 @@ /* Return DIE at given offset. - Copyright (C) 2002-2010 Red Hat, Inc. + Copyright (C) 2002-2010, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2002. @@ -45,7 +45,7 @@ __libdw_offdie (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result, Elf_Data *const data = dbg->sectiondata[debug_types ? IDX_debug_types : IDX_debug_info]; - if (offset >= data->d_size) + if (data == NULL || offset >= data->d_size) { __libdw_seterrno (DWARF_E_INVALID_DWARF); return NULL; diff --git a/libdw/dwarf_peel_type.c b/libdw/dwarf_peel_type.c index 5dca8f88..59fc6f15 100644 --- a/libdw/dwarf_peel_type.c +++ b/libdw/dwarf_peel_type.c @@ -1,5 +1,5 @@ /* Peel type aliases and qualifier tags from a type DIE. - Copyright (C) 2014, 2015 Red Hat, Inc. + Copyright (C) 2014, 2015, 2016 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -46,14 +46,22 @@ dwarf_peel_type (Dwarf_Die *die, Dwarf_Die *result) *result = *die; tag = INTUSE (dwarf_tag) (result); - while (tag == DW_TAG_typedef - || tag == DW_TAG_const_type - || tag == DW_TAG_volatile_type - || tag == DW_TAG_restrict_type - || tag == DW_TAG_atomic_type) + +/* Stack 8 of all these modifiers, after that it gets silly. */ +#define MAX_DEPTH (8 * 8) + int max_depth = MAX_DEPTH; + while ((tag == DW_TAG_typedef + || tag == DW_TAG_const_type + || tag == DW_TAG_volatile_type + || tag == DW_TAG_restrict_type + || tag == DW_TAG_atomic_type + || tag == DW_TAG_immutable_type + || tag == DW_TAG_packed_type + || tag == DW_TAG_shared_type) + && max_depth-- > 0) { Dwarf_Attribute attr_mem; - Dwarf_Attribute *attr = INTUSE (dwarf_attr_integrate) (die, DW_AT_type, + Dwarf_Attribute *attr = INTUSE (dwarf_attr_integrate) (result, DW_AT_type, &attr_mem); if (attr == NULL) return 1; @@ -64,7 +72,7 @@ dwarf_peel_type (Dwarf_Die *die, Dwarf_Die *result) tag = INTUSE (dwarf_tag) (result); } - if (tag == DW_TAG_invalid) + if (tag == DW_TAG_invalid || max_depth <= 0) return -1; return 0; diff --git a/libdw/dwarf_ranges.c b/libdw/dwarf_ranges.c index 4b6853d3..f67d8a5a 100644 --- a/libdw/dwarf_ranges.c +++ b/libdw/dwarf_ranges.c @@ -1,5 +1,5 @@ /* Enumerate the PC ranges covered by a DIE. - Copyright (C) 2005, 2007, 2009 Red Hat, Inc. + Copyright (C) 2005, 2007, 2009, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -36,48 +36,427 @@ /* 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 a default location, set `*beginp' (0), `*endp' (-1) and return 0. - If it's base address selection record, set up `*basep' and return 1. - If it's end of rangelist, don't set anything and return 2 - If an error occurs, don't set anything and return -1. */ internal_function int -__libdw_read_begin_end_pair_inc (Dwarf *dbg, int sec_index, - unsigned char **addrp, int width, +__libdw_read_begin_end_pair_inc (Dwarf_CU *cu, int sec_index, + const unsigned char **addrp, + const unsigned char *addrend, + int width, Dwarf_Addr *beginp, Dwarf_Addr *endp, Dwarf_Addr *basep) { - Dwarf_Addr escape = (width == 8 ? (Elf64_Addr) -1 - : (Elf64_Addr) (Elf32_Addr) -1); - Dwarf_Addr begin; - Dwarf_Addr end; + Dwarf *dbg = cu->dbg; + if (sec_index == IDX_debug_loc + && cu->version < 5 + && cu->unit_type == DW_UT_split_compile) + { + /* GNU DebugFission. */ + const unsigned char *addr = *addrp; + if (addrend - addr < 1) + goto invalid; + + const char code = *addr++; + uint64_t begin = 0, end = 0, base = *basep, addr_idx; + switch (code) + { + case DW_LLE_GNU_end_of_list_entry: + *addrp = addr; + return 2; + + case DW_LLE_GNU_base_address_selection_entry: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &base) != 0) + return -1; + *basep = base; + *addrp = addr; + return 1; + + case DW_LLE_GNU_start_end_entry: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &begin) != 0) + return -1; + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &end) != 0) + return -1; + + *beginp = begin; + *endp = end; + *addrp = addr; + return 0; + + case DW_LLE_GNU_start_length_entry: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &begin) != 0) + return -1; + if (addrend - addr < 4) + goto invalid; + end = read_4ubyte_unaligned_inc (dbg, addr); + + *beginp = begin; + *endp = begin + end; + *addrp = addr; + return 0; + + default: + goto invalid; + } + } + else if (sec_index == IDX_debug_ranges || sec_index == IDX_debug_loc) + { + Dwarf_Addr escape = (width == 8 ? (Elf64_Addr) -1 + : (Elf64_Addr) (Elf32_Addr) -1); + Dwarf_Addr begin; + Dwarf_Addr end; + + const unsigned char *addr = *addrp; + if (addrend - addr < width * 2) + { + invalid: + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } + + bool begin_relocated = READ_AND_RELOCATE (__libdw_relocate_address, + begin); + bool end_relocated = READ_AND_RELOCATE (__libdw_relocate_address, + end); + *addrp = addr; + + /* Unrelocated escape for begin means base address selection. */ + if (begin == escape && !begin_relocated) + { + if (unlikely (end == escape)) + goto invalid; + + *basep = end; + return 1; + } + + /* Unrelocated pair of zeroes means end of range list. */ + if (begin == 0 && end == 0 && !begin_relocated && !end_relocated) + return 2; + + /* Don't check for begin_relocated == end_relocated. Serve the data + to the client even though it may be buggy. */ + *beginp = begin + *basep; + *endp = end + *basep; - unsigned char *addr = *addrp; - bool begin_relocated = READ_AND_RELOCATE (__libdw_relocate_address, begin); - bool end_relocated = READ_AND_RELOCATE (__libdw_relocate_address, end); - *addrp = addr; + return 0; + } + else if (sec_index == IDX_debug_rnglists) + { + const unsigned char *addr = *addrp; + if (addrend - addr < 1) + goto invalid; + + const char code = *addr++; + uint64_t begin = 0, end = 0, base = *basep, addr_idx; + switch (code) + { + case DW_RLE_end_of_list: + *addrp = addr; + return 2; + + case DW_RLE_base_addressx: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &base) != 0) + return -1; + + *basep = base; + *addrp = addr; + return 1; + + case DW_RLE_startx_endx: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &begin) != 0) + return -1; + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &end) != 0) + return -1; + + *beginp = begin; + *endp = end; + *addrp = addr; + return 0; + + case DW_RLE_startx_length: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &begin) != 0) + return -1; + if (addrend - addr < 1) + goto invalid; + get_uleb128 (end, addr, addrend); + + *beginp = begin; + *endp = begin + end; + *addrp = addr; + return 0; + + case DW_RLE_offset_pair: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (begin, addr, addrend); + if (addrend - addr < 1) + goto invalid; + get_uleb128 (end, addr, addrend); + + *beginp = begin + base; + *endp = end + base; + *addrp = addr; + return 0; + + case DW_RLE_base_address: + if (addrend - addr < width) + goto invalid; + __libdw_read_address_inc (dbg, sec_index, &addr, width, &base); + + *basep = base; + *addrp = addr; + return 1; + + case DW_RLE_start_end: + if (addrend - addr < 2 * width) + goto invalid; + __libdw_read_address_inc (dbg, sec_index, &addr, width, &begin); + __libdw_read_address_inc (dbg, sec_index, &addr, width, &end); + + *beginp = begin; + *endp = end; + *addrp = addr; + return 0; + + case DW_RLE_start_length: + if (addrend - addr < width) + goto invalid; + __libdw_read_address_inc (dbg, sec_index, &addr, width, &begin); + if (addrend - addr < 1) + goto invalid; + get_uleb128 (end, addr, addrend); + + *beginp = begin; + *endp = begin + end; + *addrp = addr; + return 0; + + default: + goto invalid; + } + } + else if (sec_index == IDX_debug_loclists) + { + const unsigned char *addr = *addrp; + if (addrend - addr < 1) + goto invalid; + + const char code = *addr++; + uint64_t begin = 0, end = 0, base = *basep, addr_idx; + switch (code) + { + case DW_LLE_end_of_list: + *addrp = addr; + return 2; + + case DW_LLE_base_addressx: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &base) != 0) + return -1; + + *basep = base; + *addrp = addr; + return 1; + + case DW_LLE_startx_endx: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &begin) != 0) + return -1; + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &end) != 0) + return -1; + + *beginp = begin; + *endp = end; + *addrp = addr; + return 0; + + case DW_LLE_startx_length: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (addr_idx, addr, addrend); + if (__libdw_addrx (cu, addr_idx, &begin) != 0) + return -1; + if (addrend - addr < 1) + goto invalid; + get_uleb128 (end, addr, addrend); + + *beginp = begin; + *endp = begin + end; + *addrp = addr; + return 0; + + case DW_LLE_offset_pair: + if (addrend - addr < 1) + goto invalid; + get_uleb128 (begin, addr, addrend); + if (addrend - addr < 1) + goto invalid; + get_uleb128 (end, addr, addrend); + + *beginp = begin + base; + *endp = end + base; + *addrp = addr; + return 0; + + case DW_LLE_default_location: + *beginp = 0; + *endp = (Dwarf_Addr) -1; + *addrp = addr; + return 0; + + case DW_LLE_base_address: + if (addrend - addr < width) + goto invalid; + __libdw_read_address_inc (dbg, sec_index, &addr, width, &base); + + *basep = base; + *addrp = addr; + return 1; + + case DW_LLE_start_end: + if (addrend - addr < 2 * width) + goto invalid; + __libdw_read_address_inc (dbg, sec_index, &addr, width, &begin); + __libdw_read_address_inc (dbg, sec_index, &addr, width, &end); + + *beginp = begin; + *endp = end; + *addrp = addr; + return 0; + + case DW_LLE_start_length: + if (addrend - addr < width) + goto invalid; + __libdw_read_address_inc (dbg, sec_index, &addr, width, &begin); + if (addrend - addr < 1) + goto invalid; + get_uleb128 (end, addr, addrend); + + *beginp = begin; + *endp = begin + end; + *addrp = addr; + return 0; + + default: + goto invalid; + } + } + else + { + __libdw_seterrno (DWARF_E_INVALID_DWARF); + return -1; + } +} + +static int +initial_offset (Dwarf_Attribute *attr, ptrdiff_t *offset) +{ + size_t secidx = (attr->cu->version < 5 + ? IDX_debug_ranges : IDX_debug_rnglists); - /* Unrelocated escape for begin means base address selection. */ - if (begin == escape && !begin_relocated) + Dwarf_Word start_offset; + if (attr->form == DW_FORM_rnglistx) { - if (unlikely (end == escape)) + Dwarf_Word idx; + Dwarf_CU *cu = attr->cu; + const unsigned char *datap = attr->valp; + const unsigned char *endp = cu->endp; + if (datap >= endp) { __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1; } + get_uleb128 (idx, datap, endp); - if (basep != NULL) - *basep = end; - return 1; - } + Elf_Data *data = cu->dbg->sectiondata[secidx]; + if (data == NULL && cu->unit_type == DW_UT_split_compile) + { + cu = __libdw_find_split_unit (cu); + if (cu != NULL) + data = cu->dbg->sectiondata[secidx]; + } + + if (data == NULL) + { + __libdw_seterrno (secidx == IDX_debug_ranges + ? DWARF_E_NO_DEBUG_RANGES + : DWARF_E_NO_DEBUG_RNGLISTS); + return -1; + } - /* Unrelocated pair of zeroes means end of range list. */ - if (begin == 0 && end == 0 && !begin_relocated && !end_relocated) - return 2; + Dwarf_Off range_base_off = __libdw_cu_ranges_base (cu); - /* Don't check for begin_relocated == end_relocated. Serve the data - to the client even though it may be buggy. */ - *beginp = begin; - *endp = end; + /* The section should at least contain room for one offset. */ + size_t sec_size = cu->dbg->sectiondata[secidx]->d_size; + size_t offset_size = cu->offset_size; + if (offset_size > sec_size) + { + invalid_offset: + __libdw_seterrno (DWARF_E_INVALID_OFFSET); + return -1; + } + + /* And the base offset should be at least inside the section. */ + if (range_base_off > (sec_size - offset_size)) + goto invalid_offset; + + size_t max_idx = (sec_size - offset_size - range_base_off) / offset_size; + if (idx > max_idx) + goto invalid_offset; + + datap = (cu->dbg->sectiondata[secidx]->d_buf + + range_base_off + (idx * offset_size)); + if (offset_size == 4) + start_offset = read_4ubyte_unaligned (cu->dbg, datap); + else + start_offset = read_8ubyte_unaligned (cu->dbg, datap); + + start_offset += range_base_off; + } + else + { + if (__libdw_formptr (attr, secidx, + (secidx == IDX_debug_ranges + ? DWARF_E_NO_DEBUG_RANGES + : DWARF_E_NO_DEBUG_RNGLISTS), + NULL, &start_offset) == NULL) + return -1; + } + *offset = start_offset; return 0; } @@ -101,68 +480,64 @@ dwarf_ranges (Dwarf_Die *die, ptrdiff_t offset, Dwarf_Addr *basep, return 0; /* We have to look for a noncontiguous range. */ - - const Elf_Data *d = die->cu->dbg->sectiondata[IDX_debug_ranges]; - if (d == NULL && offset != 0) + Dwarf_CU *cu = die->cu; + if (cu == NULL) { - __libdw_seterrno (DWARF_E_NO_DEBUG_RANGES); + __libdw_seterrno (DWARF_E_INVALID_DWARF); return -1; } - unsigned char *readp; - unsigned char *readendp; + size_t secidx = (cu->version < 5 ? IDX_debug_ranges : IDX_debug_rnglists); + const Elf_Data *d = cu->dbg->sectiondata[secidx]; + if (d == NULL && cu->unit_type == DW_UT_split_compile) + { + Dwarf_CU *skel = __libdw_find_split_unit (cu); + if (skel != NULL) + { + cu = skel; + d = cu->dbg->sectiondata[secidx]; + } + } + + const unsigned char *readp; + const unsigned char *readendp; if (offset == 0) { Dwarf_Attribute attr_mem; Dwarf_Attribute *attr = INTUSE(dwarf_attr) (die, DW_AT_ranges, &attr_mem); + if (attr == NULL + && is_cudie (die) + && die->cu->unit_type == DW_UT_split_compile) + attr = INTUSE(dwarf_attr_integrate) (die, DW_AT_ranges, &attr_mem); if (attr == NULL) /* No PC attributes in this DIE at all, so an empty range list. */ return 0; - Dwarf_Word start_offset; - if ((readp = __libdw_formptr (attr, IDX_debug_ranges, - DWARF_E_NO_DEBUG_RANGES, - &readendp, &start_offset)) == NULL) + *basep = __libdw_cu_base_address (attr->cu); + if (*basep == (Dwarf_Addr) -1) return -1; - offset = start_offset; - assert ((Dwarf_Word) offset == start_offset); - - /* Fetch the CU's base address. */ - Dwarf_Die cudie = CUDIE (attr->cu); - - /* Find the base address of the compilation unit. It will - normally be specified by DW_AT_low_pc. In DWARF-3 draft 4, - the base address could be overridden by DW_AT_entry_pc. It's - been removed, but GCC emits DW_AT_entry_pc and not DW_AT_lowpc - for compilation units with discontinuous ranges. */ - if (unlikely (INTUSE(dwarf_lowpc) (&cudie, basep) != 0) - && INTUSE(dwarf_formaddr) (INTUSE(dwarf_attr) (&cudie, - DW_AT_entry_pc, - &attr_mem), - basep) != 0) - *basep = (Dwarf_Addr) -1; + if (initial_offset (attr, &offset) != 0) + return -1; } else { - if (__libdw_offset_in_section (die->cu->dbg, - IDX_debug_ranges, offset, 1)) - return -1l; - - readp = d->d_buf + offset; - readendp = d->d_buf + d->d_size; + if (__libdw_offset_in_section (cu->dbg, + secidx, offset, 1)) + return -1; } - next: - if (readendp - readp < die->cu->address_size * 2) - goto invalid; + readp = d->d_buf + offset; + readendp = d->d_buf + d->d_size; Dwarf_Addr begin; Dwarf_Addr end; - switch (__libdw_read_begin_end_pair_inc (die->cu->dbg, IDX_debug_ranges, - &readp, die->cu->address_size, + next: + switch (__libdw_read_begin_end_pair_inc (cu, secidx, + &readp, readendp, + cu->address_size, &begin, &end, basep)) { case 0: @@ -172,22 +547,11 @@ dwarf_ranges (Dwarf_Die *die, ptrdiff_t offset, Dwarf_Addr *basep, case 2: return 0; default: - return -1l; - } - - /* We have an address range entry. Check that we have a base. */ - if (*basep == (Dwarf_Addr) -1) - { - if (INTUSE(dwarf_errno) () == 0) - { - invalid: - __libdw_seterrno (DWARF_E_INVALID_DWARF); - } return -1; } - *startp = *basep + begin; - *endp = *basep + end; + *startp = begin; + *endp = end; return readp - (unsigned char *) d->d_buf; } INTDEF (dwarf_ranges) diff --git a/libdw/dwarf_setalt.c b/libdw/dwarf_setalt.c index 9bd566ff..9051b8e0 100644 --- a/libdw/dwarf_setalt.c +++ b/libdw/dwarf_setalt.c @@ -1,5 +1,5 @@ /* Provides the data referenced by the .gnu_debugaltlink section. - Copyright (C) 2014 Red Hat, Inc. + Copyright (C) 2014, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -32,9 +32,18 @@ #include "libdwP.h" +#include + void dwarf_setalt (Dwarf *main, Dwarf *alt) { + if (main->alt_fd != -1) + { + INTUSE(dwarf_end) (main->alt_dwarf); + close (main->alt_fd); + main->alt_fd = -1; + } + main->alt_dwarf = alt; } INTDEF (dwarf_setalt) diff --git a/libdw/dwarf_siblingof.c b/libdw/dwarf_siblingof.c index df39c1cb..613d2090 100644 --- a/libdw/dwarf_siblingof.c +++ b/libdw/dwarf_siblingof.c @@ -58,8 +58,6 @@ dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result) sibattr.cu = this_die.cu; /* That's the address we start looking. */ unsigned char *addr = this_die.addr; - /* End of the buffer. */ - 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. */ @@ -96,6 +94,8 @@ dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result) /* This abbreviation has children. */ ++level; + /* End of the buffer. */ + unsigned char *endp = sibattr.cu->endp; while (1) { @@ -125,6 +125,7 @@ dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result) while (level > 0); /* Maybe we reached the end of the CU. */ + unsigned char *endp = sibattr.cu->endp; if (addr >= endp) return 1; diff --git a/libdw/libdw.h b/libdw/libdw.h index 473e1a25..e20961be 100644 --- a/libdw/libdw.h +++ b/libdw/libdw.h @@ -1,5 +1,5 @@ /* Interfaces for libdw. - Copyright (C) 2002-2010, 2013, 2014 Red Hat, Inc. + Copyright (C) 2002-2010, 2013, 2014, 2016, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -34,23 +34,6 @@ #include #include - -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -# define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__))) -# define __deprecated_attribute__ __attribute__ ((__deprecated__)) -#else -# define __nonnull_attribute__(args...) -# define __deprecated_attribute__ -#endif - - -#ifdef __GNUC_STDC_INLINE__ -# define __libdw_extern_inline extern __inline __attribute__ ((__gnu_inline__)) -#else -# define __libdw_extern_inline extern __inline -#endif - - /* Mode for the session. */ typedef enum { @@ -228,7 +211,9 @@ typedef union Dwarf_FDE fde; } Dwarf_CFI_Entry; -#define dwarf_cfi_cie_p(entry) ((entry)->cie.CIE_id == DW_CIE_ID_64) +/* Same as DW_CIE_ID_64 from dwarf.h to keep libdw.h independent. */ +#define LIBDW_CIE_ID 0xffffffffffffffffULL +#define dwarf_cfi_cie_p(entry) ((entry)->cie.CIE_id == LIBDW_CIE_ID) /* Opaque type representing a frame state described by CFI. */ typedef struct Dwarf_Frame_s Dwarf_Frame; @@ -242,11 +227,7 @@ typedef struct Dwarf Dwarf; /* Out-Of-Memory handler. */ -#if __GNUC__ < 4 -typedef void (*Dwarf_OOM) (void); -#else -typedef void (*__attribute__ ((noreturn)) Dwarf_OOM) (void); -#endif +typedef void (*__noreturn_attribute__ Dwarf_OOM) (void); #ifdef __cplusplus @@ -269,7 +250,9 @@ extern Elf *dwarf_getelf (Dwarf *dwarf); extern Dwarf *dwarf_cu_getdwarf (Dwarf_CU *cu); /* Retrieves the DWARF descriptor for debugaltlink data. Returns NULL - if no alternate debug data has been supplied. */ + if no alternate debug data has been supplied yet. libdw will try + to set the alt file on first use of an alt FORM if not yet explicitly + provided by dwarf_setalt. */ extern Dwarf *dwarf_getalt (Dwarf *main); /* Provides the data referenced by the .gnu_debugaltlink section. The @@ -277,16 +260,15 @@ extern Dwarf *dwarf_getalt (Dwarf *main); same build ID). It is the responsibility of the caller to ensure that the data referenced by ALT stays valid while it is used by MAIN, until dwarf_setalt is called on MAIN with a different - descriptor, or dwarf_end. */ + descriptor, or dwarf_end. Must be called before inspecting DIEs + that might have alt FORMs. Otherwise libdw will try to set the + alt file itself on first use. */ extern void dwarf_setalt (Dwarf *main, Dwarf *alt); /* Release debugging handling context. */ extern int dwarf_end (Dwarf *dwarf); -/* Get the data block for the .debug_info section. */ -extern Elf_Data *dwarf_getscn_info (Dwarf *dwarf); - /* Read the header for the DWARF CU. */ extern int dwarf_nextcu (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, size_t *header_sizep, Dwarf_Off *abbrev_offsetp, @@ -304,6 +286,33 @@ extern int dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off, __nonnull_attribute__ (3); +/* Gets the next Dwarf_CU (unit), version, unit type and if available + the CU DIE and sub (type) DIE of the unit. Returns 0 on success, + -1 on error or 1 if there are no more units. To start iterating + provide NULL for CU. If version < 5 the unit type is set from the + CU DIE if available (DW_UT_compile for DW_TAG_compile_unit, + DW_UT_type for DW_TAG_type_unit or DW_UT_partial for + DW_TAG_partial_unit), otherwise it is set to zero. If unavailable + (the version or unit type is unknown) the CU DIE is cleared. + Likewise if the sub DIE isn't isn't available (the unit type is not + DW_UT_type or DW_UT_split_type) the sub DIE tag is cleared. */ +extern int dwarf_get_units (Dwarf *dwarf, Dwarf_CU *cu, Dwarf_CU **next_cu, + Dwarf_Half *version, uint8_t *unit_type, + Dwarf_Die *cudie, Dwarf_Die *subdie) + __nonnull_attribute__ (3); + +/* Provides information and DIEs associated with the given Dwarf_CU + unit. Returns -1 on error, zero on success. Arguments not needed + may be NULL. If they are NULL and aren't known yet, they won't be + looked up. If the subdie doesn't exist for this unit_type it will + be cleared. If there is no unit_id for this unit type it will be + set to zero. */ +extern int dwarf_cu_info (Dwarf_CU *cu, + Dwarf_Half *version, uint8_t *unit_type, + Dwarf_Die *cudie, Dwarf_Die *subdie, + uint64_t *unit_id, + uint8_t *address_size, uint8_t *offset_size); + /* Decode one DWARF CFI entry (CIE or FDE) from the raw section data. The E_IDENT from the originating ELF file indicates the address size and byte order used in the CFI section contained in DATA; @@ -365,6 +374,18 @@ extern Dwarf_Die *dwarf_diecu (Dwarf_Die *die, Dwarf_Die *result, uint8_t *address_sizep, uint8_t *offset_sizep) __nonnull_attribute__ (2); +/* Given a Dwarf_Die addr returns a (reconstructed) Dwarf_Die, or NULL + if the given addr didn't come from a valid Dwarf_Die. In particular + it will make sure that the correct Dwarf_CU pointer is set for the + Dwarf_Die, the Dwarf_Abbrev pointer will not be set up yet (it will + only be once the Dwarf_Die is used to read attributes, children or + siblings). This functions can be used to keep a reference to a + Dwarf_Die which you want to refer to later. The addr, and the result + of this function, is only valid while the associated Dwarf is valid. */ +extern Dwarf_Die *dwarf_die_addr_die (Dwarf *dbg, void *addr, + Dwarf_Die *result) + __nonnull_attribute__ (3); + /* Return the CU DIE and the header info associated with a Dwarf_Die or Dwarf_Attribute. A Dwarf_Die or a Dwarf_Attribute is associated with a particular Dwarf_CU handle. This function returns the CU or @@ -399,8 +420,11 @@ 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. +/* For type aliases and qualifier type DIEs, which don't modify or + change the structural layout of the underlying type, 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 @@ -408,13 +432,18 @@ extern int dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result) attribute). Returns -1 when an error occured. The current DWARF specification defines one type alias tag - (DW_TAG_typedef) and three qualifier type tags (DW_TAG_const_type, - DW_TAG_volatile_type, DW_TAG_restrict_type). DWARF5 defines one - other qualifier type tag (DW_TAG_atomic_type). A future version of - this function might peel other alias or qualifier type tags if a - future DWARF version or GNU extension defines other type aliases or - qualifier type tags that don't modify or change the structural - layout of the underlying type. */ + (DW_TAG_typedef) and seven modifier/qualifier type tags + (DW_TAG_const_type, DW_TAG_volatile_type, DW_TAG_restrict_type, + DW_TAG_atomic_type, DW_TAG_immutable_type, DW_TAG_packed_type and + DW_TAG_shared_type). This function won't peel modifier type + tags that change the way the underlying type is accessed such + as the pointer or reference type tags (DW_TAG_pointer_type, + DW_TAG_reference_type or DW_TAG_rvalue_reference_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, + change the structural layout or the way to access the underlying type. */ extern int dwarf_peel_type (Dwarf_Die *die, Dwarf_Die *result) __nonnull_attribute__ (2); @@ -574,6 +603,12 @@ extern int dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep, unsigned int *formp, Dwarf_Off *offset); +/* Get specific attribute of abbreviation and any data encoded with it. + Specifically for DW_FORM_implicit_const data will be set to the + constant value associated. */ +extern int dwarf_getabbrevattr_data (Dwarf_Abbrev *abbrev, size_t idx, + unsigned int *namep, unsigned int *formp, + Dwarf_Sword *datap, Dwarf_Off *offset); /* Get string from-debug_str section. */ extern const char *dwarf_getstring (Dwarf *dbg, Dwarf_Off offset, @@ -653,14 +688,23 @@ extern int dwarf_linediscriminator (Dwarf_Line *line, unsigned int *discp) __nonnull_attribute__ (2); -/* Find line information for address. */ +/* Find line information for address. The returned string is NULL when + an error occured, or the file path. The file path is either absolute + or relative to the compilation directory. See dwarf_decl_file. */ extern const char *dwarf_linesrc (Dwarf_Line *line, Dwarf_Word *mtime, Dwarf_Word *length); -/* Return file information. */ +/* Return file information. The returned string is NULL when + an error occured, or the file path. The file path is either absolute + or relative to the compilation directory. See dwarf_decl_file. */ extern const char *dwarf_filesrc (Dwarf_Files *file, size_t idx, Dwarf_Word *mtime, Dwarf_Word *length); +/* Return the Dwarf_Files and index associated with the given Dwarf_Line. */ +extern int dwarf_line_file (Dwarf_Line *line, + Dwarf_Files **files, size_t *idx) + __nonnull_attribute__ (2, 3); + /* Return the directory list used in the file information extracted. (*RESULT)[0] is the CU's DW_AT_comp_dir value, and may be null. (*RESULT)[0..*NDIRS-1] are the compile-time include directory path @@ -669,6 +713,24 @@ extern int dwarf_getsrcdirs (Dwarf_Files *files, const char *const **result, size_t *ndirs) __nonnull_attribute__ (2, 3); +/* Iterates through the debug line units. Returns 0 on success, -1 on + error or 1 if there are no more units. To start iterating use zero + for OFF and set *CU to NULL. On success NEXT_OFF will be set to + the next offset to use. The *CU will be set if this line table + needed a specific CU and needs to be given when calling + dwarf_next_lines again (to help dwarf_next_lines quickly find the + next CU). *CU might be set to NULL when it couldn't be found (the + compilation directory entry will be the empty string in that case) + or for DWARF 5 or later tables, which are self contained. SRCFILES + and SRCLINES may be NULL if the caller is not interested in the + actual line or file table. On success and when not NULL, NFILES + and NLINES will be set to the number of files in the file table and + number of lines in the line table. */ +extern int dwarf_next_lines (Dwarf *dwarf, Dwarf_Off off, + Dwarf_Off *next_off, Dwarf_CU **cu, + Dwarf_Files **srcfiles, size_t *nfiles, + Dwarf_Lines **srclines, size_t *nlines) + __nonnull_attribute__ (3,4); /* Return location expression, decoded as a list of operations. */ extern int dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **expr, @@ -749,6 +811,12 @@ extern int dwarf_getlocation_attr (Dwarf_Attribute *attr, For DW_TAG_array_type it can apply much more complex rules. */ extern int dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size); +/* Given a language code, as returned by dwarf_srclan, get the default + lower bound for a subrange type without a lower bound attribute. + Returns zero on success or -1 on failure when the given language + wasn't recognized. */ +extern int dwarf_default_lower_bound (int lang, Dwarf_Sword *result) + __nonnull_attribute__ (2); /* Return scope DIEs containing PC address. Sets *SCOPES to a malloc'd array of Dwarf_Die structures, @@ -818,7 +886,14 @@ extern ptrdiff_t dwarf_getfuncs (Dwarf_Die *cudie, void *arg, ptrdiff_t offset); -/* Return file name containing definition of the given declaration. */ +/* Return file name containing definition of the given declaration. + Of the DECL has an (indirect, see dwarf_attr_integrate) decl_file + attribute. The returned file path is either absolute, or relative + to the compilation directory. Given the decl DIE, the compilation + directory can be retrieved through: + dwarf_formstring (dwarf_attr (dwarf_diecu (decl, &cudie, NULL, NULL), + DW_AT_comp_dir, &attr)); + Returns NULL if no decl_file could be found or an error occured. */ extern const char *dwarf_decl_file (Dwarf_Die *decl); /* Get line number of beginning of given declaration. */ diff --git a/libdw/libdw.map b/libdw/libdw.map index 83cb1d97..3fef2ede 100644 --- a/libdw/libdw.map +++ b/libdw/libdw.map @@ -49,7 +49,6 @@ ELFUTILS_0.122 { dwarf_getlocation_addr; dwarf_getmacros; dwarf_getpubnames; - dwarf_getscn_info; dwarf_getscopes; dwarf_getscopes_die; dwarf_getscopevar; @@ -338,3 +337,22 @@ ELFUTILS_0.167 { dwelf_strent_str; dwelf_strtab_free; } ELFUTILS_0.165; + +ELFUTILS_0.170 { + global: + dwarf_default_lower_bound; + dwarf_line_file; +} ELFUTILS_0.167; + +ELFUTILS_0.171 { + global: + dwarf_die_addr_die; + dwarf_get_units; + dwarf_getabbrevattr_data; + dwarf_cu_info; +} ELFUTILS_0.170; + +ELFUTILS_0.173 { + global: + dwarf_next_lines; +} ELFUTILS_0.171; diff --git a/libdw/libdwP.h b/libdw/libdwP.h index 5d095a7e..eebb7d12 100644 --- a/libdw/libdwP.h +++ b/libdw/libdwP.h @@ -1,7 +1,6 @@ -/* Internal definitions for libdwarf. - Copyright (C) 2002-2011, 2013-2015 Red Hat, Inc. +/* Internal definitions for libdw. + Copyright (C) 2002-2011, 2013-2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2002. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -74,14 +73,19 @@ enum IDX_debug_types, IDX_debug_abbrev, IDX_debug_aranges, + IDX_debug_addr, IDX_debug_line, + IDX_debug_line_str, IDX_debug_frame, IDX_debug_loc, + IDX_debug_loclists, IDX_debug_pubnames, IDX_debug_str, + IDX_debug_str_offsets, IDX_debug_macinfo, IDX_debug_macro, IDX_debug_ranges, + IDX_debug_rnglists, IDX_gnu_debugaltlink, IDX_last }; @@ -108,6 +112,9 @@ enum DWARF_E_NO_ENTRY, DWARF_E_INVALID_DWARF, DWARF_E_NO_STRING, + DWARF_E_NO_DEBUG_STR, + DWARF_E_NO_DEBUG_LINE_STR, + DWARF_E_NO_STR_OFFSETS, DWARF_E_NO_ADDR, DWARF_E_NO_CONSTANT, DWARF_E_NO_REFERENCE, @@ -118,7 +125,9 @@ enum DWARF_E_VERSION, DWARF_E_INVALID_DIR_IDX, DWARF_E_ADDR_OUTOFRANGE, - DWARF_E_NO_LOCLIST, + DWARF_E_NO_DEBUG_LOC, + DWARF_E_NO_DEBUG_LOCLISTS, + DWARF_E_NO_LOC_VALUE, DWARF_E_NO_BLOCK, DWARF_E_INVALID_LINE_IDX, DWARF_E_INVALID_ARANGE_IDX, @@ -126,10 +135,13 @@ enum DWARF_E_NO_FLAG, DWARF_E_INVALID_OFFSET, DWARF_E_NO_DEBUG_RANGES, + DWARF_E_NO_DEBUG_RNGLISTS, DWARF_E_INVALID_CFI, DWARF_E_NO_ALT_DEBUGLINK, DWARF_E_INVALID_OPCODE, DWARF_E_NOT_CUDIE, + DWARF_E_UNKNOWN_LANGUAGE, + DWARF_E_NO_DEBUG_ADDR, }; @@ -141,6 +153,10 @@ struct Dwarf /* The underlying ELF file. */ Elf *elf; + /* The (absolute) path to the ELF dir, if known. To help locating + alt and dwo files. */ + char *debugdir; + /* dwz alternate DWARF file. */ Dwarf *alt_dwarf; @@ -153,6 +169,10 @@ struct Dwarf /* If true, we allocated the ELF descriptor ourselves. */ bool free_elf; + /* If >= 0, we allocated the alt_dwarf ourselves and must end it and + close this file descriptor. */ + int alt_fd; + /* Information for traversing the .debug_pubnames section. This is an array and separately allocated with malloc. */ struct pubnames_s @@ -173,6 +193,9 @@ struct Dwarf Dwarf_Off next_tu_offset; Dwarf_Sig8_Hash sig8_hash; + /* Search tree for split Dwarf associated with CUs in this debug. */ + void *split_tree; + /* Search tree for .debug_macro operator tables. */ void *macro_ops; @@ -186,8 +209,14 @@ struct Dwarf 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. */ + came from a location list entry in dwarf_getlocation_attr. + Depending on version this is the .debug_loc or .debug_loclists + section (could be both if mixing CUs with different DWARF versions). */ struct Dwarf_CU *fake_loc_cu; + struct Dwarf_CU *fake_loclists_cu; + + /* Similar for addrx/constx, which will come from .debug_addr section. */ + struct Dwarf_CU *fake_addr_cu; /* Internal memory handling. This is basically a simplified reimplementation of obstacks. Unfortunately the standard obstack @@ -211,13 +240,12 @@ struct Dwarf /* Abbreviation representation. */ struct Dwarf_Abbrev { - Dwarf_Off offset; - unsigned char *attrp; - unsigned int attrcnt; - unsigned int code; - unsigned int tag; - bool has_children; -}; + Dwarf_Off offset; /* Offset to start of abbrev into .debug_abbrev. */ + unsigned char *attrp; /* Pointer to start of attribute name/form pairs. */ + bool has_children : 1; /* Whether or not the DIE has children. */ + unsigned int code : 31; /* The (unique) abbrev code. */ + unsigned int tag; /* The tag of the DIE. */ +} attribute_packed; #include "dwarf_abbrev_hash.h" @@ -292,9 +320,23 @@ struct Dwarf_CU uint8_t offset_size; uint16_t version; - /* Zero if this is a normal CU. Nonzero if it is a type unit. */ - size_t type_offset; - uint64_t type_sig8; + size_t sec_idx; /* Normally .debug_info, could be .debug_type or "fake". */ + + /* The unit type if version >= 5. Otherwise 0 for normal CUs (from + .debug_info) or 1 for v4 type units (from .debug_types). */ + uint8_t unit_type; + + /* Zero if the unit type doesn't support a die/type offset and/or id/sig. + Nonzero if it is a v4 type unit or for DWARFv5 units depending on + unit_type. */ + size_t subdie_offset; + uint64_t unit_id8; + + /* If this is a skeleton unit this points to the split compile unit. + Or the other way around if this is a split compile unit. Set to -1 + if not yet searched. Always use __libdw_find_split_unit to access + this field. */ + struct Dwarf_CU *split; /* Hash table for the abbreviations. */ Dwarf_Abbrev_Hash abbrev_hash; @@ -312,13 +354,57 @@ struct Dwarf_CU /* Known location lists. */ void *locs; + /* Base address for use with ranges and locs. + Don't access directly, call __libdw_cu_base_address. */ + Dwarf_Addr base_address; + + /* The offset into the .debug_addr section where index zero begins. + Don't access directly, call __libdw_cu_addr_base. */ + Dwarf_Off addr_base; + + /* The offset into the .debug_str_offsets section where index zero begins. + Don't access directly, call __libdw_cu_str_off_base. */ + Dwarf_Off str_off_base; + + /* The offset into the .debug_ranges section to use for GNU + DebugFission split units. Don't access directly, call + __libdw_cu_ranges_base. */ + Dwarf_Off ranges_base; + + /* The start of the offset table in .debug_loclists. + Don't access directly, call __libdw_cu_locs_base. */ + Dwarf_Off locs_base; + /* Memory boundaries of this CU. */ void *startp; void *endp; }; -/* Compute the offset of a CU's first DIE from its offset. This - is either: +#define ISV4TU(cu) ((cu)->version == 4 && (cu)->sec_idx == IDX_debug_types) + +/* Compute the offset of a CU's first DIE from the CU offset. + CU must be a valid/known version/unit_type. */ +static inline Dwarf_Off +__libdw_first_die_from_cu_start (Dwarf_Off cu_start, + uint8_t offset_size, + uint16_t version, + uint8_t unit_type) +{ +/* + assert (offset_size == 4 || offset_size == 8); + assert (version >= 2 && version <= 5); + assert (unit_type == DW_UT_compile + || unit_type == DW_UT_partial + || unit_type == DW_UT_skeleton + || unit_type == DW_UT_split_compile + || unit_type == DW_UT_type + || unit_type == DW_UT_split_type); +*/ + + Dwarf_Off off = cu_start; + if (version < 5) + { + /* LEN VER OFFSET ADDR 4-bytes + 2-bytes + 4-bytes + 1-byte for 32-bit dwarf 12-bytes + 2-bytes + 8-bytes + 1-byte for 64-bit dwarf @@ -327,22 +413,61 @@ struct Dwarf_CU 12-bytes + 2-bytes + 8-bytes + 1-byte + 8-bytes + 8-bytes for 64-bit Note the trick in the computation. If the offset_size is 4 - the '- 4' term changes the '3 *' into a '2 *'. If the - offset_size is 8 it accounts for the 4-byte escape value + the '- 4' term changes the '3 *' (or '4 *') into a '2 *' (or '3 *). + If the offset_size is 8 it accounts for the 4-byte escape value used at the start of the length. */ -#define DIE_OFFSET_FROM_CU_OFFSET(cu_offset, offset_size, type_unit) \ - ((type_unit) ? ((cu_offset) + 4 * (offset_size) - 4 + 3 + 8) \ - : ((cu_offset) + 3 * (offset_size) - 4 + 3)) + if (unit_type != DW_UT_type) + off += 3 * offset_size - 4 + 3; + else + off += 4 * offset_size - 4 + 3 + 8; + } + else + { + /* + LEN VER TYPE ADDR OFFSET SIGNATURE TYPE-OFFSET + 4-bytes + 2-bytes + 1-byte + 1-byte + 4-bytes + 8-bytes + 4-bytes 32-bit + 12-bytes + 2-bytes + 1-byte + 1-byte + 8-bytes + 8-bytes + 8-bytes 64-bit + Both signature and type offset are optional. + + Note same 4/8 offset size trick as above. + We explicitly ignore unknow unit types (see asserts above). */ + off += 3 * offset_size - 4 + 4; + if (unit_type == DW_UT_skeleton || unit_type == DW_UT_split_compile + || unit_type == DW_UT_type || unit_type == DW_UT_split_type) + { + off += 8; + if (unit_type == DW_UT_type || unit_type == DW_UT_split_type) + off += offset_size; + } + } + + return off; +} + +static inline Dwarf_Off +__libdw_first_die_off_from_cu (struct Dwarf_CU *cu) +{ + return __libdw_first_die_from_cu_start (cu->start, + cu->offset_size, + cu->version, + cu->unit_type); +} #define CUDIE(fromcu) \ ((Dwarf_Die) \ { \ .cu = (fromcu), \ - .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)) \ - }) \ + .addr = ((char *) (fromcu)->dbg->sectiondata[cu_sec_idx (fromcu)]->d_buf \ + + __libdw_first_die_off_from_cu (fromcu)) \ + }) + +#define SUBDIE(fromcu) \ + ((Dwarf_Die) \ + { \ + .cu = (fromcu), \ + .addr = ((char *) (fromcu)->dbg->sectiondata[cu_sec_idx (fromcu)]->d_buf \ + + (fromcu)->start + (fromcu)->subdie_offset) \ + }) /* Prototype of a single .debug_macro operator. */ @@ -398,6 +523,44 @@ libdw_macro_nforms (Dwarf_Macro *macro) return macro->table->table[macro->table->opcodes[macro->opcode - 1]].nforms; } +/* Returns true for any allowed FORM in the opcode_operands_table as + mentioned in the DWARF5 spec (6.3.1 Macro Information Header). + Or those mentioned in DWARF5 spec (6.2.4.2 Vendor-defined Content + Descriptions) for the directory/file table (plus DW_FORM_strp_sup). */ +static inline bool +libdw_valid_user_form (int form) +{ + switch (form) + { + case DW_FORM_block: + case DW_FORM_block1: + case DW_FORM_block2: + case DW_FORM_block4: + case DW_FORM_data1: + case DW_FORM_data2: + case DW_FORM_data4: + case DW_FORM_data8: + case DW_FORM_data16: + case DW_FORM_flag: + case DW_FORM_line_strp: + case DW_FORM_sdata: + case DW_FORM_sec_offset: + case DW_FORM_string: + case DW_FORM_strp: + case DW_FORM_strp_sup: + case DW_FORM_strx: + case DW_FORM_strx1: + case DW_FORM_strx2: + case DW_FORM_strx3: + case DW_FORM_strx4: + case DW_FORM_udata: + return true; + default: + return false; + } +} + + /* We have to include the file at this point because the inline functions access internals of the Dwarf structure. */ #include "memory-access.h" @@ -433,7 +596,19 @@ extern void *__libdw_allocate (Dwarf *dbg, size_t minsize, size_t align) __attribute__ ((__malloc__)) __nonnull_attribute__ (1); /* Default OOM handler. */ -extern void __libdw_oom (void) __attribute ((noreturn, visibility ("hidden"))); +extern void __libdw_oom (void) __attribute ((noreturn)) attribute_hidden; + +/* Read next unit (or v4 debug type) and return next offset. Doesn't + create an actual Dwarf_CU just provides necessary header fields. */ +extern int +internal_function +__libdw_next_unit (Dwarf *dbg, bool v4_debug_types, Dwarf_Off off, + Dwarf_Off *next_off, size_t *header_sizep, + Dwarf_Half *versionp, uint8_t *unit_typep, + Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep, + uint8_t *offset_sizep, uint64_t *unit_id8p, + Dwarf_Off *subdie_offsetp) + __nonnull_attribute__ (4) internal_function; /* Allocate the internal data for a unit not seen before. */ extern struct Dwarf_CU *__libdw_intern_next_unit (Dwarf *dbg, bool debug_types) @@ -443,6 +618,18 @@ 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; +/* Find CU for given DIE address. */ +extern struct Dwarf_CU *__libdw_findcu_addr (Dwarf *dbg, void *addr) + __nonnull_attribute__ (1) internal_function; + +/* Find split Dwarf for given DIE address. */ +extern struct Dwarf *__libdw_find_split_dbg_addr (Dwarf *dbg, void *addr) + __nonnull_attribute__ (1) internal_function; + +/* Find the split (or skeleton) unit. */ +extern struct Dwarf_CU *__libdw_find_split_unit (Dwarf_CU *cu) + internal_function; + /* Get abbreviation with given code. */ extern Dwarf_Abbrev *__libdw_findabbrev (struct Dwarf_CU *cu, unsigned int code) @@ -466,6 +653,9 @@ __libdw_dieabbrev (Dwarf_Die *die, const unsigned char **readp) /* Get the abbreviation code. */ unsigned int code; const unsigned char *addr = die->addr; + if (unlikely (die->cu == NULL + || addr >= (const unsigned char *) die->cu->endp)) + return die->abbrev = DWARF_END_ABBREV; get_uleb128 (code, addr, die->cu->endp); if (readp != NULL) *readp = addr; @@ -483,7 +673,7 @@ extern size_t __libdw_form_val_compute_len (struct Dwarf_CU *cu, const unsigned char *valp) __nonnull_attribute__ (1, 3) internal_function; -/* Find the length of a form attribute. */ +/* Find the length of a form attribute in DIE/info data. */ static inline size_t __nonnull_attribute__ (1, 3) __libdw_form_val_len (struct Dwarf_CU *cu, unsigned int form, @@ -494,10 +684,24 @@ __libdw_form_val_len (struct Dwarf_CU *cu, unsigned int form, static const uint8_t form_lengths[] = { [DW_FORM_flag_present] = 0x80, - [DW_FORM_data1] = 1, [DW_FORM_ref1] = 1, [DW_FORM_flag] = 1, + [DW_FORM_implicit_const] = 0x80, /* Value is in abbrev, not in info. */ + + [DW_FORM_flag] = 1, + [DW_FORM_data1] = 1, [DW_FORM_ref1] = 1, + [DW_FORM_addrx1] = 1, [DW_FORM_strx1] = 1, + [DW_FORM_data2] = 2, [DW_FORM_ref2] = 2, - [DW_FORM_data4] = 4, [DW_FORM_ref4] = 4, - [DW_FORM_data8] = 8, [DW_FORM_ref8] = 8, [DW_FORM_ref_sig8] = 8, + [DW_FORM_addrx2] = 2, [DW_FORM_strx2] = 2, + + [DW_FORM_addrx3] = 3, [DW_FORM_strx3] = 3, + + [DW_FORM_data4] = 4, [DW_FORM_ref4] = 4, [DW_FORM_ref_sup4] = 4, + [DW_FORM_addrx4] = 4, [DW_FORM_strx4] = 4, + + [DW_FORM_ref_sig8] = 8, + [DW_FORM_data8] = 8, [DW_FORM_ref8] = 8, [DW_FORM_ref_sup8] = 8, + + [DW_FORM_data16] = 16, }; /* Return immediately for forms with fixed lengths. */ @@ -625,7 +829,8 @@ __libdw_offset_in_section (Dwarf *dbg, int sec_index, if (data == NULL) return -1; if (unlikely (offset > data->d_size) - || unlikely (data->d_size - offset < size)) + || unlikely (data->d_size < size) + || unlikely (offset > data->d_size - size)) { __libdw_seterrno (DWARF_E_INVALID_OFFSET); return -1; @@ -642,7 +847,8 @@ __libdw_in_section (Dwarf *dbg, int sec_index, if (data == NULL) return false; if (unlikely (addr < data->d_buf) - || unlikely (data->d_size - (addr - data->d_buf) < size)) + || unlikely (data->d_size < size) + || unlikely ((size_t)(addr - data->d_buf) > data->d_size - size)) { __libdw_seterrno (DWARF_E_INVALID_OFFSET); return false; @@ -713,13 +919,13 @@ __libdw_read_offset (Dwarf *dbg, Dwarf *dbg_ret, static inline size_t cu_sec_idx (struct Dwarf_CU *cu) { - return cu->type_offset == 0 ? IDX_debug_info : IDX_debug_types; + return cu->sec_idx; } static inline bool is_cudie (Dwarf_Die *cudie) { - return CUDIE (cudie->cu).addr == cudie->addr; + return cudie->cu != NULL && CUDIE (cudie->cu).addr == cudie->addr; } /* Read up begin/end pair and increment read pointer. @@ -727,15 +933,18 @@ is_cudie (Dwarf_Die *cudie) - If it's base address selection record, set up *BASEP and return 1. - If it's end of rangelist, don't set anything and return 2 - If an error occurs, don't set anything and return <0. */ -int __libdw_read_begin_end_pair_inc (Dwarf *dbg, int sec_index, - unsigned char **addr, int width, +int __libdw_read_begin_end_pair_inc (Dwarf_CU *cu, int sec_index, + const unsigned char **readp, + const unsigned char *readend, + int width, Dwarf_Addr *beginp, Dwarf_Addr *endp, Dwarf_Addr *basep) internal_function; -unsigned char * __libdw_formptr (Dwarf_Attribute *attr, int sec_index, - int err_nodata, unsigned char **endpp, - Dwarf_Off *offsetp) +const unsigned char * __libdw_formptr (Dwarf_Attribute *attr, int sec_index, + int err_nodata, + const unsigned char **endpp, + Dwarf_Off *offsetp) internal_function; /* Fills in the given attribute to point at an empty location expression. */ @@ -756,6 +965,363 @@ int __libdw_getsrclines (Dwarf *dbg, Dwarf_Off debug_line_offset, /* Load and return value of DW_AT_comp_dir from CUDIE. */ const char *__libdw_getcompdir (Dwarf_Die *cudie); +/* Get the base address for the CU, fetches it when not yet set. + This is used as initial base address for ranges and loclists. */ +Dwarf_Addr __libdw_cu_base_address (Dwarf_CU *cu); + +/* Get the address base for the CU, fetches it when not yet set. */ +static inline Dwarf_Off +__libdw_cu_addr_base (Dwarf_CU *cu) +{ + if (cu->addr_base == (Dwarf_Off) -1) + { + Dwarf_Die cu_die = CUDIE(cu); + Dwarf_Attribute attr; + Dwarf_Off offset = 0; + if (dwarf_attr (&cu_die, DW_AT_GNU_addr_base, &attr) != NULL + || dwarf_attr (&cu_die, DW_AT_addr_base, &attr) != NULL) + { + Dwarf_Word off; + if (dwarf_formudata (&attr, &off) == 0) + offset = off; + } + cu->addr_base = offset; + } + + return cu->addr_base; +} + +/* Gets the .debug_str_offsets base offset to use. static inline to + be shared between libdw and eu-readelf. */ +static inline Dwarf_Off +str_offsets_base_off (Dwarf *dbg, Dwarf_CU *cu) +{ + /* If we don't have a CU, then find and use the first one in the + debug file (when we support .dwp files, we must actually find the + one matching our "caller" - aka macro or line). If we (now) have + a cu and str_offsets_base attribute, just use that. Otherwise + use the first offset. But we might have to parse the header + first, but only if this is version 5. Assume if all else fails, + this is version 4, without header. */ + + if (cu == NULL && dbg != NULL) + { + Dwarf_CU *first_cu; + if (dwarf_get_units (dbg, NULL, &first_cu, + NULL, NULL, NULL, NULL) == 0) + cu = first_cu; + } + + if (cu != NULL) + { + if (cu->str_off_base == (Dwarf_Off) -1) + { + Dwarf_Die cu_die = CUDIE(cu); + Dwarf_Attribute attr; + if (dwarf_attr (&cu_die, DW_AT_str_offsets_base, &attr) != NULL) + { + Dwarf_Word off; + if (dwarf_formudata (&attr, &off) == 0) + { + cu->str_off_base = off; + return cu->str_off_base; + } + } + /* For older DWARF simply assume zero (no header). */ + if (cu->version < 5) + { + cu->str_off_base = 0; + return cu->str_off_base; + } + + if (dbg == NULL) + dbg = cu->dbg; + } + else + return cu->str_off_base; + } + + /* No str_offsets_base attribute, we have to assume "zero". + But there could be a header first. */ + Dwarf_Off off = 0; + if (dbg == NULL) + goto no_header; + + Elf_Data *data = dbg->sectiondata[IDX_debug_str_offsets]; + if (data == NULL) + goto no_header; + + const unsigned char *start; + const unsigned char *readp; + const unsigned char *readendp; + start = readp = (const unsigned char *) data->d_buf; + readendp = (const unsigned char *) data->d_buf + data->d_size; + + uint64_t unit_length; + uint16_t version; + + unit_length = read_4ubyte_unaligned_inc (dbg, readp); + if (unlikely (unit_length == 0xffffffff)) + { + if (unlikely (readendp - readp < 8)) + goto no_header; + unit_length = read_8ubyte_unaligned_inc (dbg, readp); + /* In theory the offset size could be different + between CU and str_offsets unit. But we just + ignore that here. */ + } + + /* We need at least 2-bytes (version) + 2-bytes (padding) = + 4 bytes to complete the header. And this unit cannot go + beyond the section data. */ + if (readendp - readp < 4 + || unit_length < 4 + || (uint64_t) (readendp - readp) < unit_length) + goto no_header; + + version = read_2ubyte_unaligned_inc (dbg, readp); + if (version != 5) + goto no_header; + /* padding */ + read_2ubyte_unaligned_inc (dbg, readp); + + off = (Dwarf_Off) (readp - start); + + no_header: + if (cu != NULL) + cu->str_off_base = off; + + return off; +} + + +/* Get the string offsets base for the CU, fetches it when not yet set. */ +static inline Dwarf_Off __libdw_cu_str_off_base (Dwarf_CU *cu) +{ + return str_offsets_base_off (NULL, cu); +} + + +/* Either a direct offset into .debug_ranges for version < 5, or the + start of the offset table in .debug_rnglists for version > 5. */ +static inline Dwarf_Off +__libdw_cu_ranges_base (Dwarf_CU *cu) +{ + if (cu->ranges_base == (Dwarf_Off) -1) + { + Dwarf_Off offset = 0; + Dwarf_Die cu_die = CUDIE(cu); + Dwarf_Attribute attr; + if (cu->version < 5) + { + if (dwarf_attr (&cu_die, DW_AT_GNU_ranges_base, &attr) != NULL) + { + Dwarf_Word off; + if (dwarf_formudata (&attr, &off) == 0) + offset = off; + } + } + else + { + if (dwarf_attr (&cu_die, DW_AT_rnglists_base, &attr) != NULL) + { + Dwarf_Word off; + if (dwarf_formudata (&attr, &off) == 0) + offset = off; + } + + /* There wasn't an rnglists_base, if the Dwarf does have a + .debug_rnglists section, then it might be we need the + base after the first header. */ + Elf_Data *data = cu->dbg->sectiondata[IDX_debug_rnglists]; + if (offset == 0 && data != NULL) + { + Dwarf *dbg = cu->dbg; + const unsigned char *readp = data->d_buf; + const unsigned char *const dataend + = (unsigned char *) data->d_buf + data->d_size; + + uint64_t unit_length = read_4ubyte_unaligned_inc (dbg, readp); + unsigned int offset_size = 4; + if (unlikely (unit_length == 0xffffffff)) + { + if (unlikely (readp > dataend - 8)) + goto no_header; + + unit_length = read_8ubyte_unaligned_inc (dbg, readp); + offset_size = 8; + } + + if (readp > dataend - 8 + || unit_length < 8 + || unit_length > (uint64_t) (dataend - readp)) + goto no_header; + + uint16_t version = read_2ubyte_unaligned_inc (dbg, readp); + if (version != 5) + goto no_header; + + uint8_t address_size = *readp++; + if (address_size != 4 && address_size != 8) + goto no_header; + + uint8_t segment_size = *readp++; + if (segment_size != 0) + goto no_header; + + uint32_t offset_entry_count; + offset_entry_count = read_4ubyte_unaligned_inc (dbg, readp); + + const unsigned char *offset_array_start = readp; + if (offset_entry_count <= 0) + goto no_header; + + uint64_t needed = offset_entry_count * offset_size; + if (unit_length - 8 < needed) + goto no_header; + + offset = (Dwarf_Off) (offset_array_start + - (unsigned char *) data->d_buf); + } + } + no_header: + cu->ranges_base = offset; + } + + return cu->ranges_base; +} + + +/* The start of the offset table in .debug_loclists for DWARF5. */ +static inline Dwarf_Off +__libdw_cu_locs_base (Dwarf_CU *cu) +{ + if (cu->locs_base == (Dwarf_Off) -1) + { + Dwarf_Off offset = 0; + Dwarf_Die cu_die = CUDIE(cu); + Dwarf_Attribute attr; + if (dwarf_attr (&cu_die, DW_AT_loclists_base, &attr) != NULL) + { + Dwarf_Word off; + if (dwarf_formudata (&attr, &off) == 0) + offset = off; + } + + /* There wasn't an loclists_base, if the Dwarf does have a + .debug_loclists section, then it might be we need the + base after the first header. */ + Elf_Data *data = cu->dbg->sectiondata[IDX_debug_loclists]; + if (offset == 0 && data != NULL) + { + Dwarf *dbg = cu->dbg; + const unsigned char *readp = data->d_buf; + const unsigned char *const dataend + = (unsigned char *) data->d_buf + data->d_size; + + uint64_t unit_length = read_4ubyte_unaligned_inc (dbg, readp); + unsigned int offset_size = 4; + if (unlikely (unit_length == 0xffffffff)) + { + if (unlikely (readp > dataend - 8)) + goto no_header; + + unit_length = read_8ubyte_unaligned_inc (dbg, readp); + offset_size = 8; + } + + if (readp > dataend - 8 + || unit_length < 8 + || unit_length > (uint64_t) (dataend - readp)) + goto no_header; + + uint16_t version = read_2ubyte_unaligned_inc (dbg, readp); + if (version != 5) + goto no_header; + + uint8_t address_size = *readp++; + if (address_size != 4 && address_size != 8) + goto no_header; + + uint8_t segment_size = *readp++; + if (segment_size != 0) + goto no_header; + + uint32_t offset_entry_count; + offset_entry_count = read_4ubyte_unaligned_inc (dbg, readp); + + const unsigned char *offset_array_start = readp; + if (offset_entry_count <= 0) + goto no_header; + + uint64_t needed = offset_entry_count * offset_size; + if (unit_length - 8 < needed) + goto no_header; + + offset = (Dwarf_Off) (offset_array_start + - (unsigned char *) data->d_buf); + } + + no_header: + cu->locs_base = offset; + } + + return cu->locs_base; +} + +/* Helper function for tsearch/tfind split_tree Dwarf. */ +int __libdw_finddbg_cb (const void *arg1, const void *arg2); + +/* Link skeleton and split compile units. */ +static inline void +__libdw_link_skel_split (Dwarf_CU *skel, Dwarf_CU *split) +{ + skel->split = split; + split->split = skel; + + /* Get .debug_addr and addr_base greedy. + We also need it for the fake addr cu. + There is only one per split debug. */ + Dwarf *dbg = skel->dbg; + Dwarf *sdbg = split->dbg; + if (sdbg->sectiondata[IDX_debug_addr] == NULL + && dbg->sectiondata[IDX_debug_addr] != NULL) + { + sdbg->sectiondata[IDX_debug_addr] + = dbg->sectiondata[IDX_debug_addr]; + split->addr_base = __libdw_cu_addr_base (skel); + sdbg->fake_addr_cu = dbg->fake_addr_cu; + } +} + + +/* Given an address index for a CU return the address. + Returns -1 and sets libdw_errno if an error occurs. */ +int __libdw_addrx (Dwarf_CU *cu, Dwarf_Word idx, Dwarf_Addr *addr); + + +/* Helper function to set debugdir field in Dwarf, used from dwarf_begin_elf + and libdwfl process_file. */ +char * __libdw_debugdir (int fd); + + +/* Given the directory of a debug file, an absolute or relative dir + to look in, and file returns a full path. + + If the file is absolute (starts with a /) a copy of file is returned. + the file isn't absolute, but dir is absolute, then a path that is + the concatenation of dir and file is returned. If neither file, + nor dir is absolute, the path will be constructed using dir (if not + NULL) and file relative to the debugdir (if valid). + + The debugdir and the dir may be NULL (in which case they aren't used). + If file is NULL, or no full path can be constructed NULL is returned. + + The caller is responsible for freeing the result if not NULL. */ +char * __libdw_filepath (const char *debugdir, const char *dir, + const char *file) + internal_function; + /* Aliases to avoid PLTs. */ INTDECL (dwarf_aggregate_size) @@ -764,6 +1330,7 @@ INTDECL (dwarf_attr_integrate) INTDECL (dwarf_begin) INTDECL (dwarf_begin_elf) INTDECL (dwarf_child) +INTDECL (dwarf_default_lower_bound) INTDECL (dwarf_dieoffset) INTDECL (dwarf_diename) INTDECL (dwarf_end) @@ -775,6 +1342,7 @@ INTDECL (dwarf_formref_die) INTDECL (dwarf_formsdata) INTDECL (dwarf_formstring) INTDECL (dwarf_formudata) +INTDECL (dwarf_getabbrevattr_data) INTDECL (dwarf_getalt) INTDECL (dwarf_getarange_addr) INTDECL (dwarf_getarangeinfo) diff --git a/libdw/libdw_alloc.c b/libdw/libdw_alloc.c index 28a8cf6e..f1e08714 100644 --- a/libdw/libdw_alloc.c +++ b/libdw/libdw_alloc.c @@ -31,7 +31,6 @@ # include #endif -#include #include #include #include "libdwP.h" @@ -70,7 +69,7 @@ dwarf_new_oom_handler (Dwarf *dbg, Dwarf_OOM handler) void -__attribute ((noreturn, visibility ("hidden"))) +__attribute ((noreturn)) attribute_hidden __libdw_oom (void) { while (1) diff --git a/libdw/libdw_find_split_unit.c b/libdw/libdw_find_split_unit.c new file mode 100644 index 00000000..da039e50 --- /dev/null +++ b/libdw/libdw_find_split_unit.c @@ -0,0 +1,147 @@ +/* Find the split (or skeleton) unit for a given unit. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include "libdwP.h" +#include "libelfP.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +void +try_split_file (Dwarf_CU *cu, const char *dwo_path) +{ + int split_fd = open (dwo_path, O_RDONLY); + if (split_fd != -1) + { + Dwarf *split_dwarf = dwarf_begin (split_fd, DWARF_C_READ); + if (split_dwarf != NULL) + { + Dwarf_CU *split = NULL; + while (dwarf_get_units (split_dwarf, split, &split, + NULL, NULL, NULL, NULL) == 0) + { + if (split->unit_type == DW_UT_split_compile + && cu->unit_id8 == split->unit_id8) + { + if (tsearch (split->dbg, &cu->dbg->split_tree, + __libdw_finddbg_cb) == NULL) + { + /* Something went wrong. Don't link. */ + __libdw_seterrno (DWARF_E_NOMEM); + break; + } + + /* Link skeleton and split compile units. */ + __libdw_link_skel_split (cu, split); + + /* We have everything we need from this ELF + file. And we are going to close the fd to + not run out of file descriptors. */ + elf_cntl (split_dwarf->elf, ELF_C_FDDONE); + break; + } + } + if (cu->split == (Dwarf_CU *) -1) + dwarf_end (split_dwarf); + } + /* Always close, because we don't want to run out of file + descriptors. See also the elf_fcntl ELF_C_FDDONE call + above. */ + close (split_fd); + } +} + +Dwarf_CU * +internal_function +__libdw_find_split_unit (Dwarf_CU *cu) +{ + /* Only try once. */ + if (cu->split != (Dwarf_CU *) -1) + return cu->split; + + /* We need a skeleton unit with a comp_dir and [GNU_]dwo_name attributes. + The split unit will be the first in the dwo file and should have the + same id as the skeleton. */ + if (cu->unit_type == DW_UT_skeleton) + { + Dwarf_Die cudie = CUDIE (cu); + Dwarf_Attribute dwo_name; + /* It is fine if dwo_dir doesn't exists, but then dwo_name needs + to be an absolute path. */ + if (dwarf_attr (&cudie, DW_AT_dwo_name, &dwo_name) != NULL + || dwarf_attr (&cudie, DW_AT_GNU_dwo_name, &dwo_name) != NULL) + { + /* First try the dwo file name in the same directory + as we found the skeleton file. */ + const char *dwo_file = dwarf_formstring (&dwo_name); + const char *debugdir = cu->dbg->debugdir; + char *dwo_path = __libdw_filepath (debugdir, NULL, dwo_file); + if (dwo_path != NULL) + { + try_split_file (cu, dwo_path); + free (dwo_path); + } + + if (cu->split == (Dwarf_CU *) -1) + { + /* Try compdir plus dwo_name. */ + Dwarf_Attribute compdir; + dwarf_attr (&cudie, DW_AT_comp_dir, &compdir); + const char *dwo_dir = dwarf_formstring (&compdir); + if (dwo_dir != NULL) + { + dwo_path = __libdw_filepath (debugdir, dwo_dir, dwo_file); + if (dwo_path != NULL) + { + try_split_file (cu, dwo_path); + free (dwo_path); + } + } + } + /* XXX If still not found we could try stripping dirs from the + comp_dir and adding them from the comp_dir, assuming + someone moved a whole build tree around. */ + } + } + + /* If we found nothing, make sure we don't try again. */ + if (cu->split == (Dwarf_CU *) -1) + cu->split = NULL; + + return cu->split; +} diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c index 082307b0..ed744231 100644 --- a/libdw/libdw_findcu.c +++ b/libdw/libdw_findcu.c @@ -1,5 +1,5 @@ /* Find CU for given offset. - Copyright (C) 2003-2010, 2014 Red Hat, Inc. + Copyright (C) 2003-2010, 2014, 2016, 2017, 2018 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2003. @@ -61,6 +61,40 @@ findcu_cb (const void *arg1, const void *arg2) return 0; } +int +__libdw_finddbg_cb (const void *arg1, const void *arg2) +{ + Dwarf *dbg1 = (Dwarf *) arg1; + Dwarf *dbg2 = (Dwarf *) arg2; + + Elf_Data *dbg1_data = dbg1->sectiondata[IDX_debug_info]; + unsigned char *dbg1_start = dbg1_data->d_buf; + size_t dbg1_size = dbg1_data->d_size; + + Elf_Data *dbg2_data = dbg2->sectiondata[IDX_debug_info]; + unsigned char *dbg2_start = dbg2_data->d_buf; + size_t dbg2_size = dbg2_data->d_size; + + /* Find out which of the two arguments is the search value. It has + a size of 0. */ + if (dbg1_size == 0) + { + if (dbg1_start < dbg2_start) + return -1; + if (dbg1_start >= dbg2_start + dbg2_size) + return 1; + } + else + { + if (dbg2_start < dbg1_start) + return 1; + if (dbg2_start >= dbg1_start + dbg1_size) + return -1; + } + + return 0; +} + struct Dwarf_CU * internal_function __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) @@ -71,30 +105,41 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) Dwarf_Off oldoff = *offsetp; uint16_t version; + uint8_t unit_type; uint8_t address_size; uint8_t offset_size; Dwarf_Off abbrev_offset; - uint64_t type_sig8 = 0; - Dwarf_Off type_offset = 0; - - if (INTUSE(dwarf_next_unit) (dbg, oldoff, offsetp, NULL, - &version, &abbrev_offset, - &address_size, &offset_size, - debug_types ? &type_sig8 : NULL, - debug_types ? &type_offset : NULL) != 0) + uint64_t unit_id8; + Dwarf_Off subdie_offset; + + if (__libdw_next_unit (dbg, debug_types, oldoff, offsetp, NULL, + &version, &unit_type, &abbrev_offset, + &address_size, &offset_size, + &unit_id8, &subdie_offset) != 0) /* No more entries. */ return NULL; - /* We only know how to handle the DWARF version 2 through 4 formats. */ - if (unlikely (version < 2) || unlikely (version > 4)) + /* We only know how to handle the DWARF version 2 through 5 formats. + For v4 debug types we only handle version 4. */ + if (unlikely (version < 2) || unlikely (version > 5) + || (debug_types && unlikely (version != 4))) { - __libdw_seterrno (DWARF_E_INVALID_DWARF); + __libdw_seterrno (DWARF_E_VERSION); return NULL; } + /* We only handle 32 or 64 bit (4 or 8 byte) addresses and offsets. + Just assume we are dealing with 64bit in case the size is "unknown". + Too much code assumes if it isn't 4 then it is 8 (or the other way + around). */ + if (unlikely (address_size != 4 && address_size != 8)) + address_size = 8; + if (unlikely (offset_size != 4 && offset_size != 8)) + offset_size = 8; + /* Invalid or truncated debug section data? */ - Elf_Data *data = dbg->sectiondata[debug_types - ? IDX_debug_types : IDX_debug_info]; + size_t sec_idx = debug_types ? IDX_debug_types : IDX_debug_info; + Elf_Data *data = dbg->sectiondata[sec_idx]; if (unlikely (*offsetp > data->d_size)) *offsetp = data->d_size; @@ -102,24 +147,71 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) struct Dwarf_CU *newp = libdw_typed_alloc (dbg, struct Dwarf_CU); newp->dbg = dbg; + newp->sec_idx = sec_idx; newp->start = oldoff; newp->end = *offsetp; newp->address_size = address_size; newp->offset_size = offset_size; newp->version = version; - newp->type_sig8 = type_sig8; - newp->type_offset = type_offset; + newp->unit_id8 = unit_id8; + newp->subdie_offset = subdie_offset; Dwarf_Abbrev_Hash_init (&newp->abbrev_hash, 41); newp->orig_abbrev_offset = newp->last_abbrev_offset = abbrev_offset; + newp->files = NULL; newp->lines = NULL; newp->locs = NULL; - - if (debug_types) - Dwarf_Sig8_Hash_insert (&dbg->sig8_hash, type_sig8, newp); + newp->split = (Dwarf_CU *) -1; + newp->base_address = (Dwarf_Addr) -1; + newp->addr_base = (Dwarf_Off) -1; + newp->str_off_base = (Dwarf_Off) -1; + newp->ranges_base = (Dwarf_Off) -1; + newp->locs_base = (Dwarf_Off) -1; newp->startp = data->d_buf + newp->start; newp->endp = data->d_buf + newp->end; + /* v4 debug type units have version == 4 and unit_type == DW_UT_type. */ + if (debug_types) + newp->unit_type = DW_UT_type; + else if (version < 5) + { + /* This is a reasonable guess (and needed to get the CUDIE). */ + newp->unit_type = DW_UT_compile; + + /* But set it correctly from the actual CUDIE tag. */ + Dwarf_Die cudie = CUDIE (newp); + int tag = INTUSE(dwarf_tag) (&cudie); + if (tag == DW_TAG_compile_unit) + { + Dwarf_Attribute dwo_id; + if (INTUSE(dwarf_attr) (&cudie, DW_AT_GNU_dwo_id, &dwo_id) != NULL) + { + Dwarf_Word id8; + if (INTUSE(dwarf_formudata) (&dwo_id, &id8) == 0) + { + if (INTUSE(dwarf_haschildren) (&cudie) == 0 + && INTUSE(dwarf_hasattr) (&cudie, + DW_AT_GNU_dwo_name) == 1) + newp->unit_type = DW_UT_skeleton; + else + newp->unit_type = DW_UT_split_compile; + + newp->unit_id8 = id8; + } + } + } + else if (tag == DW_TAG_partial_unit) + newp->unit_type = DW_UT_partial; + else if (tag == DW_TAG_type_unit) + newp->unit_type = DW_UT_type; + } + else + newp->unit_type = unit_type; + + /* Store a reference to any type unit ids in the hash for quick lookup. */ + if (unit_type == DW_UT_type || unit_type == DW_UT_split_type) + Dwarf_Sig8_Hash_insert (&dbg->sig8_hash, unit_id8, newp); + /* Add the new entry to the search tree. */ if (tsearch (newp, tree, findcu_cb) == NULL) { @@ -134,11 +226,11 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) struct Dwarf_CU * internal_function -__libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool debug_types) +__libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool v4_debug_types) { - void **tree = debug_types ? &dbg->tu_tree : &dbg->cu_tree; + void **tree = v4_debug_types ? &dbg->tu_tree : &dbg->cu_tree; Dwarf_Off *next_offset - = debug_types ? &dbg->next_tu_offset : &dbg->next_cu_offset; + = v4_debug_types ? &dbg->next_tu_offset : &dbg->next_cu_offset; /* Maybe we already know that CU. */ struct Dwarf_CU fake = { .start = start, .end = 0 }; @@ -155,14 +247,61 @@ __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool debug_types) /* No. Then read more CUs. */ while (1) { - struct Dwarf_CU *newp = __libdw_intern_next_unit (dbg, debug_types); + struct Dwarf_CU *newp = __libdw_intern_next_unit (dbg, v4_debug_types); if (newp == NULL) return NULL; /* Is this the one we are looking for? */ - if (start < *next_offset) - // XXX Match exact offset. + if (start < *next_offset || start == newp->start) return newp; } /* NOTREACHED */ } + +struct Dwarf_CU * +internal_function +__libdw_findcu_addr (Dwarf *dbg, void *addr) +{ + void **tree; + Dwarf_Off start; + if (addr >= dbg->sectiondata[IDX_debug_info]->d_buf + && addr < (dbg->sectiondata[IDX_debug_info]->d_buf + + dbg->sectiondata[IDX_debug_info]->d_size)) + { + tree = &dbg->cu_tree; + start = addr - dbg->sectiondata[IDX_debug_info]->d_buf; + } + else if (dbg->sectiondata[IDX_debug_types] != NULL + && addr >= dbg->sectiondata[IDX_debug_types]->d_buf + && addr < (dbg->sectiondata[IDX_debug_types]->d_buf + + dbg->sectiondata[IDX_debug_types]->d_size)) + { + tree = &dbg->tu_tree; + start = addr - dbg->sectiondata[IDX_debug_types]->d_buf; + } + else + return NULL; + + struct Dwarf_CU fake = { .start = start, .end = 0 }; + struct Dwarf_CU **found = tfind (&fake, tree, findcu_cb); + + if (found != NULL) + return *found; + + return NULL; +} + +Dwarf * +internal_function +__libdw_find_split_dbg_addr (Dwarf *dbg, void *addr) +{ + /* XXX Assumes split DWARF only has CUs in main IDX_debug_info. */ + Elf_Data fake_data = { .d_buf = addr, .d_size = 0 }; + Dwarf fake = { .sectiondata[IDX_debug_info] = &fake_data }; + Dwarf **found = tfind (&fake, &dbg->split_tree, __libdw_finddbg_cb); + + if (found != NULL) + return *found; + + return NULL; +} diff --git a/libdw/libdw_form.c b/libdw/libdw_form.c index 72e2390c..584c8467 100644 --- a/libdw/libdw_form.c +++ b/libdw/libdw_form.c @@ -60,6 +60,8 @@ __libdw_form_val_compute_len (struct Dwarf_CU *cu, unsigned int form, break; case DW_FORM_strp: + case DW_FORM_strp_sup: + case DW_FORM_line_strp: case DW_FORM_sec_offset: case DW_FORM_GNU_ref_alt: case DW_FORM_GNU_strp_alt: @@ -103,6 +105,12 @@ __libdw_form_val_compute_len (struct Dwarf_CU *cu, unsigned int form, case DW_FORM_sdata: case DW_FORM_udata: case DW_FORM_ref_udata: + case DW_FORM_addrx: + case DW_FORM_loclistx: + case DW_FORM_rnglistx: + case DW_FORM_strx: + case DW_FORM_GNU_addr_index: + case DW_FORM_GNU_str_index: get_uleb128 (u128, valp, endp); result = valp - startp; break; diff --git a/libdw/memory-access.h b/libdw/memory-access.h index a749b5a9..a39ad6d2 100644 --- a/libdw/memory-access.h +++ b/libdw/memory-access.h @@ -1,7 +1,6 @@ /* Unaligned memory access functionality. - Copyright (C) 2000-2014 Red Hat, Inc. + Copyright (C) 2000-2014, 2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 2001. This file is free software; you can redistribute it and/or modify it under the terms of either @@ -31,6 +30,7 @@ #define _MEMORY_ACCESS_H 1 #include +#include #include #include @@ -87,8 +87,26 @@ __libdw_get_uleb128 (const unsigned char **addrp, const unsigned char *end) return UINT64_MAX; } +static inline uint64_t +__libdw_get_uleb128_unchecked (const unsigned char **addrp) +{ + 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); + + const size_t max = len_leb128 (uint64_t); + 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; +} + /* Note, addr needs to me smaller than end. */ #define get_uleb128(var, addr, end) ((var) = __libdw_get_uleb128 (&(addr), end)) +#define get_uleb128_unchecked(var, addr) ((var) = __libdw_get_uleb128_unchecked (&(addr))) /* The signed case is similar, but we sign-extend the result. */ @@ -121,7 +139,26 @@ __libdw_get_sleb128 (const unsigned char **addrp, const unsigned char *end) return INT64_MAX; } +static inline int64_t +__libdw_get_sleb128_unchecked (const unsigned char **addrp) +{ + int64_t acc = 0; + + /* Unroll the first step to help the compiler optimize + for the common single-byte case. */ + get_sleb128_step (acc, *addrp, 0); + + /* Subtract one step, so we don't shift into sign bit. */ + const size_t max = len_leb128 (int64_t) - 1; + 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, end) ((var) = __libdw_get_sleb128 (&(addr), end)) +#define get_sleb128_unchecked(var, addr) ((var) = __libdw_get_sleb128_unchecked (&(addr))) /* We use simple memory access functions in case the hardware allows it. @@ -170,7 +207,7 @@ union unaligned int16_t s2; int32_t s4; int64_t s8; - } __attribute__ ((packed)); + } attribute_packed; # define read_2ubyte_unaligned(Dbg, Addr) \ read_2ubyte_unaligned_1 ((Dbg)->other_byte_order, (Addr)) @@ -278,6 +315,57 @@ read_8sbyte_unaligned_1 (bool other_byte_order, const void *p) Addr = (__typeof (Addr)) (((uintptr_t) (Addr)) + 8); \ t_; }) +/* 3ubyte reads are only used for DW_FORM_addrx3 and DW_FORM_strx3. + And are probably very rare. They are not optimized. They are + handled as if reading a 4byte value with the first (for big endian) + or last (for little endian) byte zero. */ + +static inline int +file_byte_order (bool other_byte_order) +{ +#if __BYTE_ORDER == __LITTLE_ENDIAN + return other_byte_order ? __BIG_ENDIAN : __LITTLE_ENDIAN; +#else + return other_byte_order ? __LITTLE_ENDIAN : __BIG_ENDIAN; +#endif +} + +static inline uint32_t +read_3ubyte_unaligned (Dwarf *dbg, const unsigned char *p) +{ + union + { + uint32_t u4; + unsigned char c[4]; + } d; + bool other_byte_order = dbg->other_byte_order; + + if (file_byte_order (other_byte_order) == __BIG_ENDIAN) + { + d.c[0] = 0x00; + d.c[1] = p[0]; + d.c[2] = p[1]; + d.c[3] = p[2]; + } + else + { + d.c[0] = p[0]; + d.c[1] = p[1]; + d.c[2] = p[2]; + d.c[3] = 0x00; + } + + if (other_byte_order) + return bswap_32 (d.u4); + else + return d.u4; +} + + +#define read_3ubyte_unaligned_inc(Dbg, Addr) \ + ({ uint32_t t_ = read_2ubyte_unaligned (Dbg, Addr); \ + Addr = (__typeof (Addr)) (((uintptr_t) (Addr)) + 3); \ + t_; }) #define read_addr_unaligned_inc(Nbytes, Dbg, Addr) \ (assert ((Nbytes) == 4 || (Nbytes) == 8), \ diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 4c9f4f6a..15d75114 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,188 @@ +2018-07-17 Ulf Hermann + + * linux-pid-attach.c: Include sys/uio.h only on linux. + +2018-06-04 Mark Wielaard + + * libdwflP.h (__libdwfl_addrsym): Remove function declaration. + * dwfl_module_addrsym.c (__libdwfl_addrsym): Make a static function. + +2018-05-27 Mark Wielaard + + * relocate.c (__libdwfl_relocate): Always call relocate_section with + partial true. + +2018-05-17 Mark Wielaard + + * dwfl_module (__libdwfl_module_free): Free elfdir. + * dwfl_module_getdwarf.c (load_dw): Close file descriptors after + dwarf_begin_elf call. Set Dwarf debugdir if it is NULL, this is the + main module file and we recorded the elfdir. + * libdwflP.h (struct Dwfl_Module): Add elfdir field. + * offline.c (process_elf): Record the elfdir before we close the + main ELF file descriptor. + +2018-04-10 Mark Wielaard + + * frame_unwind.c (unwind): If __libdwfl_frame_reg_get fails for + the return address either set an error or mark the pc undefined. + +2018-03-17 Mark Wielaard + + * libdwflP.h (struct __libdwfl_remote_mem_cache): New. + (struct __libdwfl_pid_arg): Add mem_cache field. + * linux-pid-attach.c (read_cached_memory): New function. + (clear_cached_memory): Likewise. + (pid_memory_read): Call read_cached_memory. + (pid_detach): Free mem_cache. + (pid_thread_detach): Call clear_cached_memory. + (dwfl_linux_proc_attach): Initialize mem_cache to NULL. + +2018-03-05 Mark Wielaard + + * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Use + realpath (name, NULL) instead of canonicalize_file_name (name). + * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise. + +2018-01-29 Mark Wielaard + + * cu.c (cudie_offset): Use __libdw_first_die_off_from_cu instead of + DIE_OFFSET_FROM_CU_OFFSET. + (intern_cu): Simply use a copy of the given die CU as key instead of + trying to construct a dummy one by hand. + +2018-02-15 Mark Wielaard + + * linux-pid-attach.c: Include sys/wait.h after sys/ptrace.h. + +2018-02-09 Joshua Watt + + * dwfl_report_elf.c (__libdwfl_elf_address_range): Use FALLTHROUGH + macro instead of comment. + * frame_unwind.c (expr_eval): Likewise. + +2017-11-20 Mark Wielaard + + * link_map.c (do_check64): Take a char * and calculate type and val + offsets before reading, possibly unaligned, values. + (do_check32): Likewise. + (check64): Remove define. + (check32): Likewise. + (auxv_format_probe): Call do_check32 and do_check64 directly with + a, possibly unaligned, auxv entry pointer. + (dwfl_link_map_report): Redefine AUXV_SCAN to not dereference a + possibly unaligned auxv entry pointer. + +2017-10-16 Mark Wielaard + + * argp-std.c (parse_opt): For -k call argp_failure not failure to + keep dwfl around. + +2017-07-26 Yunlian Jiang + + * argp-std.c (failure): Move to file scope. + (fail): Likewise. + +2017-04-20 Ulf Hermann + Mark Wielaard + + * derelocate.c (compare_secrefs): Compare by end address and then by + section number if addresses are equal. + +2017-04-20 Ulf Hermann + Mark Wielaard + + * linux-kernel-modules.c: Always return NULL from kernel_release() on + non-linux systems and set errno to ENOTSUP. + +2017-04-20 Ulf Hermann + + * libdwflP.h: Don't include config.h. + * argp-std.c: Include config.h. + * cu.c: Likewise. + * derelocate.c: Likewise. + * dwfl_addrdie.c: Likewise. + * dwfl_addrdwarf.c: Likewise. + * dwfl_addrmodule.c: Likewise. + * dwfl_begin.c: Likewise. + * dwfl_build_id_find_debuginfo.c: Likewise. + * dwfl_build_id_find_elf.c: Likewise. + * dwfl_cumodule.c: Likewise. + * dwfl_dwarf_line.c: Likewise. + * dwfl_end.c: Likewise. + * dwfl_frame.c: Likewise. + * dwfl_frame_regs.c: Likewise. + * dwfl_getdwarf.c: Likewise. + * dwfl_getmodules.c: Likewise. + * dwfl_getsrc.c: Likewise. + * dwfl_getsrclines.c: Likewise. + * dwfl_line_comp_dir.c: Likewise. + * dwfl_linecu.c: Likewise. + * dwfl_lineinfo.c: Likewise. + * dwfl_linemodule.c: Likewise. + * dwfl_module.c: Likewise. + * dwfl_module_addrdie.c: Likewise. + * dwfl_module_addrname.c: Likewise. + * dwfl_module_addrsym.c: Likewise. + * dwfl_module_build_id.c: Likewise. + * dwfl_module_dwarf_cfi.c: Likewise. + * dwfl_module_eh_cfi.c: Likewise. + * dwfl_module_getdarf.c: Likewise. + * dwfl_module_getelf.c: Likewise. + * dwfl_module_getsrc.c: Likewise. + * dwfl_module_getsrc_file.c: Likewise. + * dwfl_module_getsym.c: Likewise. + * dwfl_module_info.c: Likewise. + * dwfl_module_nextcu.c: Likewise. + * dwfl_module_register_names.c: Likewise. + * dwfl_module_report_build_id.c: Likewise. + * dwfl_module_return_value_location.c: Likewise. + * dwfl_nextcu.c: Likewise. + * dwfl_onesrcline.c: Likewise. + * dwfl_report_elf.c: Likewise. + * dwfl_validate_address.c: Likewise. + * dwfl_version.c: Likewise. + * find-debuginfo.c: Likewise. + * gzip.c: Likewise. + * image-header.c: Likewise. + * lines.c: Likewise. + * linux-core-attach.c: Likewise. + * linux-pid-attach.c: Likewise. + * offline.c: Likewise. + * open.c: Likewise. + * relocate.c: Likewise. + * segment.c: Likewise. + +2017-04-20 Ulf Hermann + + * libdwfl.h: Use __const_attribute__. + +2017-04-20 Ulf Hermann + + * elf-from-memory.c: Explicitly cast phnum to size_t. + +2017-04-20 Ulf Hermann + + * dwfl_module_getdwarf.c: Check shnum for 0 before subtracting from + it. + +2017-04-20 Ulf Hermann + + * dwfl_frame.c: Drop unused sys/ptrace.h include. + * frame_unwind.c: Likewise. + * linux-pid-attach.c: Include sys/ptrace.h and sys/syscall.h only on + linux. + +2017-04-20 Ulf Hermann + + * linux-kernel-modules.c: Include sys/types.h before fts.h + +2017-03-24 Mark Wielaard + + * linux-core-attach.c (core_next_thread): If n_namesz == 0 then + the note name data is the empty string. + (dwfl_core_file_attach): Likewise. + 2017-02-15 Ulf Hermann * linux-kernel-modules.c: Include system.h. diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c index 501530a5..8ee91587 100644 --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include @@ -100,25 +104,28 @@ struct parse_opt const char *core; }; +static inline void +failure (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state) +{ + if (dwfl != NULL) + dwfl_end (dwfl); + if (errnum == -1) + argp_failure (state, EXIT_FAILURE, 0, "%s: %s", + msg, INTUSE(dwfl_errmsg) (-1)); + else + argp_failure (state, EXIT_FAILURE, errnum, "%s", msg); +} + +static inline error_t +fail (Dwfl *dwfl, int errnum, const char *msg, struct argp_state *state) +{ + failure (dwfl, errnum, msg, state); + return errnum == -1 ? EIO : errnum; +} + static error_t parse_opt (int key, char *arg, struct argp_state *state) { - inline void failure (Dwfl *dwfl, int errnum, const char *msg) - { - if (dwfl != NULL) - dwfl_end (dwfl); - if (errnum == -1) - argp_failure (state, EXIT_FAILURE, 0, "%s: %s", - msg, INTUSE(dwfl_errmsg) (-1)); - else - argp_failure (state, EXIT_FAILURE, errnum, "%s", msg); - } - inline error_t fail (Dwfl *dwfl, int errnum, const char *msg) - { - failure (dwfl, errnum, msg); - return errnum == -1 ? EIO : errnum; - } - switch (key) { case ARGP_KEY_INIT: @@ -126,7 +133,7 @@ parse_opt (int key, char *arg, struct argp_state *state) assert (state->hook == NULL); struct parse_opt *opt = calloc (1, sizeof (*opt)); if (opt == NULL) - failure (NULL, DWFL_E_ERRNO, "calloc"); + failure (NULL, DWFL_E_ERRNO, "calloc", state); state->hook = opt; } break; @@ -143,7 +150,7 @@ parse_opt (int key, char *arg, struct argp_state *state) { dwfl = INTUSE(dwfl_begin) (&offline_callbacks); if (dwfl == NULL) - return fail (dwfl, -1, arg); + return fail (dwfl, -1, arg, state); opt->dwfl = dwfl; /* Start at zero so if there is just one -e foo.so, @@ -169,7 +176,7 @@ parse_opt (int key, char *arg, struct argp_state *state) Dwfl *dwfl = INTUSE(dwfl_begin) (&proc_callbacks); int result = INTUSE(dwfl_linux_proc_report) (dwfl, atoi (arg)); if (result != 0) - return fail (dwfl, result, arg); + return fail (dwfl, result, arg, state); /* Non-fatal to not be able to attach to process, ignore error. */ INTUSE(dwfl_linux_proc_attach) (dwfl, atoi (arg), false); @@ -198,7 +205,7 @@ parse_opt (int key, char *arg, struct argp_state *state) int result = INTUSE(dwfl_linux_proc_maps_report) (dwfl, f); fclose (f); if (result != 0) - return fail (dwfl, result, arg); + return fail (dwfl, result, arg, state); opt->dwfl = dwfl; } else @@ -227,11 +234,11 @@ parse_opt (int key, char *arg, struct argp_state *state) Dwfl *dwfl = INTUSE(dwfl_begin) (&kernel_callbacks); int result = INTUSE(dwfl_linux_kernel_report_kernel) (dwfl); if (result != 0) - return fail (dwfl, result, _("cannot load kernel symbols")); + return fail (dwfl, result, _("cannot load kernel symbols"), state); result = INTUSE(dwfl_linux_kernel_report_modules) (dwfl); if (result != 0) /* Non-fatal to have no modules since we do have the kernel. */ - failure (dwfl, result, _("cannot find kernel modules")); + argp_failure (state, 0, result, _("cannot find kernel modules")); opt->dwfl = dwfl; } else @@ -248,7 +255,7 @@ parse_opt (int key, char *arg, struct argp_state *state) int result = INTUSE(dwfl_linux_kernel_report_offline) (dwfl, arg, NULL); if (result != 0) - return fail (dwfl, result, _("cannot find kernel or modules")); + return fail (dwfl, result, _("cannot find kernel or modules"), state); opt->dwfl = dwfl; } else @@ -267,7 +274,7 @@ parse_opt (int key, char *arg, struct argp_state *state) arg = "a.out"; dwfl = INTUSE(dwfl_begin) (&offline_callbacks); if (INTUSE(dwfl_report_offline) (dwfl, "", arg, -1) == NULL) - return fail (dwfl, -1, arg); + return fail (dwfl, -1, arg, state); opt->dwfl = dwfl; } @@ -297,7 +304,7 @@ parse_opt (int key, char *arg, struct argp_state *state) { elf_end (core); close (fd); - return fail (dwfl, result, opt->core); + return fail (dwfl, result, opt->core, state); } /* Non-fatal to not be able to attach to core, ignore error. */ @@ -327,7 +334,7 @@ parse_opt (int key, char *arg, struct argp_state *state) else if (opt->e) { if (INTUSE(dwfl_report_offline) (dwfl, "", opt->e, -1) == NULL) - return fail (dwfl, -1, opt->e); + return fail (dwfl, -1, opt->e, state); } /* One of the three flavors has done dwfl_begin and some reporting diff --git a/libdwfl/cu.c b/libdwfl/cu.c index 5182054d..94bfad8d 100644 --- a/libdwfl/cu.c +++ b/libdwfl/cu.c @@ -1,5 +1,5 @@ /* Keeping track of DWARF compilation units in libdwfl. - Copyright (C) 2005-2010, 2015 Red Hat, Inc. + Copyright (C) 2005-2010, 2015, 2016, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" #include "../libdw/memory-access.h" @@ -151,12 +155,7 @@ less_lazy (Dwfl_Module *mod) static inline Dwarf_Off cudie_offset (const struct dwfl_cu *cu) { - /* These are real CUs, so there never is a type_sig8. Note - initialization of dwkey.start and offset_size in intern_cu () - to see why this calculates the same value for both key and - die.cu search items. */ - return DIE_OFFSET_FROM_CU_OFFSET (cu->die.cu->start, cu->die.cu->offset_size, - 0); + return __libdw_first_die_off_from_cu (cu->die.cu); } static int @@ -194,11 +193,8 @@ intern_cu (Dwfl_Module *mod, Dwarf_Off cuoff, struct dwfl_cu **result) if (die == NULL) return DWFL_E_LIBDW; - struct Dwarf_CU dwkey; struct dwfl_cu key; - key.die.cu = &dwkey; - dwkey.offset_size = 0; - dwkey.start = cuoff - (3 * 0 - 4 + 3); + key.die.cu = die->cu; struct dwfl_cu **found = tsearch (&key, &mod->lazy_cu_root, &compare_cukey); if (unlikely (found == NULL)) return DWFL_E_NOMEM; diff --git a/libdwfl/derelocate.c b/libdwfl/derelocate.c index 439a24e3..2f80b20f 100644 --- a/libdwfl/derelocate.c +++ b/libdwfl/derelocate.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" struct dwfl_relocation @@ -63,7 +67,13 @@ compare_secrefs (const void *a, const void *b) if ((*p1)->start > (*p2)->start) return 1; - return 0; + if ((*p1)->end < (*p2)->end) + return -1; + if ((*p1)->end > (*p2)->end) + return 1; + + /* Same start/end, then just compare which section came first. */ + return elf_ndxscn ((*p1)->scn) - elf_ndxscn ((*p2)->scn); } static int diff --git a/libdwfl/dwfl_addrdie.c b/libdwfl/dwfl_addrdie.c index 1e9b3ab6..c5b1d68e 100644 --- a/libdwfl/dwfl_addrdie.c +++ b/libdwfl/dwfl_addrdie.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_addrdwarf.c b/libdwfl/dwfl_addrdwarf.c index ba412eca..4f9efabf 100644 --- a/libdwfl/dwfl_addrdwarf.c +++ b/libdwfl/dwfl_addrdwarf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf * diff --git a/libdwfl/dwfl_addrmodule.c b/libdwfl/dwfl_addrmodule.c index 9234eb71..abf1ff48 100644 --- a/libdwfl/dwfl_addrmodule.c +++ b/libdwfl/dwfl_addrmodule.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Module * diff --git a/libdwfl/dwfl_begin.c b/libdwfl/dwfl_begin.c index 44c16a92..b03f5cf4 100644 --- a/libdwfl/dwfl_begin.c +++ b/libdwfl/dwfl_begin.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl * diff --git a/libdwfl/dwfl_build_id_find_debuginfo.c b/libdwfl/dwfl_build_id_find_debuginfo.c index f1c64bcd..273e5e5f 100644 --- a/libdwfl/dwfl_build_id_find_debuginfo.c +++ b/libdwfl/dwfl_build_id_find_debuginfo.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include diff --git a/libdwfl/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c index d4737c9f..cc6c3f62 100644 --- a/libdwfl/dwfl_build_id_find_elf.c +++ b/libdwfl/dwfl_build_id_find_elf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include @@ -95,7 +99,7 @@ __libdwfl_open_by_build_id (Dwfl_Module *mod, bool debug, char **file_name, { if (*file_name != NULL) free (*file_name); - *file_name = canonicalize_file_name (name); + *file_name = realpath (name, NULL); if (*file_name == NULL) { *file_name = name; diff --git a/libdwfl/dwfl_cumodule.c b/libdwfl/dwfl_cumodule.c index c5cf004d..2b593f22 100644 --- a/libdwfl/dwfl_cumodule.c +++ b/libdwfl/dwfl_cumodule.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Module * diff --git a/libdwfl/dwfl_dwarf_line.c b/libdwfl/dwfl_dwarf_line.c index e96f859a..e22e984c 100644 --- a/libdwfl/dwfl_dwarf_line.c +++ b/libdwfl/dwfl_dwarf_line.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_end.c b/libdwfl/dwfl_end.c index 0b35bd28..74ee9e07 100644 --- a/libdwfl/dwfl_end.c +++ b/libdwfl/dwfl_end.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include diff --git a/libdwfl/dwfl_frame.c b/libdwfl/dwfl_frame.c index d6399398..881f735a 100644 --- a/libdwfl/dwfl_frame.c +++ b/libdwfl/dwfl_frame.c @@ -26,8 +26,11 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" -#include #include /* Set STATE->pc_set from STATE->regs according to the backend. Return true on diff --git a/libdwfl/dwfl_frame_regs.c b/libdwfl/dwfl_frame_regs.c index 10803fe7..83b1abef 100644 --- a/libdwfl/dwfl_frame_regs.c +++ b/libdwfl/dwfl_frame_regs.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" bool diff --git a/libdwfl/dwfl_getdwarf.c b/libdwfl/dwfl_getdwarf.c index 8d1d9ba7..edd088ec 100644 --- a/libdwfl/dwfl_getdwarf.c +++ b/libdwfl/dwfl_getdwarf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" struct module_callback_info diff --git a/libdwfl/dwfl_getmodules.c b/libdwfl/dwfl_getmodules.c index eed9b4ff..243cb04d 100644 --- a/libdwfl/dwfl_getmodules.c +++ b/libdwfl/dwfl_getmodules.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" ptrdiff_t diff --git a/libdwfl/dwfl_getsrc.c b/libdwfl/dwfl_getsrc.c index 8d4ae022..d853aed4 100644 --- a/libdwfl/dwfl_getsrc.c +++ b/libdwfl/dwfl_getsrc.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Line * diff --git a/libdwfl/dwfl_getsrclines.c b/libdwfl/dwfl_getsrclines.c index bdfcf5c6..1ce78fcb 100644 --- a/libdwfl/dwfl_getsrclines.c +++ b/libdwfl/dwfl_getsrclines.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" int diff --git a/libdwfl/dwfl_line_comp_dir.c b/libdwfl/dwfl_line_comp_dir.c index bda09c46..77c3fdf1 100644 --- a/libdwfl/dwfl_line_comp_dir.c +++ b/libdwfl/dwfl_line_comp_dir.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include diff --git a/libdwfl/dwfl_linecu.c b/libdwfl/dwfl_linecu.c index ce78d297..2043b17f 100644 --- a/libdwfl/dwfl_linecu.c +++ b/libdwfl/dwfl_linecu.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #undef dwfl_linecu diff --git a/libdwfl/dwfl_lineinfo.c b/libdwfl/dwfl_lineinfo.c index 7ddbfb07..96187128 100644 --- a/libdwfl/dwfl_lineinfo.c +++ b/libdwfl/dwfl_lineinfo.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_linemodule.c b/libdwfl/dwfl_linemodule.c index e4a35e09..d243f0d2 100644 --- a/libdwfl/dwfl_linemodule.c +++ b/libdwfl/dwfl_linemodule.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Module * diff --git a/libdwfl/dwfl_module.c b/libdwfl/dwfl_module.c index 515092f3..e7dfdace 100644 --- a/libdwfl/dwfl_module.c +++ b/libdwfl/dwfl_module.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/cfi.h" #include @@ -116,6 +120,7 @@ __libdwfl_module_free (Dwfl_Module *mod) free (mod->reloc_info); free (mod->name); + free (mod->elfdir); free (mod); } diff --git a/libdwfl/dwfl_module_addrdie.c b/libdwfl/dwfl_module_addrdie.c index 20d2842a..b44ec139 100644 --- a/libdwfl/dwfl_module_addrdie.c +++ b/libdwfl/dwfl_module_addrdie.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_module_addrname.c b/libdwfl/dwfl_module_addrname.c index 88a8139d..3142b3eb 100644 --- a/libdwfl/dwfl_module_addrname.c +++ b/libdwfl/dwfl_module_addrname.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/dwfl_module_addrsym.c b/libdwfl/dwfl_module_addrsym.c index 5a7bf714..2336b602 100644 --- a/libdwfl/dwfl_module_addrsym.c +++ b/libdwfl/dwfl_module_addrsym.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" struct search_state @@ -231,9 +235,12 @@ search_table (struct search_state *state, int start, int end) } /* Returns the name of the symbol "closest" to ADDR. - Never returns symbols at addresses above ADDR. */ -const char * -internal_function + Never returns symbols at addresses above ADDR. + + Wrapper for old dwfl_module_addrsym and new dwfl_module_addrinfo. + adjust_st_value set to true returns adjusted SYM st_value, set to false + it will not adjust SYM at all, but does match against resolved values. */ +static const char * __libdwfl_addrsym (Dwfl_Module *_mod, GElf_Addr _addr, GElf_Off *off, GElf_Sym *_closest_sym, GElf_Word *shndxp, Elf **elfp, Dwarf_Addr *biasp, bool _adjust_st_value) diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c index c9a42ca7..6ca93761 100644 --- a/libdwfl/dwfl_module_build_id.c +++ b/libdwfl/dwfl_module_build_id.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" static int diff --git a/libdwfl/dwfl_module_dwarf_cfi.c b/libdwfl/dwfl_module_dwarf_cfi.c index 1dac26d5..0e5b4356 100644 --- a/libdwfl/dwfl_module_dwarf_cfi.c +++ b/libdwfl/dwfl_module_dwarf_cfi.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/cfi.h" diff --git a/libdwfl/dwfl_module_eh_cfi.c b/libdwfl/dwfl_module_eh_cfi.c index dbe43b0f..c296e399 100644 --- a/libdwfl/dwfl_module_eh_cfi.c +++ b/libdwfl/dwfl_module_eh_cfi.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/cfi.h" diff --git a/libdwfl/dwfl_module_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c index 46caece5..af6838a6 100644 --- a/libdwfl/dwfl_module_getdwarf.c +++ b/libdwfl/dwfl_module_getdwarf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include @@ -349,12 +353,14 @@ find_prelink_address_sync (Dwfl_Module *mod, struct dwfl_file *file) /* Since prelink does not store the zeroth section header in the undo section, it cannot support SHN_XINDEX encoding. */ - if (unlikely (shnum >= SHN_LORESERVE) + if (unlikely (shnum >= SHN_LORESERVE) || unlikely(shnum == 0) || unlikely (undodata->d_size != (src.d_size + phnum * phentsize + (shnum - 1) * shentsize))) return DWFL_E_BAD_PRELINK; + --shnum; + /* We look at the allocated SHT_PROGBITS (or SHT_NOBITS) sections. (Most every file will have some SHT_PROGBITS sections, but it's possible to have one with nothing but .bss, i.e. SHT_NOBITS.) The special sections @@ -431,12 +437,12 @@ find_prelink_address_sync (Dwfl_Module *mod, struct dwfl_file *file) src.d_buf += src.d_size; src.d_type = ELF_T_SHDR; - src.d_size = gelf_fsize (mod->main.elf, ELF_T_SHDR, shnum - 1, EV_CURRENT); + src.d_size = gelf_fsize (mod->main.elf, ELF_T_SHDR, shnum, EV_CURRENT); size_t shdr_size = class32 ? sizeof (Elf32_Shdr) : sizeof (Elf64_Shdr); - if (unlikely (shnum - 1 > SIZE_MAX / shdr_size)) + if (unlikely (shnum > SIZE_MAX / shdr_size)) return DWFL_E_NOMEM; - const size_t shdrs_bytes = (shnum - 1) * shdr_size; + const size_t shdrs_bytes = shnum * shdr_size; void *shdrs = malloc (shdrs_bytes); if (unlikely (shdrs == NULL)) return DWFL_E_NOMEM; @@ -488,16 +494,16 @@ find_prelink_address_sync (Dwfl_Module *mod, struct dwfl_file *file) highest = 0; if (class32) { - Elf32_Shdr (*s32)[shnum - 1] = shdrs; - for (size_t i = 0; i < shnum - 1; ++i) + Elf32_Shdr (*s32)[shnum] = shdrs; + for (size_t i = 0; i < shnum; ++i) consider_shdr (undo_interp, (*s32)[i].sh_type, (*s32)[i].sh_flags, (*s32)[i].sh_addr, (*s32)[i].sh_size, &highest); } else { - Elf64_Shdr (*s64)[shnum - 1] = shdrs; - for (size_t i = 0; i < shnum - 1; ++i) + Elf64_Shdr (*s64)[shnum] = shdrs; + for (size_t i = 0; i < shnum; ++i) consider_shdr (undo_interp, (*s64)[i].sh_type, (*s64)[i].sh_flags, (*s64)[i].sh_addr, (*s64)[i].sh_size, &highest); @@ -1329,7 +1335,18 @@ load_dw (Dwfl_Module *mod, struct dwfl_file *debugfile) result = __libdwfl_relocate (mod, debugfile->elf, true); if (result != DWFL_E_NOERROR) return result; + } + mod->dw = INTUSE(dwarf_begin_elf) (debugfile->elf, DWARF_C_READ, NULL); + if (mod->dw == NULL) + { + int err = INTUSE(dwarf_errno) (); + return err == DWARF_E_NO_DWARF ? DWFL_E_NO_DWARF : DWFL_E (LIBDW, err); + } + + /* Do this after dwarf_begin_elf has a chance to process the fd. */ + if (mod->e_type == ET_REL && !debugfile->relocated) + { /* Don't keep the file descriptors around. */ if (mod->main.fd != -1 && elf_cntl (mod->main.elf, ELF_C_FDREAD) == 0) { @@ -1343,12 +1360,12 @@ load_dw (Dwfl_Module *mod, struct dwfl_file *debugfile) } } - mod->dw = INTUSE(dwarf_begin_elf) (debugfile->elf, DWARF_C_READ, NULL); - if (mod->dw == NULL) - { - int err = INTUSE(dwarf_errno) (); - return err == DWARF_E_NO_DWARF ? DWFL_E_NO_DWARF : DWFL_E (LIBDW, err); - } + /* We might have already closed the fd when we asked dwarf_begin_elf to + create an Dwarf. Help out a little in case we need to find an alt or + dwo file later. */ + if (mod->dw->debugdir == NULL && mod->elfdir != NULL + && debugfile == &mod->main) + mod->dw->debugdir = strdup (mod->elfdir); /* Until we have iterated through all CU's, we might do lazy lookups. */ mod->lazycu = 1; diff --git a/libdwfl/dwfl_module_getelf.c b/libdwfl/dwfl_module_getelf.c index f20fb042..6358de4c 100644 --- a/libdwfl/dwfl_module_getelf.c +++ b/libdwfl/dwfl_module_getelf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Elf * diff --git a/libdwfl/dwfl_module_getsrc.c b/libdwfl/dwfl_module_getsrc.c index f7e340bc..fc99b163 100644 --- a/libdwfl/dwfl_module_getsrc.c +++ b/libdwfl/dwfl_module_getsrc.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_module_getsrc_file.c b/libdwfl/dwfl_module_getsrc_file.c index 4eaaeaff..cea2ba41 100644 --- a/libdwfl/dwfl_module_getsrc_file.c +++ b/libdwfl/dwfl_module_getsrc_file.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c index 42d2b679..8de9a3eb 100644 --- a/libdwfl/dwfl_module_getsym.c +++ b/libdwfl/dwfl_module_getsym.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/dwfl_module_info.c b/libdwfl/dwfl_module_info.c index df16be41..af1faab4 100644 --- a/libdwfl/dwfl_module_info.c +++ b/libdwfl/dwfl_module_info.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/dwfl_module_nextcu.c b/libdwfl/dwfl_module_nextcu.c index 6f81f4cc..32ee6bc2 100644 --- a/libdwfl/dwfl_module_nextcu.c +++ b/libdwfl/dwfl_module_nextcu.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_module_register_names.c b/libdwfl/dwfl_module_register_names.c index 18fed373..9ea09371 100644 --- a/libdwfl/dwfl_module_register_names.c +++ b/libdwfl/dwfl_module_register_names.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" diff --git a/libdwfl/dwfl_module_report_build_id.c b/libdwfl/dwfl_module_report_build_id.c index b41512b4..31e17c86 100644 --- a/libdwfl/dwfl_module_report_build_id.c +++ b/libdwfl/dwfl_module_report_build_id.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" // XXX vs report changed module: punting old file diff --git a/libdwfl/dwfl_module_return_value_location.c b/libdwfl/dwfl_module_return_value_location.c index 29da61fb..ff6f56f8 100644 --- a/libdwfl/dwfl_module_return_value_location.c +++ b/libdwfl/dwfl_module_return_value_location.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" diff --git a/libdwfl/dwfl_nextcu.c b/libdwfl/dwfl_nextcu.c index 9ea83881..64bd5219 100644 --- a/libdwfl/dwfl_nextcu.c +++ b/libdwfl/dwfl_nextcu.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwarf_Die * diff --git a/libdwfl/dwfl_onesrcline.c b/libdwfl/dwfl_onesrcline.c index 4c20d657..b1e70555 100644 --- a/libdwfl/dwfl_onesrcline.c +++ b/libdwfl/dwfl_onesrcline.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" Dwfl_Line * diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c index 73a5511a..3fc9384a 100644 --- a/libdwfl/dwfl_report_elf.c +++ b/libdwfl/dwfl_report_elf.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include @@ -170,7 +174,7 @@ __libdwfl_elf_address_range (Elf *elf, GElf_Addr base, bool add_p_vaddr, /* An assigned base address is meaningless for these. */ base = 0; add_p_vaddr = true; - /* Fallthrough. */ + FALLTHROUGH; case ET_DYN: default:; size_t phnum; diff --git a/libdwfl/dwfl_validate_address.c b/libdwfl/dwfl_validate_address.c index 7334c3e2..15e2602a 100644 --- a/libdwfl/dwfl_validate_address.c +++ b/libdwfl/dwfl_validate_address.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" int diff --git a/libdwfl/dwfl_version.c b/libdwfl/dwfl_version.c index d1c5d918..c27d4f6d 100644 --- a/libdwfl/dwfl_version.c +++ b/libdwfl/dwfl_version.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" const char * diff --git a/libdwfl/elf-from-memory.c b/libdwfl/elf-from-memory.c index dd42e954..12a0a1be 100644 --- a/libdwfl/elf-from-memory.c +++ b/libdwfl/elf-from-memory.c @@ -172,7 +172,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma, { /* Read in the program headers. */ - if (initial_bufsize < phnum * phentsize) + if (initial_bufsize < (size_t)phnum * phentsize) { unsigned char *newbuf = realloc (buffer, phnum * phentsize); if (newbuf == NULL) diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c index 80515dbd..9267788d 100644 --- a/libdwfl/find-debuginfo.c +++ b/libdwfl/find-debuginfo.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include @@ -385,7 +389,7 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, /* If FILE_NAME is a symlink, the debug file might be associated with the symlink target name instead. */ - char *canon = canonicalize_file_name (file_name); + char *canon = realpath (file_name, NULL); if (canon != NULL && strcmp (file_name, canon)) fd = find_debuginfo_in_path (mod, canon, debuglink_file, debuglink_crc, diff --git a/libdwfl/frame_unwind.c b/libdwfl/frame_unwind.c index fb42c1a7..8da691ee 100644 --- a/libdwfl/frame_unwind.c +++ b/libdwfl/frame_unwind.c @@ -34,7 +34,6 @@ #include #include "libdwflP.h" #include "../libdw/dwarf.h" -#include #include /* Maximum number of DWARF expression stack slots before returning an error. */ @@ -443,7 +442,7 @@ expr_eval (Dwfl_Frame *state, Dwarf_Frame *frame, const Dwarf_Op *ops, } if (val1 == 0) break; - /* FALLTHRU */ + FALLTHROUGH; case DW_OP_skip:; Dwarf_Word offset = op->offset + 1 + 2 + (int16_t) op->number; const Dwarf_Op *found = bsearch ((void *) (uintptr_t) offset, ops, nops, @@ -633,24 +632,38 @@ handle_cfi (Dwfl_Frame *state, Dwarf_Addr pc, Dwarf_CFI *cfi, Dwarf_Addr bias) ra_set = true; } } - if (unwound->pc_state == DWFL_FRAME_STATE_ERROR - && __libdwfl_frame_reg_get (unwound, - frame->fde->cie->return_address_register, - &unwound->pc)) + if (unwound->pc_state == DWFL_FRAME_STATE_ERROR) { - /* PPC32 __libc_start_main properly CFI-unwinds PC as zero. Currently - none of the archs supported for unwinding have zero as a valid PC. */ - if (unwound->pc == 0) - unwound->pc_state = DWFL_FRAME_STATE_PC_UNDEFINED; + if (__libdwfl_frame_reg_get (unwound, + frame->fde->cie->return_address_register, + &unwound->pc)) + { + /* PPC32 __libc_start_main properly CFI-unwinds PC as zero. + Currently none of the archs supported for unwinding have + zero as a valid PC. */ + if (unwound->pc == 0) + unwound->pc_state = DWFL_FRAME_STATE_PC_UNDEFINED; + else + { + unwound->pc_state = DWFL_FRAME_STATE_PC_SET; + /* In SPARC the return address register actually contains + the address of the call instruction instead of the return + address. Therefore we add here an offset defined by the + backend. Most likely 0. */ + unwound->pc += ebl_ra_offset (ebl); + } + } else - { - unwound->pc_state = DWFL_FRAME_STATE_PC_SET; - /* In SPARC the return address register actually contains - the address of the call instruction instead of the return - address. Therefore we add here an offset defined by the - backend. Most likely 0. */ - unwound->pc += ebl_ra_offset (ebl); - } + { + /* We couldn't set the return register, either it was bogus, + or the return pc is undefined, maybe end of call stack. */ + unsigned pcreg = frame->fde->cie->return_address_register; + if (! ebl_dwarf_to_regno (ebl, &pcreg) + || pcreg >= ebl_frame_nregs (ebl)) + __libdwfl_seterrno (DWFL_E_INVALID_REGISTER); + else + unwound->pc_state = DWFL_FRAME_STATE_PC_UNDEFINED; + } } free (frame); } diff --git a/libdwfl/gzip.c b/libdwfl/gzip.c index 078e1da4..c2c13baf 100644 --- a/libdwfl/gzip.c +++ b/libdwfl/gzip.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "system.h" diff --git a/libdwfl/image-header.c b/libdwfl/image-header.c index 62ccc3e3..25fbfd99 100644 --- a/libdwfl/image-header.c +++ b/libdwfl/image-header.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "system.h" diff --git a/libdwfl/libdwfl.h b/libdwfl/libdwfl.h index aea8b993..a0c1d357 100644 --- a/libdwfl/libdwfl.h +++ b/libdwfl/libdwfl.h @@ -385,7 +385,7 @@ extern int dwfl_linux_proc_find_elf (Dwfl_Module *mod, void **userdata, /* Standard argument parsing for using a standard callback set. */ struct argp; -extern const struct argp *dwfl_standard_argp (void) __attribute__ ((const)); +extern const struct argp *dwfl_standard_argp (void) __const_attribute__; /*** Relocation of addresses from Dwfl ***/ diff --git a/libdwfl/libdwflP.h b/libdwfl/libdwflP.h index 2a83646e..31e6e190 100644 --- a/libdwfl/libdwflP.h +++ b/libdwfl/libdwflP.h @@ -1,5 +1,5 @@ /* Internal definitions for libdwfl. - Copyright (C) 2005-2015 Red Hat, Inc. + Copyright (C) 2005-2015, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -29,9 +29,6 @@ #ifndef _LIBDWFLP_H #define _LIBDWFLP_H 1 -#ifndef PACKAGE_NAME -# include -#endif #include #include #include @@ -193,6 +190,8 @@ struct Dwfl_Module Elf_Data *symxndxdata; /* Data in the extended section index table. */ Elf_Data *aux_symxndxdata; /* Data in the extended auxiliary table. */ + char *elfdir; /* The dir where we found the main Elf. */ + Dwarf *dw; /* libdw handle for its debugging info. */ Dwarf *alt; /* Dwarf used for dwarf_setalt, or NULL. */ int alt_fd; /* descriptor, only valid when alt != NULL. */ @@ -404,6 +403,14 @@ struct dwfl_arange size_t arange; /* Index in Dwarf_Aranges. */ }; +#define __LIBDWFL_REMOTE_MEM_CACHE_SIZE 4096 +/* Structure for caching remote memory reads as used by __libdwfl_pid_arg. */ +struct __libdwfl_remote_mem_cache +{ + Dwarf_Addr addr; /* Remote address. */ + Dwarf_Off len; /* Zero if cleared, otherwise likely 4K. */ + unsigned char buf[__LIBDWFL_REMOTE_MEM_CACHE_SIZE]; /* The actual cache. */ +}; /* Structure used for keeping track of ptrace attaching a thread. Shared by linux-pid-attach and linux-proc-maps. If it has been setup @@ -414,6 +421,10 @@ struct __libdwfl_pid_arg DIR *dir; /* Elf for /proc/PID/exe. Set to NULL if it couldn't be opened. */ Elf *elf; + /* Remote memory cache, NULL if there is no memory cached. + Should be cleared on detachment (because that makes the thread + runnable and the cache invalid). */ + struct __libdwfl_remote_mem_cache *mem_cache; /* fd for /proc/PID/exe. Set to -1 if it couldn't be opened. */ int elf_fd; /* It is 0 if not used. */ @@ -452,15 +463,6 @@ extern const char *__libdwfl_getsym (Dwfl_Module *mod, int ndx, GElf_Sym *sym, bool *resolved, bool adjust_st_value) internal_function; -/* Internal wrapper for old dwfl_module_addrsym and new dwfl_module_addrinfo. - adjust_st_value set to true returns adjusted SYM st_value, set to false - it will not adjust SYM at all, but does match against resolved values. */ -extern const char *__libdwfl_addrsym (Dwfl_Module *mod, GElf_Addr addr, - GElf_Off *off, GElf_Sym *sym, - GElf_Word *shndxp, Elf **elfp, - Dwarf_Addr *bias, - bool adjust_st_value) internal_function; - extern void __libdwfl_module_free (Dwfl_Module *mod) internal_function; /* Find the main ELF file, update MOD->elferr and/or MOD->main.elf. */ diff --git a/libdwfl/lines.c b/libdwfl/lines.c index 721e29cc..128c0c97 100644 --- a/libdwfl/lines.c +++ b/libdwfl/lines.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include "../libdw/libdwP.h" diff --git a/libdwfl/link_map.c b/libdwfl/link_map.c index 794668fc..29307c74 100644 --- a/libdwfl/link_map.c +++ b/libdwfl/link_map.c @@ -43,13 +43,14 @@ static inline bool -do_check64 (size_t i, const Elf64_auxv_t (*a64)[], uint_fast8_t *elfdata) +do_check64 (const char *a64, uint_fast8_t *elfdata) { /* The AUXV pointer might not even be naturally aligned for 64-bit data, because note payloads in a core file are not aligned. */ - - uint64_t type = read_8ubyte_unaligned_noncvt (&(*a64)[i].a_type); - uint64_t val = read_8ubyte_unaligned_noncvt (&(*a64)[i].a_un.a_val); + const char *typep = a64 + offsetof (Elf64_auxv_t, a_type); + uint64_t type = read_8ubyte_unaligned_noncvt (typep); + const char *valp = a64 + offsetof (Elf64_auxv_t, a_un.a_val); + uint64_t val = read_8ubyte_unaligned_noncvt (valp); if (type == BE64 (PROBE_TYPE) && val == BE64 (PROBE_VAL64)) @@ -68,16 +69,15 @@ do_check64 (size_t i, const Elf64_auxv_t (*a64)[], uint_fast8_t *elfdata) return false; } -#define check64(n) do_check64 (n, a64, elfdata) - static inline bool -do_check32 (size_t i, const Elf32_auxv_t (*a32)[], uint_fast8_t *elfdata) +do_check32 (const char *a32, uint_fast8_t *elfdata) { /* The AUXV pointer might not even be naturally aligned for 32-bit data, because note payloads in a core file are not aligned. */ - - uint32_t type = read_4ubyte_unaligned_noncvt (&(*a32)[i].a_type); - uint32_t val = read_4ubyte_unaligned_noncvt (&(*a32)[i].a_un.a_val); + const char *typep = a32 + offsetof (Elf32_auxv_t, a_type); + uint32_t type = read_4ubyte_unaligned_noncvt (typep); + const char *valp = a32 + offsetof (Elf32_auxv_t, a_un.a_val); + uint32_t val = read_4ubyte_unaligned_noncvt (valp); if (type == BE32 (PROBE_TYPE) && val == BE32 (PROBE_VAL32)) @@ -96,26 +96,22 @@ do_check32 (size_t i, const Elf32_auxv_t (*a32)[], uint_fast8_t *elfdata) return false; } -#define check32(n) do_check32 (n, a32, elfdata) - /* Examine an auxv data block and determine its format. Return true iff we figured it out. */ static bool auxv_format_probe (const void *auxv, size_t size, uint_fast8_t *elfclass, uint_fast8_t *elfdata) { - const Elf32_auxv_t (*a32)[size / sizeof (Elf32_auxv_t)] = (void *) auxv; - const Elf64_auxv_t (*a64)[size / sizeof (Elf64_auxv_t)] = (void *) auxv; - for (size_t i = 0; i < size / sizeof (Elf64_auxv_t); ++i) { - if (check64 (i)) + if (do_check64 (auxv + i * sizeof (Elf64_auxv_t), elfdata)) { *elfclass = ELFCLASS64; return true; } - if (check32 (i * 2) || check32 (i * 2 + 1)) + if (do_check32 (auxv + (i * 2) * sizeof (Elf32_auxv_t), elfdata) + || do_check32 (auxv + (i * 2 + 1) * sizeof (Elf32_auxv_t), elfdata)) { *elfclass = ELFCLASS32; return true; @@ -717,8 +713,12 @@ dwfl_link_map_report (Dwfl *dwfl, const void *auxv, size_t auxv_size, const Elf##NN##_auxv_t *av = auxv; \ for (size_t i = 0; i < auxv_size / sizeof av[0]; ++i) \ { \ - uint##NN##_t type = READ_AUXV##NN (&av[i].a_type); \ - uint##NN##_t val = BL##NN (READ_AUXV##NN (&av[i].a_un.a_val)); \ + const char *typep = auxv + i * sizeof (Elf##NN##_auxv_t); \ + typep += offsetof (Elf##NN##_auxv_t, a_type); \ + uint##NN##_t type = READ_AUXV##NN (typep); \ + const char *valp = auxv + i * sizeof (Elf##NN##_auxv_t); \ + valp += offsetof (Elf##NN##_auxv_t, a_un.a_val); \ + uint##NN##_t val = BL##NN (READ_AUXV##NN (valp)); \ if (type == BL##NN (AT_ENTRY)) \ entry = val; \ else if (type == BL##NN (AT_PHDR)) \ diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c index 93d0e46e..9f05f72a 100644 --- a/libdwfl/linux-core-attach.c +++ b/libdwfl/linux-core-attach.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include "system.h" @@ -125,7 +129,8 @@ core_next_thread (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg, &desc_offset)) > 0) { /* Do not check NAME for now, help broken Linux kernels. */ - const char *name = note_data->d_buf + name_offset; + const char *name = (nhdr.n_namesz == 0 + ? "" : note_data->d_buf + name_offset); const char *desc = note_data->d_buf + desc_offset; GElf_Word regs_offset; size_t nregloc; @@ -178,7 +183,8 @@ core_set_initial_registers (Dwfl_Thread *thread, void *thread_arg_voidp) /* __libdwfl_attach_state_for_core already verified the note is there. */ assert (getnote_err != 0); /* Do not check NAME for now, help broken Linux kernels. */ - const char *name = note_data->d_buf + name_offset; + const char *name = (nhdr.n_namesz == 0 + ? "" : note_data->d_buf + name_offset); const char *desc = note_data->d_buf + desc_offset; GElf_Word regs_offset; size_t nregloc; @@ -367,7 +373,8 @@ dwfl_core_file_attach (Dwfl *dwfl, Elf *core) &nhdr, &name_offset, &desc_offset)) > 0) { /* Do not check NAME for now, help broken Linux kernels. */ - const char *name = note_data->d_buf + name_offset; + const char *name = (nhdr.n_namesz == 0 + ? "" : note_data->d_buf + name_offset); const char *desc = note_data->d_buf + desc_offset; GElf_Word regs_offset; size_t nregloc; diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c index 7345e760..9d0fef2c 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -28,8 +28,11 @@ /* In case we have a bad fts we include this before config.h because it can't handle _FILE_OFFSET_BITS. - Everything we need here is fine if its declarations just come first. */ + Everything we need here is fine if its declarations just come first. + Also, include sys/types.h before fts. On some systems fts.h is not self + contained. */ #ifdef BAD_FTS + #include #include #endif @@ -55,6 +58,7 @@ #define fopen fopen64 #endif #else + #include #include #endif @@ -152,11 +156,18 @@ try_kernel_name (Dwfl *dwfl, char **fname, bool try_debug) static inline const char * kernel_release (void) { +#ifdef __linux__ /* Cache the `uname -r` string we'll use. */ static struct utsname utsname; if (utsname.release[0] == '\0' && uname (&utsname) != 0) return NULL; return utsname.release; +#else + /* Used for finding the running linux kernel, which isn't supported + on non-linux kernel systems. */ + errno = ENOTSUP; + return NULL; +#endif } static int diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c index adfc7f81..f19e9b49 100644 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@ -1,5 +1,5 @@ /* Get Dwarf Frame state for target live PID process. - Copyright (C) 2013, 2014, 2015 Red Hat, Inc. + Copyright (C) 2013, 2014, 2015, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -26,19 +26,25 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libelfP.h" #include "libdwflP.h" #include #include #include -#include -#include #include -#include #include #ifdef __linux__ +#include +#include +#include +#include + static bool linux_proc_pid_is_stopped (pid_t pid) { @@ -110,12 +116,90 @@ __libdwfl_ptrace_attach (pid_t tid, bool *tid_was_stoppedp) return true; } +#ifdef HAVE_PROCESS_VM_READV +/* Note that the result word size depends on the architecture word size. + That is sizeof long. */ +static bool +read_cached_memory (struct __libdwfl_pid_arg *pid_arg, + Dwarf_Addr addr, Dwarf_Word *result) +{ + /* Let the ptrace fallback deal with the corner case of the address + possibly crossing a page boundery. */ + if ((addr & ((Dwarf_Addr)__LIBDWFL_REMOTE_MEM_CACHE_SIZE - 1)) + > (Dwarf_Addr)__LIBDWFL_REMOTE_MEM_CACHE_SIZE - sizeof (unsigned long)) + return false; + + struct __libdwfl_remote_mem_cache *mem_cache = pid_arg->mem_cache; + if (mem_cache == NULL) + { + size_t mem_cache_size = sizeof (struct __libdwfl_remote_mem_cache); + mem_cache = (struct __libdwfl_remote_mem_cache *) malloc (mem_cache_size); + if (mem_cache == NULL) + return false; + + mem_cache->addr = 0; + mem_cache->len = 0; + pid_arg->mem_cache = mem_cache; + } + + unsigned char *d; + if (addr >= mem_cache->addr && addr - mem_cache->addr < mem_cache->len) + { + d = &mem_cache->buf[addr - mem_cache->addr]; + if ((((uintptr_t) d) & (sizeof (unsigned long) - 1)) == 0) + *result = *(unsigned long *) d; + else + memcpy (result, d, sizeof (unsigned long)); + return true; + } + + struct iovec local, remote; + mem_cache->addr = addr & ~((Dwarf_Addr)__LIBDWFL_REMOTE_MEM_CACHE_SIZE - 1); + local.iov_base = mem_cache->buf; + local.iov_len = __LIBDWFL_REMOTE_MEM_CACHE_SIZE; + remote.iov_base = (void *) (uintptr_t) mem_cache->addr; + remote.iov_len = __LIBDWFL_REMOTE_MEM_CACHE_SIZE; + + ssize_t res = process_vm_readv (pid_arg->tid_attached, + &local, 1, &remote, 1, 0); + if (res != __LIBDWFL_REMOTE_MEM_CACHE_SIZE) + { + mem_cache->len = 0; + return false; + } + + mem_cache->len = res; + d = &mem_cache->buf[addr - mem_cache->addr]; + if ((((uintptr_t) d) & (sizeof (unsigned long) - 1)) == 0) + *result = *(unsigned long *) d; + else + memcpy (result, d, sizeof (unsigned long)); + return true; +} +#endif /* HAVE_PROCESS_VM_READV */ + +static void +clear_cached_memory (struct __libdwfl_pid_arg *pid_arg) +{ + struct __libdwfl_remote_mem_cache *mem_cache = pid_arg->mem_cache; + if (mem_cache != NULL) + mem_cache->len = 0; +} + +/* Note that the result word size depends on the architecture word size. + That is sizeof long. */ static bool pid_memory_read (Dwfl *dwfl, Dwarf_Addr addr, Dwarf_Word *result, void *arg) { struct __libdwfl_pid_arg *pid_arg = arg; pid_t tid = pid_arg->tid_attached; assert (tid > 0); + +#ifdef HAVE_PROCESS_VM_READV + if (read_cached_memory (pid_arg, addr, result)) + return true; +#endif + Dwfl_Process *process = dwfl->process; if (ebl_get_elfclass (process->ebl) == ELFCLASS64) { @@ -248,6 +332,7 @@ pid_detach (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg) { struct __libdwfl_pid_arg *pid_arg = dwfl_arg; elf_end (pid_arg->elf); + free (pid_arg->mem_cache); close (pid_arg->elf_fd); closedir (pid_arg->dir); free (pid_arg); @@ -273,6 +358,7 @@ pid_thread_detach (Dwfl_Thread *thread, void *thread_arg) pid_t tid = INTUSE(dwfl_thread_tid) (thread); assert (pid_arg->tid_attached == tid); pid_arg->tid_attached = 0; + clear_cached_memory (pid_arg); if (! pid_arg->assume_ptrace_stopped) __libdwfl_ptrace_detach (tid, pid_arg->tid_was_stopped); } @@ -374,6 +460,7 @@ dwfl_linux_proc_attach (Dwfl *dwfl, pid_t pid, bool assume_ptrace_stopped) pid_arg->dir = dir; pid_arg->elf = elf; pid_arg->elf_fd = elf_fd; + pid_arg->mem_cache = NULL; pid_arg->tid_attached = 0; pid_arg->assume_ptrace_stopped = assume_ptrace_stopped; if (! INTUSE(dwfl_attach_state) (dwfl, elf, pid, &pid_thread_callbacks, diff --git a/libdwfl/linux-proc-maps.c b/libdwfl/linux-proc-maps.c index 094dd53d..c4438c0f 100644 --- a/libdwfl/linux-proc-maps.c +++ b/libdwfl/linux-proc-maps.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include diff --git a/libdwfl/offline.c b/libdwfl/offline.c index c0a25992..d8697cf2 100644 --- a/libdwfl/offline.c +++ b/libdwfl/offline.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" #include #include @@ -146,6 +150,9 @@ process_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, /* Don't keep the file descriptor around. */ if (mod->main.fd != -1 && elf_cntl (mod->main.elf, ELF_C_FDREAD) == 0) { + /* Grab the dir path in case we want to report this file as + Dwarf later. */ + mod->elfdir = __libdw_debugdir (mod->main.fd); close (mod->main.fd); mod->main.fd = -1; } diff --git a/libdwfl/open.c b/libdwfl/open.c index 92f2798b..4e0461bd 100644 --- a/libdwfl/open.c +++ b/libdwfl/open.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "../libelf/libelfP.h" #undef _ #include "libdwflP.h" diff --git a/libdwfl/relocate.c b/libdwfl/relocate.c index a44126e8..9afcdebe 100644 --- a/libdwfl/relocate.c +++ b/libdwfl/relocate.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" typedef uint8_t GElf_Byte; @@ -747,7 +751,7 @@ __libdwfl_relocate (Dwfl_Module *mod, Elf *debugfile, bool debug) else result = relocate_section (mod, debugfile, ehdr, d_shstrndx, &reloc_symtab, scn, shdr, tscn, - debug, !debug); + debug, true /* partial always OK. */); } } diff --git a/libdwfl/segment.c b/libdwfl/segment.c index 2983cf23..d9599a7f 100644 --- a/libdwfl/segment.c +++ b/libdwfl/segment.c @@ -26,6 +26,10 @@ the GNU Lesser General Public License along with this program. If not, see . */ +#ifdef HAVE_CONFIG_H +# include +#endif + #include "libdwflP.h" GElf_Addr diff --git a/libebl/ChangeLog b/libebl/ChangeLog index 719d08d0..f76afd10 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,54 @@ +2018-07-04 Ross Burton + + * eblopenbackend.c: Remove error.h include. + +2018-04-25 Mark Wielaard + + * eblopenbackend.c (default_debugscn_p): Add new DWARF5 sections + .debug_addr, .debug_line_str, .debug_loclists, .debug_names, + .debug_rnglists and .debug_str_offsets. + +2018-04-19 Andreas Schwab + + * eblopenbackend.c (machines): Add entries for RISC-V. + +2018-03-16 Mark Wielaard + + * ebldynamictagname.c (ebl_dynamic_tag_name): Add SYMTAB_SHNDX to + stdtags. Add a eu_static_assert to make sure stdtags contains all + DT_NUM entries. + +2018-02-21 Mark Wielaard + + * eblcheckreloctargettype.c (ebl_check_reloc_target_type): Accept + SHT_NOTE. + +2018-02-09 Joshua Watt + + * eblobjnote.c (ebl_object_note): Use FALLTHROUGH macro instead of + comment. + +2017-04-27 Ulf Hermann + + * Makefile.am: Use fpic_CFLAGS. + +2017-07-19 Gustavo Romero + + * eblcorenotetypename.c: Add ppc64 HTM SPRs note as known type. + +2017-07-20 Mark Wielaard + + * Makefile.am (gen_SOURCES): Add ebl_data_marker_symbol.c. + * ebl-hooks.h (data_marker_symbol): New hook. + * ebl_data_marker_symbol.c: New file. + * eblopenbackend.c (default_data_marker_symbol): New function. + (fill_defaults): Add default_data_marker_symbol. + * libebl.h (ebl_data_marker_symbol): New function. + +2017-04-20 Ulf Hermann + + * libebl.h: Use __pure_attribute__. + 2017-02-15 Ulf Hermann * eblmachineflagname.c: Include system.h. diff --git a/libebl/Makefile.am b/libebl/Makefile.am index 6f945eb8..737de6b0 100644 --- a/libebl/Makefile.am +++ b/libebl/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2000-2010, 2013, 2016 Red Hat, Inc. +## Copyright (C) 2000-2010, 2013, 2016, 2017 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -28,7 +28,7 @@ ## not, see . ## include $(top_srcdir)/config/eu.am -AM_CFLAGS += -fPIC +AM_CFLAGS += $(fpic_CFLAGS) AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm VERSION = 1 LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ @@ -53,7 +53,8 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c \ eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \ ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \ eblstother.c eblinitreg.c ebldwarftoregno.c eblnormalizepc.c \ - eblunwind.c eblresolvesym.c eblcheckreloctargettype.c + eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \ + ebl_data_marker_symbol.c libebl_a_SOURCES = $(gen_SOURCES) diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h index b7253748..f3a0e64a 100644 --- a/libebl/ebl-hooks.h +++ b/libebl/ebl-hooks.h @@ -1,5 +1,5 @@ /* Backend hook signatures internal interface for libebl. - Copyright (C) 2000-2011, 2013, 2014, 2016 Red Hat, Inc. + Copyright (C) 2000-2011, 2013, 2014, 2016, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -121,6 +121,9 @@ bool EBLHOOK(relative_reloc_p) (int); bool EBLHOOK(check_special_symbol) (Elf *, GElf_Ehdr *, const GElf_Sym *, const char *, const GElf_Shdr *); +/* Check if this is a data marker symbol. e.g. '$d' symbols for ARM. */ +bool EBLHOOK(data_marker_symbol) (const GElf_Sym *sym, const char *sname); + /* Check whether only valid bits are set on the st_other symbol flag. Standard ST_VISIBILITY have already been masked off. */ bool EBLHOOK(check_st_other_bits) (unsigned char st_other); diff --git a/libebl/ebl_data_marker_symbol.c b/libebl/ebl_data_marker_symbol.c new file mode 100644 index 00000000..922d7203 --- /dev/null +++ b/libebl/ebl_data_marker_symbol.c @@ -0,0 +1,44 @@ +/* Check whether a symbol is a special data marker. + Copyright (C) 2017 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of either + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version + + or both in parallel, as here. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + + +bool +ebl_data_marker_symbol (Ebl *ebl, const GElf_Sym *sym, const char *sname) +{ + if (ebl == NULL) + return false; + + return ebl->data_marker_symbol (sym, sname); +} diff --git a/libebl/eblcheckreloctargettype.c b/libebl/eblcheckreloctargettype.c index e0d57c14..068ad8f1 100644 --- a/libebl/eblcheckreloctargettype.c +++ b/libebl/eblcheckreloctargettype.c @@ -46,6 +46,7 @@ ebl_check_reloc_target_type (Ebl *ebl, Elf64_Word sh_type) case SHT_INIT_ARRAY: case SHT_FINI_ARRAY: case SHT_PREINIT_ARRAY: + case SHT_NOTE: return true; default: diff --git a/libebl/eblcorenotetypename.c b/libebl/eblcorenotetypename.c index fa81dbec..d3a56fa9 100644 --- a/libebl/eblcorenotetypename.c +++ b/libebl/eblcorenotetypename.c @@ -75,6 +75,7 @@ ebl_core_note_type_name (Ebl *ebl, uint32_t type, char *buf, size_t len) KNOWNSTYPE (PPC_VMX); KNOWNSTYPE (PPC_SPE); KNOWNSTYPE (PPC_VSX); + KNOWNSTYPE (PPC_TM_SPR); KNOWNSTYPE (386_TLS); KNOWNSTYPE (386_IOPERM); KNOWNSTYPE (X86_XSTATE); diff --git a/libebl/ebldynamictagname.c b/libebl/ebldynamictagname.c index 3aaccd0d..5622fc31 100644 --- a/libebl/ebldynamictagname.c +++ b/libebl/ebldynamictagname.c @@ -34,6 +34,7 @@ #include #include #include +#include "system.h" const char * @@ -53,8 +54,9 @@ ebl_dynamic_tag_name (Ebl *ebl, int64_t tag, char *buf, size_t len) "RELENT", "PLTREL", "DEBUG", "TEXTREL", "JMPREL", "BIND_NOW", "INIT_ARRAY", "FINI_ARRAY", "INIT_ARRAYSZ", "FINI_ARRAYSZ", "RUNPATH", "FLAGS", "ENCODING", "PREINIT_ARRAY", - "PREINIT_ARRAYSZ" + "PREINIT_ARRAYSZ", "SYMTAB_SHNDX" }; + eu_static_assert (sizeof (stdtags) / sizeof (const char *) == DT_NUM); res = stdtags[tag]; } diff --git a/libebl/eblobjnote.c b/libebl/eblobjnote.c index f80a1a57..ca4f155d 100644 --- a/libebl/eblobjnote.c +++ b/libebl/eblobjnote.c @@ -223,7 +223,7 @@ ebl_object_note (Ebl *ebl, const char *name, uint32_t type, free (buf); break; } - /* FALLTHROUGH */ + FALLTHROUGH; default: /* Unknown type. */ diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c index f3a65cfa..1962e608 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -1,5 +1,5 @@ /* Generate ELF backend handle. - Copyright (C) 2000-2016 Red Hat, Inc. + Copyright (C) 2000-2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -32,7 +32,6 @@ #include #include -#include #include #include #include @@ -134,6 +133,8 @@ static const struct { "xtensa", "elf_xtensa", "xtensa", 6, EM_XTENSA, 0, 0 }, { "aarch64", "elf_aarch64", "aarch64", 7, EM_AARCH64, ELFCLASS64, 0 }, { "bpf", "elf_bpf", "bpf", 3, EM_BPF, 0, 0 }, + { "riscv", "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS64, ELFDATA2LSB }, + { "riscv", "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS32, ELFDATA2LSB }, }; #define nmachines (sizeof (machines) / sizeof (machines[0])) @@ -184,6 +185,7 @@ static bool default_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr, const GElf_Sym *sym, const char *name, const GElf_Shdr *destshdr); +static bool default_data_marker_symbol (const GElf_Sym *sym, const char *sname); static bool default_check_st_other_bits (unsigned char st_other); static bool default_check_special_section (Ebl *, int, const GElf_Shdr *, const char *); @@ -235,6 +237,7 @@ fill_defaults (Ebl *result) result->none_reloc_p = default_none_reloc_p; result->relative_reloc_p = default_relative_reloc_p; result->check_special_symbol = default_check_special_symbol; + result->data_marker_symbol = default_data_marker_symbol; result->check_st_other_bits = default_check_st_other_bits; result->bss_plt_p = default_bss_plt_p; result->return_value_location = default_return_value_location; @@ -636,6 +639,13 @@ default_debugscn_p (const char *name) ".gdb_index", /* GNU/DWARF 5 extension/proposal */ ".debug_macro", + /* DWARF 5 */ + ".debug_addr", + ".debug_line_str", + ".debug_loclists", + ".debug_names", + ".debug_rnglists", + ".debug_str_offsets", /* SGI/MIPS DWARF 2 extensions */ ".debug_weaknames", ".debug_funcnames", @@ -671,6 +681,13 @@ default_check_special_symbol (Elf *elf __attribute__ ((unused)), return false; } +static bool +default_data_marker_symbol (const GElf_Sym *sym __attribute__ ((unused)), + const char *sname __attribute__ ((unused))) +{ + return false; +} + static bool default_check_st_other_bits (unsigned char st_other __attribute__ ((unused))) { diff --git a/libebl/libebl.h b/libebl/libebl.h index c8e01fe9..882bdb99 100644 --- a/libebl/libebl.h +++ b/libebl/libebl.h @@ -1,5 +1,5 @@ /* Interface for libebl. - Copyright (C) 2000-2010, 2013, 2014, 2015, 2016 Red Hat, Inc. + Copyright (C) 2000-2010, 2013, 2014, 2015, 2016, 2017 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -73,13 +73,13 @@ extern void ebl_closebackend (Ebl *bh); /* Information about the descriptor. */ /* Get ELF machine. */ -extern int ebl_get_elfmachine (Ebl *ebl) __attribute__ ((__pure__)); +extern int ebl_get_elfmachine (Ebl *ebl) __pure_attribute__; /* Get ELF class. */ -extern int ebl_get_elfclass (Ebl *ebl) __attribute__ ((__pure__)); +extern int ebl_get_elfclass (Ebl *ebl) __pure_attribute__; /* Get ELF data encoding. */ -extern int ebl_get_elfdata (Ebl *ebl) __attribute__ ((__pure__)); +extern int ebl_get_elfdata (Ebl *ebl) __pure_attribute__; /* Function to call the callback functions including default ELF @@ -156,6 +156,10 @@ extern bool ebl_check_special_symbol (Ebl *ebl, GElf_Ehdr *ehdr, const GElf_Sym *sym, const char *name, const GElf_Shdr *destshdr); +/* Check if this is a data marker symbol. e.g. '$d' symbols for ARM. */ +extern bool ebl_data_marker_symbol (Ebl *ebl, const GElf_Sym *sym, + const char *sname); + /* Check whether only valid bits are set on the st_other symbol flag. */ extern bool ebl_check_st_other_bits (Ebl *ebl, unsigned char st_other); diff --git a/libelf/ChangeLog b/libelf/ChangeLog index 8539cb56..7c884b00 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,118 @@ +2018-08-18 Mark Wielaard + + * libelf.h (elf_compress_gnu): Add documentation about + interaction between SHF_COMPRESED and elf_compress_gnu. + * elf_compress_gnu.c (elf_compress_gnu): Return error if section + sh_flags has SHF_COMPRESSED set. + +2018-07-27 Mark Wielaard + + * libelf.h (elf_getshdrstrndx): Fix documentation. + (elf_getshstrndx): Likewise. + +2018-06-19 Mark Wielaard + + * libelfP.h (__libelf_type_align): Remove !ALLOW_UNALIGNED guard. + * elf_getdata.c (__libelf_type_aligns): Likewise. + (convert_data): Remove ALLOW_UNALIGNED check. + * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Likewise. + +2018-06-21 Mark Wielaard + + * elf.h: Update from glibc. + +2018-04-19 Andreas Schwab + + * elf.h: Update from glibc. + +2018-02-16 Mark Wielaard + + * elf.h: Update from glibc. + +2018-02-09 Joshua Watt + + * elf32_updatenull.c (updatenull_wrlock): Use FALLTHROUGH macro + instead of comment. + * elf_begin.c (read_unmmaped_file): Likewise. + (elf_begin): Likewise. + * elf_cntl.c (elf_cntl): Likewise. + +2017-10-04 Mark Wielaard + + * elf_begin.c (file_read_elf): Skip sanity checking e_shoff if scncnt + is zero, we won't use it then. + +2017-10-04 Mark Wielaard + + * libelfP.h: Add ELF_E_INVALID_ELF to error values enum. + * elf_error.c (ELF_E_INVALID_ELF_IDX): New define. Use it as value + for ELF_E_INVALID_ELF in msgidx. + * elf_getshdrstrndx.c (elf_getshdrstrndx): Distinquish between pread + failing and not having enough data. + * elf_begin.c (get_shnum): Likewise. Explicitly set libelf errno on + too large value. + (file_read_elf): Make sure to always set libelf errno when returning + NULL. Distinquish between i/o file and elf data errors. + +2017-08-18 Ulf Hermann + + * gelf_xlate.c: Use attribute_packed. + +2017-04-27 Ulf Hermann + + * libelfP.h: Use attribute_hidden. + +2017-04-27 Ulf Hermann + + * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS. + +2017-08-15 Mark Wielaard + + * elf.h: Update from glibc. Add new powerpc note descriptors. + +2017-07-19 Gustavo Romero + + * elf.h: Add known type in notes segment descriptor for HTM SPRs. + +2017-02-17 Ulf hermann + + * Makefile.am: Add libelf_so_DEPS, which include libeu.a, + libelf_so_LIBS. + (libelf_so_LDLIBS): Add $(libelf_so_DEPS). + (libelf.so$(EXEEXT): Use $(libelf_so_LIBS), require libelf.map + from the right directory. + +2017-04-20 Ulf Hermann + + * libelfP.h: Don't include config.h. + +2017-04-20 Ulf Hermann + + * elf_begin.c: Use F_GETFD rather than F_GETFL. + +2017-04-20 Ulf Hermann + + * libelf.h: Define macros for various function attributes and use + them. + +2017-04-20 Ulf Hermann + + * elf_update.c: Set ELF_F_MMAPPED flag if we mmap from elf_update. + +2017-04-19 Mark Wielaard + + * elf_getarsym.c (elf_getarsym): Initialize n to zero. + +2017-03-27 Mark Wielaard + + * elf32_updatefile.c (updatemmap): Always update last_positition. + (updatefile): Likewise. + +2017-03-24 Mark Wielaard + + * elf_compress.c (__libelf_decompress): Check insane compression + ratios before trying to allocate output buffer. + 2016-10-11 Akihiko Odaki Mark Wielaard diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 167a8322..ddaeaa2b 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -29,7 +29,7 @@ ## include $(top_srcdir)/config/eu.am if BUILD_STATIC -AM_CFLAGS += -fPIC +AM_CFLAGS += $(fpic_CFLAGS) endif GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) VERSION = 1 @@ -95,16 +95,20 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \ libelf_pic_a_SOURCES = am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os) -libelf_so_LDLIBS = -lz +libelf_so_DEPS = ../lib/libeu.a +libelf_so_LDLIBS = $(libelf_so_DEPS) -lz if USE_LOCKS libelf_so_LDLIBS += -lpthread endif +libelf_so_LIBS = libelf_pic.a libelf_so_SOURCES = -libelf.so$(EXEEXT): libelf_pic.a libelf.map - $(AM_V_CCLD)$(LINK) -shared -o $@ -Wl,--whole-archive,$<,--no-whole-archive \ - -Wl,--version-script,$(srcdir)/libelf.map,--no-undefined \ - -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro $(libelf_so_LDLIBS) +libelf.so$(EXEEXT): $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS) + $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \ + -Wl,--soname,$@.$(VERSION) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(libelf_so_LIBS) -Wl,--no-whole-archive \ + $(libelf_so_LDLIBS) @$(textrel_check) $(AM_V_at)ln -fs $@ $@.$(VERSION) diff --git a/libelf/elf.h b/libelf/elf.h index b6112d9d..75043bcb 100644 --- a/libelf/elf.h +++ b/libelf/elf.h @@ -1,5 +1,5 @@ /* This file defines standard ELF types, structures, and macros. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -739,6 +739,8 @@ typedef struct /* Legal values for note segment descriptor types for core files. */ #define NT_PRSTATUS 1 /* Contains copy of prstatus struct */ +#define NT_PRFPREG 2 /* Contains copy of fpregset + struct. */ #define NT_FPREGSET 2 /* Contains copy of fpregset struct */ #define NT_PRPSINFO 3 /* Contains copy of prpsinfo struct */ #define NT_PRXREG 4 /* Contains copy of prxregset struct */ @@ -762,6 +764,24 @@ typedef struct #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ #define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */ #define NT_PPC_VSX 0x102 /* PowerPC VSX registers */ +#define NT_PPC_TAR 0x103 /* Target Address Register */ +#define NT_PPC_PPR 0x104 /* Program Priority Register */ +#define NT_PPC_DSCR 0x105 /* Data Stream Control Register */ +#define NT_PPC_EBB 0x106 /* Event Based Branch Registers */ +#define NT_PPC_PMU 0x107 /* Performance Monitor Registers */ +#define NT_PPC_TM_CGPR 0x108 /* TM checkpointed GPR Registers */ +#define NT_PPC_TM_CFPR 0x109 /* TM checkpointed FPR Registers */ +#define NT_PPC_TM_CVMX 0x10a /* TM checkpointed VMX Registers */ +#define NT_PPC_TM_CVSX 0x10b /* TM checkpointed VSX Registers */ +#define NT_PPC_TM_SPR 0x10c /* TM Special Purpose Registers */ +#define NT_PPC_TM_CTAR 0x10d /* TM checkpointed Target Address + Register */ +#define NT_PPC_TM_CPPR 0x10e /* TM checkpointed Program Priority + Register */ +#define NT_PPC_TM_CDSCR 0x10f /* TM checkpointed Data Stream Control + Register */ +#define NT_PPC_PKEY 0x110 /* Memory Protection Keys + registers. */ #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ #define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */ #define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */ @@ -774,11 +794,20 @@ typedef struct #define NT_S390_LAST_BREAK 0x306 /* s390 breaking event address */ #define NT_S390_SYSTEM_CALL 0x307 /* s390 system call restart data */ #define NT_S390_TDB 0x308 /* s390 transaction diagnostic block */ +#define NT_S390_VXRS_LOW 0x309 /* s390 vector registers 0-15 + upper half. */ +#define NT_S390_VXRS_HIGH 0x30a /* s390 vector registers 16-31. */ +#define NT_S390_GS_CB 0x30b /* s390 guarded storage registers. */ +#define NT_S390_GS_BC 0x30c /* s390 guarded storage + broadcast control block. */ +#define NT_S390_RI_CB 0x30d /* s390 runtime instrumentation. */ #define NT_ARM_VFP 0x400 /* ARM VFP/NEON registers */ #define NT_ARM_TLS 0x401 /* ARM TLS register */ #define NT_ARM_HW_BREAK 0x402 /* ARM hardware breakpoint registers */ #define NT_ARM_HW_WATCH 0x403 /* ARM hardware watchpoint registers */ #define NT_ARM_SYSTEM_CALL 0x404 /* ARM system call number */ +#define NT_ARM_SVE 0x405 /* ARM Scalable Vector Extension + registers */ /* Legal values for the note segment descriptor types for object files. */ @@ -843,7 +872,8 @@ typedef struct #define DT_ENCODING 32 /* Start of encoded range */ #define DT_PREINIT_ARRAY 32 /* Array with addresses of preinit fct*/ #define DT_PREINIT_ARRAYSZ 33 /* size in bytes of DT_PREINIT_ARRAY */ -#define DT_NUM 34 /* Number used */ +#define DT_SYMTAB_SHNDX 34 /* Address of SYMTAB_SHNDX section */ +#define DT_NUM 35 /* Number used */ #define DT_LOOS 0x6000000d /* Start of OS-specific */ #define DT_HIOS 0x6ffff000 /* End of OS-specific */ #define DT_LOPROC 0x70000000 /* Start of processor-specific */ @@ -951,6 +981,8 @@ typedef struct #define DF_1_SYMINTPOSE 0x00800000 /* Object has individual interposers. */ #define DF_1_GLOBAUDIT 0x01000000 /* Global auditing required. */ #define DF_1_SINGLETON 0x02000000 /* Singleton symbols are used. */ +#define DF_1_STUB 0x04000000 +#define DF_1_PIE 0x08000000 /* Flags for the feature selection in DT_FEATURE_1. */ #define DTF_1_PARINIT 0x00000001 @@ -1170,6 +1202,18 @@ typedef struct #define AT_L2_CACHESHAPE 36 #define AT_L3_CACHESHAPE 37 +/* Shapes of the caches, with more room to describe them. + *GEOMETRY are comprised of cache line size in bytes in the bottom 16 bits + and the cache associativity in the next 16 bits. */ +#define AT_L1I_CACHESIZE 40 +#define AT_L1I_CACHEGEOMETRY 41 +#define AT_L1D_CACHESIZE 42 +#define AT_L1D_CACHEGEOMETRY 43 +#define AT_L2_CACHESIZE 44 +#define AT_L2_CACHEGEOMETRY 45 +#define AT_L3_CACHESIZE 46 +#define AT_L3_CACHEGEOMETRY 47 + /* Note section contents. Each entry in the note section begins with a header of a fixed form. */ @@ -1235,6 +1279,62 @@ typedef struct /* Version note generated by GNU gold containing a version string. */ #define NT_GNU_GOLD_VERSION 4 +/* Program property. */ +#define NT_GNU_PROPERTY_TYPE_0 5 + +/* Note section name of program property. */ +#define NOTE_GNU_PROPERTY_SECTION_NAME ".note.gnu.property" + +/* Values used in GNU .note.gnu.property notes (NT_GNU_PROPERTY_TYPE_0). */ + +/* Stack size. */ +#define GNU_PROPERTY_STACK_SIZE 1 +/* No copy relocation on protected data symbol. */ +#define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2 + +/* Processor-specific semantics, lo */ +#define GNU_PROPERTY_LOPROC 0xc0000000 +/* Processor-specific semantics, hi */ +#define GNU_PROPERTY_HIPROC 0xdfffffff +/* Application-specific semantics, lo */ +#define GNU_PROPERTY_LOUSER 0xe0000000 +/* Application-specific semantics, hi */ +#define GNU_PROPERTY_HIUSER 0xffffffff + +/* The x86 instruction sets indicated by the corresponding bits are + used in program. Their support in the hardware is optional. */ +#define GNU_PROPERTY_X86_ISA_1_USED 0xc0000000 +/* The x86 instruction sets indicated by the corresponding bits are + used in program and they must be supported by the hardware. */ +#define GNU_PROPERTY_X86_ISA_1_NEEDED 0xc0000001 +/* X86 processor-specific features used in program. */ +#define GNU_PROPERTY_X86_FEATURE_1_AND 0xc0000002 + +#define GNU_PROPERTY_X86_ISA_1_486 (1U << 0) +#define GNU_PROPERTY_X86_ISA_1_586 (1U << 1) +#define GNU_PROPERTY_X86_ISA_1_686 (1U << 2) +#define GNU_PROPERTY_X86_ISA_1_SSE (1U << 3) +#define GNU_PROPERTY_X86_ISA_1_SSE2 (1U << 4) +#define GNU_PROPERTY_X86_ISA_1_SSE3 (1U << 5) +#define GNU_PROPERTY_X86_ISA_1_SSSE3 (1U << 6) +#define GNU_PROPERTY_X86_ISA_1_SSE4_1 (1U << 7) +#define GNU_PROPERTY_X86_ISA_1_SSE4_2 (1U << 8) +#define GNU_PROPERTY_X86_ISA_1_AVX (1U << 9) +#define GNU_PROPERTY_X86_ISA_1_AVX2 (1U << 10) +#define GNU_PROPERTY_X86_ISA_1_AVX512F (1U << 11) +#define GNU_PROPERTY_X86_ISA_1_AVX512CD (1U << 12) +#define GNU_PROPERTY_X86_ISA_1_AVX512ER (1U << 13) +#define GNU_PROPERTY_X86_ISA_1_AVX512PF (1U << 14) +#define GNU_PROPERTY_X86_ISA_1_AVX512VL (1U << 15) +#define GNU_PROPERTY_X86_ISA_1_AVX512DQ (1U << 16) +#define GNU_PROPERTY_X86_ISA_1_AVX512BW (1U << 17) + +/* This indicates that all executable sections are compatible with + IBT. */ +#define GNU_PROPERTY_X86_FEATURE_1_IBT (1U << 0) +/* This indicates that all executable sections are compatible with + SHSTK. */ +#define GNU_PROPERTY_X86_FEATURE_1_SHSTK (1U << 1) /* Move records. */ typedef struct @@ -2532,9 +2632,10 @@ enum #define DT_PPC64_OPT (DT_LOPROC + 3) #define DT_PPC64_NUM 4 -/* PowerPC64 specific values for the DT_PPC64_OPT Dyn entry. */ +/* PowerPC64 specific bits in the DT_PPC64_OPT Dyn entry. */ #define PPC64_OPT_TLS 1 #define PPC64_OPT_MULTI_TOC 2 +#define PPC64_OPT_LOCALENTRY 4 /* PowerPC64 specific values for the Elf64_Sym st_other field. */ #define STO_PPC64_LOCAL_BIT 5 @@ -3268,6 +3369,9 @@ enum relaxable. */ #define R_X86_64_NUM 43 +/* x86-64 sh_type values. */ +#define SHT_X86_64_UNWIND 0x70000001 /* Unwind information. */ + /* AM33 relocations. */ #define R_MN10300_NONE 0 /* No reloc. */ @@ -3677,10 +3781,139 @@ enum #define R_TILEGX_NUM 130 +/* RISC-V ELF Flags */ +#define EF_RISCV_RVC 0x0001 +#define EF_RISCV_FLOAT_ABI 0x0006 +#define EF_RISCV_FLOAT_ABI_SOFT 0x0000 +#define EF_RISCV_FLOAT_ABI_SINGLE 0x0002 +#define EF_RISCV_FLOAT_ABI_DOUBLE 0x0004 +#define EF_RISCV_FLOAT_ABI_QUAD 0x0006 + +/* RISC-V relocations. */ +#define R_RISCV_NONE 0 +#define R_RISCV_32 1 +#define R_RISCV_64 2 +#define R_RISCV_RELATIVE 3 +#define R_RISCV_COPY 4 +#define R_RISCV_JUMP_SLOT 5 +#define R_RISCV_TLS_DTPMOD32 6 +#define R_RISCV_TLS_DTPMOD64 7 +#define R_RISCV_TLS_DTPREL32 8 +#define R_RISCV_TLS_DTPREL64 9 +#define R_RISCV_TLS_TPREL32 10 +#define R_RISCV_TLS_TPREL64 11 +#define R_RISCV_BRANCH 16 +#define R_RISCV_JAL 17 +#define R_RISCV_CALL 18 +#define R_RISCV_CALL_PLT 19 +#define R_RISCV_GOT_HI20 20 +#define R_RISCV_TLS_GOT_HI20 21 +#define R_RISCV_TLS_GD_HI20 22 +#define R_RISCV_PCREL_HI20 23 +#define R_RISCV_PCREL_LO12_I 24 +#define R_RISCV_PCREL_LO12_S 25 +#define R_RISCV_HI20 26 +#define R_RISCV_LO12_I 27 +#define R_RISCV_LO12_S 28 +#define R_RISCV_TPREL_HI20 29 +#define R_RISCV_TPREL_LO12_I 30 +#define R_RISCV_TPREL_LO12_S 31 +#define R_RISCV_TPREL_ADD 32 +#define R_RISCV_ADD8 33 +#define R_RISCV_ADD16 34 +#define R_RISCV_ADD32 35 +#define R_RISCV_ADD64 36 +#define R_RISCV_SUB8 37 +#define R_RISCV_SUB16 38 +#define R_RISCV_SUB32 39 +#define R_RISCV_SUB64 40 +#define R_RISCV_GNU_VTINHERIT 41 +#define R_RISCV_GNU_VTENTRY 42 +#define R_RISCV_ALIGN 43 +#define R_RISCV_RVC_BRANCH 44 +#define R_RISCV_RVC_JUMP 45 +#define R_RISCV_RVC_LUI 46 +#define R_RISCV_GPREL_I 47 +#define R_RISCV_GPREL_S 48 +#define R_RISCV_TPREL_I 49 +#define R_RISCV_TPREL_S 50 +#define R_RISCV_RELAX 51 +#define R_RISCV_SUB6 52 +#define R_RISCV_SET6 53 +#define R_RISCV_SET8 54 +#define R_RISCV_SET16 55 +#define R_RISCV_SET32 56 +#define R_RISCV_32_PCREL 57 + +#define R_RISCV_NUM 58 + /* BPF specific declarations. */ #define R_BPF_NONE 0 /* No reloc */ -#define R_BPF_MAP_FD 1 /* Map fd to pointer */ +#define R_BPF_64_64 1 +#define R_BPF_64_32 10 + +/* Imagination Meta specific relocations. */ + +#define R_METAG_HIADDR16 0 +#define R_METAG_LOADDR16 1 +#define R_METAG_ADDR32 2 /* 32bit absolute address */ +#define R_METAG_NONE 3 /* No reloc */ +#define R_METAG_RELBRANCH 4 +#define R_METAG_GETSETOFF 5 + +/* Backward compatability */ +#define R_METAG_REG32OP1 6 +#define R_METAG_REG32OP2 7 +#define R_METAG_REG32OP3 8 +#define R_METAG_REG16OP1 9 +#define R_METAG_REG16OP2 10 +#define R_METAG_REG16OP3 11 +#define R_METAG_REG32OP4 12 + +#define R_METAG_HIOG 13 +#define R_METAG_LOOG 14 + +#define R_METAG_REL8 15 +#define R_METAG_REL16 16 + +/* GNU */ +#define R_METAG_GNU_VTINHERIT 30 +#define R_METAG_GNU_VTENTRY 31 + +/* PIC relocations */ +#define R_METAG_HI16_GOTOFF 32 +#define R_METAG_LO16_GOTOFF 33 +#define R_METAG_GETSET_GOTOFF 34 +#define R_METAG_GETSET_GOT 35 +#define R_METAG_HI16_GOTPC 36 +#define R_METAG_LO16_GOTPC 37 +#define R_METAG_HI16_PLT 38 +#define R_METAG_LO16_PLT 39 +#define R_METAG_RELBRANCH_PLT 40 +#define R_METAG_GOTOFF 41 +#define R_METAG_PLT 42 +#define R_METAG_COPY 43 +#define R_METAG_JMP_SLOT 44 +#define R_METAG_RELATIVE 45 +#define R_METAG_GLOB_DAT 46 + +/* TLS relocations */ +#define R_METAG_TLS_GD 47 +#define R_METAG_TLS_LDM 48 +#define R_METAG_TLS_LDO_HI16 49 +#define R_METAG_TLS_LDO_LO16 50 +#define R_METAG_TLS_LDO 51 +#define R_METAG_TLS_IE 52 +#define R_METAG_TLS_IENONPIC 53 +#define R_METAG_TLS_IENONPIC_HI16 54 +#define R_METAG_TLS_IENONPIC_LO16 55 +#define R_METAG_TLS_TPOFF 56 +#define R_METAG_TLS_DTPMOD 57 +#define R_METAG_TLS_DTPOFF 58 +#define R_METAG_TLS_LE 59 +#define R_METAG_TLS_LE_HI16 60 +#define R_METAG_TLS_LE_LO16 61 __END_DECLS diff --git a/libelf/elf32_updatefile.c b/libelf/elf32_updatefile.c index 8dd85d1a..7ac99510 100644 --- a/libelf/elf32_updatefile.c +++ b/libelf/elf32_updatefile.c @@ -343,9 +343,10 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) { fill_mmap (dl->data.d.d_off, last_position, scn_start, shdr_start, shdr_end); - last_position = scn_start + dl->data.d.d_off; } + last_position = scn_start + dl->data.d.d_off; + if ((scn->flags | dl->flags | elf->flags) & ELF_F_DIRTY) { /* Let it go backward if the sections use a bogus @@ -353,8 +354,6 @@ __elfw2(LIBELFBITS,updatemmap) (Elf *elf, int change_bo, size_t shnum) user's section data with the latest one, rather than crashing. */ - last_position = scn_start + dl->data.d.d_off; - if (unlikely (change_bo)) { #if EV_NUM != 2 @@ -728,6 +727,8 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) } } + last_offset = scn_start + dl->data.d.d_off; + if ((scn->flags | dl->flags | elf->flags) & ELF_F_DIRTY) { char tmpbuf[MAX_TMPBUF]; @@ -738,8 +739,6 @@ __elfw2(LIBELFBITS,updatefile) (Elf *elf, int change_bo, size_t shnum) user's section data with the latest one, rather than crashing. */ - last_offset = scn_start + dl->data.d.d_off; - if (unlikely (change_bo)) { #if EV_NUM != 2 diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c index d83c0b3f..3e9ef61b 100644 --- a/libelf/elf32_updatenull.c +++ b/libelf/elf32_updatenull.c @@ -232,7 +232,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) __libelf_seterrno (ELF_E_GROUP_NOT_REL); return -1; } - /* FALLTHROUGH */ + FALLTHROUGH; case SHT_SYMTAB_SHNDX: sh_entsize = elf_typesize (32, ELF_T_WORD, 1); break; diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 5e9099c2..b20ab4f3 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -158,6 +158,7 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, else { Elf32_Word size; + ssize_t r; if (likely (map_address != NULL)) /* gcc will optimize the memcpy to a simple memory @@ -167,11 +168,19 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, + offset))->sh_size, sizeof (Elf32_Word)); else - if (unlikely (pread_retry (fildes, &size, sizeof (Elf32_Word), - offset + ehdr.e32->e_shoff - + offsetof (Elf32_Shdr, sh_size)) + if (unlikely ((r = pread_retry (fildes, &size, + sizeof (Elf32_Word), + offset + ehdr.e32->e_shoff + + offsetof (Elf32_Shdr, + sh_size))) != sizeof (Elf32_Word))) - return (size_t) -1l; + { + if (r < 0) + __libelf_seterrno (ELF_E_INVALID_FILE); + else + __libelf_seterrno (ELF_E_INVALID_ELF); + return (size_t) -1l; + } if (e_ident[EI_DATA] != MY_ELFDATA) CONVERT (size); @@ -207,6 +216,7 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, + offset))->sh_size; else { + ssize_t r; if (likely (map_address != NULL)) /* gcc will optimize the memcpy to a simple memory access while taking care of alignment issues. */ @@ -215,19 +225,30 @@ get_shnum (void *map_address, unsigned char *e_ident, int fildes, off_t offset, + offset))->sh_size, sizeof (Elf64_Xword)); else - if (unlikely (pread_retry (fildes, &size, sizeof (Elf64_Xword), - offset + ehdr.e64->e_shoff - + offsetof (Elf64_Shdr, sh_size)) + if (unlikely ((r = pread_retry (fildes, &size, + sizeof (Elf64_Xword), + offset + ehdr.e64->e_shoff + + offsetof (Elf64_Shdr, + sh_size))) != sizeof (Elf64_Xword))) - return (size_t) -1l; + { + if (r < 0) + __libelf_seterrno (ELF_E_INVALID_FILE); + else + __libelf_seterrno (ELF_E_INVALID_ELF); + return (size_t) -1l; + } if (e_ident[EI_DATA] != MY_ELFDATA) CONVERT (size); } if (size > ~((GElf_Word) 0)) - /* Invalid value, it is too large. */ - return (size_t) -1l; + { + /* Invalid value, it is too large. */ + __libelf_seterrno (ELF_E_INVALID_ELF); + return (size_t) -1l; + } result = size; } @@ -255,11 +276,13 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, && e_ident[EI_DATA] != ELFDATA2MSB))) { /* Cannot handle this. */ - __libelf_seterrno (ELF_E_INVALID_FILE); + __libelf_seterrno (ELF_E_INVALID_ELF); return NULL; } - /* Determine the number of sections. */ + /* Determine the number of sections. Returns -1 and sets libelf errno + if the file handle or elf file is invalid. Returns zero if there + are no section headers (or they cannot be read). */ size_t scncnt = get_shnum (map_address, e_ident, fildes, offset, maxsize); if (scncnt == (size_t) -1l) /* Could not determine the number of sections. */ @@ -269,10 +292,16 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, if (e_ident[EI_CLASS] == ELFCLASS32) { if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf32_Shdr))) - return NULL; + { + __libelf_seterrno (ELF_E_INVALID_ELF); + return NULL; + } } else if (scncnt > SIZE_MAX / (sizeof (Elf_Scn) + sizeof (Elf64_Shdr))) - return NULL; + { + __libelf_seterrno (ELF_E_INVALID_ELF); + return NULL; + } /* We can now allocate the memory. Even if there are no section headers, we allocate space for a zeroth section in case we need it later. */ @@ -281,7 +310,7 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, Elf *elf = allocate_elf (fildes, map_address, offset, maxsize, cmd, parent, ELF_K_ELF, scnmax * sizeof (Elf_Scn)); if (elf == NULL) - /* Not enough memory. */ + /* Not enough memory. allocate_elf will have set libelf errno. */ return NULL; assert ((unsigned int) scncnt == scncnt); @@ -344,13 +373,13 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, || (((uintptr_t) ((char *) ehdr + e_shoff) & (__alignof__ (Elf32_Shdr) - 1)) == 0))) { - if (unlikely (e_shoff >= maxsize) + if (unlikely (scncnt > 0 && e_shoff >= maxsize) || unlikely (maxsize - e_shoff < scncnt * sizeof (Elf32_Shdr))) { free_and_out: free (elf); - __libelf_seterrno (ELF_E_INVALID_FILE); + __libelf_seterrno (ELF_E_INVALID_ELF); return NULL; } elf->state.elf32.shdr @@ -446,7 +475,7 @@ file_read_elf (int fildes, void *map_address, unsigned char *e_ident, || (((uintptr_t) ((char *) ehdr + e_shoff) & (__alignof__ (Elf64_Shdr) - 1)) == 0))) { - if (unlikely (e_shoff >= maxsize) + if (unlikely (scncnt > 0 && e_shoff >= maxsize) || unlikely (maxsize - e_shoff < scncnt * sizeof (Elf64_Shdr))) goto free_and_out; @@ -582,7 +611,7 @@ read_unmmaped_file (int fildes, off_t offset, size_t maxsize, Elf_Cmd cmd, ? sizeof (Elf32_Ehdr) : sizeof (Elf64_Ehdr))) return file_read_elf (fildes, NULL, mem.header, offset, maxsize, cmd, parent); - /* FALLTHROUGH */ + FALLTHROUGH; default: break; @@ -1075,7 +1104,7 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref) if (ref != NULL) /* Make sure the descriptor is not suddenly going away. */ rwlock_rdlock (ref->lock); - else if (unlikely (fcntl (fildes, F_GETFL) == -1 && errno == EBADF)) + else if (unlikely (fcntl (fildes, F_GETFD) == -1 && errno == EBADF)) { /* We cannot do anything productive without a file descriptor. */ __libelf_seterrno (ELF_E_INVALID_FILE); @@ -1097,7 +1126,7 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref) retval = NULL; break; } - /* FALLTHROUGH */ + FALLTHROUGH; case ELF_C_READ: case ELF_C_READ_MMAP: diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c index ab13ffb6..fd681789 100644 --- a/libelf/elf_cntl.c +++ b/libelf/elf_cntl.c @@ -62,7 +62,7 @@ elf_cntl (Elf *elf, Elf_Cmd cmd) result = -1; break; } - /* FALLTHROUGH */ + FALLTHROUGH; case ELF_C_FDDONE: /* Mark the file descriptor as not usable. */ diff --git a/libelf/elf_compress.c b/libelf/elf_compress.c index dac0ac6d..711be591 100644 --- a/libelf/elf_compress.c +++ b/libelf/elf_compress.c @@ -211,6 +211,15 @@ void * internal_function __libelf_decompress (void *buf_in, size_t size_in, size_t size_out) { + /* Catch highly unlikely compression ratios so we don't allocate + some giant amount of memory for nothing. The max compression + factor 1032:1 comes from http://www.zlib.net/zlib_tech.html */ + if (unlikely (size_out / 1032 > size_in)) + { + __libelf_seterrno (ELF_E_INVALID_DATA); + return NULL; + } + void *buf_out = malloc (size_out); if (unlikely (buf_out == NULL)) { diff --git a/libelf/elf_compress_gnu.c b/libelf/elf_compress_gnu.c index c35dc395..dfa7c571 100644 --- a/libelf/elf_compress_gnu.c +++ b/libelf/elf_compress_gnu.c @@ -80,7 +80,9 @@ elf_compress_gnu (Elf_Scn *scn, int inflate, unsigned int flags) sh_addralign = shdr->sh_addralign; } - if ((sh_flags & SHF_ALLOC) != 0) + /* Allocated sections, or sections that are already are compressed + cannot (also) be GNU compressed. */ + if ((sh_flags & SHF_ALLOC) != 0 || (sh_flags & SHF_COMPRESSED)) { __libelf_seterrno (ELF_E_INVALID_SECTION_FLAGS); return -1; diff --git a/libelf/elf_error.c b/libelf/elf_error.c index 888b389a..5364e685 100644 --- a/libelf/elf_error.c +++ b/libelf/elf_error.c @@ -94,8 +94,12 @@ static const char msgstr[] = (ELF_E_NOMEM_IDX + sizeof "out of memory") N_("invalid file descriptor") "\0" -#define ELF_E_INVALID_OP_IDX \ +#define ELF_E_INVALID_ELF_IDX \ (ELF_E_INVALID_FILE_IDX + sizeof "invalid file descriptor") + N_("invalid ELF file data") + "\0" +#define ELF_E_INVALID_OP_IDX \ + (ELF_E_INVALID_ELF_IDX + sizeof "invalid ELF file data") N_("invalid operation") "\0" #define ELF_E_NO_VERSION_IDX \ @@ -280,6 +284,7 @@ static const uint_fast16_t msgidx[ELF_E_NUM] = [ELF_E_INVALID_ENCODING] = ELF_E_INVALID_ENCODING_IDX, [ELF_E_NOMEM] = ELF_E_NOMEM_IDX, [ELF_E_INVALID_FILE] = ELF_E_INVALID_FILE_IDX, + [ELF_E_INVALID_ELF] = ELF_E_INVALID_ELF_IDX, [ELF_E_INVALID_OP] = ELF_E_INVALID_OP_IDX, [ELF_E_NO_VERSION] = ELF_E_NO_VERSION_IDX, [ELF_E_INVALID_CMD] = ELF_E_INVALID_CMD_IDX, diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c index d5f0ba43..1f031fca 100644 --- a/libelf/elf_getarsym.c +++ b/libelf/elf_getarsym.c @@ -167,7 +167,7 @@ elf_getarsym (Elf *elf, size_t *ptr) /* We have an archive. The first word in there is the number of entries in the table. */ - uint64_t n; + uint64_t n = 0; size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr); if (read_number_entries (&n, elf, &off, index64_p) < 0) { diff --git a/libelf/elf_getdata.c b/libelf/elf_getdata.c index 97c503b5..278dfa8f 100644 --- a/libelf/elf_getdata.c +++ b/libelf/elf_getdata.c @@ -76,7 +76,6 @@ static const Elf_Type shtype_map[EV_NUM - 1][TYPEIDX (SHT_HISUNW) + 1] = } }; -#if !ALLOW_UNALIGNED /* Associate libelf types with their internal alignment requirements. */ const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] = { @@ -115,7 +114,6 @@ const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] } # undef TYPE_ALIGNS }; -#endif Elf_Type @@ -173,8 +171,7 @@ convert_data (Elf_Scn *scn, int version __attribute__ ((unused)), int eclass, /* Make sure the source is correctly aligned for the conversion function to directly access the data elements. */ char *rawdata_source; - if (ALLOW_UNALIGNED || - ((((size_t) (char *) scn->rawdata_base)) & (align - 1)) == 0) + if (((((size_t) (char *) scn->rawdata_base)) & (align - 1)) == 0) rawdata_source = scn->rawdata_base; else { diff --git a/libelf/elf_getdata_rawchunk.c b/libelf/elf_getdata_rawchunk.c index 31b2fe7d..d0c0b75f 100644 --- a/libelf/elf_getdata_rawchunk.c +++ b/libelf/elf_getdata_rawchunk.c @@ -80,8 +80,7 @@ elf_getdata_rawchunk (Elf *elf, off_t offset, size_t size, Elf_Type type) { /* If the file is mmap'ed we can use it directly, if aligned for type. */ char *rawdata = elf->map_address + elf->start_offset + offset; - if (ALLOW_UNALIGNED || - ((uintptr_t) rawdata & (align - 1)) == 0) + if (((uintptr_t) rawdata & (align - 1)) == 0) rawchunk = rawdata; else { diff --git a/libelf/elf_getshdrstrndx.c b/libelf/elf_getshdrstrndx.c index aead2fe5..ad884fd3 100644 --- a/libelf/elf_getshdrstrndx.c +++ b/libelf/elf_getshdrstrndx.c @@ -133,13 +133,17 @@ elf_getshdrstrndx (Elf *elf, size_t *dst) /* We avoid reading in all the section headers. Just read the first one. */ Elf32_Shdr shdr_mem; + ssize_t r; - if (unlikely (pread_retry (elf->fildes, &shdr_mem, - sizeof (Elf32_Shdr), offset) + if (unlikely ((r = pread_retry (elf->fildes, &shdr_mem, + sizeof (Elf32_Shdr), offset)) != sizeof (Elf32_Shdr))) { /* We must be able to read this ELF section header. */ - __libelf_seterrno (ELF_E_INVALID_FILE); + if (r < 0) + __libelf_seterrno (ELF_E_INVALID_FILE); + else + __libelf_seterrno (ELF_E_INVALID_ELF); result = -1; goto out; } @@ -194,13 +198,17 @@ elf_getshdrstrndx (Elf *elf, size_t *dst) /* We avoid reading in all the section headers. Just read the first one. */ Elf64_Shdr shdr_mem; + ssize_t r; - if (unlikely (pread_retry (elf->fildes, &shdr_mem, - sizeof (Elf64_Shdr), offset) + if (unlikely ((r = pread_retry (elf->fildes, &shdr_mem, + sizeof (Elf64_Shdr), offset)) != sizeof (Elf64_Shdr))) { /* We must be able to read this ELF section header. */ - __libelf_seterrno (ELF_E_INVALID_FILE); + if (r < 0) + __libelf_seterrno (ELF_E_INVALID_FILE); + else + __libelf_seterrno (ELF_E_INVALID_ELF); result = -1; goto out; } diff --git a/libelf/elf_update.c b/libelf/elf_update.c index c635eb32..8ce07829 100644 --- a/libelf/elf_update.c +++ b/libelf/elf_update.c @@ -74,6 +74,8 @@ write_file (Elf *elf, off_t size, int change_bo, size_t shnum) MAP_SHARED, elf->fildes, 0); if (unlikely (elf->map_address == MAP_FAILED)) elf->map_address = NULL; + else + elf->flags |= ELF_F_MMAPPED; } if (elf->map_address != NULL) diff --git a/libelf/gelf_xlate.c b/libelf/gelf_xlate.c index f3d3b7a0..479f1436 100644 --- a/libelf/gelf_xlate.c +++ b/libelf/gelf_xlate.c @@ -74,7 +74,7 @@ union unaligned uint16_t u16; uint32_t u32; uint64_t u64; - } __attribute__ ((packed)); + } attribute_packed; #define FETCH(Bits, ptr) (((const union unaligned *) ptr)->u##Bits) #define STORE(Bits, ptr, val) (((union unaligned *) ptr)->u##Bits = val) diff --git a/libelf/libelf.h b/libelf/libelf.h index c0d6389f..d11358cc 100644 --- a/libelf/libelf.h +++ b/libelf/libelf.h @@ -64,6 +64,30 @@ #define ELFCOMPRESS_HIPROC 0x7fffffff /* End of processor-specific. */ #endif +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) +# define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__))) +# define __deprecated_attribute__ __attribute__ ((__deprecated__)) +# define __pure_attribute__ __attribute__ ((__pure__)) +# define __const_attribute__ __attribute__ ((__const__)) +#else +# define __nonnull_attribute__(...) +# define __deprecated_attribute__ +# define __pure_attribute__ +# define __const_attribute__ +#endif + +#if __GNUC__ < 4 +#define __noreturn_attribute__ +#else +#define __noreturn_attribute__ __attribute__ ((noreturn)) +#endif + +#ifdef __GNUC_STDC_INLINE__ +# define __libdw_extern_inline extern __inline __attribute__ ((__gnu_inline__)) +#else +# define __libdw_extern_inline extern __inline +#endif + /* Known translation types. */ typedef enum { @@ -216,7 +240,7 @@ extern int elf_end (Elf *__elf); extern int64_t elf_update (Elf *__elf, Elf_Cmd __cmd); /* Determine what kind of file is associated with ELF. */ -extern Elf_Kind elf_kind (Elf *__elf) __attribute__ ((__pure__)); +extern Elf_Kind elf_kind (Elf *__elf) __pure_attribute__; /* Get the base offset for an object file. */ extern int64_t elf_getbase (Elf *__elf); @@ -282,19 +306,19 @@ extern int elf_getshdrnum (Elf *__elf, size_t *__dst); It was agreed to make the same functionality available under a different name and obsolete the old name. */ extern int elf_getshnum (Elf *__elf, size_t *__dst) - __attribute__ ((__deprecated__)); + __deprecated_attribute__; /* Get the section index of the section header string table in the ELF - file. If the index cannot be represented in the e_shnum field of + file. If the index cannot be represented in the e_shstrndx field of the ELF header the information from the sh_link field in the zeroth section header is used. */ extern int elf_getshdrstrndx (Elf *__elf, size_t *__dst); -/* Sun messed up the implementation of 'elf_getshnum' in their implementation. - It was agreed to make the same functionality available under a different - name and obsolete the old name. */ +/* Sun messed up the implementation of 'elf_getshstrndx' in their + implementation. It was agreed to make the same functionality available + under a different name and obsolete the old name. */ extern int elf_getshstrndx (Elf *__elf, size_t *__dst) - __attribute__ ((__deprecated__)); + __deprecated_attribute__; /* Retrieve section header of ELFCLASS32 binary. */ @@ -342,6 +366,11 @@ extern Elf64_Chdr *elf64_getchdr (Elf_Scn *__scn); It is an error to request compression for a section that already has SHF_COMPRESSED set, or (for elf_compress) to request decompression for an section that doesn't have SHF_COMPRESSED set. + If a section has SHF_COMPRESSED set then calling elf_compress_gnu + will result in an error. The section has to be decompressed first + using elf_compress. Calling elf_compress on a section compressed + with elf_compress_gnu is fine, but probably useless. + It is always an error to call these functions on SHT_NOBITS sections or if the section has the SHF_ALLOC flag set. elf_compress_gnu will not check whether the section name starts @@ -429,11 +458,11 @@ extern char *elf_rawfile (Elf *__elf, size_t *__nbytes); The result is based on version VERSION of the ELF standard. */ extern size_t elf32_fsize (Elf_Type __type, size_t __count, unsigned int __version) - __attribute__ ((__const__)); + __const_attribute__; /* Similar but this time the binary calls is ELFCLASS64. */ extern size_t elf64_fsize (Elf_Type __type, size_t __count, unsigned int __version) - __attribute__ ((__const__)); + __const_attribute__; /* Convert data structure from the representation in the file represented @@ -472,11 +501,11 @@ extern void elf_fill (int __fill); /* Compute hash value. */ extern unsigned long int elf_hash (const char *__string) - __attribute__ ((__pure__)); + __pure_attribute__; /* Compute hash value using the GNU-specific hash function. */ extern unsigned long int elf_gnu_hash (const char *__string) - __attribute__ ((__pure__)); + __pure_attribute__; /* Compute simple checksum from permanent parts of the ELF file. */ diff --git a/libelf/libelfP.h b/libelf/libelfP.h index 44599827..ed216c8c 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -30,10 +30,6 @@ #ifndef _LIBELFP_H #define _LIBELFP_H 1 -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include @@ -106,6 +102,7 @@ enum ELF_E_INVALID_ENCODING, ELF_E_NOMEM, ELF_E_INVALID_FILE, + ELF_E_INVALID_ELF, ELF_E_INVALID_OP, ELF_E_NO_VERSION, ELF_E_INVALID_CMD, @@ -446,15 +443,11 @@ extern int __libelf_version_initialized attribute_hidden; # define LIBELF_EV_IDX (__libelf_version - 1) #endif -#if !ALLOW_UNALIGNED /* Array with alignment requirements of the internal types indexed by ELF version, binary class, and type. */ extern const uint_fast8_t __libelf_type_aligns[EV_NUM - 1][ELFCLASSNUM - 1][ELF_T_NUM] attribute_hidden; # define __libelf_type_align(class, type) \ (__libelf_type_aligns[LIBELF_EV_IDX][class - 1][type] ?: 1) -#else -# define __libelf_type_align(class, type) 1 -#endif /* Given an Elf handle and a section type returns the Elf_Data d_type. Should not be called when SHF_COMPRESSED is set, the d_type should @@ -582,7 +575,7 @@ extern Elf_Data *__elf64_xlatetof_internal (Elf_Data *__dest, extern unsigned int __elf_version_internal (unsigned int __version) attribute_hidden; extern unsigned long int __elf_hash_internal (const char *__string) - __attribute__ ((__pure__, visibility ("hidden"))); + __attribute__ ((__pure__)) attribute_hidden; extern long int __elf32_checksum_internal (Elf *__elf) attribute_hidden; extern long int __elf64_checksum_internal (Elf *__elf) attribute_hidden; diff --git a/po/ChangeLog b/po/ChangeLog index b679f7a0..8f318aa7 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,23 @@ +2018-06-11 Mark Wielaard + + * *.po: Update for 0.172. + +2018-06-01 Mark Wielaard + + * *.po: Update for 0.171. + +2017-09-01 Mark Wielaard + + * *.po: Regenerated. Replace \v with \n\n. + +2017-08-02 Mark Wielaard + + * *.po: Update for 0.170. + +2017-05-05 Mark Wielaard + + * *.po: Update for 0.169. + 2017-02-16 Ulf Hermann * po/POTFILES.in: Removed lib/version.c, added lib/printversion.c. diff --git a/po/de.po b/po/de.po index 87160cdc..738963a5 100644 --- a/po/de.po +++ b/po/de.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: elfutils VERSION\n" "Report-Msgid-Bugs-To: https://sourceware.org/bugzilla/\n" -"POT-Creation-Date: 2016-12-27 15:20+0100\n" +"POT-Creation-Date: 2018-06-29 20:47+0200\n" "PO-Revision-Date: 2009-06-29 15:15+0200\n" "Last-Translator: Michael Münch \n" "Language-Team: German\n" @@ -37,23 +37,35 @@ msgid "" " - 'auto', 'tty', 'if-tty'\n" msgstr "" -#: lib/color.c:190 src/objdump.c:725 +#: lib/color.c:190 src/objdump.c:727 #, fuzzy, c-format msgid "cannot allocate memory" msgstr "konnte Verzeichnis nicht erstellen: %s" -#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3294 -#: src/readelf.c:3685 src/readelf.c:8433 src/unstrip.c:2224 src/unstrip.c:2429 +#: lib/printversion.c:40 +#, fuzzy, c-format +msgid "" +"Copyright (C) %s The elfutils developers <%s>.\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +msgstr "" +"Copyright (C) %s Red Hat, Inc.\n" +"Dies ist freie Software, siehe Quellcode für Kopierbedingungen. KEINE " +"GARANTIE,\n" +"auch nicht für Marktgängigkeit oder Eignung für einen Bestimmten Zweck.\n" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3395 +#: src/readelf.c:11196 src/unstrip.c:2227 src/unstrip.c:2433 #, c-format msgid "memory exhausted" msgstr "Kein Speicher mehr verfügbar" -#: libasm/asm_error.c:65 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:53 +#: libasm/asm_error.c:65 libdw/dwarf_error.c:57 libdwfl/libdwflP.h:50 #: libelf/elf_error.c:60 msgid "no error" msgstr "kein Fehler" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:52 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "nicht genügend Speicher" @@ -90,385 +102,426 @@ msgstr "Fehler bei Datenausgabe" msgid "no backend support available" msgstr "keine Backend-Unterstützung verfügbar" -#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:51 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "unbekannter Fehler" -#: libdw/dwarf_error.c:60 +#: libdw/dwarf_error.c:59 msgid "invalid access" msgstr "Ungültiger Zugriff" -#: libdw/dwarf_error.c:61 +#: libdw/dwarf_error.c:60 msgid "no regular file" msgstr "Keine reguläre Date" -#: libdw/dwarf_error.c:62 +#: libdw/dwarf_error.c:61 msgid "I/O error" msgstr "I/O Fehler" -#: libdw/dwarf_error.c:63 +#: libdw/dwarf_error.c:62 msgid "invalid ELF file" msgstr "Ungültige ELF Datei" -#: libdw/dwarf_error.c:64 +#: libdw/dwarf_error.c:63 msgid "no DWARF information" msgstr "keine DWARF Information" -#: libdw/dwarf_error.c:65 +#: libdw/dwarf_error.c:64 msgid "cannot decompress DWARF" msgstr "" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:65 msgid "no ELF file" msgstr "keine ELF Datei" -#: libdw/dwarf_error.c:67 +#: libdw/dwarf_error.c:66 msgid "cannot get ELF header" msgstr "ELF Kopf konnte nicht ausgelesen werden" -#: libdw/dwarf_error.c:69 +#: libdw/dwarf_error.c:68 msgid "not implemented" msgstr "Nicht implementiert" -#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:69 libelf/elf_error.c:111 libelf/elf_error.c:159 msgid "invalid command" msgstr "Ungültiger Befehl" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:70 msgid "invalid version" msgstr "Ungültige Version" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:71 msgid "invalid file" msgstr "Ungültige Datei" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:72 msgid "no entries found" msgstr "Keine Einträge gefunden" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:73 msgid "invalid DWARF" msgstr "DWARF ungültig" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:74 msgid "no string data" msgstr "" +#: libdw/dwarf_error.c:75 +#, fuzzy +msgid ".debug_str section missing" +msgstr ".debug_line Sektion fehlt" + #: libdw/dwarf_error.c:76 +#, fuzzy +msgid ".debug_line_str section missing" +msgstr ".debug_line Sektion fehlt" + +#: libdw/dwarf_error.c:77 +#, fuzzy +msgid ".debug_str_offsets section missing" +msgstr ".debug_line Sektion fehlt" + +#: libdw/dwarf_error.c:78 msgid "no address value" msgstr "Kein Adress-Wert" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:79 msgid "no constant value" msgstr "Kein Konstanten-Wert" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:80 msgid "no reference value" msgstr "Kein Referenz-Wert" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:81 msgid "invalid reference value" msgstr "Ungültiger Referenz-Wert" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:82 msgid ".debug_line section missing" msgstr ".debug_line Sektion fehlt" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:83 msgid "invalid .debug_line section" msgstr "ungültige .debug_line Sektion" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:84 msgid "debug information too big" msgstr "Debug Information zu groß" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:85 msgid "invalid DWARF version" msgstr "Ungültige DWARF Version" -#: libdw/dwarf_error.c:84 +#: libdw/dwarf_error.c:86 msgid "invalid directory index" msgstr "ungültiger Verzeichnisindex" -#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:87 libdwfl/libdwflP.h:71 msgid "address out of range" msgstr "Außerhalb des Adressbereiches" -#: libdw/dwarf_error.c:86 -msgid "no location list value" -msgstr "" +#: libdw/dwarf_error.c:88 +#, fuzzy +msgid ".debug_loc section missing" +msgstr ".debug_line Sektion fehlt" + +#: libdw/dwarf_error.c:89 +#, fuzzy +msgid ".debug_loclists section missing" +msgstr ".debug_line Sektion fehlt" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:90 +#, fuzzy +msgid "not a location list value" +msgstr "Kein Konstanten-Wert" + +#: libdw/dwarf_error.c:91 msgid "no block data" msgstr "" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:92 msgid "invalid line index" msgstr "Ungültiger Zeilenindex" -#: libdw/dwarf_error.c:89 +#: libdw/dwarf_error.c:93 msgid "invalid address range index" msgstr "Ungültiger Adressbereichs Index" -#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:94 libdwfl/libdwflP.h:72 msgid "no matching address range" msgstr "Kein passender Adressbereich" -#: libdw/dwarf_error.c:91 +#: libdw/dwarf_error.c:95 msgid "no flag value" msgstr "" -#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:96 libelf/elf_error.c:236 msgid "invalid offset" msgstr "ungültiger Offset" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:97 msgid ".debug_ranges section missing" msgstr "" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:98 +#, fuzzy +msgid ".debug_rnglists section missing" +msgstr ".debug_line Sektion fehlt" + +#: libdw/dwarf_error.c:99 #, fuzzy msgid "invalid CFI section" msgstr "ungültiger Abschnitt" -#: libdw/dwarf_error.c:95 +#: libdw/dwarf_error.c:100 msgid "no alternative debug link found" msgstr "" -#: libdw/dwarf_error.c:96 +#: libdw/dwarf_error.c:101 #, fuzzy msgid "invalid opcode" msgstr "ungültiger Operand" -#: libdw/dwarf_error.c:97 +#: libdw/dwarf_error.c:102 msgid "not a CU (unit) DIE" msgstr "" -#: libdwfl/argp-std.c:46 src/stack.c:635 src/unstrip.c:2371 +#: libdw/dwarf_error.c:103 +#, fuzzy +msgid "unknown language code" +msgstr "unbekannter Typ" + +#: libdw/dwarf_error.c:104 +#, fuzzy +msgid ".debug_addr section missing" +msgstr ".debug_line Sektion fehlt" + +#: libdwfl/argp-std.c:50 src/stack.c:639 src/unstrip.c:2374 msgid "Input selection options:" msgstr "Eingabeauswahloptionen:" -#: libdwfl/argp-std.c:47 +#: libdwfl/argp-std.c:51 msgid "Find addresses in FILE" msgstr "Finde Adressen in FILE" -#: libdwfl/argp-std.c:49 +#: libdwfl/argp-std.c:53 msgid "Find addresses from signatures found in COREFILE" msgstr "Finde Adressen von Signatur aus COREFILE" -#: libdwfl/argp-std.c:51 +#: libdwfl/argp-std.c:55 msgid "Find addresses in files mapped into process PID" msgstr "" -#: libdwfl/argp-std.c:53 +#: libdwfl/argp-std.c:57 msgid "" "Find addresses in files mapped as read from FILE in Linux /proc/PID/maps " "format" msgstr "" -#: libdwfl/argp-std.c:55 +#: libdwfl/argp-std.c:59 msgid "Find addresses in the running kernel" msgstr "Finde Adressen im laufenden Kernel" -#: libdwfl/argp-std.c:57 +#: libdwfl/argp-std.c:61 msgid "Kernel with all modules" msgstr "Kernel mit allen Modulen" -#: libdwfl/argp-std.c:59 src/stack.c:642 +#: libdwfl/argp-std.c:63 src/stack.c:646 msgid "Search path for separate debuginfo files" msgstr "Dateisuchpfad für separate Debug-Informationen" -#: libdwfl/argp-std.c:157 +#: libdwfl/argp-std.c:164 msgid "only one of -e, -p, -k, -K, or --core allowed" msgstr "Nur eine Option von -e, -p, -k, -K, oder --core erlaubt" -#: libdwfl/argp-std.c:230 +#: libdwfl/argp-std.c:237 msgid "cannot load kernel symbols" msgstr "Konnte Kernel Symbole nicht laden" #. Non-fatal to have no modules since we do have the kernel. -#: libdwfl/argp-std.c:234 +#: libdwfl/argp-std.c:241 msgid "cannot find kernel modules" msgstr "Konnte Kernel Module nicht finden" -#: libdwfl/argp-std.c:251 +#: libdwfl/argp-std.c:258 msgid "cannot find kernel or modules" msgstr "Konnte Kernel oder Module nicht finden" -#: libdwfl/argp-std.c:290 +#: libdwfl/argp-std.c:297 #, c-format msgid "cannot read ELF core file: %s" msgstr "Konnte ELF Kerndatei %s nicht lesen" -#: libdwfl/argp-std.c:313 +#: libdwfl/argp-std.c:320 #, fuzzy msgid "Not enough memory" msgstr "nicht genügend Speicher" -#: libdwfl/argp-std.c:323 +#: libdwfl/argp-std.c:330 msgid "No modules recognized in core file" msgstr "Keine Module in der Kerndatei gefunden" -#: libdwfl/libdwflP.h:56 +#: libdwfl/libdwflP.h:53 msgid "See errno" msgstr "" -#: libdwfl/libdwflP.h:57 +#: libdwfl/libdwflP.h:54 msgid "See elf_errno" msgstr "" -#: libdwfl/libdwflP.h:58 +#: libdwfl/libdwflP.h:55 msgid "See dwarf_errno" msgstr "" -#: libdwfl/libdwflP.h:59 +#: libdwfl/libdwflP.h:56 msgid "See ebl_errno (XXX missing)" msgstr "" -#: libdwfl/libdwflP.h:60 +#: libdwfl/libdwflP.h:57 msgid "gzip decompression failed" msgstr "" -#: libdwfl/libdwflP.h:61 +#: libdwfl/libdwflP.h:58 msgid "bzip2 decompression failed" msgstr "" -#: libdwfl/libdwflP.h:62 +#: libdwfl/libdwflP.h:59 msgid "LZMA decompression failed" msgstr "" -#: libdwfl/libdwflP.h:63 +#: libdwfl/libdwflP.h:60 msgid "no support library found for machine" msgstr "" -#: libdwfl/libdwflP.h:64 +#: libdwfl/libdwflP.h:61 msgid "Callbacks missing for ET_REL file" msgstr "" -#: libdwfl/libdwflP.h:65 +#: libdwfl/libdwflP.h:62 msgid "Unsupported relocation type" msgstr "" -#: libdwfl/libdwflP.h:66 +#: libdwfl/libdwflP.h:63 msgid "r_offset is bogus" msgstr "" -#: libdwfl/libdwflP.h:67 libelf/elf_error.c:111 libelf/elf_error.c:171 +#: libdwfl/libdwflP.h:64 libelf/elf_error.c:115 libelf/elf_error.c:175 msgid "offset out of range" msgstr "Offset ausserhalb des Bereichs" -#: libdwfl/libdwflP.h:68 +#: libdwfl/libdwflP.h:65 #, fuzzy msgid "relocation refers to undefined symbol" msgstr "Zeige Grösse der definierten Symbole" -#: libdwfl/libdwflP.h:69 +#: libdwfl/libdwflP.h:66 msgid "Callback returned failure" msgstr "" -#: libdwfl/libdwflP.h:70 +#: libdwfl/libdwflP.h:67 #, fuzzy msgid "No DWARF information found" msgstr "keine DWARF Information" -#: libdwfl/libdwflP.h:71 +#: libdwfl/libdwflP.h:68 msgid "No symbol table found" msgstr "" -#: libdwfl/libdwflP.h:72 +#: libdwfl/libdwflP.h:69 #, fuzzy msgid "No ELF program headers" msgstr "Programm-Köpfe anzeigen" -#: libdwfl/libdwflP.h:73 +#: libdwfl/libdwflP.h:70 msgid "address range overlaps an existing module" msgstr "" -#: libdwfl/libdwflP.h:76 +#: libdwfl/libdwflP.h:73 msgid "image truncated" msgstr "" -#: libdwfl/libdwflP.h:77 +#: libdwfl/libdwflP.h:74 #, fuzzy msgid "ELF file opened" msgstr "keine ELF Datei" -#: libdwfl/libdwflP.h:78 +#: libdwfl/libdwflP.h:75 #, fuzzy msgid "not a valid ELF file" msgstr "Ungültige ELF Datei" -#: libdwfl/libdwflP.h:79 +#: libdwfl/libdwflP.h:76 #, fuzzy msgid "cannot handle DWARF type description" msgstr "konnte Elf-Deskriptor nicht erzeugen: %s" -#: libdwfl/libdwflP.h:80 +#: libdwfl/libdwflP.h:77 msgid "ELF file does not match build ID" msgstr "" -#: libdwfl/libdwflP.h:81 +#: libdwfl/libdwflP.h:78 #, fuzzy msgid "corrupt .gnu.prelink_undo section data" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: libdwfl/libdwflP.h:82 +#: libdwfl/libdwflP.h:79 msgid "Internal error due to ebl" msgstr "" -#: libdwfl/libdwflP.h:83 +#: libdwfl/libdwflP.h:80 msgid "Missing data in core file" msgstr "" -#: libdwfl/libdwflP.h:84 +#: libdwfl/libdwflP.h:81 #, fuzzy msgid "Invalid register" msgstr "ungültiger Parameter" -#: libdwfl/libdwflP.h:85 +#: libdwfl/libdwflP.h:82 msgid "Error reading process memory" msgstr "" -#: libdwfl/libdwflP.h:86 +#: libdwfl/libdwflP.h:83 msgid "Couldn't find architecture of any ELF" msgstr "" -#: libdwfl/libdwflP.h:87 +#: libdwfl/libdwflP.h:84 msgid "Error parsing /proc filesystem" msgstr "" -#: libdwfl/libdwflP.h:88 +#: libdwfl/libdwflP.h:85 #, fuzzy msgid "Invalid DWARF" msgstr "DWARF ungültig" -#: libdwfl/libdwflP.h:89 +#: libdwfl/libdwflP.h:86 msgid "Unsupported DWARF" msgstr "" -#: libdwfl/libdwflP.h:90 +#: libdwfl/libdwflP.h:87 msgid "Unable to find more threads" msgstr "" -#: libdwfl/libdwflP.h:91 +#: libdwfl/libdwflP.h:88 msgid "Dwfl already has attached state" msgstr "" -#: libdwfl/libdwflP.h:92 +#: libdwfl/libdwflP.h:89 msgid "Dwfl has no attached state" msgstr "" -#: libdwfl/libdwflP.h:93 +#: libdwfl/libdwflP.h:90 msgid "Unwinding not supported for this architecture" msgstr "" -#: libdwfl/libdwflP.h:94 +#: libdwfl/libdwflP.h:91 #, fuzzy msgid "Invalid argument" msgstr "ungültiger Parameter" -#: libdwfl/libdwflP.h:95 +#: libdwfl/libdwflP.h:92 #, fuzzy msgid "Not an ET_CORE ELF file" msgstr "Ungültige ELF Datei" @@ -477,14 +530,14 @@ msgstr "Ungültige ELF Datei" msgid "No backend" msgstr "Kein Backend" -#: libebl/eblcorenotetypename.c:99 libebl/eblobjnotetypename.c:76 +#: libebl/eblcorenotetypename.c:100 libebl/eblobjnotetypename.c:76 #: libebl/eblobjnotetypename.c:83 libebl/eblobjnotetypename.c:102 #: libebl/eblosabiname.c:73 libebl/eblsectionname.c:83 #: libebl/eblsectiontypename.c:115 libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:101 +#: libebl/ebldynamictagname.c:103 #, c-format msgid ": %#" msgstr ": %#" @@ -574,7 +627,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:5112 +#: libelf/elf_error.c:87 src/readelf.c:6107 #, c-format msgid "invalid encoding" msgstr "ungültige Kodierung" @@ -584,497 +637,527 @@ msgid "invalid file descriptor" msgstr "ungültiger Datei-Deskriptor" #: libelf/elf_error.c:99 +#, fuzzy +msgid "invalid ELF file data" +msgstr "Ungültige ELF Datei" + +#: libelf/elf_error.c:103 msgid "invalid operation" msgstr "ungültige Operation" -#: libelf/elf_error.c:103 +#: libelf/elf_error.c:107 msgid "ELF version not set" msgstr "ELF-Version nicht gesetzt" -#: libelf/elf_error.c:115 +#: libelf/elf_error.c:119 msgid "invalid fmag field in archive header" msgstr "ungültiges fmag-Feld im Archivheader" -#: libelf/elf_error.c:119 +#: libelf/elf_error.c:123 msgid "invalid archive file" msgstr "Ungültige Archiv-Datei" -#: libelf/elf_error.c:123 +#: libelf/elf_error.c:127 msgid "descriptor is not for an archive" msgstr "" -#: libelf/elf_error.c:127 +#: libelf/elf_error.c:131 msgid "no index available" msgstr "kein Index verfügbar" -#: libelf/elf_error.c:131 +#: libelf/elf_error.c:135 msgid "cannot read data from file" msgstr "Daten aus der Datei konnten nicht gelesen werden" -#: libelf/elf_error.c:135 +#: libelf/elf_error.c:139 msgid "cannot write data to file" msgstr "Daten konnten nicht in die Datei geschrieben werden" -#: libelf/elf_error.c:139 +#: libelf/elf_error.c:143 msgid "invalid binary class" msgstr "ungültige Binärklasse" -#: libelf/elf_error.c:143 +#: libelf/elf_error.c:147 msgid "invalid section index" msgstr "ungültiger Abschnittsindex" -#: libelf/elf_error.c:147 +#: libelf/elf_error.c:151 msgid "invalid operand" msgstr "ungültiger Operand" -#: libelf/elf_error.c:151 +#: libelf/elf_error.c:155 msgid "invalid section" msgstr "ungültiger Abschnitt" -#: libelf/elf_error.c:159 +#: libelf/elf_error.c:163 msgid "executable header not created first" msgstr "ausführbarer Header wurde nicht zuerst erstellt" -#: libelf/elf_error.c:163 +#: libelf/elf_error.c:167 msgid "file descriptor disabled" msgstr "Datei-Deskriptor deaktiviert" -#: libelf/elf_error.c:167 +#: libelf/elf_error.c:171 #, fuzzy msgid "archive/member file descriptor mismatch" msgstr "Datei-Deskriptor deaktiviert" -#: libelf/elf_error.c:175 +#: libelf/elf_error.c:179 msgid "cannot manipulate null section" msgstr "" -#: libelf/elf_error.c:179 +#: libelf/elf_error.c:183 #, fuzzy msgid "data/scn mismatch" msgstr "data/scn Unterschied" -#: libelf/elf_error.c:183 +#: libelf/elf_error.c:187 msgid "invalid section header" msgstr "ungültiger Abschnitts-Header" -#: libelf/elf_error.c:187 src/readelf.c:7359 src/readelf.c:7807 -#: src/readelf.c:7908 src/readelf.c:8089 +#: libelf/elf_error.c:191 src/readelf.c:9742 src/readelf.c:10313 +#: src/readelf.c:10414 src/readelf.c:10595 #, c-format msgid "invalid data" msgstr "Ungültige Daten" -#: libelf/elf_error.c:191 +#: libelf/elf_error.c:195 msgid "unknown data encoding" msgstr "Unbekannte Datenkodierung" -#: libelf/elf_error.c:195 +#: libelf/elf_error.c:199 msgid "section `sh_size' too small for data" msgstr "Abschnitt `sh_size' zu klein für Daten" -#: libelf/elf_error.c:199 +#: libelf/elf_error.c:203 msgid "invalid section alignment" msgstr "ungültige Abschnittsausrichtung" -#: libelf/elf_error.c:203 +#: libelf/elf_error.c:207 msgid "invalid section entry size" msgstr "" -#: libelf/elf_error.c:207 +#: libelf/elf_error.c:211 msgid "update() for write on read-only file" msgstr "" -#: libelf/elf_error.c:211 +#: libelf/elf_error.c:215 msgid "no such file" msgstr "Datei nicht gefunden" -#: libelf/elf_error.c:215 +#: libelf/elf_error.c:219 msgid "only relocatable files can contain section groups" msgstr "" -#: libelf/elf_error.c:220 +#: libelf/elf_error.c:224 msgid "" "program header only allowed in executables, shared objects, and core files" msgstr "" -#: libelf/elf_error.c:227 +#: libelf/elf_error.c:231 msgid "file has no program header" msgstr "Datei hat keinen Programm-Kopf" -#: libelf/elf_error.c:237 +#: libelf/elf_error.c:241 #, fuzzy msgid "invalid section type" msgstr "ungültiger Abschnitt" -#: libelf/elf_error.c:242 +#: libelf/elf_error.c:246 #, fuzzy msgid "invalid section flags" msgstr "ungültiger Abschnitt" -#: libelf/elf_error.c:247 +#: libelf/elf_error.c:251 msgid "section does not contain compressed data" msgstr "" -#: libelf/elf_error.c:252 +#: libelf/elf_error.c:256 msgid "section contains compressed data" msgstr "" -#: libelf/elf_error.c:257 +#: libelf/elf_error.c:261 #, fuzzy msgid "unknown compression type" msgstr "unbekannter Typ" -#: libelf/elf_error.c:262 +#: libelf/elf_error.c:266 #, fuzzy msgid "cannot compress data" msgstr "konnte Abschnittsdaten nicht kopieren: %s" -#: libelf/elf_error.c:267 +#: libelf/elf_error.c:271 #, fuzzy msgid "cannot decompress data" msgstr "konnte Abschnittsdaten nicht kopieren: %s" -#: src/addr2line.c:57 +#: src/addr2line.c:58 #, fuzzy msgid "Input format options:" msgstr "Eingabeauswahloptionen:" -#: src/addr2line.c:59 +#: src/addr2line.c:60 msgid "Treat addresses as offsets relative to NAME section." msgstr "" -#: src/addr2line.c:61 +#: src/addr2line.c:62 #, fuzzy msgid "Output format options:" msgstr "Ausgabeformat:" -#: src/addr2line.c:62 +#: src/addr2line.c:63 msgid "Print address before each entry" msgstr "" -#: src/addr2line.c:63 +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "" -#: src/addr2line.c:65 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "" -#: src/addr2line.c:66 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "" -#: src/addr2line.c:67 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "" -#: src/addr2line.c:68 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "" -#: src/addr2line.c:69 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "" -#: src/addr2line.c:71 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" -#: src/addr2line.c:74 +#: src/addr2line.c:75 msgid "Show demangled symbols (ARG is always ignored)" msgstr "" -#: src/addr2line.c:76 +#: src/addr2line.c:77 msgid "Print all information on one line, and indent inlines" msgstr "" -#: src/addr2line.c:78 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:99 -#: src/strings.c:78 +#: src/addr2line.c:79 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:101 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Verschiedenes:" #. Short description of program. -#: src/addr2line.c:86 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" #. Strings for arguments in help texts. -#: src/addr2line.c:90 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "" -#: src/addr2line.c:518 +#: src/addr2line.c:520 #, fuzzy, c-format msgid "Section syntax requires exactly one module" msgstr "Abschnitt syntax benötigt genau ein Modul" -#: src/addr2line.c:541 +#: src/addr2line.c:543 #, c-format msgid "offset %# lies outside section '%s'" msgstr "" -#: src/addr2line.c:631 +#: src/addr2line.c:633 #, c-format msgid "cannot find symbol '%s'" msgstr "Konnte Symbol '%s' nicht finden" -#: src/addr2line.c:636 +#: src/addr2line.c:638 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "" -#: src/ar.c:67 +#: src/ar.c:68 msgid "Commands:" msgstr "Befehle:" -#: src/ar.c:68 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Dateien aus dem Archiv löschen." -#: src/ar.c:69 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Dateien zum Archiv hinzufügen." -#: src/ar.c:70 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Packe Dateien in Archiv" -#: src/ar.c:71 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Hänge Dateien an ein Archiv" -#: src/ar.c:73 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Ersetze existierende oder füge neue Datei in das Archiv ein." -#: src/ar.c:74 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Zeige Archivinhalt an." -#: src/ar.c:75 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Entpacke Dateien aus dem Archiv" -#: src/ar.c:77 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "" -#: src/ar.c:78 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Erhalte ursprüngliche Daten." -#: src/ar.c:79 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "" -#: src/ar.c:81 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Ersetze existierende Dateien nicht mit entpackten Dateien" -#: src/ar.c:82 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Erlaube angehängte Dateinamen, wenn nötig" -#: src/ar.c:84 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Zeige detaillierte Ausgabe." -#: src/ar.c:85 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Erzwinge Regenerierung der Symboltabelle." -#: src/ar.c:86 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Füge Datei nach [MEMBER] ein." -#: src/ar.c:87 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Füge Datei vor [MEMBER] ein." -#: src/ar.c:88 +#: src/ar.c:89 msgid "Same as -b." msgstr "Genau wie -b." -#: src/ar.c:89 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Unterdrücke Nachricht wenn Bibliothek erstellt werden muss." -#: src/ar.c:91 +#: src/ar.c:92 #, fuzzy msgid "Use full path for file matching." msgstr "Vollständigen Pfad für Dateiabgleich verwenden." -#: src/ar.c:92 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Nur ältere Datein im Archiv aktualisieren" #. Short description of program. -#: src/ar.c:98 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Erstelle, ändere, extrahiere von Archiven" #. Strings for arguments in help texts. -#: src/ar.c:101 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[MEMBER] [COUNT] ARCHIVE [FILE...]" -#: src/ar.c:180 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "'a', 'b', und 'i' nur zusammen mit 'm' and 'r Optionen" -#: src/ar.c:185 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "" -#: src/ar.c:201 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "'N' ist nur mit den Optionen 'x' und 'd' von Bedeutung." -#: src/ar.c:206 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "COUNT Parameter erforderlich" -#: src/ar.c:218 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "Ungültiger COUNT Parameter %s" -#: src/ar.c:225 +#: src/ar.c:226 #, fuzzy, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "'%' ist nur mit der Option 'x' von Bedeutung" -#: src/ar.c:231 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "Archivname erforderlich" -#: src/ar.c:244 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "" -#: src/ar.c:295 +#: src/ar.c:296 #, c-format msgid "More than one operation specified" msgstr "Mehr als eine Operation angegeben" -#: src/ar.c:389 +#: src/ar.c:390 #, c-format msgid "cannot open archive '%s'" msgstr "Konnte Archiv '%s' nicht öffnen" -#: src/ar.c:399 +#: src/ar.c:400 #, c-format msgid "cannot open archive '%s': %s" msgstr "Konnte Archiv '%s': %s nicht öffnen" -#: src/ar.c:403 +#: src/ar.c:404 #, c-format msgid "%s: not an archive file" msgstr "%s: Keine Archiv-Datei" -#: src/ar.c:407 +#: src/ar.c:408 #, c-format msgid "cannot stat archive '%s'" msgstr "" -#: src/ar.c:419 +#: src/ar.c:420 #, c-format msgid "no entry %s in archive\n" msgstr "Kein Eintrag %s in Archiv\n" -#: src/ar.c:472 src/ar.c:917 src/ar.c:1117 +#: src/ar.c:473 src/ar.c:918 src/ar.c:1122 #, c-format msgid "cannot create hash table" msgstr "Konnte Hash-Tabelle nicht erstellen" -#: src/ar.c:479 src/ar.c:924 src/ar.c:1126 +#: src/ar.c:480 src/ar.c:925 src/ar.c:1131 #, c-format msgid "cannot insert into hash table" msgstr "Konnte nicht in Hash-Tabelle einfügen" -#: src/ar.c:487 src/ranlib.c:148 +#: src/ar.c:488 src/ranlib.c:149 #, c-format msgid "cannot stat '%s'" msgstr "" -#: src/ar.c:583 +#: src/ar.c:584 #, c-format msgid "cannot read content of %s: %s" msgstr "Konnte Inhalt von %s: %s nicht lesen" -#: src/ar.c:626 +#: src/ar.c:627 #, c-format msgid "cannot open %.*s" msgstr "Konnte %.*s nicht öffnen" -#: src/ar.c:648 +#: src/ar.c:649 #, c-format msgid "failed to write %s" msgstr "Konnte %s nicht schreiben" -#: src/ar.c:660 +#: src/ar.c:661 #, c-format msgid "cannot change mode of %s" msgstr "" -#: src/ar.c:676 +#: src/ar.c:677 #, c-format msgid "cannot change modification time of %s" msgstr "Konnte Bearbeitungszeit von %s nicht ändern" -#: src/ar.c:722 +#: src/ar.c:723 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "Konnte temporäre Datei nicht in %.*s umbenennen" -#: src/ar.c:758 src/ar.c:1009 src/ar.c:1408 src/ranlib.c:222 +#: src/ar.c:759 src/ar.c:1010 src/ar.c:1411 src/ranlib.c:223 #, c-format msgid "cannot create new file" msgstr "neue Datei konnte nicht angelegt werden" -#: src/ar.c:1208 +#: src/ar.c:1213 #, c-format msgid "position member %s not found" msgstr "" -#: src/ar.c:1218 +#: src/ar.c:1223 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: Kein Eintrag %s in dem Archiv!\n" -#: src/ar.c:1247 src/objdump.c:240 +#: src/ar.c:1252 src/objdump.c:242 #, c-format msgid "cannot open %s" msgstr "Konnte %s nicht öffnen" -#: src/ar.c:1252 +#: src/ar.c:1257 #, c-format msgid "cannot stat %s" msgstr "" -#: src/ar.c:1258 +#: src/ar.c:1263 #, c-format msgid "%s is no regular file" msgstr "%s ist keine reguläre Datei" -#: src/ar.c:1271 +#: src/ar.c:1276 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "" -#: src/ar.c:1291 +#: src/ar.c:1296 #, c-format msgid "cannot read %s: %s" msgstr "Konnte %s: %s nicht lesen" +#: src/ar.c:1471 +#, fuzzy, c-format +msgid "cannot represent ar_date" +msgstr "konnte Abschnittsdaten nicht kopieren: %s" + +#: src/ar.c:1477 +#, fuzzy, c-format +msgid "cannot represent ar_uid" +msgstr "konnte Abschnittsdaten nicht kopieren: %s" + +#: src/ar.c:1483 +#, fuzzy, c-format +msgid "cannot represent ar_gid" +msgstr "konnte Abschnittsdaten nicht kopieren: %s" + +#: src/ar.c:1489 +#, fuzzy, c-format +msgid "cannot represent ar_mode" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/ar.c:1495 +#, fuzzy, c-format +msgid "cannot represent ar_size" +msgstr "Konnte %s nicht öffnen" + #: src/arlib-argp.c:32 msgid "Use zero for uid, gid, and date in archive members." msgstr "" @@ -1205,120 +1288,120 @@ msgstr "" msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "" -#: src/elfcmp.c:427 src/elfcmp.c:496 +#: src/elfcmp.c:428 src/elfcmp.c:498 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "" -#: src/elfcmp.c:435 +#: src/elfcmp.c:436 #, fuzzy, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elfcmp.c:445 +#: src/elfcmp.c:447 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "" -#: src/elfcmp.c:453 +#: src/elfcmp.c:455 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "" -#: src/elfcmp.c:468 +#: src/elfcmp.c:470 #, c-format msgid "%s %s differ: build ID length" msgstr "" -#: src/elfcmp.c:476 +#: src/elfcmp.c:478 #, c-format msgid "%s %s differ: build ID content" msgstr "" -#: src/elfcmp.c:485 +#: src/elfcmp.c:487 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "" -#: src/elfcmp.c:526 +#: src/elfcmp.c:528 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "" -#: src/elfcmp.c:530 +#: src/elfcmp.c:532 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "" -#: src/elfcmp.c:545 +#: src/elfcmp.c:547 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "" -#: src/elfcmp.c:578 src/elfcmp.c:583 +#: src/elfcmp.c:580 src/elfcmp.c:585 #, c-format msgid "cannot load data of '%s': %s" msgstr "" -#: src/elfcmp.c:602 src/elfcmp.c:608 +#: src/elfcmp.c:604 src/elfcmp.c:610 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" -#: src/elfcmp.c:614 +#: src/elfcmp.c:616 #, c-format msgid "%s %s differ: program header %d" msgstr "" -#: src/elfcmp.c:638 +#: src/elfcmp.c:640 #, c-format msgid "%s %s differ: gap" msgstr "" -#: src/elfcmp.c:689 +#: src/elfcmp.c:691 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "" -#: src/elfcmp.c:717 src/findtextrel.c:206 src/nm.c:363 src/ranlib.c:141 -#: src/size.c:273 src/strings.c:185 src/strip.c:452 src/strip.c:489 -#: src/unstrip.c:2020 src/unstrip.c:2049 +#: src/elfcmp.c:719 src/findtextrel.c:206 src/nm.c:365 src/ranlib.c:142 +#: src/size.c:273 src/strings.c:186 src/strip.c:518 src/strip.c:555 +#: src/unstrip.c:2023 src/unstrip.c:2052 #, c-format msgid "cannot open '%s'" msgstr "'%s' kann nicht geöffnet werden" -#: src/elfcmp.c:721 src/findtextrel.c:213 src/ranlib.c:158 +#: src/elfcmp.c:723 src/findtextrel.c:213 src/ranlib.c:159 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "" -#: src/elfcmp.c:726 +#: src/elfcmp.c:728 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "" -#: src/elfcmp.c:744 src/findtextrel.c:394 +#: src/elfcmp.c:746 src/findtextrel.c:394 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "" -#: src/elfcmp.c:754 +#: src/elfcmp.c:756 #, c-format msgid "cannot get content of section %zu: %s" msgstr "" -#: src/elfcmp.c:764 src/elfcmp.c:778 +#: src/elfcmp.c:766 src/elfcmp.c:780 #, c-format msgid "cannot get relocation: %s" msgstr "" -#: src/elfcompress.c:115 src/strip.c:240 src/unstrip.c:121 +#: src/elfcompress.c:115 src/strip.c:297 src/unstrip.c:121 #, c-format msgid "-o option specified twice" msgstr "" #: src/elfcompress.c:122 -#, fuzzy +#, fuzzy, c-format msgid "-t option specified twice" msgstr "Option -d zweimal angegeben" @@ -1329,11 +1412,12 @@ msgstr "unbekannter Typ" #. We need at least one input file. #: src/elfcompress.c:143 src/elfcompress.c:1305 -#, fuzzy +#, fuzzy, c-format msgid "No input file given" msgstr "Eingabedatei '%s' ignoriert" #: src/elfcompress.c:149 src/elfcompress.c:1310 +#, c-format msgid "Only one input file allowed together with '-o'" msgstr "" @@ -1362,7 +1446,7 @@ msgstr "" msgid "Force compression of section even if it would become larger" msgstr "" -#: src/elfcompress.c:1282 src/strip.c:87 +#: src/elfcompress.c:1282 src/strip.c:91 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "" @@ -1372,7 +1456,7 @@ msgid "Be silent when a section cannot be compressed" msgstr "konnte Abschnittsdaten nicht holen: %s" #. Strings for arguments in help texts. -#: src/elfcompress.c:1294 src/elflint.c:77 src/readelf.c:126 +#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154 msgid "FILE..." msgstr "DATEI..." @@ -1380,251 +1464,261 @@ msgstr "DATEI..." msgid "Compress or decompress sections in an ELF file." msgstr "" -#: src/elflint.c:63 +#: src/elflint.c:64 msgid "Be extremely strict, flag level 2 features." msgstr "" -#: src/elflint.c:64 +#: src/elflint.c:65 msgid "Do not print anything if successful" msgstr "Gebe nichts aus, wenn erfolgreich" -#: src/elflint.c:65 +#: src/elflint.c:66 msgid "Binary is a separate debuginfo file" msgstr "" -#: src/elflint.c:67 +#: src/elflint.c:68 msgid "" "Binary has been created with GNU ld and is therefore known to be broken in " "certain ways" msgstr "" #. Short description of program. -#: src/elflint.c:73 +#: src/elflint.c:74 msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "" -#: src/elflint.c:154 src/readelf.c:301 +#: src/elflint.c:155 src/readelf.c:347 #, c-format msgid "cannot open input file" msgstr "Kann Eingabedatei nicht öffnen" -#: src/elflint.c:161 +#: src/elflint.c:162 #, c-format msgid "cannot generate Elf descriptor: %s\n" msgstr "kann Elf-Deskriptor nicht erzeugen: %s\n" -#: src/elflint.c:180 +#: src/elflint.c:181 #, c-format msgid "error while closing Elf descriptor: %s\n" msgstr "Fehler beim Schliessen des Elf-Desktriptor: %s\n" -#: src/elflint.c:184 +#: src/elflint.c:185 msgid "No errors" msgstr "Keine Fehler" -#: src/elflint.c:219 src/readelf.c:478 +#: src/elflint.c:220 src/readelf.c:546 msgid "Missing file name.\n" msgstr "Dateiname fehlt.\n" -#: src/elflint.c:284 +#: src/elflint.c:285 #, c-format msgid " error while freeing sub-ELF descriptor: %s\n" msgstr "" #. We cannot do anything. -#: src/elflint.c:292 +#: src/elflint.c:293 #, fuzzy, c-format msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "Keine ELF-Datei - sie hat die falschen Magic Bytes am Anfang\n" -#: src/elflint.c:357 +#: src/elflint.c:358 #, c-format msgid "e_ident[%d] == %d is no known class\n" msgstr "" -#: src/elflint.c:362 +#: src/elflint.c:363 #, c-format msgid "e_ident[%d] == %d is no known data encoding\n" msgstr "" -#: src/elflint.c:366 +#: src/elflint.c:367 #, c-format msgid "unknown ELF header version number e_ident[%d] == %d\n" msgstr "" -#: src/elflint.c:374 +#: src/elflint.c:375 #, c-format msgid "unsupported OS ABI e_ident[%d] == '%s'\n" msgstr "" -#: src/elflint.c:380 +#: src/elflint.c:381 #, c-format -msgid "unsupport ABI version e_ident[%d] == %d\n" +msgid "unsupported ABI version e_ident[%d] == %d\n" msgstr "" -#: src/elflint.c:385 +#: src/elflint.c:386 #, c-format msgid "e_ident[%zu] is not zero\n" msgstr "e_ident[%zu] ist nicht null\n" -#: src/elflint.c:390 +#: src/elflint.c:391 #, c-format msgid "unknown object file type %d\n" msgstr "" -#: src/elflint.c:397 +#: src/elflint.c:398 #, c-format msgid "unknown machine type %d\n" msgstr "" -#: src/elflint.c:401 +#: src/elflint.c:402 #, c-format msgid "unknown object file version\n" msgstr "" -#: src/elflint.c:407 +#: src/elflint.c:408 #, c-format msgid "invalid program header offset\n" msgstr "" -#: src/elflint.c:409 +#: src/elflint.c:410 #, c-format msgid "executables and DSOs cannot have zero program header offset\n" msgstr "" -#: src/elflint.c:413 +#: src/elflint.c:414 #, c-format msgid "invalid number of program header entries\n" msgstr "" -#: src/elflint.c:421 +#: src/elflint.c:422 #, c-format msgid "invalid section header table offset\n" msgstr "" -#: src/elflint.c:424 +#: src/elflint.c:425 #, c-format msgid "section header table must be present\n" msgstr "" -#: src/elflint.c:438 +#: src/elflint.c:439 #, c-format msgid "invalid number of section header table entries\n" msgstr "" -#: src/elflint.c:455 +#: src/elflint.c:456 #, c-format msgid "invalid section header index\n" msgstr "" -#: src/elflint.c:469 +#: src/elflint.c:474 +#, c-format +msgid "Can only check %u headers, shnum was %u\n" +msgstr "" + +#: src/elflint.c:488 #, fuzzy, c-format msgid "invalid number of program header table entries\n" msgstr "Ungültige Anzahl von Parametern.\n" -#: src/elflint.c:478 +#: src/elflint.c:505 +#, c-format +msgid "Can only check %u headers, phnum was %u\n" +msgstr "" + +#: src/elflint.c:510 #, c-format msgid "invalid machine flags: %s\n" msgstr "" -#: src/elflint.c:485 src/elflint.c:502 +#: src/elflint.c:517 src/elflint.c:534 #, c-format msgid "invalid ELF header size: %hd\n" msgstr "" -#: src/elflint.c:488 src/elflint.c:505 +#: src/elflint.c:520 src/elflint.c:537 #, c-format msgid "invalid program header size: %hd\n" msgstr "" -#: src/elflint.c:491 src/elflint.c:508 +#: src/elflint.c:523 src/elflint.c:540 #, c-format msgid "invalid program header position or size\n" msgstr "" -#: src/elflint.c:494 src/elflint.c:511 +#: src/elflint.c:526 src/elflint.c:543 #, c-format msgid "invalid section header size: %hd\n" msgstr "" -#: src/elflint.c:497 src/elflint.c:514 +#: src/elflint.c:529 src/elflint.c:546 #, c-format msgid "invalid section header position or size\n" msgstr "" -#: src/elflint.c:559 +#: src/elflint.c:591 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " "group\n" msgstr "" -#: src/elflint.c:563 +#: src/elflint.c:595 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" msgstr "" -#: src/elflint.c:579 src/elflint.c:1463 src/elflint.c:1514 src/elflint.c:1620 -#: src/elflint.c:1956 src/elflint.c:2272 src/elflint.c:2886 src/elflint.c:3049 -#: src/elflint.c:3197 src/elflint.c:3387 src/elflint.c:4355 +#: src/elflint.c:611 src/elflint.c:1495 src/elflint.c:1546 src/elflint.c:1652 +#: src/elflint.c:1988 src/elflint.c:2311 src/elflint.c:2930 src/elflint.c:3093 +#: src/elflint.c:3241 src/elflint.c:3431 src/elflint.c:4399 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "" -#: src/elflint.c:592 src/elflint.c:1627 +#: src/elflint.c:624 src/elflint.c:1659 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " "type is not SHT_STRTAB\n" msgstr "" -#: src/elflint.c:615 +#: src/elflint.c:647 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " "section\n" msgstr "" -#: src/elflint.c:627 +#: src/elflint.c:659 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "" -#: src/elflint.c:636 +#: src/elflint.c:668 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "" -#: src/elflint.c:641 src/elflint.c:644 src/elflint.c:647 src/elflint.c:650 -#: src/elflint.c:653 src/elflint.c:656 +#: src/elflint.c:673 src/elflint.c:676 src/elflint.c:679 src/elflint.c:682 +#: src/elflint.c:685 src/elflint.c:688 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "" -#: src/elflint.c:659 +#: src/elflint.c:691 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "" -#: src/elflint.c:669 +#: src/elflint.c:701 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "" -#: src/elflint.c:678 +#: src/elflint.c:710 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "" -#: src/elflint.c:693 +#: src/elflint.c:725 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " "section index section\n" msgstr "" -#: src/elflint.c:699 +#: src/elflint.c:731 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1632,116 +1726,116 @@ msgid "" msgstr "" #. || sym->st_shndx > SHN_HIRESERVE always false -#: src/elflint.c:711 +#: src/elflint.c:743 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "" -#: src/elflint.c:719 +#: src/elflint.c:751 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "" -#: src/elflint.c:725 +#: src/elflint.c:757 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "" -#: src/elflint.c:730 +#: src/elflint.c:762 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" -#: src/elflint.c:738 +#: src/elflint.c:770 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" msgstr "" -#: src/elflint.c:742 +#: src/elflint.c:774 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" -#: src/elflint.c:746 +#: src/elflint.c:778 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "" -#: src/elflint.c:797 +#: src/elflint.c:829 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "" -#: src/elflint.c:803 src/elflint.c:828 src/elflint.c:877 +#: src/elflint.c:835 src/elflint.c:860 src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:812 +#: src/elflint.c:844 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " "SHF_TLS flag set\n" msgstr "" -#: src/elflint.c:822 src/elflint.c:870 +#: src/elflint.c:854 src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:849 +#: src/elflint.c:881 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" -#: src/elflint.c:855 +#: src/elflint.c:887 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " "header entry\n" msgstr "" -#: src/elflint.c:863 +#: src/elflint.c:895 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:890 +#: src/elflint.c:922 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " "sh_info\n" msgstr "" -#: src/elflint.c:897 +#: src/elflint.c:929 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " "sh_info\n" msgstr "" -#: src/elflint.c:904 +#: src/elflint.c:936 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "" -#: src/elflint.c:954 +#: src/elflint.c:986 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " "[%2d]\n" msgstr "" -#: src/elflint.c:961 +#: src/elflint.c:993 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1751,1364 +1845,1364 @@ msgstr "" #. This test is more strict than the psABIs which #. usually allow the symbol to be in the middle of #. the .got section, allowing negative offsets. -#: src/elflint.c:977 +#: src/elflint.c:1009 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " "match %s section address %#\n" msgstr "" -#: src/elflint.c:984 +#: src/elflint.c:1016 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " "match %s section size %\n" msgstr "" -#: src/elflint.c:992 +#: src/elflint.c:1024 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " "section\n" msgstr "" -#: src/elflint.c:1008 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " "segment address %#\n" msgstr "" -#: src/elflint.c:1015 +#: src/elflint.c:1047 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " "segment size %\n" msgstr "" -#: src/elflint.c:1028 +#: src/elflint.c:1060 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" "default visibility\n" msgstr "" -#: src/elflint.c:1032 +#: src/elflint.c:1064 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "" -#: src/elflint.c:1070 +#: src/elflint.c:1102 #, fuzzy, c-format msgid "section [%2d] '%s': cannot get section data.\n" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elflint.c:1086 +#: src/elflint.c:1118 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "" -#: src/elflint.c:1097 src/elflint.c:1150 +#: src/elflint.c:1129 src/elflint.c:1182 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" -#: src/elflint.c:1122 src/elflint.c:1175 +#: src/elflint.c:1154 src/elflint.c:1207 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " "DT_RELCOUNT\n" msgstr "" -#: src/elflint.c:1128 src/elflint.c:1181 +#: src/elflint.c:1160 src/elflint.c:1213 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " "specified %d relative relocations\n" msgstr "" -#: src/elflint.c:1140 +#: src/elflint.c:1172 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "" -#: src/elflint.c:1223 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "" -#: src/elflint.c:1235 +#: src/elflint.c:1267 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "" -#: src/elflint.c:1243 +#: src/elflint.c:1275 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "" -#: src/elflint.c:1251 +#: src/elflint.c:1283 #, fuzzy, c-format msgid "" "section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elflint.c:1259 +#: src/elflint.c:1291 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" -#: src/elflint.c:1319 +#: src/elflint.c:1351 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" -#: src/elflint.c:1346 +#: src/elflint.c:1378 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "" -#: src/elflint.c:1354 +#: src/elflint.c:1386 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " "type\n" msgstr "" -#: src/elflint.c:1362 +#: src/elflint.c:1394 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "" -#: src/elflint.c:1380 +#: src/elflint.c:1412 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " "be used with %s\n" msgstr "" -#: src/elflint.c:1397 +#: src/elflint.c:1429 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "" -#: src/elflint.c:1412 +#: src/elflint.c:1444 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " "%s\n" msgstr "" -#: src/elflint.c:1433 +#: src/elflint.c:1465 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " "relocation flag not set\n" msgstr "" -#: src/elflint.c:1448 +#: src/elflint.c:1480 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" -#: src/elflint.c:1488 src/elflint.c:1539 +#: src/elflint.c:1520 src/elflint.c:1571 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "" -#: src/elflint.c:1615 +#: src/elflint.c:1647 #, c-format msgid "more than one dynamic section present\n" msgstr "" -#: src/elflint.c:1633 +#: src/elflint.c:1665 #, c-format msgid "" "section [%2d]: referenced as string table for section [%2d] '%s' but section " "link value is invalid\n" msgstr "" -#: src/elflint.c:1641 +#: src/elflint.c:1673 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" -#: src/elflint.c:1646 src/elflint.c:1935 +#: src/elflint.c:1678 src/elflint.c:1967 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "" -#: src/elflint.c:1656 +#: src/elflint.c:1688 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" -#: src/elflint.c:1664 +#: src/elflint.c:1696 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "" -#: src/elflint.c:1671 +#: src/elflint.c:1703 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "" -#: src/elflint.c:1682 +#: src/elflint.c:1714 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "" -#: src/elflint.c:1692 +#: src/elflint.c:1724 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "" -#: src/elflint.c:1710 +#: src/elflint.c:1742 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" -#: src/elflint.c:1723 +#: src/elflint.c:1755 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] '%s' referenced by sh_link\n" msgstr "" -#: src/elflint.c:1766 +#: src/elflint.c:1798 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" -#: src/elflint.c:1781 +#: src/elflint.c:1813 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:1801 src/elflint.c:1829 +#: src/elflint.c:1833 src/elflint.c:1861 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "" -#: src/elflint.c:1813 +#: src/elflint.c:1845 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "" -#: src/elflint.c:1822 +#: src/elflint.c:1854 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "" -#: src/elflint.c:1837 src/elflint.c:1844 +#: src/elflint.c:1869 src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "" -#: src/elflint.c:1854 src/elflint.c:1858 +#: src/elflint.c:1886 src/elflint.c:1890 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" -#: src/elflint.c:1864 +#: src/elflint.c:1896 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" -#: src/elflint.c:1875 src/elflint.c:1879 src/elflint.c:1883 src/elflint.c:1887 +#: src/elflint.c:1907 src/elflint.c:1911 src/elflint.c:1915 src/elflint.c:1919 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" -#: src/elflint.c:1899 +#: src/elflint.c:1931 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" -#: src/elflint.c:1909 +#: src/elflint.c:1941 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" -#: src/elflint.c:1913 +#: src/elflint.c:1945 #, c-format msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" msgstr "" -#: src/elflint.c:1918 +#: src/elflint.c:1950 #, c-format msgid "cannot get data for symbol section\n" msgstr "" -#: src/elflint.c:1921 +#: src/elflint.c:1953 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "" -#: src/elflint.c:1930 +#: src/elflint.c:1962 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" -#: src/elflint.c:1945 +#: src/elflint.c:1977 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " "same symbol table\n" msgstr "" -#: src/elflint.c:1962 +#: src/elflint.c:1995 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "" -#: src/elflint.c:1974 +#: src/elflint.c:2007 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "" -#: src/elflint.c:1979 +#: src/elflint.c:2012 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" -#: src/elflint.c:1995 src/elflint.c:2046 +#: src/elflint.c:2029 src/elflint.c:2083 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" -#: src/elflint.c:2007 src/elflint.c:2058 +#: src/elflint.c:2043 src/elflint.c:2097 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "" -#: src/elflint.c:2021 src/elflint.c:2072 +#: src/elflint.c:2057 src/elflint.c:2111 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2031 +#: src/elflint.c:2067 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2082 +#: src/elflint.c:2121 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" -#: src/elflint.c:2095 +#: src/elflint.c:2134 #, c-format msgid "section [%2d] '%s': not enough data\n" msgstr "" -#: src/elflint.c:2107 +#: src/elflint.c:2146 #, c-format msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "" -#: src/elflint.c:2123 +#: src/elflint.c:2162 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" msgstr "" -#: src/elflint.c:2132 +#: src/elflint.c:2171 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" -#: src/elflint.c:2166 +#: src/elflint.c:2205 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" -#: src/elflint.c:2187 +#: src/elflint.c:2226 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" msgstr "" -#: src/elflint.c:2200 +#: src/elflint.c:2239 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" -#: src/elflint.c:2209 +#: src/elflint.c:2248 #, c-format msgid "" "section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" msgstr "" -#: src/elflint.c:2239 +#: src/elflint.c:2278 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2244 +#: src/elflint.c:2283 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2250 +#: src/elflint.c:2289 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" -#: src/elflint.c:2263 +#: src/elflint.c:2302 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" -#: src/elflint.c:2281 +#: src/elflint.c:2320 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" -#: src/elflint.c:2285 +#: src/elflint.c:2324 #, c-format msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" msgstr "" -#: src/elflint.c:2293 +#: src/elflint.c:2334 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "" -#: src/elflint.c:2298 +#: src/elflint.c:2339 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "" -#: src/elflint.c:2303 +#: src/elflint.c:2344 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" msgstr "" -#: src/elflint.c:2352 +#: src/elflint.c:2393 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" -#: src/elflint.c:2376 src/elflint.c:2441 src/elflint.c:2476 +#: src/elflint.c:2417 src/elflint.c:2482 src/elflint.c:2517 #, c-format msgid "hash section [%2zu] '%s' does not contain enough data\n" msgstr "" -#: src/elflint.c:2397 +#: src/elflint.c:2438 #, c-format msgid "hash section [%2zu] '%s' has zero bit mask words\n" msgstr "" -#: src/elflint.c:2408 src/elflint.c:2452 src/elflint.c:2489 +#: src/elflint.c:2449 src/elflint.c:2493 src/elflint.c:2530 #, c-format msgid "hash section [%2zu] '%s' uses too much data\n" msgstr "" -#: src/elflint.c:2423 +#: src/elflint.c:2464 #, c-format msgid "" "hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " "%, nentries: %\n" msgstr "" -#: src/elflint.c:2510 +#: src/elflint.c:2551 #, c-format msgid "hash section [%2zu] '%s' invalid sh_entsize\n" msgstr "" -#: src/elflint.c:2520 src/elflint.c:2524 +#: src/elflint.c:2561 src/elflint.c:2565 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "" -#: src/elflint.c:2531 +#: src/elflint.c:2572 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2543 +#: src/elflint.c:2584 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2559 +#: src/elflint.c:2600 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "" -#: src/elflint.c:2579 +#: src/elflint.c:2620 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" -#: src/elflint.c:2590 +#: src/elflint.c:2631 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "" -#: src/elflint.c:2595 +#: src/elflint.c:2636 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" -#: src/elflint.c:2601 +#: src/elflint.c:2642 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "" -#: src/elflint.c:2606 +#: src/elflint.c:2647 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "" -#: src/elflint.c:2613 +#: src/elflint.c:2654 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "" -#: src/elflint.c:2617 +#: src/elflint.c:2658 #, c-format msgid "section [%2d] '%s': cannot get symbol name for signature\n" msgstr "" -#: src/elflint.c:2622 +#: src/elflint.c:2663 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "" -#: src/elflint.c:2628 +#: src/elflint.c:2669 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "" -#: src/elflint.c:2634 +#: src/elflint.c:2675 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "" -#: src/elflint.c:2643 +#: src/elflint.c:2684 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" -#: src/elflint.c:2648 +#: src/elflint.c:2690 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "" -#: src/elflint.c:2654 +#: src/elflint.c:2698 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "" -#: src/elflint.c:2658 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "" -#: src/elflint.c:2669 +#: src/elflint.c:2713 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "" -#: src/elflint.c:2681 +#: src/elflint.c:2725 #, fuzzy, c-format msgid "section [%2d] '%s': section index %zu out of range\n" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elflint.c:2690 +#: src/elflint.c:2734 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" -#: src/elflint.c:2697 +#: src/elflint.c:2741 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "" -#: src/elflint.c:2703 +#: src/elflint.c:2747 #, c-format msgid "" "section [%2d] '%s': element %zu references section [%2d] '%s' without " "SHF_GROUP flag set\n" msgstr "" -#: src/elflint.c:2710 +#: src/elflint.c:2754 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "" -#: src/elflint.c:2900 +#: src/elflint.c:2944 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " "dynamic symbol table\n" msgstr "" -#: src/elflint.c:2912 +#: src/elflint.c:2956 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:2928 +#: src/elflint.c:2972 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "" -#: src/elflint.c:2944 +#: src/elflint.c:2988 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" -#: src/elflint.c:2952 +#: src/elflint.c:2996 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "" -#: src/elflint.c:2966 +#: src/elflint.c:3010 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "" -#: src/elflint.c:2971 +#: src/elflint.c:3015 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" -#: src/elflint.c:2981 +#: src/elflint.c:3025 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" -#: src/elflint.c:3034 +#: src/elflint.c:3078 #, c-format msgid "more than one version reference section present\n" msgstr "" -#: src/elflint.c:3042 src/elflint.c:3189 +#: src/elflint.c:3086 src/elflint.c:3233 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "" -#: src/elflint.c:3067 src/elflint.c:3243 +#: src/elflint.c:3111 src/elflint.c:3287 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "" -#: src/elflint.c:3074 src/elflint.c:3250 +#: src/elflint.c:3118 src/elflint.c:3294 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" -#: src/elflint.c:3084 +#: src/elflint.c:3128 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "" -#: src/elflint.c:3092 +#: src/elflint.c:3136 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "" -#: src/elflint.c:3104 +#: src/elflint.c:3148 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:3112 +#: src/elflint.c:3156 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" msgstr "" -#: src/elflint.c:3121 +#: src/elflint.c:3165 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" msgstr "" -#: src/elflint.c:3130 +#: src/elflint.c:3174 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name '%s'\n" msgstr "" -#: src/elflint.c:3141 +#: src/elflint.c:3185 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" -#: src/elflint.c:3158 src/elflint.c:3334 +#: src/elflint.c:3202 src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" -#: src/elflint.c:3166 src/elflint.c:3342 +#: src/elflint.c:3210 src/elflint.c:3386 #, c-format msgid "" "section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " "there are more entries\n" msgstr "" -#: src/elflint.c:3181 +#: src/elflint.c:3225 #, c-format msgid "more than one version definition section present\n" msgstr "" -#: src/elflint.c:3228 +#: src/elflint.c:3272 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "" -#: src/elflint.c:3232 +#: src/elflint.c:3276 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" -#: src/elflint.c:3238 +#: src/elflint.c:3282 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:3265 +#: src/elflint.c:3309 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "" -#: src/elflint.c:3272 +#: src/elflint.c:3316 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" -#: src/elflint.c:3280 +#: src/elflint.c:3324 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "" -#: src/elflint.c:3300 +#: src/elflint.c:3344 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" -#: src/elflint.c:3317 +#: src/elflint.c:3361 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" -#: src/elflint.c:3350 +#: src/elflint.c:3394 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "" -#: src/elflint.c:3366 +#: src/elflint.c:3410 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "" -#: src/elflint.c:3379 +#: src/elflint.c:3423 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "" -#: src/elflint.c:3400 +#: src/elflint.c:3444 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "" -#: src/elflint.c:3416 +#: src/elflint.c:3460 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" -#: src/elflint.c:3425 +#: src/elflint.c:3469 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" -#: src/elflint.c:3437 +#: src/elflint.c:3481 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" -#: src/elflint.c:3454 +#: src/elflint.c:3498 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" -#: src/elflint.c:3463 +#: src/elflint.c:3507 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "" -#: src/elflint.c:3472 +#: src/elflint.c:3516 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" -#: src/elflint.c:3487 +#: src/elflint.c:3531 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" #. Tag_File -#: src/elflint.c:3498 +#: src/elflint.c:3542 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" -#: src/elflint.c:3516 +#: src/elflint.c:3560 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" -#: src/elflint.c:3527 +#: src/elflint.c:3571 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "" -#: src/elflint.c:3540 +#: src/elflint.c:3584 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "" -#: src/elflint.c:3544 +#: src/elflint.c:3588 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" -#: src/elflint.c:3554 +#: src/elflint.c:3598 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "" -#: src/elflint.c:3560 +#: src/elflint.c:3604 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" -#: src/elflint.c:3649 +#: src/elflint.c:3693 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "" -#: src/elflint.c:3653 +#: src/elflint.c:3697 #, c-format msgid "zeroth section has nonzero name\n" msgstr "" -#: src/elflint.c:3655 +#: src/elflint.c:3699 #, c-format msgid "zeroth section has nonzero type\n" msgstr "" -#: src/elflint.c:3657 +#: src/elflint.c:3701 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "" -#: src/elflint.c:3659 +#: src/elflint.c:3703 #, c-format msgid "zeroth section has nonzero address\n" msgstr "" -#: src/elflint.c:3661 +#: src/elflint.c:3705 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "" -#: src/elflint.c:3663 +#: src/elflint.c:3707 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "" -#: src/elflint.c:3665 +#: src/elflint.c:3709 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "" -#: src/elflint.c:3668 +#: src/elflint.c:3712 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " "value\n" msgstr "" -#: src/elflint.c:3672 +#: src/elflint.c:3716 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in shstrndx\n" msgstr "" -#: src/elflint.c:3676 +#: src/elflint.c:3720 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in phnum\n" msgstr "" -#: src/elflint.c:3694 +#: src/elflint.c:3738 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "" -#: src/elflint.c:3703 +#: src/elflint.c:3747 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "" -#: src/elflint.c:3730 +#: src/elflint.c:3774 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3748 +#: src/elflint.c:3792 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3766 +#: src/elflint.c:3810 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" -#: src/elflint.c:3784 +#: src/elflint.c:3828 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "" -#: src/elflint.c:3790 src/elflint.c:3822 +#: src/elflint.c:3834 src/elflint.c:3866 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" -#: src/elflint.c:3795 src/elflint.c:3827 +#: src/elflint.c:3839 src/elflint.c:3871 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " "segments\n" msgstr "" -#: src/elflint.c:3803 +#: src/elflint.c:3847 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" msgstr "" -#: src/elflint.c:3846 +#: src/elflint.c:3890 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "" -#: src/elflint.c:3851 +#: src/elflint.c:3895 #, c-format msgid "cannot get section header\n" msgstr "" -#: src/elflint.c:3861 +#: src/elflint.c:3905 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "" -#: src/elflint.c:3876 +#: src/elflint.c:3920 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" msgstr "" -#: src/elflint.c:3883 +#: src/elflint.c:3927 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "" -#: src/elflint.c:3891 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" -#: src/elflint.c:3901 +#: src/elflint.c:3945 #, fuzzy, c-format msgid "section [%2zu] '%s': allocated section cannot be compressed\n" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elflint.c:3906 +#: src/elflint.c:3950 #, fuzzy, c-format msgid "section [%2zu] '%s': nobits section cannot be compressed\n" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/elflint.c:3912 +#: src/elflint.c:3956 #, c-format msgid "" "section [%2zu] '%s': compressed section with no compression header: %s\n" msgstr "" -#: src/elflint.c:3918 +#: src/elflint.c:3962 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" -#: src/elflint.c:3923 +#: src/elflint.c:3967 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" -#: src/elflint.c:3930 +#: src/elflint.c:3974 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "" -#: src/elflint.c:3935 +#: src/elflint.c:3979 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" -#: src/elflint.c:3954 +#: src/elflint.c:3998 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" -#: src/elflint.c:3963 +#: src/elflint.c:4007 #, c-format msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" msgstr "" -#: src/elflint.c:3970 +#: src/elflint.c:4014 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "" -#: src/elflint.c:4001 +#: src/elflint.c:4045 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " "%d\n" msgstr "" -#: src/elflint.c:4011 +#: src/elflint.c:4055 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d\n" msgstr "" -#: src/elflint.c:4037 +#: src/elflint.c:4081 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d and file contents is non-zero\n" msgstr "" -#: src/elflint.c:4048 +#: src/elflint.c:4092 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " "segment of program header entry %d\n" msgstr "" -#: src/elflint.c:4059 +#: src/elflint.c:4103 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "" -#: src/elflint.c:4069 +#: src/elflint.c:4113 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" -#: src/elflint.c:4079 +#: src/elflint.c:4123 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" -#: src/elflint.c:4085 +#: src/elflint.c:4129 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" msgstr "" -#: src/elflint.c:4093 +#: src/elflint.c:4137 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" -#: src/elflint.c:4144 +#: src/elflint.c:4188 #, c-format msgid "more than one version symbol table present\n" msgstr "" -#: src/elflint.c:4167 +#: src/elflint.c:4211 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "" -#: src/elflint.c:4178 +#: src/elflint.c:4222 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" -#: src/elflint.c:4184 +#: src/elflint.c:4228 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" -#: src/elflint.c:4195 +#: src/elflint.c:4239 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " "exist\n" msgstr "" -#: src/elflint.c:4208 +#: src/elflint.c:4252 #, c-format msgid "duplicate version index %d\n" msgstr "" -#: src/elflint.c:4222 +#: src/elflint.c:4266 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" -#: src/elflint.c:4271 +#: src/elflint.c:4315 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" -#: src/elflint.c:4275 +#: src/elflint.c:4319 #, c-format msgid "" "section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4298 +#: src/elflint.c:4342 #, c-format msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4302 +#: src/elflint.c:4346 #, c-format msgid "" "section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4319 +#: src/elflint.c:4363 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4338 +#: src/elflint.c:4382 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "" -#: src/elflint.c:4341 +#: src/elflint.c:4385 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4362 +#: src/elflint.c:4406 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4369 +#: src/elflint.c:4413 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "" -#: src/elflint.c:4372 +#: src/elflint.c:4416 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4390 +#: src/elflint.c:4434 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" msgstr "" -#: src/elflint.c:4405 +#: src/elflint.c:4449 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "" -#: src/elflint.c:4414 +#: src/elflint.c:4458 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" -#: src/elflint.c:4425 +#: src/elflint.c:4469 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "" -#: src/elflint.c:4433 +#: src/elflint.c:4477 #, c-format msgid "more than one TLS entry in program header\n" msgstr "" -#: src/elflint.c:4440 +#: src/elflint.c:4484 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "" -#: src/elflint.c:4454 +#: src/elflint.c:4498 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4457 +#: src/elflint.c:4501 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4467 +#: src/elflint.c:4511 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "" -#: src/elflint.c:4488 +#: src/elflint.c:4532 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "" -#: src/elflint.c:4499 +#: src/elflint.c:4543 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" -#: src/elflint.c:4506 +#: src/elflint.c:4550 #, c-format msgid "" "GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" msgstr "" -#: src/elflint.c:4515 src/elflint.c:4538 +#: src/elflint.c:4559 src/elflint.c:4582 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "" -#: src/elflint.c:4544 +#: src/elflint.c:4588 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" -#: src/elflint.c:4569 +#: src/elflint.c:4613 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4572 +#: src/elflint.c:4616 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4585 +#: src/elflint.c:4629 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "" -#: src/elflint.c:4593 +#: src/elflint.c:4637 #, c-format msgid "call frame search table must be allocated\n" msgstr "" -#: src/elflint.c:4596 +#: src/elflint.c:4640 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "" -#: src/elflint.c:4600 +#: src/elflint.c:4644 #, c-format msgid "call frame search table must not be writable\n" msgstr "" -#: src/elflint.c:4603 +#: src/elflint.c:4647 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "" -#: src/elflint.c:4608 +#: src/elflint.c:4652 #, c-format msgid "call frame search table must not be executable\n" msgstr "" -#: src/elflint.c:4611 +#: src/elflint.c:4655 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "" -#: src/elflint.c:4622 +#: src/elflint.c:4666 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "" -#: src/elflint.c:4629 +#: src/elflint.c:4673 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "" -#: src/elflint.c:4632 +#: src/elflint.c:4676 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " "alignment\n" msgstr "" -#: src/elflint.c:4645 +#: src/elflint.c:4689 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " "program header entry" msgstr "" -#: src/elflint.c:4679 +#: src/elflint.c:4723 #, c-format msgid "cannot read ELF header: %s\n" msgstr "" -#: src/elflint.c:4705 +#: src/elflint.c:4749 #, c-format msgid "text relocation flag set but not needed\n" msgstr "" @@ -3131,8 +3225,8 @@ msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "" #. Strings for arguments in help texts. -#: src/findtextrel.c:75 src/nm.c:107 src/objdump.c:70 src/size.c:81 -#: src/strings.c:87 src/strip.c:95 +#: src/findtextrel.c:75 src/nm.c:109 src/objdump.c:72 src/size.c:81 +#: src/strings.c:88 src/strip.c:99 msgid "[FILE...]" msgstr "" @@ -3217,44 +3311,44 @@ msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" msgstr "" -#: src/nm.c:65 src/strip.c:67 +#: src/nm.c:67 src/strip.c:70 msgid "Output selection:" msgstr "" -#: src/nm.c:66 +#: src/nm.c:68 msgid "Display debugger-only symbols" msgstr "" -#: src/nm.c:67 +#: src/nm.c:69 msgid "Display only defined symbols" msgstr "Zeige nur definierte Symbole" -#: src/nm.c:70 +#: src/nm.c:72 msgid "Display dynamic symbols instead of normal symbols" msgstr "Zeige dynamische Symbole anstelle normaler Symbole" -#: src/nm.c:71 +#: src/nm.c:73 msgid "Display only external symbols" msgstr "Zeige nur externe Symbole" -#: src/nm.c:72 +#: src/nm.c:74 msgid "Display only undefined symbols" msgstr "Zeige nur undefinierte Symbole" -#: src/nm.c:74 +#: src/nm.c:76 msgid "Include index for symbols from archive members" msgstr "" -#: src/nm.c:76 src/size.c:55 +#: src/nm.c:78 src/size.c:55 msgid "Output format:" msgstr "Ausgabeformat:" -#: src/nm.c:78 +#: src/nm.c:80 #, fuzzy msgid "Print name of the input file before every symbol" msgstr "Zeige Name der Eingabedatei vor jedem Symbol" -#: src/nm.c:81 +#: src/nm.c:83 msgid "" "Use the output format FORMAT. FORMAT can be `bsd', `sysv' or `posix'. The " "default is `sysv'" @@ -3262,76 +3356,76 @@ msgstr "" "Benutze das Ausgabeformat FORMAT. FORMAT kann `bsd', `sysv' or `posix' sein. " "Der Standard ist `sysv'" -#: src/nm.c:83 +#: src/nm.c:85 msgid "Same as --format=bsd" msgstr "Genau wie --format=bsd" -#: src/nm.c:84 +#: src/nm.c:86 msgid "Same as --format=posix" msgstr "Genau wie --format=posix" -#: src/nm.c:85 src/size.c:61 +#: src/nm.c:87 src/size.c:61 msgid "Use RADIX for printing symbol values" msgstr "Benutze RADIX zur Ausgabe von Symbolwerten" -#: src/nm.c:86 +#: src/nm.c:88 #, fuzzy msgid "Mark special symbols" msgstr "Kennzeichne schwache Symbole" -#: src/nm.c:88 +#: src/nm.c:90 #, fuzzy msgid "Print size of defined symbols" msgstr "Zeige Grösse der definierten Symbole" -#: src/nm.c:90 src/size.c:69 src/strip.c:72 src/unstrip.c:73 +#: src/nm.c:92 src/size.c:69 src/strip.c:75 src/unstrip.c:73 msgid "Output options:" msgstr "Ausgabeoptionen:" -#: src/nm.c:91 +#: src/nm.c:93 msgid "Sort symbols numerically by address" msgstr "Symbole anhand der Adresse numerisch sortieren" -#: src/nm.c:93 +#: src/nm.c:95 msgid "Do not sort the symbols" msgstr "Symbole nicht sortieren" -#: src/nm.c:94 +#: src/nm.c:96 msgid "Reverse the sense of the sort" msgstr "Sortierreihenfolge umkehren" -#: src/nm.c:97 +#: src/nm.c:99 msgid "Decode low-level symbol names into source code names" msgstr "" #. Short description of program. -#: src/nm.c:104 +#: src/nm.c:106 msgid "List symbols from FILEs (a.out by default)." msgstr "" -#: src/nm.c:115 src/objdump.c:78 +#: src/nm.c:117 src/objdump.c:80 #, fuzzy msgid "Output formatting" msgstr "Ausgabeformat:" -#: src/nm.c:139 src/objdump.c:102 src/size.c:106 src/strip.c:127 +#: src/nm.c:141 src/objdump.c:104 src/size.c:106 src/strip.c:131 #, fuzzy, c-format msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: INTERNER FEHLER %d (%s-%s): %s" -#: src/nm.c:380 src/nm.c:392 src/size.c:289 src/size.c:298 src/size.c:309 -#: src/strip.c:2298 +#: src/nm.c:382 src/nm.c:394 src/size.c:289 src/size.c:298 src/size.c:309 +#: src/strip.c:2421 #, c-format msgid "while closing '%s'" msgstr "beim Schliessen von '%s'" -#: src/nm.c:402 src/objdump.c:279 src/strip.c:377 +#: src/nm.c:404 src/objdump.c:281 src/strip.c:443 #, c-format msgid "%s: File format not recognized" msgstr "%s: Dateiformat nicht erkannt" #. Note: 0 is no valid offset. -#: src/nm.c:442 +#: src/nm.c:444 #, fuzzy msgid "" "\n" @@ -3340,44 +3434,44 @@ msgstr "" "\n" "Archiv-Index:" -#: src/nm.c:451 +#: src/nm.c:453 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "ungültiger Offset %zu für Symbol %s" -#: src/nm.c:456 +#: src/nm.c:458 #, c-format msgid "%s in %s\n" msgstr "" -#: src/nm.c:464 +#: src/nm.c:466 #, c-format msgid "cannot reset archive offset to beginning" msgstr "" -#: src/nm.c:489 src/objdump.c:327 +#: src/nm.c:491 src/objdump.c:329 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: Dateiformat nicht erkannt" -#: src/nm.c:704 +#: src/nm.c:706 #, c-format msgid "cannot create search tree" msgstr "Kann Suchbaum nicht erstellen" -#: src/nm.c:745 src/nm.c:1206 src/objdump.c:776 src/readelf.c:535 -#: src/readelf.c:1113 src/readelf.c:1313 src/readelf.c:1461 src/readelf.c:1662 -#: src/readelf.c:1868 src/readelf.c:2058 src/readelf.c:2236 src/readelf.c:2312 -#: src/readelf.c:2570 src/readelf.c:2646 src/readelf.c:2733 src/readelf.c:3313 -#: src/readelf.c:3363 src/readelf.c:3426 src/readelf.c:8337 src/readelf.c:9437 -#: src/readelf.c:9640 src/readelf.c:9708 src/size.c:397 src/size.c:466 -#: src/strip.c:506 +#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:606 +#: src/readelf.c:1196 src/readelf.c:1396 src/readelf.c:1544 src/readelf.c:1745 +#: src/readelf.c:1951 src/readelf.c:2141 src/readelf.c:2319 src/readelf.c:2395 +#: src/readelf.c:2653 src/readelf.c:2729 src/readelf.c:2816 src/readelf.c:3414 +#: src/readelf.c:3464 src/readelf.c:3527 src/readelf.c:11028 +#: src/readelf.c:12200 src/readelf.c:12403 src/readelf.c:12471 src/size.c:397 +#: src/size.c:466 src/strip.c:572 #, c-format msgid "cannot get section header string table index" msgstr "" #. We always print this prolog. -#: src/nm.c:772 +#: src/nm.c:774 #, c-format msgid "" "\n" @@ -3391,87 +3485,87 @@ msgstr "" "\n" #. The header line. -#: src/nm.c:775 +#: src/nm.c:777 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" "\n" msgstr "" -#: src/nm.c:1217 +#: src/nm.c:1219 #, fuzzy, c-format msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "%s: entry size in section `%s' is not what we expect" -#: src/nm.c:1222 +#: src/nm.c:1224 #, fuzzy, c-format msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "%s: entry size in section `%s' is not what we expect" -#: src/nm.c:1301 +#: src/nm.c:1303 #, fuzzy, c-format msgid "%s: entries (%zd) in section %zd `%s' is too large" msgstr "%s: entry size in section `%s' is not what we expect" #. XXX Add machine specific object file types. -#: src/nm.c:1527 +#: src/nm.c:1529 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: Ungültige Operation" -#: src/nm.c:1584 +#: src/nm.c:1586 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: keine Symbole" -#: src/objdump.c:51 +#: src/objdump.c:53 msgid "Mode selection:" msgstr "" -#: src/objdump.c:52 +#: src/objdump.c:54 msgid "Display relocation information." msgstr "" -#: src/objdump.c:54 +#: src/objdump.c:56 msgid "Display the full contents of all sections requested" msgstr "" -#: src/objdump.c:56 +#: src/objdump.c:58 msgid "Display assembler code of executable sections" msgstr "" -#: src/objdump.c:58 +#: src/objdump.c:60 #, fuzzy msgid "Output content selection:" msgstr "Eingabeauswahloptionen:" -#: src/objdump.c:60 +#: src/objdump.c:62 msgid "Only display information for section NAME." msgstr "" #. Short description of program. -#: src/objdump.c:66 +#: src/objdump.c:68 msgid "Show information from FILEs (a.out by default)." msgstr "" -#: src/objdump.c:217 src/readelf.c:483 +#: src/objdump.c:219 src/readelf.c:551 msgid "No operation specified.\n" msgstr "Keine Operation angegeben.\n" -#: src/objdump.c:257 src/objdump.c:269 +#: src/objdump.c:259 src/objdump.c:271 #, c-format msgid "while close `%s'" msgstr "" -#: src/objdump.c:362 src/readelf.c:1963 src/readelf.c:2155 +#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238 msgid "INVALID SYMBOL" msgstr "" -#: src/objdump.c:377 src/readelf.c:1997 src/readelf.c:2191 +#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274 msgid "INVALID SECTION" msgstr "" -#: src/objdump.c:497 +#: src/objdump.c:499 #, c-format msgid "" "\n" @@ -3479,507 +3573,527 @@ msgid "" "%-*s TYPE VALUE\n" msgstr "" -#: src/objdump.c:500 +#: src/objdump.c:502 msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:565 +#: src/objdump.c:567 #, c-format msgid "Contents of section %s:\n" msgstr "Inhalt des Abschnitts %s:\n" -#: src/objdump.c:686 +#: src/objdump.c:688 #, c-format msgid "cannot disassemble" msgstr "Disassemblieren nicht möglich" #. Short description of program. -#: src/ranlib.c:63 +#: src/ranlib.c:64 msgid "Generate an index to speed access to archives." msgstr "Erstelle einen Index zur Beschleunigung des Zugriffs auf Archive." #. Strings for arguments in help texts. -#: src/ranlib.c:66 +#: src/ranlib.c:67 msgid "ARCHIVE" msgstr "ARCHIV" -#: src/ranlib.c:102 +#: src/ranlib.c:103 #, c-format msgid "Archive name required" msgstr "Archivname benötigt" -#: src/ranlib.c:166 +#: src/ranlib.c:167 #, c-format msgid "'%s' is no archive" msgstr "'%s' ist kein Archiv" -#: src/ranlib.c:201 +#: src/ranlib.c:202 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "" -#: src/readelf.c:71 +#: src/readelf.c:95 #, fuzzy msgid "ELF input selection:" msgstr "Eingabeauswahloptionen:" -#: src/readelf.c:73 +#: src/readelf.c:97 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" -#: src/readelf.c:75 +#: src/readelf.c:100 +msgid "" +"Used with -w to find the skeleton Compile Units in FILE associated with the " +"Split Compile units in a .dwo input file" +msgstr "" + +#: src/readelf.c:102 #, fuzzy msgid "ELF output selection:" msgstr "Eingabeauswahloptionen:" -#: src/readelf.c:77 +#: src/readelf.c:104 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "" -#: src/readelf.c:78 +#: src/readelf.c:105 msgid "Display the dynamic segment" msgstr "" -#: src/readelf.c:79 +#: src/readelf.c:106 msgid "Display the ELF file header" msgstr "" -#: src/readelf.c:81 +#: src/readelf.c:108 msgid "Display histogram of bucket list lengths" msgstr "" -#: src/readelf.c:82 +#: src/readelf.c:109 msgid "Display the program headers" msgstr "Programm-Köpfe anzeigen" -#: src/readelf.c:84 +#: src/readelf.c:111 msgid "Display relocations" msgstr "Relocations anzeigen" -#: src/readelf.c:85 +#: src/readelf.c:112 +#, fuzzy +msgid "Display the section groups" +msgstr "Programm-Köpfe anzeigen" + +#: src/readelf.c:113 #, fuzzy msgid "Display the sections' headers" msgstr "Programm-Köpfe anzeigen" -#: src/readelf.c:88 +#: src/readelf.c:116 #, fuzzy msgid "Display the symbol table sections" msgstr "Symboltabelle anzeigen" -#: src/readelf.c:89 +#: src/readelf.c:117 msgid "Display versioning information" msgstr "Versionierungsinformationen anzeigen" -#: src/readelf.c:90 +#: src/readelf.c:118 #, fuzzy msgid "Display the ELF notes" msgstr "Kernnotizen anzeigen" -#: src/readelf.c:92 +#: src/readelf.c:120 #, fuzzy msgid "Display architecture specific information, if any" msgstr "Architekturspezifische Informationen anzeigen (falls vorhanden)" -#: src/readelf.c:94 +#: src/readelf.c:122 msgid "Display sections for exception handling" msgstr "Abschnitte für Ausnahmebehandlung anzeigen" -#: src/readelf.c:96 +#: src/readelf.c:124 msgid "Additional output selection:" msgstr "" -#: src/readelf.c:98 +#: src/readelf.c:126 msgid "" -"Display DWARF section content. SECTION can be one of abbrev, aranges, " -"decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " -"pubnames, str, macinfo, macro or exception" +"Display DWARF section content. SECTION can be one of abbrev, addr, aranges, " +"decodedaranges, frame, gdb_index, info, info+, loc, line, decodedline, " +"ranges, pubnames, str, macinfo, macro or exception" msgstr "" -#: src/readelf.c:102 +#: src/readelf.c:130 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "" -#: src/readelf.c:104 +#: src/readelf.c:132 msgid "Print string contents of sections" msgstr "" -#: src/readelf.c:107 +#: src/readelf.c:135 msgid "Display the symbol index of an archive" msgstr "Symbolindex des Archivs anzeigen" -#: src/readelf.c:109 +#: src/readelf.c:137 msgid "Output control:" msgstr "Ausgabekontrolle:" -#: src/readelf.c:111 +#: src/readelf.c:139 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Keine symbolischen Namen für Adressen in DWARF-Daten suchen" -#: src/readelf.c:113 +#: src/readelf.c:141 #, fuzzy msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "Keine symbolischen Namen für Adressen in DWARF-Daten suchen" -#: src/readelf.c:115 +#: src/readelf.c:143 msgid "Ignored for compatibility (lines always wide)" msgstr "" -#: src/readelf.c:117 +#: src/readelf.c:145 msgid "" "Show compression information for compressed sections (when used with -S); " "decompress section before dumping data (when used with -p or -x)" msgstr "" #. Short description of program. -#: src/readelf.c:122 +#: src/readelf.c:150 msgid "Print information from ELF file in human-readable form." msgstr "Informationen aus der ELF-Datei in menschenlesbarer Form ausgeben." -#: src/readelf.c:451 +#. Look up once. +#: src/readelf.c:329 +msgid "yes" +msgstr "ja" + +#: src/readelf.c:330 +msgid "no" +msgstr "nein" + +#: src/readelf.c:519 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "" -#: src/readelf.c:519 src/readelf.c:630 +#: src/readelf.c:590 src/readelf.c:701 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "konnte Elf-Deskriptor nicht erzeugen: %s" -#: src/readelf.c:526 src/readelf.c:842 src/strip.c:575 +#: src/readelf.c:597 src/readelf.c:925 src/strip.c:641 #, c-format msgid "cannot determine number of sections: %s" msgstr "" -#: src/readelf.c:544 src/readelf.c:1135 src/readelf.c:1337 +#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420 #, c-format msgid "cannot get section: %s" msgstr "" -#: src/readelf.c:553 src/readelf.c:1142 src/readelf.c:1345 src/readelf.c:9660 +#: src/readelf.c:624 src/readelf.c:1225 src/readelf.c:1428 src/readelf.c:12423 #: src/unstrip.c:375 src/unstrip.c:406 src/unstrip.c:455 src/unstrip.c:565 -#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1106 -#: src/unstrip.c:1298 src/unstrip.c:1359 src/unstrip.c:1532 src/unstrip.c:1647 -#: src/unstrip.c:1787 src/unstrip.c:1882 +#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1109 +#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650 +#: src/unstrip.c:1790 src/unstrip.c:1885 #, c-format msgid "cannot get section header: %s" msgstr "" -#: src/readelf.c:561 +#: src/readelf.c:632 #, fuzzy, c-format msgid "cannot get section name" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:570 src/readelf.c:5521 src/readelf.c:7795 src/readelf.c:7897 -#: src/readelf.c:8074 +#: src/readelf.c:641 src/readelf.c:6517 src/readelf.c:10301 src/readelf.c:10403 +#: src/readelf.c:10580 #, c-format msgid "cannot get %s content: %s" msgstr "" -#: src/readelf.c:586 +#: src/readelf.c:657 #, fuzzy, c-format msgid "cannot create temp file '%s'" msgstr "neue Datei konnte nicht angelegt werden" -#: src/readelf.c:595 +#: src/readelf.c:666 #, fuzzy, c-format msgid "cannot write section data" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:601 src/readelf.c:618 src/readelf.c:647 +#: src/readelf.c:672 src/readelf.c:689 src/readelf.c:718 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "" -#: src/readelf.c:608 +#: src/readelf.c:679 #, fuzzy, c-format msgid "error while rewinding file descriptor" msgstr "Fehler beim Schliessen des Elf-Desktriptor: %s\n" -#: src/readelf.c:642 +#: src/readelf.c:713 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "" -#: src/readelf.c:741 -#, fuzzy, c-format -msgid "No such section '%s' in '%s'" -msgstr "konnte Abschnittsdaten nicht holen: %s" - -#: src/readelf.c:768 +#: src/readelf.c:817 #, c-format msgid "cannot stat input file" msgstr "" -#: src/readelf.c:770 +#: src/readelf.c:819 #, c-format msgid "input file is empty" msgstr "" -#: src/readelf.c:772 +#: src/readelf.c:821 #, c-format msgid "failed reading '%s': %s" msgstr "Konnte '%s' nicht lesen: %s" -#: src/readelf.c:827 +#: src/readelf.c:850 +#, fuzzy, c-format +msgid "No such section '%s' in '%s'" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/readelf.c:910 #, c-format msgid "cannot read ELF header: %s" msgstr "" -#: src/readelf.c:835 +#: src/readelf.c:918 #, c-format msgid "cannot create EBL handle" msgstr "" -#: src/readelf.c:848 +#: src/readelf.c:931 #, fuzzy, c-format msgid "cannot determine number of program headers: %s" msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/readelf.c:938 +#: src/readelf.c:1021 msgid "NONE (None)" msgstr "" -#: src/readelf.c:939 +#: src/readelf.c:1022 msgid "REL (Relocatable file)" msgstr "" -#: src/readelf.c:940 +#: src/readelf.c:1023 msgid "EXEC (Executable file)" msgstr "" -#: src/readelf.c:941 +#: src/readelf.c:1024 msgid "DYN (Shared object file)" msgstr "" -#: src/readelf.c:942 +#: src/readelf.c:1025 msgid "CORE (Core file)" msgstr "" -#: src/readelf.c:947 +#: src/readelf.c:1030 #, c-format msgid "OS Specific: (%x)\n" msgstr "" #. && e_type <= ET_HIPROC always true -#: src/readelf.c:949 +#: src/readelf.c:1032 #, c-format msgid "Processor Specific: (%x)\n" msgstr "" -#: src/readelf.c:959 +#: src/readelf.c:1042 msgid "" "ELF Header:\n" " Magic: " msgstr "" -#: src/readelf.c:963 +#: src/readelf.c:1046 #, c-format msgid "" "\n" " Class: %s\n" msgstr "" -#: src/readelf.c:968 +#: src/readelf.c:1051 #, fuzzy, c-format msgid " Data: %s\n" msgstr " Daten: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1057 #, c-format msgid " Ident Version: %hhd %s\n" msgstr "" -#: src/readelf.c:976 src/readelf.c:993 +#: src/readelf.c:1059 src/readelf.c:1076 msgid "(current)" msgstr "(aktuell)" -#: src/readelf.c:980 +#: src/readelf.c:1063 #, c-format msgid " OS/ABI: %s\n" msgstr "" -#: src/readelf.c:983 +#: src/readelf.c:1066 #, c-format msgid " ABI Version: %hhd\n" msgstr "" -#: src/readelf.c:986 +#: src/readelf.c:1069 msgid " Type: " msgstr " Typ: " -#: src/readelf.c:989 +#: src/readelf.c:1072 #, c-format msgid " Machine: %s\n" msgstr "" -#: src/readelf.c:991 +#: src/readelf.c:1074 #, c-format msgid " Version: %d %s\n" msgstr "" -#: src/readelf.c:995 +#: src/readelf.c:1078 #, c-format msgid " Entry point address: %#\n" msgstr "" -#: src/readelf.c:998 +#: src/readelf.c:1081 #, c-format msgid " Start of program headers: % %s\n" msgstr "" -#: src/readelf.c:999 src/readelf.c:1002 +#: src/readelf.c:1082 src/readelf.c:1085 msgid "(bytes into file)" msgstr "" -#: src/readelf.c:1001 +#: src/readelf.c:1084 #, c-format msgid " Start of section headers: % %s\n" msgstr "" -#: src/readelf.c:1004 +#: src/readelf.c:1087 #, c-format msgid " Flags: %s\n" msgstr "" -#: src/readelf.c:1007 +#: src/readelf.c:1090 #, c-format msgid " Size of this header: % %s\n" msgstr "" -#: src/readelf.c:1008 src/readelf.c:1011 src/readelf.c:1028 +#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111 msgid "(bytes)" msgstr "(Bytes)" -#: src/readelf.c:1010 +#: src/readelf.c:1093 #, c-format msgid " Size of program header entries: % %s\n" msgstr "" -#: src/readelf.c:1013 +#: src/readelf.c:1096 #, c-format msgid " Number of program headers entries: %" msgstr "" -#: src/readelf.c:1020 +#: src/readelf.c:1103 #, c-format msgid " (% in [0].sh_info)" msgstr "" -#: src/readelf.c:1023 src/readelf.c:1040 src/readelf.c:1054 +#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137 msgid " ([0] not available)" msgstr "" -#: src/readelf.c:1027 +#: src/readelf.c:1110 #, c-format msgid " Size of section header entries: % %s\n" msgstr "" -#: src/readelf.c:1030 +#: src/readelf.c:1113 #, c-format msgid " Number of section headers entries: %" msgstr "" -#: src/readelf.c:1037 +#: src/readelf.c:1120 #, c-format msgid " (% in [0].sh_size)" msgstr "" #. We managed to get the zeroth section. -#: src/readelf.c:1050 +#: src/readelf.c:1133 #, c-format msgid " (% in [0].sh_link)" msgstr "" -#: src/readelf.c:1058 +#: src/readelf.c:1141 #, c-format msgid "" " Section header string table index: XINDEX%s\n" "\n" msgstr "" -#: src/readelf.c:1062 +#: src/readelf.c:1145 #, c-format msgid "" " Section header string table index: %\n" "\n" msgstr "" -#: src/readelf.c:1105 +#: src/readelf.c:1188 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" "\n" msgstr "" -#: src/readelf.c:1115 +#: src/readelf.c:1198 msgid "Section Headers:" msgstr "" -#: src/readelf.c:1118 +#: src/readelf.c:1201 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" msgstr "" -#: src/readelf.c:1120 +#: src/readelf.c:1203 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" msgstr "" -#: src/readelf.c:1125 +#: src/readelf.c:1208 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1127 +#: src/readelf.c:1210 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1203 +#: src/readelf.c:1286 #, c-format msgid "bad compression header for section %zd: %s" msgstr "" -#: src/readelf.c:1214 +#: src/readelf.c:1297 #, c-format msgid "bad gnu compressed size for section %zd: %s" msgstr "" -#: src/readelf.c:1232 +#: src/readelf.c:1315 msgid "Program Headers:" msgstr "Programm-Köpfe:" -#: src/readelf.c:1234 +#: src/readelf.c:1317 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" -#: src/readelf.c:1237 +#: src/readelf.c:1320 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" msgstr "" -#: src/readelf.c:1294 +#: src/readelf.c:1377 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "" -#: src/readelf.c:1315 +#: src/readelf.c:1398 msgid "" "\n" " Section to Segment mapping:\n" " Segment Sections..." msgstr "" -#: src/readelf.c:1326 src/unstrip.c:1941 src/unstrip.c:1983 src/unstrip.c:1990 +#: src/readelf.c:1409 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993 #, c-format msgid "cannot get program header: %s" msgstr "" -#: src/readelf.c:1469 +#: src/readelf.c:1552 #, c-format msgid "" "\n" @@ -3990,7 +4104,7 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1474 +#: src/readelf.c:1557 #, c-format msgid "" "\n" @@ -4001,31 +4115,31 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1482 +#: src/readelf.c:1565 msgid "" msgstr "" -#: src/readelf.c:1496 +#: src/readelf.c:1579 msgid "" msgstr "" -#: src/readelf.c:1519 src/readelf.c:2246 src/readelf.c:3329 src/readelf.c:9531 -#: src/readelf.c:9538 src/readelf.c:9582 src/readelf.c:9589 +#: src/readelf.c:1602 src/readelf.c:2329 src/readelf.c:3430 src/readelf.c:12294 +#: src/readelf.c:12301 src/readelf.c:12345 src/readelf.c:12352 msgid "Couldn't uncompress section" msgstr "" -#: src/readelf.c:1524 src/readelf.c:2251 src/readelf.c:3334 +#: src/readelf.c:1607 src/readelf.c:2334 src/readelf.c:3435 #, fuzzy, c-format msgid "cannot get section [%zd] header: %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:1668 src/readelf.c:2318 src/readelf.c:2576 src/readelf.c:2652 -#: src/readelf.c:2956 src/readelf.c:3030 src/readelf.c:4732 +#: src/readelf.c:1751 src/readelf.c:2401 src/readelf.c:2659 src/readelf.c:2735 +#: src/readelf.c:3039 src/readelf.c:3113 src/readelf.c:5308 #, fuzzy, c-format msgid "invalid sh_link value in section %zu" msgstr "ungültige .debug_line Sektion" -#: src/readelf.c:1671 +#: src/readelf.c:1754 #, c-format msgid "" "\n" @@ -4038,43 +4152,43 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1681 +#: src/readelf.c:1764 msgid " Type Value\n" msgstr "" -#: src/readelf.c:1705 +#: src/readelf.c:1788 #, c-format msgid "Shared library: [%s]\n" msgstr "" -#: src/readelf.c:1710 +#: src/readelf.c:1793 #, c-format msgid "Library soname: [%s]\n" msgstr "" -#: src/readelf.c:1715 +#: src/readelf.c:1798 #, c-format msgid "Library rpath: [%s]\n" msgstr "" -#: src/readelf.c:1720 +#: src/readelf.c:1803 #, c-format msgid "Library runpath: [%s]\n" msgstr "" -#: src/readelf.c:1740 +#: src/readelf.c:1823 #, c-format msgid "% (bytes)\n" msgstr "" -#: src/readelf.c:1853 src/readelf.c:2043 +#: src/readelf.c:1936 src/readelf.c:2126 #, c-format msgid "" "\n" "Invalid symbol table at offset %#0\n" msgstr "" -#: src/readelf.c:1871 src/readelf.c:2061 +#: src/readelf.c:1954 src/readelf.c:2144 #, c-format msgid "" "\n" @@ -4093,7 +4207,7 @@ msgstr[1] "" #. The .rela.dyn section does not refer to a specific section but #. instead of section index zero. Do not try to print a section #. name. -#: src/readelf.c:1886 src/readelf.c:2076 +#: src/readelf.c:1969 src/readelf.c:2159 #, c-format msgid "" "\n" @@ -4104,29 +4218,29 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:1896 +#: src/readelf.c:1979 msgid " Offset Type Value Name\n" msgstr "" -#: src/readelf.c:1898 +#: src/readelf.c:1981 msgid " Offset Type Value Name\n" msgstr "" -#: src/readelf.c:1951 src/readelf.c:1962 src/readelf.c:1975 src/readelf.c:1996 -#: src/readelf.c:2008 src/readelf.c:2142 src/readelf.c:2154 src/readelf.c:2168 -#: src/readelf.c:2190 src/readelf.c:2203 +#: src/readelf.c:2034 src/readelf.c:2045 src/readelf.c:2058 src/readelf.c:2079 +#: src/readelf.c:2091 src/readelf.c:2225 src/readelf.c:2237 src/readelf.c:2251 +#: src/readelf.c:2273 src/readelf.c:2286 msgid "" msgstr "" -#: src/readelf.c:2086 +#: src/readelf.c:2169 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2088 +#: src/readelf.c:2171 msgid " Offset Type Value Addend Name\n" msgstr "" -#: src/readelf.c:2326 +#: src/readelf.c:2409 #, c-format msgid "" "\n" @@ -4137,40 +4251,40 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2331 +#: src/readelf.c:2414 #, 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:2339 +#: src/readelf.c:2422 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2341 +#: src/readelf.c:2424 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr "" -#: src/readelf.c:2361 +#: src/readelf.c:2444 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "" -#: src/readelf.c:2449 +#: src/readelf.c:2532 #, c-format msgid "bad dynamic symbol" msgstr "" -#: src/readelf.c:2531 +#: src/readelf.c:2614 msgid "none" msgstr "keine" -#: src/readelf.c:2548 +#: src/readelf.c:2631 msgid "| " msgstr "| " -#: src/readelf.c:2579 +#: src/readelf.c:2662 #, c-format msgid "" "\n" @@ -4183,17 +4297,17 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2600 +#: src/readelf.c:2683 #, fuzzy, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Version: %hu Datei: %s Cnt: %hu\n" -#: src/readelf.c:2613 +#: src/readelf.c:2696 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Name: %s Flags: %s Version: %hu\n" -#: src/readelf.c:2656 +#: src/readelf.c:2739 #, c-format msgid "" "\n" @@ -4206,18 +4320,18 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2684 +#: src/readelf.c:2767 #, c-format msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n" msgstr "" -#: src/readelf.c:2699 +#: src/readelf.c:2782 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr "" #. Print the header. -#: src/readelf.c:2960 +#: src/readelf.c:3043 #, c-format msgid "" "\n" @@ -4230,15 +4344,15 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:2988 +#: src/readelf.c:3071 msgid " 0 *local* " msgstr " 0 *lokal* " -#: src/readelf.c:2993 +#: src/readelf.c:3076 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:3035 +#: src/readelf.c:3118 #, c-format msgid "" "\n" @@ -4253,56 +4367,66 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:3057 +#: src/readelf.c:3140 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr "" -#: src/readelf.c:3059 +#: src/readelf.c:3142 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:3066 +#: src/readelf.c:3149 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:3079 +#: src/readelf.c:3162 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" "\t\t\t unsuccessful lookup: %f\n" msgstr "" -#: src/readelf.c:3097 src/readelf.c:3152 src/readelf.c:3209 +#: src/readelf.c:3180 src/readelf.c:3244 src/readelf.c:3310 #, c-format msgid "cannot get data for section %d: %s" msgstr "" -#: src/readelf.c:3105 +#: src/readelf.c:3188 #, fuzzy, c-format msgid "invalid data in sysv.hash section %d" msgstr "ungültige .debug_line Sektion" -#: src/readelf.c:3160 +#: src/readelf.c:3217 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3252 #, fuzzy, c-format msgid "invalid data in sysv.hash64 section %d" msgstr "ungültige .debug_line Sektion" -#: src/readelf.c:3218 +#: src/readelf.c:3283 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash64 section %d" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:3319 #, fuzzy, c-format msgid "invalid data in gnu.hash section %d" msgstr "ungültige .debug_line Sektion" -#: src/readelf.c:3285 +#: src/readelf.c:3386 #, c-format msgid "" " Symbol Bias: %u\n" " Bitmask Size: %zu bytes %%% bits set 2nd hash shift: %u\n" msgstr "" -#: src/readelf.c:3374 +#: src/readelf.c:3475 #, c-format msgid "" "\n" @@ -4313,13 +4437,13 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:3388 +#: src/readelf.c:3489 msgid "" " Library Time Stamp Checksum Version " "Flags" msgstr "" -#: src/readelf.c:3438 +#: src/readelf.c:3539 #, c-format msgid "" "\n" @@ -4327,142 +4451,102 @@ msgid "" "%#0:\n" msgstr "" -#: src/readelf.c:3455 +#: src/readelf.c:3556 msgid " Owner Size\n" msgstr "" -#: src/readelf.c:3484 +#: src/readelf.c:3585 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" #. Unknown subsection, print and skip. -#: src/readelf.c:3523 +#: src/readelf.c:3624 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" #. Tag_File -#: src/readelf.c:3528 +#: src/readelf.c:3629 #, c-format msgid " File: %11\n" msgstr " File: %11\n" -#: src/readelf.c:3577 +#: src/readelf.c:3678 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3580 +#: src/readelf.c:3681 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3583 +#: src/readelf.c:3684 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3593 +#: src/readelf.c:3694 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3596 +#: src/readelf.c:3697 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3641 -#, c-format -msgid "%s+%# <%s+%#>" -msgstr "%s+%# <%s+%#>" - -#: src/readelf.c:3644 -#, c-format -msgid "%s+%#0* <%s+%#>" -msgstr "%s+%#0* <%s+%#>" - -#: src/readelf.c:3649 -#, c-format -msgid "%# <%s+%#>" -msgstr "%# <%s+%#>" - -#: src/readelf.c:3652 -#, c-format -msgid "%#0* <%s+%#>" -msgstr "%#0* <%s+%#>" - -#: src/readelf.c:3658 -#, c-format -msgid "%s+%# <%s>" -msgstr "%s+%# <%s>" - -#: src/readelf.c:3661 -#, c-format -msgid "%s+%#0* <%s>" -msgstr "%s+%#0* <%s>" - -#: src/readelf.c:3665 -#, c-format -msgid "%# <%s>" -msgstr "%# <%s>" - -#: src/readelf.c:3668 -#, c-format -msgid "%#0* <%s>" -msgstr "%#0* <%s>" - -#: src/readelf.c:3673 -#, c-format -msgid "%s+%#" -msgstr "%s+%#" - -#: src/readelf.c:3676 -#, c-format -msgid "%s+%#0*" -msgstr "%s+%#0*" +#: src/readelf.c:3767 +#, fuzzy, c-format +msgid "sprintf failure" +msgstr "mprotect fehlgeschlagen" -#: src/readelf.c:4054 +#: src/readelf.c:4249 msgid "empty block" msgstr "" -#: src/readelf.c:4057 +#: src/readelf.c:4252 #, c-format msgid "%zu byte block:" msgstr "" -#: src/readelf.c:4454 +#: src/readelf.c:4730 #, c-format -msgid "%*s[%4] %s \n" +msgid "%*s[%2] %s \n" msgstr "" -#: src/readelf.c:4511 +#: src/readelf.c:4794 #, c-format msgid "%s %# used with different address sizes" msgstr "" -#: src/readelf.c:4518 +#: src/readelf.c:4801 #, c-format msgid "%s %# used with different offset sizes" msgstr "" -#: src/readelf.c:4525 +#: src/readelf.c:4808 #, c-format msgid "%s %# used with different base addresses" msgstr "" -#: src/readelf.c:4614 +#: src/readelf.c:4815 +#, c-format +msgid "%s %# used with different attribute %s and %s" +msgstr "" + +#: src/readelf.c:4912 #, c-format msgid " [%6tx] \n" msgstr "" -#: src/readelf.c:4622 +#: src/readelf.c:4920 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr "" -#: src/readelf.c:4648 +#: src/readelf.c:4998 #, c-format msgid "" "\n" @@ -4470,37 +4554,79 @@ msgid "" " [ Code]\n" msgstr "" -#: src/readelf.c:4656 +#: src/readelf.c:5006 #, c-format msgid "" "\n" "Abbreviation section at offset %:\n" msgstr "" -#: src/readelf.c:4669 +#: src/readelf.c:5019 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr "" -#: src/readelf.c:4685 +#: src/readelf.c:5035 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr "" -#: src/readelf.c:4688 -msgid "yes" -msgstr "ja" +#: src/readelf.c:5068 src/readelf.c:5377 src/readelf.c:5541 src/readelf.c:5926 +#: src/readelf.c:6527 src/readelf.c:8168 src/readelf.c:8838 src/readelf.c:9274 +#: src/readelf.c:9518 src/readelf.c:9683 src/readelf.c:10044 +#: src/readelf.c:10102 +#, c-format +msgid "" +"\n" +"DWARF section [%2zu] '%s' at offset %#:\n" +msgstr "" -#: src/readelf.c:4688 -msgid "no" -msgstr "nein" +#: src/readelf.c:5081 +#, fuzzy, c-format +msgid "cannot get .debug_addr section data: %s" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/readelf.c:5181 src/readelf.c:5205 src/readelf.c:5586 src/readelf.c:8883 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905 +#, fuzzy, c-format +msgid " Address size: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915 +#, fuzzy, c-format +msgid " Segment size: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:5224 src/readelf.c:5603 src/readelf.c:8900 src/readelf.c:10234 +#, fuzzy, c-format +msgid "Unknown version" +msgstr "unbekannte Version" + +#: src/readelf.c:5234 src/readelf.c:5447 src/readelf.c:5613 src/readelf.c:8910 +#, fuzzy, c-format +msgid "unsupported address size" +msgstr "Kein Adress-Wert" + +#: src/readelf.c:5245 src/readelf.c:5456 src/readelf.c:5623 src/readelf.c:8920 +#, c-format +msgid "unsupported segment size" +msgstr "" -#: src/readelf.c:4722 src/readelf.c:4795 +#: src/readelf.c:5298 src/readelf.c:5372 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "" -#: src/readelf.c:4737 +#: src/readelf.c:5313 #, c-format msgid "" "\n" @@ -4511,195 +4637,241 @@ msgid_plural "" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:4768 +#: src/readelf.c:5344 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4770 +#: src/readelf.c:5346 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" -#: src/readelf.c:4800 src/readelf.c:4954 src/readelf.c:5531 src/readelf.c:6485 -#: src/readelf.c:7017 src/readelf.c:7137 src/readelf.c:7301 src/readelf.c:7726 -#, c-format -msgid "" -"\n" -"DWARF section [%2zu] '%s' at offset %#:\n" -msgstr "" - -#: src/readelf.c:4813 src/readelf.c:6511 +#: src/readelf.c:5390 src/readelf.c:8195 #, c-format msgid "" "\n" "Table at offset %zu:\n" msgstr "" -#: src/readelf.c:4817 src/readelf.c:5555 src/readelf.c:6522 +#: src/readelf.c:5394 src/readelf.c:5567 src/readelf.c:6551 src/readelf.c:8206 +#: src/readelf.c:8864 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "" -#: src/readelf.c:4833 +#: src/readelf.c:5410 #, fuzzy, c-format msgid "" "\n" " Length: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4845 +#: src/readelf.c:5422 #, fuzzy, c-format msgid " DWARF version: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4849 +#: src/readelf.c:5426 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4860 +#: src/readelf.c:5437 #, fuzzy, c-format msgid " CU offset: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4866 +#: src/readelf.c:5443 #, c-format msgid " Address size: %6\n" msgstr "" -#: src/readelf.c:4870 -#, fuzzy, c-format -msgid "unsupported address size" -msgstr "Kein Adress-Wert" - -#: src/readelf.c:4875 +#: src/readelf.c:5452 #, c-format msgid "" " Segment size: %6\n" "\n" msgstr "" -#: src/readelf.c:4879 +#: src/readelf.c:5507 #, c-format -msgid "unsupported segment size" +msgid " %zu padding bytes\n" msgstr "" -#: src/readelf.c:4919 +#: src/readelf.c:5550 +#, fuzzy, c-format +msgid "cannot get .debug_rnglists content: %s" +msgstr "konnte Programm-Kopf nicht erstellen: %s" + +#: src/readelf.c:5573 src/readelf.c:8870 #, fuzzy, c-format -msgid " %s..%s (%)\n" +msgid "" +"Table at Offset 0x%:\n" +"\n" msgstr " %s: %\n" -#: src/readelf.c:4922 +#: src/readelf.c:5628 src/readelf.c:8925 #, fuzzy, c-format -msgid " %s..%s\n" -msgstr " [%6tx] %s..%s\n" +msgid " Offset entries: %8\n" +msgstr " %s: %\n" -#: src/readelf.c:4931 +#: src/readelf.c:5644 src/readelf.c:8941 #, c-format -msgid " %zu padding bytes\n" +msgid " Unknown CU base: " msgstr "" -#: src/readelf.c:4949 +#: src/readelf.c:5646 src/readelf.c:8943 #, c-format -msgid "cannot get .debug_ranges content: %s" +msgid " CU [%6] base: " msgstr "" -#: src/readelf.c:4979 src/readelf.c:7044 +#: src/readelf.c:5652 src/readelf.c:8949 #, c-format -msgid " [%6tx] \n" +msgid " Not associated with a CU.\n" msgstr "" -#: src/readelf.c:5001 src/readelf.c:7066 +#: src/readelf.c:5663 src/readelf.c:8960 #, c-format -msgid " [%6tx] base address %s\n" +msgid "too many offset entries for unit length" msgstr "" -#: src/readelf.c:5008 src/readelf.c:7073 +#: src/readelf.c:5667 src/readelf.c:8964 #, fuzzy, c-format -msgid " [%6tx] empty list\n" -msgstr " [%6tx] %s..%s\n" +msgid " Offsets starting at 0x%:\n" +msgstr " %s: %\n" -#. We have an address range entry. -#. First address range entry in a list. -#: src/readelf.c:5019 +#: src/readelf.c:5719 +#, fuzzy, c-format +msgid "invalid range list data" +msgstr "Ungültige Daten" + +#: src/readelf.c:5904 src/readelf.c:9252 #, c-format -msgid " [%6tx] %s..%s\n" -msgstr " [%6tx] %s..%s\n" +msgid "" +" %zu padding bytes\n" +"\n" +msgstr "" + +#: src/readelf.c:5921 +#, c-format +msgid "cannot get .debug_ranges content: %s" +msgstr "" + +#: src/readelf.c:5957 src/readelf.c:9307 +#, c-format +msgid "" +"\n" +" Unknown CU base: " +msgstr "" + +#: src/readelf.c:5959 src/readelf.c:9309 +#, c-format +msgid "" +"\n" +" CU [%6] base: " +msgstr "" + +#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361 +#, c-format +msgid " [%6tx] \n" +msgstr "" -#: src/readelf.c:5021 +#: src/readelf.c:5989 src/readelf.c:9441 #, c-format -msgid " %s..%s\n" -msgstr " %s..%s\n" +msgid "" +" [%6tx] base address\n" +" " +msgstr "" + +#: src/readelf.c:5997 src/readelf.c:9449 +#, fuzzy, c-format +msgid " [%6tx] empty list\n" +msgstr " [%6tx] %s..%s\n" -#: src/readelf.c:5257 +#: src/readelf.c:6252 msgid " \n" msgstr "" -#: src/readelf.c:5510 +#: src/readelf.c:6505 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "ELF Kopf konnte nicht ausgelesen werden" -#: src/readelf.c:5527 +#: src/readelf.c:6523 #, c-format msgid "" "\n" "Call frame information section [%2zu] '%s' at offset %#:\n" msgstr "" -#: src/readelf.c:5577 +#: src/readelf.c:6573 #, c-format msgid "" "\n" " [%6tx] Zero terminator\n" msgstr "" -#: src/readelf.c:5670 src/readelf.c:5825 +#: src/readelf.c:6666 src/readelf.c:6820 #, fuzzy, c-format msgid "invalid augmentation length" msgstr "ungültige Abschnittsausrichtung" -#: src/readelf.c:5685 +#: src/readelf.c:6681 msgid "FDE address encoding: " msgstr "" -#: src/readelf.c:5691 +#: src/readelf.c:6687 msgid "LSDA pointer encoding: " msgstr "" -#: src/readelf.c:5802 +#: src/readelf.c:6797 #, c-format msgid " (offset: %#)" msgstr "" -#: src/readelf.c:5809 +#: src/readelf.c:6804 #, c-format msgid " (end offset: %#)" msgstr "" -#: src/readelf.c:5846 +#: src/readelf.c:6841 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr "" -#: src/readelf.c:5901 +#: src/readelf.c:6926 #, c-format -msgid "cannot get attribute code: %s" +msgid "DIE [%] cannot get attribute code: %s" msgstr "" -#: src/readelf.c:5910 +#: src/readelf.c:6936 #, c-format -msgid "cannot get attribute form: %s" +msgid "DIE [%] cannot get attribute form: %s" msgstr "" -#: src/readelf.c:5925 +#: src/readelf.c:6958 #, c-format -msgid "cannot get attribute value: %s" +msgid "DIE [%] cannot get attribute '%s' (%s) value: %s" msgstr "" -#: src/readelf.c:6224 +#: src/readelf.c:7291 +#, fuzzy, c-format +msgid "invalid file (%): %s" +msgstr "Ungültige Datei" + +#: src/readelf.c:7295 +#, fuzzy, c-format +msgid "no srcfiles for CU [%]" +msgstr "unbekannte Form %" + +#: src/readelf.c:7299 +#, fuzzy, c-format +msgid "couldn't get DWARF CU: %s" +msgstr "ELF Kopf konnte nicht ausgelesen werden" + +#: src/readelf.c:7522 #, c-format msgid "" "\n" @@ -4707,16 +4879,21 @@ msgid "" " [Offset]\n" msgstr "" -#: src/readelf.c:6256 +#: src/readelf.c:7572 +#, fuzzy, c-format +msgid "cannot get next unit: %s" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/readelf.c:7591 #, c-format msgid "" " Type unit at offset %:\n" " Version: %, Abbreviation section offset: %, Address size: " "%, Offset size: %\n" -" Type signature: %#, Type offset: %#\n" +" Type signature: %#, Type offset: %# [%]\n" msgstr "" -#: src/readelf.c:6265 +#: src/readelf.c:7603 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -4724,32 +4901,45 @@ msgid "" "%, Offset size: %\n" msgstr "" -#: src/readelf.c:6290 +#: src/readelf.c:7613 src/readelf.c:7776 #, c-format -msgid "cannot get DIE at offset % in section '%s': %s" +msgid " Unit type: %s (%)" msgstr "" -#: src/readelf.c:6304 +#: src/readelf.c:7640 #, c-format -msgid "cannot get DIE offset: %s" +msgid "unknown version (%d) or unit type (%d)" msgstr "" -#: src/readelf.c:6313 +#: src/readelf.c:7669 #, c-format -msgid "cannot get tag of DIE at offset % in section '%s': %s" +msgid "cannot get DIE offset: %s" msgstr "" -#: src/readelf.c:6345 +#: src/readelf.c:7678 +#, fuzzy, c-format +msgid "cannot get tag of DIE at offset [%] in section '%s': %s" +msgstr "konnte Programm-Kopf nicht erstellen: %s" + +#: src/readelf.c:7716 #, c-format msgid "cannot get next DIE: %s\n" msgstr "" -#: src/readelf.c:6353 +#: src/readelf.c:7724 #, c-format msgid "cannot get next DIE: %s" msgstr "" -#: src/readelf.c:6389 +#: src/readelf.c:7768 +#, c-format +msgid "" +" Split compilation unit at offset %:\n" +" Version: %, Abbreviation section offset: %, Address size: " +"%, Offset size: %\n" +msgstr "" + +#: src/readelf.c:7819 #, c-format msgid "" "\n" @@ -4757,171 +4947,201 @@ msgid "" "\n" msgstr "" -#: src/readelf.c:6498 +#: src/readelf.c:8151 +#, fuzzy, c-format +msgid "unknown form: %s" +msgstr "unbekannte Form %" + +#: src/readelf.c:8182 #, c-format msgid "cannot get line data section data: %s" msgstr "" #. Print what we got so far. -#: src/readelf.c:6568 +#: src/readelf.c:8284 #, c-format msgid "" "\n" -" Length: %\n" -" DWARF version: %\n" -" Prologue length: %\n" -" Minimum instruction length: %\n" -" Maximum operations per instruction: %\n" -" Initial value if '%s': %\n" -" Line base: %\n" -" Line range: %\n" -" Opcode base: %\n" +" Length: %\n" +" DWARF version: %\n" +" Prologue length: %\n" +" Address size: %zd\n" +" Segment selector size: %zd\n" +" Min instruction length: %\n" +" Max operations per instruction: %\n" +" Initial value if 'is_stmt': %\n" +" Line base: %\n" +" Line range: %\n" +" Opcode base: %\n" "\n" "Opcodes:\n" msgstr "" -#: src/readelf.c:6589 +#: src/readelf.c:8306 +#, fuzzy, c-format +msgid "cannot handle .debug_line version: %u\n" +msgstr "ungültige .debug_line Sektion" + +#: src/readelf.c:8314 +#, fuzzy, c-format +msgid "cannot handle address size: %u\n" +msgstr "Kein Adress-Wert" + +#: src/readelf.c:8322 +#, c-format +msgid "cannot handle segment selector size: %u\n" +msgstr "" + +#: src/readelf.c:8332 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "" -#: src/readelf.c:6604 +#: src/readelf.c:8347 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:6612 +#: src/readelf.c:8358 msgid "" "\n" "Directory table:" msgstr "" -#: src/readelf.c:6628 +#: src/readelf.c:8364 src/readelf.c:8439 +#, fuzzy, c-format +msgid " [" +msgstr " %s: %s\n" + +#: src/readelf.c:8433 msgid "" "\n" -"File name table:\n" -" Entry Dir Time Size Name" +"File name table:" +msgstr "" + +#: src/readelf.c:8494 +msgid " Entry Dir Time Size Name" msgstr "" -#: src/readelf.c:6663 +#: src/readelf.c:8529 msgid "" "\n" "Line number statements:" msgstr "" -#: src/readelf.c:6714 +#: src/readelf.c:8552 #, c-format msgid "invalid maximum operations per instruction is zero" msgstr "" -#: src/readelf.c:6750 +#: src/readelf.c:8586 #, c-format -msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" +msgid " special opcode %u: address+%u = " msgstr "" -#: src/readelf.c:6755 +#: src/readelf.c:8590 #, c-format -msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" +msgid ", op_index = %u, line%+d = %zu\n" msgstr "" -#: src/readelf.c:6775 +#: src/readelf.c:8593 +#, c-format +msgid ", line%+d = %zu\n" +msgstr "" + +#: src/readelf.c:8611 #, c-format msgid " extended opcode %u: " msgstr "" -#: src/readelf.c:6780 +#: src/readelf.c:8616 msgid " end of sequence" msgstr "" -#: src/readelf.c:6799 -#, c-format -msgid " set address to %s\n" -msgstr "" +#: src/readelf.c:8634 +#, fuzzy, c-format +msgid " set address to " +msgstr "Außerhalb des Adressbereiches" -#: src/readelf.c:6826 +#: src/readelf.c:8662 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" -#: src/readelf.c:6839 +#: src/readelf.c:8675 #, c-format msgid " set discriminator to %u\n" msgstr "" #. Unknown, ignore it. -#: src/readelf.c:6844 +#: src/readelf.c:8680 #, fuzzy msgid " unknown opcode" msgstr "unbekannter Typ" #. Takes no argument. -#: src/readelf.c:6856 +#: src/readelf.c:8692 msgid " copy" msgstr "" -#: src/readelf.c:6867 +#: src/readelf.c:8701 #, c-format -msgid " advance address by %u to %s, op_index to %u\n" +msgid " advance address by %u to " msgstr "" -#: src/readelf.c:6871 +#: src/readelf.c:8705 src/readelf.c:8761 #, c-format -msgid " advance address by %u to %s\n" +msgid ", op_index to %u" msgstr "" -#: src/readelf.c:6882 +#: src/readelf.c:8715 #, c-format msgid " advance line by constant %d to %\n" msgstr "" -#: src/readelf.c:6890 +#: src/readelf.c:8723 #, c-format msgid " set file to %\n" msgstr "" -#: src/readelf.c:6900 +#: src/readelf.c:8733 #, c-format msgid " set column to %\n" msgstr "" -#: src/readelf.c:6907 +#: src/readelf.c:8740 #, c-format msgid " set '%s' to %\n" msgstr "" #. Takes no argument. -#: src/readelf.c:6913 +#: src/readelf.c:8746 msgid " set basic block flag" msgstr "" -#: src/readelf.c:6926 -#, c-format -msgid " advance address by constant %u to %s, op_index to %u\n" -msgstr "" - -#: src/readelf.c:6930 +#: src/readelf.c:8757 #, c-format -msgid " advance address by constant %u to %s\n" +msgid " advance address by constant %u to " msgstr "" -#: src/readelf.c:6948 +#: src/readelf.c:8776 #, c-format -msgid " advance address by fixed value %u to %s\n" +msgid " advance address by fixed value %u to \n" msgstr "" #. Takes no argument. -#: src/readelf.c:6957 +#: src/readelf.c:8786 msgid " set prologue end flag" msgstr "" #. Takes no argument. -#: src/readelf.c:6962 +#: src/readelf.c:8791 msgid " set epilogue begin flag" msgstr "" -#: src/readelf.c:6971 +#: src/readelf.c:8800 #, c-format msgid " set isa to %u\n" msgstr "" @@ -4929,109 +5149,103 @@ msgstr "" #. 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. -#: src/readelf.c:6980 +#: src/readelf.c:8809 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] "" msgstr[1] "" -#: src/readelf.c:7012 -#, c-format -msgid "cannot get .debug_loc content: %s" -msgstr "" +#: src/readelf.c:8847 +#, fuzzy, c-format +msgid "cannot get .debug_loclists content: %s" +msgstr "konnte Eintrag aus der Symboltabelle nicht holen: %s" -#. First entry in a list. -#: src/readelf.c:7087 -#, c-format -msgid " [%6tx] %s..%s" -msgstr " [%6tx] %s..%s" +#: src/readelf.c:9016 +#, fuzzy, c-format +msgid "invalid loclists data" +msgstr "Ungültige Daten" -#: src/readelf.c:7089 +#: src/readelf.c:9269 #, c-format -msgid " %s..%s" -msgstr " %s..%s" +msgid "cannot get .debug_loc content: %s" +msgstr "" -#: src/readelf.c:7096 src/readelf.c:7984 +#: src/readelf.c:9476 src/readelf.c:10490 msgid " \n" msgstr "" -#: src/readelf.c:7148 src/readelf.c:7310 +#: src/readelf.c:9530 src/readelf.c:9693 #, c-format msgid "cannot get macro information section data: %s" msgstr "" -#: src/readelf.c:7228 +#: src/readelf.c:9610 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "" -#: src/readelf.c:7251 +#: src/readelf.c:9633 #, c-format msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" msgstr "" -#: src/readelf.c:7351 +#: src/readelf.c:9734 #, fuzzy, c-format msgid " Offset: 0x%\n" msgstr " %s: %\n" -#: src/readelf.c:7363 +#: src/readelf.c:9746 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:7369 src/readelf.c:8103 +#: src/readelf.c:9752 src/readelf.c:10609 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:7376 +#: src/readelf.c:9759 #, fuzzy, c-format msgid " Flag: 0x%\n" msgstr " %s: %\n" -#: src/readelf.c:7379 +#: src/readelf.c:9762 #, c-format msgid " Offset length: %\n" msgstr "" -#: src/readelf.c:7387 +#: src/readelf.c:9770 #, c-format msgid " .debug_line offset: 0x%\n" msgstr "" -#: src/readelf.c:7400 +#: src/readelf.c:9795 #, c-format msgid " extension opcode table, % items:\n" msgstr "" -#: src/readelf.c:7407 +#: src/readelf.c:9802 #, c-format msgid " [%]" msgstr "" -#: src/readelf.c:7419 +#: src/readelf.c:9814 #, c-format msgid " % arguments:" msgstr "" -#: src/readelf.c:7447 +#: src/readelf.c:9829 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7684 -#, c-format -msgid "vendor opcode not verified?" -msgstr "" - -#: src/readelf.c:7712 +#: src/readelf.c:10030 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" -#: src/readelf.c:7753 +#: src/readelf.c:10072 #, c-format msgid "" "\n" @@ -5039,47 +5253,72 @@ msgid "" " %*s String\n" msgstr "" -#: src/readelf.c:7767 +#: src/readelf.c:10087 #, c-format -msgid " *** error while reading strings: %s\n" +msgid " *** error, missing string terminator\n" msgstr "" -#: src/readelf.c:7787 +#: src/readelf.c:10115 +#, fuzzy, c-format +msgid "cannot get .debug_str_offsets section data: %s" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/readelf.c:10214 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:10216 +#, fuzzy, c-format +msgid " Offset size: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:10230 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:10239 +#, fuzzy, c-format +msgid " Padding: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:10293 #, c-format msgid "" "\n" "Call frame search table section [%2zu] '.eh_frame_hdr':\n" msgstr "" -#: src/readelf.c:7889 +#: src/readelf.c:10395 #, c-format msgid "" "\n" "Exception handling table section [%2zu] '.gcc_except_table':\n" msgstr "" -#: src/readelf.c:7912 +#: src/readelf.c:10418 #, c-format msgid " LPStart encoding: %#x " msgstr "" -#: src/readelf.c:7924 +#: src/readelf.c:10430 #, c-format msgid " TType encoding: %#x " msgstr "" -#: src/readelf.c:7939 +#: src/readelf.c:10445 #, c-format msgid " Call site encoding: %#x " msgstr "" -#: src/readelf.c:7952 +#: src/readelf.c:10458 msgid "" "\n" " Call site table:" msgstr "" -#: src/readelf.c:7966 +#: src/readelf.c:10472 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5088,141 +5327,142 @@ msgid "" " Action: %u\n" msgstr "" -#: src/readelf.c:8039 +#: src/readelf.c:10545 #, c-format msgid "invalid TType encoding" msgstr "" -#: src/readelf.c:8065 +#: src/readelf.c:10571 #, c-format msgid "" "\n" "GDB section [%2zu] '%s' at offset %# contains % bytes :\n" msgstr "" -#: src/readelf.c:8094 +#: src/readelf.c:10600 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:8112 +#: src/readelf.c:10618 #, c-format msgid " CU offset: %#\n" msgstr "" -#: src/readelf.c:8119 +#: src/readelf.c:10625 #, c-format msgid " TU offset: %#\n" msgstr "" -#: src/readelf.c:8126 +#: src/readelf.c:10632 #, c-format msgid " address offset: %#\n" msgstr "" -#: src/readelf.c:8133 +#: src/readelf.c:10639 #, c-format msgid " symbol offset: %#\n" msgstr "" -#: src/readelf.c:8140 +#: src/readelf.c:10646 #, c-format msgid " constant offset: %#\n" msgstr "" -#: src/readelf.c:8154 +#: src/readelf.c:10660 #, c-format msgid "" "\n" " CU list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:8179 +#: src/readelf.c:10685 #, c-format msgid "" "\n" " TU list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:8208 +#: src/readelf.c:10714 #, c-format msgid "" "\n" " Address list at offset %# contains %zu entries:\n" msgstr "" -#: src/readelf.c:8241 +#: src/readelf.c:10746 #, c-format msgid "" "\n" " Symbol table at offset %# contains %zu slots:\n" msgstr "" -#: src/readelf.c:8328 +#: src/readelf.c:10884 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "" -#: src/readelf.c:8484 src/readelf.c:9106 src/readelf.c:9217 src/readelf.c:9275 +#: src/readelf.c:11247 src/readelf.c:11869 src/readelf.c:11980 +#: src/readelf.c:12038 #, c-format msgid "cannot convert core note data: %s" msgstr "" -#: src/readelf.c:8847 +#: src/readelf.c:11610 #, c-format msgid "" "\n" "%*s... ..." msgstr "" -#: src/readelf.c:9354 +#: src/readelf.c:12117 msgid " Owner Data size Type\n" msgstr "" -#: src/readelf.c:9372 +#: src/readelf.c:12135 #, c-format msgid " %-13.*s %9 %s\n" msgstr "" -#: src/readelf.c:9422 -#, c-format -msgid "cannot get content of note section: %s" -msgstr "" +#: src/readelf.c:12185 +#, fuzzy, c-format +msgid "cannot get content of note: %s" +msgstr "Konnte Inhalt von %s: %s nicht lesen" -#: src/readelf.c:9449 +#: src/readelf.c:12212 #, c-format msgid "" "\n" "Note section [%2zu] '%s' of % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9472 +#: src/readelf.c:12235 #, c-format msgid "" "\n" "Note segment of % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9518 +#: src/readelf.c:12281 #, fuzzy, c-format msgid "" "\n" "Section [%zu] '%s' has no data to dump.\n" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:9545 src/readelf.c:9596 +#: src/readelf.c:12308 src/readelf.c:12359 #, fuzzy, c-format msgid "cannot get data for section [%zu] '%s': %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:9550 +#: src/readelf.c:12313 #, c-format msgid "" "\n" "Hex dump of section [%zu] '%s', % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9555 +#: src/readelf.c:12318 #, c-format msgid "" "\n" @@ -5230,21 +5470,21 @@ msgid "" "%#0:\n" msgstr "" -#: src/readelf.c:9569 +#: src/readelf.c:12332 #, fuzzy, c-format msgid "" "\n" "Section [%zu] '%s' has no strings to dump.\n" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/readelf.c:9601 +#: src/readelf.c:12364 #, c-format msgid "" "\n" "String section [%zu] '%s' contains % bytes at offset %#0:\n" msgstr "" -#: src/readelf.c:9606 +#: src/readelf.c:12369 #, c-format msgid "" "\n" @@ -5252,45 +5492,45 @@ msgid "" "offset %#0:\n" msgstr "" -#: src/readelf.c:9655 +#: src/readelf.c:12418 #, c-format msgid "" "\n" "section [%lu] does not exist" msgstr "" -#: src/readelf.c:9684 +#: src/readelf.c:12447 #, c-format msgid "" "\n" "section '%s' does not exist" msgstr "" -#: src/readelf.c:9741 +#: src/readelf.c:12504 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "" -#: src/readelf.c:9744 +#: src/readelf.c:12507 #, c-format msgid "" "\n" "Archive '%s' has no symbol index\n" msgstr "" -#: src/readelf.c:9748 +#: src/readelf.c:12511 #, c-format msgid "" "\n" "Index of archive '%s' has %zu entries:\n" msgstr "" -#: src/readelf.c:9766 +#: src/readelf.c:12529 #, fuzzy, c-format msgid "cannot extract member at offset %zu in '%s': %s" msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/readelf.c:9771 +#: src/readelf.c:12534 #, c-format msgid "Archive member '%s' contains:\n" msgstr "" @@ -5362,257 +5602,276 @@ msgstr "" msgid "(TOTALS)\n" msgstr "" -#: src/stack.c:481 +#: src/stack.c:483 +#, c-format msgid "-p PID should be a positive process id." msgstr "" -#: src/stack.c:487 +#: src/stack.c:489 #, fuzzy, c-format msgid "Cannot open core file '%s'" msgstr "Konnte Archiv '%s' nicht öffnen" -#: src/stack.c:547 +#: src/stack.c:549 +#, c-format msgid "-n MAXFRAMES should be 0 or higher." msgstr "" -#: src/stack.c:559 +#: src/stack.c:561 +#, c-format msgid "-e EXEC needs a core given by --core." msgstr "" -#: src/stack.c:563 +#: src/stack.c:565 +#, c-format msgid "-1 needs a thread id given by -p." msgstr "" -#: src/stack.c:567 +#: src/stack.c:569 +#, c-format msgid "One of -p PID or --core COREFILE should be given." msgstr "" -#: src/stack.c:637 +#: src/stack.c:641 #, fuzzy msgid "Show stack of process PID" msgstr "Kann Suchbaum nicht erstellen" -#: src/stack.c:639 +#: src/stack.c:643 msgid "Show stack found in COREFILE" msgstr "" -#: src/stack.c:640 +#: src/stack.c:644 msgid "(optional) EXECUTABLE that produced COREFILE" msgstr "" -#: src/stack.c:644 +#: src/stack.c:648 #, fuzzy msgid "Output selection options:" msgstr "Eingabeauswahloptionen:" -#: src/stack.c:646 +#: src/stack.c:650 msgid "Additionally show frame activation" msgstr "" -#: src/stack.c:648 +#: src/stack.c:652 msgid "Additionally try to lookup DWARF debuginfo name for frame address" msgstr "" -#: src/stack.c:651 +#: src/stack.c:655 msgid "" "Additionally show inlined function frames using DWARF debuginfo if available " "(implies -d)" msgstr "" -#: src/stack.c:653 +#: src/stack.c:657 msgid "Additionally show module file information" msgstr "" -#: src/stack.c:655 +#: src/stack.c:659 msgid "Additionally show source file information" msgstr "" -#: src/stack.c:657 +#: src/stack.c:661 msgid "" "Show all additional information (activation, debugname, inlines, module and " "source)" msgstr "" -#: src/stack.c:659 +#: src/stack.c:663 msgid "Do not resolve address to function symbol name" msgstr "" -#: src/stack.c:661 +#: src/stack.c:665 msgid "Show raw function symbol names, do not try to demangle names" msgstr "" -#: src/stack.c:663 +#: src/stack.c:667 msgid "Show module build-id, load address and pc offset" msgstr "" -#: src/stack.c:665 +#: src/stack.c:669 msgid "Show the backtrace of only one thread" msgstr "" -#: src/stack.c:667 +#: src/stack.c:671 msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" msgstr "" -#: src/stack.c:669 +#: src/stack.c:673 msgid "Show module memory map with build-id, elf and debug files detected" msgstr "" -#: src/stack.c:677 +#: src/stack.c:681 msgid "" -"Print a stack for each thread in a process or core file.\vProgram exits with " -"return code 0 if all frames were shown without any errors. If some frames " -"were shown, but there were some non-fatal errors, possibly causing an " -"incomplete backtrace, the program exits with return code 1. If no frames " -"could be shown, or a fatal error occured the program exits with return code " -"2. If the program was invoked with bad or missing arguments it will exit " -"with return code 64." +"Print a stack for each thread in a process or core file.\n" +"\n" +"Program exits with return code 0 if all frames were shown without any " +"errors. If some frames were shown, but there were some non-fatal errors, " +"possibly causing an incomplete backtrace, the program exits with return code " +"1. If no frames could be shown, or a fatal error occured the program exits " +"with return code 2. If the program was invoked with bad or missing " +"arguments it will exit with return code 64." msgstr "" -#: src/stack.c:750 +#: src/stack.c:756 +#, c-format msgid "Couldn't show any frames." msgstr "" -#: src/strings.c:65 +#: src/strings.c:66 msgid "Output Selection:" msgstr "" -#: src/strings.c:66 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "" -#: src/strings.c:68 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" -#: src/strings.c:69 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" msgstr "" -#: src/strings.c:73 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "" -#: src/strings.c:75 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "" -#: src/strings.c:76 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias für --radix=o" #. Short description of program. -#: src/strings.c:83 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "" -#: src/strings.c:256 src/strings.c:291 +#: src/strings.c:257 src/strings.c:292 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "" -#: src/strings.c:302 +#: src/strings.c:303 #, c-format msgid "invalid minimum length of matched string size" msgstr "" -#: src/strings.c:585 +#: src/strings.c:586 #, fuzzy, c-format msgid "lseek failed" msgstr "lseek64 fehlgeschlagen" -#: src/strings.c:602 src/strings.c:666 +#: src/strings.c:603 src/strings.c:667 #, c-format msgid "re-mmap failed" msgstr "re-mmap fehlgeschlagen" -#: src/strings.c:639 +#: src/strings.c:640 #, c-format msgid "mprotect failed" msgstr "mprotect fehlgeschlagen" -#: src/strings.c:728 +#: src/strings.c:729 #, c-format msgid "Skipping section %zd '%s' data outside file" msgstr "" -#: src/strip.c:68 +#: src/strip.c:71 msgid "Place stripped output into FILE" msgstr "" -#: src/strip.c:69 +#: src/strip.c:72 msgid "Extract the removed sections into FILE" msgstr "" -#: src/strip.c:70 +#: src/strip.c:73 msgid "Embed name FILE instead of -f argument" msgstr "" -#: src/strip.c:74 +#: src/strip.c:77 msgid "Remove all debugging symbols" msgstr "" -#: src/strip.c:78 +#: src/strip.c:81 msgid "Remove section headers (not recommended)" msgstr "" -#: src/strip.c:80 +#: src/strip.c:83 msgid "Copy modified/access timestamps to the output" msgstr "" -#: src/strip.c:82 +#: src/strip.c:85 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" msgstr "" -#: src/strip.c:84 +#: src/strip.c:87 msgid "Remove .comment section" msgstr "" +#: src/strip.c:88 +msgid "" +"Remove the named section. SECTION is an extended wildcard pattern. May be " +"given more than once. Only non-allocated sections can be removed." +msgstr "" + +#: src/strip.c:89 +msgid "" +"Keep the named section. SECTION is an extended wildcard pattern. May be " +"given more than once." +msgstr "" + #. Short description of program. -#: src/strip.c:92 +#: src/strip.c:96 msgid "Discard symbols from object files." msgstr "" -#: src/strip.c:186 +#: src/strip.c:242 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "" -#: src/strip.c:200 +#: src/strip.c:256 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "" -#: src/strip.c:222 +#: src/strip.c:279 #, c-format msgid "-f option specified twice" msgstr "" -#: src/strip.c:231 +#: src/strip.c:288 #, c-format msgid "-F option specified twice" msgstr "" -#: src/strip.c:264 +#: src/strip.c:347 #, c-format -msgid "-R option supports only .comment section" +msgid "cannot both keep and remove .comment section" msgstr "" -#: src/strip.c:306 src/strip.c:330 +#: src/strip.c:372 src/strip.c:396 #, c-format msgid "cannot stat input file '%s'" msgstr "" -#: src/strip.c:320 +#: src/strip.c:386 #, c-format msgid "while opening '%s'" msgstr "" -#: src/strip.c:358 +#: src/strip.c:424 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "" @@ -5623,107 +5882,117 @@ msgstr "" #. result = handle_ar (fd, elf, NULL, fname, #. preserve_dates ? tv : NULL); #. -#: src/strip.c:370 +#: src/strip.c:436 #, fuzzy, c-format msgid "%s: no support for stripping archive" msgstr "%s: Kein Eintrag %s in dem Archiv!\n" -#: src/strip.c:469 +#: src/strip.c:535 #, c-format msgid "cannot open EBL backend" msgstr "" -#: src/strip.c:514 +#: src/strip.c:580 #, fuzzy, c-format msgid "cannot get number of phdrs" msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/strip.c:530 src/strip.c:554 +#: src/strip.c:596 src/strip.c:620 #, c-format msgid "cannot create new file '%s': %s" msgstr "" -#: src/strip.c:620 +#: src/strip.c:686 #, c-format msgid "illformed file '%s'" msgstr "" -#: src/strip.c:954 src/strip.c:1053 +#: src/strip.c:696 +#, fuzzy, c-format +msgid "Cannot remove allocated section '%s'" +msgstr "konnte Abschnittsdaten nicht holen: %s" + +#: src/strip.c:705 +#, fuzzy, c-format +msgid "Cannot both keep and remove section '%s'" +msgstr "Konnte Archiv '%s' nicht öffnen" + +#: src/strip.c:1061 src/strip.c:1160 #, c-format msgid "while generating output file: %s" msgstr "" -#: src/strip.c:1019 src/strip.c:2089 +#: src/strip.c:1126 src/strip.c:2208 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "" -#: src/strip.c:1036 +#: src/strip.c:1143 #, c-format msgid "while preparing output for '%s'" msgstr "" -#: src/strip.c:1094 src/strip.c:1157 +#: src/strip.c:1205 src/strip.c:1268 #, c-format msgid "while create section header section: %s" msgstr "" -#: src/strip.c:1103 +#: src/strip.c:1214 #, c-format msgid "cannot allocate section data: %s" msgstr "" -#: src/strip.c:1169 +#: src/strip.c:1280 #, c-format msgid "while create section header string table: %s" msgstr "" -#: src/strip.c:1176 +#: src/strip.c:1287 #, c-format msgid "no memory to create section header string table" msgstr "" -#: src/strip.c:1383 +#: src/strip.c:1497 #, c-format msgid "Cannot remove symbol [%zd] from allocated symbol table [%zd]" msgstr "" -#: src/strip.c:1875 +#: src/strip.c:1994 #, fuzzy, c-format msgid "bad relocation" msgstr "Relocations anzeigen" -#: src/strip.c:2000 src/strip.c:2113 +#: src/strip.c:2119 src/strip.c:2232 #, c-format msgid "while writing '%s': %s" msgstr "" -#: src/strip.c:2011 +#: src/strip.c:2130 #, c-format msgid "while creating '%s'" msgstr "" -#: src/strip.c:2034 +#: src/strip.c:2153 #, c-format msgid "while computing checksum for debug information" msgstr "" -#: src/strip.c:2098 +#: src/strip.c:2217 #, c-format msgid "%s: error while reading the file: %s" msgstr "" -#: src/strip.c:2138 src/strip.c:2158 +#: src/strip.c:2257 src/strip.c:2277 #, fuzzy, c-format msgid "while writing '%s'" msgstr "beim Schliessen von '%s'" -#: src/strip.c:2195 src/strip.c:2202 +#: src/strip.c:2314 src/strip.c:2321 #, c-format msgid "error while finishing '%s': %s" msgstr "" -#: src/strip.c:2219 src/strip.c:2291 +#: src/strip.c:2338 src/strip.c:2414 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "" @@ -5809,12 +6078,12 @@ msgstr "" msgid "cannot copy ELF header: %s" msgstr "" -#: src/unstrip.c:249 src/unstrip.c:1930 src/unstrip.c:1973 +#: src/unstrip.c:249 src/unstrip.c:1933 src/unstrip.c:1976 #, fuzzy, c-format msgid "cannot get number of program headers: %s" msgstr "konnte Programm-Kopf nicht erstellen: %s" -#: src/unstrip.c:254 src/unstrip.c:1934 +#: src/unstrip.c:254 src/unstrip.c:1937 #, c-format msgid "cannot create program headers: %s" msgstr "konnte Programm-Kopf nicht erstellen: %s" @@ -5829,12 +6098,12 @@ msgstr "konnte Programm-Kopf nicht kopieren: %s" msgid "cannot copy section header: %s" msgstr "" -#: src/unstrip.c:273 src/unstrip.c:1565 +#: src/unstrip.c:273 src/unstrip.c:1568 #, c-format msgid "cannot get section data: %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:275 src/unstrip.c:1567 +#: src/unstrip.c:275 src/unstrip.c:1570 #, c-format msgid "cannot copy section data: %s" msgstr "konnte Abschnittsdaten nicht kopieren: %s" @@ -5844,13 +6113,13 @@ msgstr "konnte Abschnittsdaten nicht kopieren: %s" msgid "cannot create directory '%s'" msgstr "konnte Verzeichnis nicht erstellen: %s" -#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1599 +#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1602 #, c-format msgid "cannot get symbol table entry: %s" msgstr "konnte Eintrag aus der Symboltabelle nicht holen: %s" #: src/unstrip.c:387 src/unstrip.c:608 src/unstrip.c:629 src/unstrip.c:641 -#: src/unstrip.c:1620 src/unstrip.c:1796 src/unstrip.c:1820 +#: src/unstrip.c:1623 src/unstrip.c:1799 src/unstrip.c:1823 #, c-format msgid "cannot update symbol table: %s" msgstr "konnte Symboltabelle nicht aktualisieren: %s" @@ -5880,186 +6149,187 @@ msgstr "" msgid "invalid string offset in symbol [%zu]" msgstr "ungültiger Offset %zu für Symbol %s" -#: src/unstrip.c:955 src/unstrip.c:1302 +#: src/unstrip.c:955 src/unstrip.c:1305 #, fuzzy, c-format msgid "cannot read section [%zu] name: %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1050 +#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1053 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "" -#: src/unstrip.c:1036 +#: src/unstrip.c:1033 #, c-format -msgid "invalid contents in '%s' section" +msgid "overflow with shnum = %zu in '%s' section" msgstr "" -#: src/unstrip.c:1042 +#: src/unstrip.c:1044 #, c-format -msgid "overflow with shnum = %zu in '%s' section" +msgid "invalid contents in '%s' section" msgstr "" -#: src/unstrip.c:1096 src/unstrip.c:1424 +#: src/unstrip.c:1099 src/unstrip.c:1427 #, fuzzy, c-format msgid "cannot find matching section for [%zu] '%s'" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:1221 src/unstrip.c:1236 src/unstrip.c:1503 src/unstrip.c:1755 +#: src/unstrip.c:1224 src/unstrip.c:1239 src/unstrip.c:1506 src/unstrip.c:1758 #, c-format msgid "cannot add section name to string table: %s" msgstr "" -#: src/unstrip.c:1245 +#: src/unstrip.c:1248 #, c-format msgid "cannot update section header string table data: %s" msgstr "" -#: src/unstrip.c:1273 src/unstrip.c:1277 +#: src/unstrip.c:1276 src/unstrip.c:1280 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" -#: src/unstrip.c:1281 src/unstrip.c:1285 src/unstrip.c:1518 +#: src/unstrip.c:1284 src/unstrip.c:1288 src/unstrip.c:1521 #, c-format msgid "cannot get section count: %s" msgstr "" -#: src/unstrip.c:1288 +#: src/unstrip.c:1291 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" -#: src/unstrip.c:1347 src/unstrip.c:1439 +#: src/unstrip.c:1350 src/unstrip.c:1442 #, c-format msgid "cannot read section header string table: %s" msgstr "" -#: src/unstrip.c:1497 +#: src/unstrip.c:1500 #, c-format msgid "cannot add new section: %s" msgstr "" -#: src/unstrip.c:1607 +#: src/unstrip.c:1610 #, fuzzy, c-format msgid "symbol [%zu] has invalid section index" msgstr "ungültiger Abschnittsindex" -#: src/unstrip.c:1891 +#: src/unstrip.c:1894 #, fuzzy, c-format msgid "cannot read section data: %s" msgstr "konnte Abschnittsdaten nicht holen: %s" -#: src/unstrip.c:1912 +#: src/unstrip.c:1915 #, c-format msgid "cannot get ELF header: %s" msgstr "" -#: src/unstrip.c:1920 +#: src/unstrip.c:1923 #, c-format msgid "cannot update ELF header: %s" msgstr "" -#: src/unstrip.c:1944 +#: src/unstrip.c:1947 #, c-format msgid "cannot update program header: %s" msgstr "konnte Programm-Kopf nicht aktualisieren: %s" -#: src/unstrip.c:1949 src/unstrip.c:2031 +#: src/unstrip.c:1952 src/unstrip.c:2034 #, c-format msgid "cannot write output file: %s" msgstr "" -#: src/unstrip.c:2000 +#: src/unstrip.c:2003 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:2003 +#: src/unstrip.c:2006 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:2022 src/unstrip.c:2073 src/unstrip.c:2085 src/unstrip.c:2171 +#: src/unstrip.c:2025 src/unstrip.c:2076 src/unstrip.c:2088 src/unstrip.c:2174 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "" -#: src/unstrip.c:2064 +#: src/unstrip.c:2067 msgid "WARNING: " msgstr "" -#: src/unstrip.c:2066 +#: src/unstrip.c:2069 msgid ", use --force" msgstr "" -#: src/unstrip.c:2089 +#: src/unstrip.c:2092 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:2092 +#: src/unstrip.c:2095 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:2095 +#: src/unstrip.c:2098 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:2098 +#: src/unstrip.c:2101 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2128 +#: src/unstrip.c:2131 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "" -#: src/unstrip.c:2132 +#: src/unstrip.c:2135 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2147 +#: src/unstrip.c:2150 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "" -#: src/unstrip.c:2151 +#: src/unstrip.c:2154 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2164 +#: src/unstrip.c:2167 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "" -#: src/unstrip.c:2195 +#: src/unstrip.c:2198 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -#: src/unstrip.c:2328 +#: src/unstrip.c:2331 #, c-format msgid "no matching modules found" msgstr "kein passendes Modul gefunden" -#: src/unstrip.c:2337 +#: src/unstrip.c:2340 #, c-format msgid "matched more than one module" msgstr "mehr als ein passendes Modul" -#: src/unstrip.c:2381 +#: src/unstrip.c:2384 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" -#: src/unstrip.c:2382 +#: src/unstrip.c:2385 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" +"Combine stripped files with separate symbols and debug information.\n" +"\n" +"The first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" "With -f these match the file name of the main (stripped) file (slashes are " @@ -6083,7 +6353,7 @@ msgid "" "was found, or . if FILE contains the debug information." msgstr "" -#: tests/backtrace.c:430 +#: tests/backtrace.c:442 msgid "Run executable" msgstr "" @@ -6095,17 +6365,55 @@ msgstr "" msgid "Show instances of inlined functions" msgstr "" -#~ msgid "" -#~ "Copyright (C) %s Red Hat, Inc.\n" -#~ "This is free software; see the source for copying conditions. There is " -#~ "NO\n" -#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " -#~ "PURPOSE.\n" -#~ msgstr "" -#~ "Copyright (C) %s Red Hat, Inc.\n" -#~ "Dies ist freie Software, siehe Quellcode für Kopierbedingungen. KEINE " -#~ "GARANTIE,\n" -#~ "auch nicht für Marktgängigkeit oder Eignung für einen Bestimmten Zweck.\n" +#~ msgid "%s+%# <%s+%#>" +#~ msgstr "%s+%# <%s+%#>" + +#~ msgid "%s+%#0* <%s+%#>" +#~ msgstr "%s+%#0* <%s+%#>" + +#~ msgid "%# <%s+%#>" +#~ msgstr "%# <%s+%#>" + +#~ msgid "%#0* <%s+%#>" +#~ msgstr "%#0* <%s+%#>" + +#~ msgid "%s+%# <%s>" +#~ msgstr "%s+%# <%s>" + +#~ msgid "%s+%#0* <%s>" +#~ msgstr "%s+%#0* <%s>" + +#~ msgid "%# <%s>" +#~ msgstr "%# <%s>" + +#~ msgid "%#0* <%s>" +#~ msgstr "%#0* <%s>" + +#~ msgid "%s+%#" +#~ msgstr "%s+%#" + +#~ msgid "%s+%#0*" +#~ msgstr "%s+%#0*" + +#, fuzzy +#~ msgid " %s..%s (%)\n" +#~ msgstr " %s: %\n" + +#, fuzzy +#~ msgid " %s..%s\n" +#~ msgstr " [%6tx] %s..%s\n" + +#~ msgid " [%6tx] %s..%s\n" +#~ msgstr " [%6tx] %s..%s\n" + +#~ msgid " %s..%s\n" +#~ msgstr " %s..%s\n" + +#~ msgid " [%6tx] %s..%s" +#~ msgstr " [%6tx] %s..%s" + +#~ msgid " %s..%s" +#~ msgstr " %s..%s" #~ msgid "Written by %s.\n" #~ msgstr "Geschrieben von %s.\n" @@ -6180,10 +6488,6 @@ msgstr "" #~ msgid "unknown user attribute %hx" #~ msgstr "unbekanntes Benutzer-Attribut %hx" -#, fuzzy -#~ msgid "unknown form %#" -#~ msgstr "unbekannte Form %" - #~ msgid "" #~ "\n" #~ "\n" diff --git a/po/es.po b/po/es.po index fedb9e5e..63a024ef 100644 --- a/po/es.po +++ b/po/es.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: elfutils.master.es\n" "Report-Msgid-Bugs-To: https://sourceware.org/bugzilla/\n" -"POT-Creation-Date: 2016-12-27 15:20+0100\n" +"POT-Creation-Date: 2018-06-29 20:47+0200\n" "PO-Revision-Date: 2011-01-10 15:17-0300\n" "Last-Translator: Claudio Rodrigo Pereyra Diaz \n" @@ -39,23 +39,36 @@ msgid "" " - 'auto', 'tty', 'if-tty'\n" msgstr "" -#: lib/color.c:190 src/objdump.c:725 +#: lib/color.c:190 src/objdump.c:727 #, fuzzy, c-format msgid "cannot allocate memory" msgstr "No se puede asignar sección PLT: %s" -#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3294 -#: src/readelf.c:3685 src/readelf.c:8433 src/unstrip.c:2224 src/unstrip.c:2429 +#: lib/printversion.c:40 +#, fuzzy, c-format +msgid "" +"Copyright (C) %s The elfutils developers <%s>.\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +msgstr "" +"Copyright (C) %s Red Hat, Inc.\n" +"El siguiente es un software libre; consulte el código para conocer las " +"condiciones de copiado. NO tiene\n" +"garantía, ni siquiera para SU COMERCIALIZACIÓN o PARA SER USADO CON UN FIN " +"DETERMINADO.\n" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3395 +#: src/readelf.c:11196 src/unstrip.c:2227 src/unstrip.c:2433 #, c-format msgid "memory exhausted" msgstr "memoria agotada" -#: libasm/asm_error.c:65 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:53 +#: libasm/asm_error.c:65 libdw/dwarf_error.c:57 libdwfl/libdwflP.h:50 #: libelf/elf_error.c:60 msgid "no error" msgstr "ningún error" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:52 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "memoria agotada" @@ -92,177 +105,218 @@ msgstr "error durante salida de datos" msgid "no backend support available" msgstr "No hay soporte de segundo plano" -#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:51 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "error desconocido" -#: libdw/dwarf_error.c:60 +#: libdw/dwarf_error.c:59 msgid "invalid access" msgstr "Acceso inválido" -#: libdw/dwarf_error.c:61 +#: libdw/dwarf_error.c:60 msgid "no regular file" msgstr "no es un archivo regular" -#: libdw/dwarf_error.c:62 +#: libdw/dwarf_error.c:61 msgid "I/O error" msgstr "Error de E/S" -#: libdw/dwarf_error.c:63 +#: libdw/dwarf_error.c:62 msgid "invalid ELF file" msgstr "Archivo ELF inválido" -#: libdw/dwarf_error.c:64 +#: libdw/dwarf_error.c:63 msgid "no DWARF information" msgstr "Sin información de DWARF" -#: libdw/dwarf_error.c:65 +#: libdw/dwarf_error.c:64 msgid "cannot decompress DWARF" msgstr "" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:65 msgid "no ELF file" msgstr "No hay archivo ELF" -#: libdw/dwarf_error.c:67 +#: libdw/dwarf_error.c:66 msgid "cannot get ELF header" msgstr "no se puede obtener el encabezamiento ELF" -#: libdw/dwarf_error.c:69 +#: libdw/dwarf_error.c:68 msgid "not implemented" msgstr "sin implementar" -#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:69 libelf/elf_error.c:111 libelf/elf_error.c:159 msgid "invalid command" msgstr "comando inválido" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:70 msgid "invalid version" msgstr "versión inválida" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:71 msgid "invalid file" msgstr "Archivo inválido" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:72 msgid "no entries found" msgstr "No se hallaron entradas" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:73 msgid "invalid DWARF" msgstr "DWARF inválido" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:74 msgid "no string data" msgstr "no hay datos de cadena" +#: libdw/dwarf_error.c:75 +#, fuzzy +msgid ".debug_str section missing" +msgstr ".debug_ranges section faltante" + #: libdw/dwarf_error.c:76 +#, fuzzy +msgid ".debug_line_str section missing" +msgstr ".debug_line section faltante" + +#: libdw/dwarf_error.c:77 +#, fuzzy +msgid ".debug_str_offsets section missing" +msgstr ".debug_ranges section faltante" + +#: libdw/dwarf_error.c:78 msgid "no address value" msgstr "no hay valor de dirección" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:79 msgid "no constant value" msgstr "no hay valor constante" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:80 msgid "no reference value" msgstr "no hay valor de referencia" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:81 msgid "invalid reference value" msgstr "valor de la referencia inválido" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:82 msgid ".debug_line section missing" msgstr ".debug_line section faltante" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:83 msgid "invalid .debug_line section" msgstr ".debug_line section inválida" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:84 msgid "debug information too big" msgstr "información de depuración muy grande" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:85 msgid "invalid DWARF version" msgstr "versión DWARF inválida" -#: libdw/dwarf_error.c:84 +#: libdw/dwarf_error.c:86 msgid "invalid directory index" msgstr "Índice de directorio inválido" -#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:87 libdwfl/libdwflP.h:71 msgid "address out of range" msgstr "dirección fuera de rango" -#: libdw/dwarf_error.c:86 -msgid "no location list value" +#: libdw/dwarf_error.c:88 +#, fuzzy +msgid ".debug_loc section missing" +msgstr ".debug_line section faltante" + +#: libdw/dwarf_error.c:89 +#, fuzzy +msgid ".debug_loclists section missing" +msgstr ".debug_line section faltante" + +#: libdw/dwarf_error.c:90 +#, fuzzy +msgid "not a location list value" msgstr "valor de lista sin ubicación" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:91 msgid "no block data" msgstr "sin datos de bloque " -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:92 msgid "invalid line index" msgstr "Índice de línea inválido" -#: libdw/dwarf_error.c:89 +#: libdw/dwarf_error.c:93 msgid "invalid address range index" msgstr "Índice de dirección de rango inválido" -#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:94 libdwfl/libdwflP.h:72 msgid "no matching address range" msgstr "dirección de rango no coincidente" -#: libdw/dwarf_error.c:91 +#: libdw/dwarf_error.c:95 msgid "no flag value" msgstr "sin valor de bandera" -#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:96 libelf/elf_error.c:236 msgid "invalid offset" msgstr "desplazamiento inválido" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:97 msgid ".debug_ranges section missing" msgstr ".debug_ranges section faltante" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:98 +#, fuzzy +msgid ".debug_rnglists section missing" +msgstr ".debug_ranges section faltante" + +#: libdw/dwarf_error.c:99 msgid "invalid CFI section" msgstr "sección CFI inválida" -#: libdw/dwarf_error.c:95 +#: libdw/dwarf_error.c:100 msgid "no alternative debug link found" msgstr "" -#: libdw/dwarf_error.c:96 +#: libdw/dwarf_error.c:101 #, fuzzy msgid "invalid opcode" msgstr "operando inválido" -#: libdw/dwarf_error.c:97 +#: libdw/dwarf_error.c:102 msgid "not a CU (unit) DIE" msgstr "" -#: libdwfl/argp-std.c:46 src/stack.c:635 src/unstrip.c:2371 +#: libdw/dwarf_error.c:103 +#, fuzzy +msgid "unknown language code" +msgstr "código operativo desconocido " + +#: libdw/dwarf_error.c:104 +#, fuzzy +msgid ".debug_addr section missing" +msgstr ".debug_ranges section faltante" + +#: libdwfl/argp-std.c:50 src/stack.c:639 src/unstrip.c:2374 msgid "Input selection options:" msgstr "Opciones de selección de entrada:" -#: libdwfl/argp-std.c:47 +#: libdwfl/argp-std.c:51 msgid "Find addresses in FILE" msgstr "Hallar direcciones en FICHERO" -#: libdwfl/argp-std.c:49 +#: libdwfl/argp-std.c:53 msgid "Find addresses from signatures found in COREFILE" msgstr "Buscar direcciones desde firmas encontradas en COREFILE" -#: libdwfl/argp-std.c:51 +#: libdwfl/argp-std.c:55 msgid "Find addresses in files mapped into process PID" msgstr "Busca direcciones en archivos mapeados sobre procesos PID" -#: libdwfl/argp-std.c:53 +#: libdwfl/argp-std.c:57 msgid "" "Find addresses in files mapped as read from FILE in Linux /proc/PID/maps " "format" @@ -270,202 +324,202 @@ msgstr "" "Busca direcciones en archivos asignados como leídos desde FILE en formato " "Linux /proc/PID/maps" -#: libdwfl/argp-std.c:55 +#: libdwfl/argp-std.c:59 msgid "Find addresses in the running kernel" msgstr "Busca direcciones en el kernel que está ejecutándose" -#: libdwfl/argp-std.c:57 +#: libdwfl/argp-std.c:61 msgid "Kernel with all modules" msgstr "Kernel con todos los módulos" -#: libdwfl/argp-std.c:59 src/stack.c:642 +#: libdwfl/argp-std.c:63 src/stack.c:646 msgid "Search path for separate debuginfo files" msgstr "Ruta de búsqueda para archivos debugingfo independientes" -#: libdwfl/argp-std.c:157 +#: libdwfl/argp-std.c:164 msgid "only one of -e, -p, -k, -K, or --core allowed" msgstr "Sólo uno de -e, -p, -k, -K, ó --core está permitido" -#: libdwfl/argp-std.c:230 +#: libdwfl/argp-std.c:237 msgid "cannot load kernel symbols" msgstr "No se pueden cargar símbolos de kernel" #. Non-fatal to have no modules since we do have the kernel. -#: libdwfl/argp-std.c:234 +#: libdwfl/argp-std.c:241 msgid "cannot find kernel modules" msgstr "no se pueden hallar módulos de kernel" -#: libdwfl/argp-std.c:251 +#: libdwfl/argp-std.c:258 msgid "cannot find kernel or modules" msgstr "imposible encontrar kernel o módulos" -#: libdwfl/argp-std.c:290 +#: libdwfl/argp-std.c:297 #, c-format msgid "cannot read ELF core file: %s" msgstr "No se puede leer archivo core ELF: %s" -#: libdwfl/argp-std.c:313 +#: libdwfl/argp-std.c:320 #, fuzzy msgid "Not enough memory" msgstr "memoria agotada" -#: libdwfl/argp-std.c:323 +#: libdwfl/argp-std.c:330 msgid "No modules recognized in core file" msgstr "No hay módulos reconocidos en el archivo core" -#: libdwfl/libdwflP.h:56 +#: libdwfl/libdwflP.h:53 msgid "See errno" msgstr "Ve errno" -#: libdwfl/libdwflP.h:57 +#: libdwfl/libdwflP.h:54 msgid "See elf_errno" msgstr "Ver elf_errno" -#: libdwfl/libdwflP.h:58 +#: libdwfl/libdwflP.h:55 msgid "See dwarf_errno" msgstr "Ver dwarf_errno" -#: libdwfl/libdwflP.h:59 +#: libdwfl/libdwflP.h:56 msgid "See ebl_errno (XXX missing)" msgstr "Ver ebl_errno (no se encuentra XXX)" -#: libdwfl/libdwflP.h:60 +#: libdwfl/libdwflP.h:57 msgid "gzip decompression failed" msgstr "falló la descompresión gzip" -#: libdwfl/libdwflP.h:61 +#: libdwfl/libdwflP.h:58 msgid "bzip2 decompression failed" msgstr "falló la descompresión bzip2" -#: libdwfl/libdwflP.h:62 +#: libdwfl/libdwflP.h:59 msgid "LZMA decompression failed" msgstr "falló la descompresión LZMA" -#: libdwfl/libdwflP.h:63 +#: libdwfl/libdwflP.h:60 msgid "no support library found for machine" msgstr "no se ha encontrado una biblioteca de soporte para la máquina" -#: libdwfl/libdwflP.h:64 +#: libdwfl/libdwflP.h:61 msgid "Callbacks missing for ET_REL file" msgstr "No se encuentran rellamadas para el archivo ET_REL" -#: libdwfl/libdwflP.h:65 +#: libdwfl/libdwflP.h:62 msgid "Unsupported relocation type" msgstr "Tipo de reubicación no soportada" -#: libdwfl/libdwflP.h:66 +#: libdwfl/libdwflP.h:63 msgid "r_offset is bogus" msgstr "r_offset se encuentra inutilizable" -#: libdwfl/libdwflP.h:67 libelf/elf_error.c:111 libelf/elf_error.c:171 +#: libdwfl/libdwflP.h:64 libelf/elf_error.c:115 libelf/elf_error.c:175 msgid "offset out of range" msgstr "desplazamiento fuera de rango" -#: libdwfl/libdwflP.h:68 +#: libdwfl/libdwflP.h:65 msgid "relocation refers to undefined symbol" msgstr "la reubicación hace referencia a un símbolo no definido" -#: libdwfl/libdwflP.h:69 +#: libdwfl/libdwflP.h:66 msgid "Callback returned failure" msgstr "La rellamada devolvió un fallo" -#: libdwfl/libdwflP.h:70 +#: libdwfl/libdwflP.h:67 msgid "No DWARF information found" msgstr "No se ha encontrado una información DWARF" -#: libdwfl/libdwflP.h:71 +#: libdwfl/libdwflP.h:68 msgid "No symbol table found" msgstr "No se ha encontrado una tabla simbólica" -#: libdwfl/libdwflP.h:72 +#: libdwfl/libdwflP.h:69 msgid "No ELF program headers" msgstr "No existen encabezados de programa ELF" -#: libdwfl/libdwflP.h:73 +#: libdwfl/libdwflP.h:70 msgid "address range overlaps an existing module" msgstr "el rango de dirección se superpone con un módulo existente" -#: libdwfl/libdwflP.h:76 +#: libdwfl/libdwflP.h:73 msgid "image truncated" msgstr "imagen truncada" -#: libdwfl/libdwflP.h:77 +#: libdwfl/libdwflP.h:74 msgid "ELF file opened" msgstr "Archivo ELF abierto" -#: libdwfl/libdwflP.h:78 +#: libdwfl/libdwflP.h:75 msgid "not a valid ELF file" msgstr "no es un archivo ELF válido" -#: libdwfl/libdwflP.h:79 +#: libdwfl/libdwflP.h:76 msgid "cannot handle DWARF type description" msgstr "no es posible manipular tipo de descripción DWARF" -#: libdwfl/libdwflP.h:80 +#: libdwfl/libdwflP.h:77 msgid "ELF file does not match build ID" msgstr "El archivo ELF no coincide con el ID construido" -#: libdwfl/libdwflP.h:81 +#: libdwfl/libdwflP.h:78 #, fuzzy msgid "corrupt .gnu.prelink_undo section data" msgstr "no se puede leer sección '.gnu.prelink_undo': %s" -#: libdwfl/libdwflP.h:82 +#: libdwfl/libdwflP.h:79 msgid "Internal error due to ebl" msgstr "" -#: libdwfl/libdwflP.h:83 +#: libdwfl/libdwflP.h:80 msgid "Missing data in core file" msgstr "" -#: libdwfl/libdwflP.h:84 +#: libdwfl/libdwflP.h:81 #, fuzzy msgid "Invalid register" msgstr "Parámetro inválido" -#: libdwfl/libdwflP.h:85 +#: libdwfl/libdwflP.h:82 msgid "Error reading process memory" msgstr "" -#: libdwfl/libdwflP.h:86 +#: libdwfl/libdwflP.h:83 msgid "Couldn't find architecture of any ELF" msgstr "" -#: libdwfl/libdwflP.h:87 +#: libdwfl/libdwflP.h:84 msgid "Error parsing /proc filesystem" msgstr "" -#: libdwfl/libdwflP.h:88 +#: libdwfl/libdwflP.h:85 #, fuzzy msgid "Invalid DWARF" msgstr "DWARF inválido" -#: libdwfl/libdwflP.h:89 +#: libdwfl/libdwflP.h:86 msgid "Unsupported DWARF" msgstr "" -#: libdwfl/libdwflP.h:90 +#: libdwfl/libdwflP.h:87 msgid "Unable to find more threads" msgstr "" -#: libdwfl/libdwflP.h:91 +#: libdwfl/libdwflP.h:88 msgid "Dwfl already has attached state" msgstr "" -#: libdwfl/libdwflP.h:92 +#: libdwfl/libdwflP.h:89 msgid "Dwfl has no attached state" msgstr "" -#: libdwfl/libdwflP.h:93 +#: libdwfl/libdwflP.h:90 msgid "Unwinding not supported for this architecture" msgstr "" -#: libdwfl/libdwflP.h:94 +#: libdwfl/libdwflP.h:91 #, fuzzy msgid "Invalid argument" msgstr "Parámetro inválido" -#: libdwfl/libdwflP.h:95 +#: libdwfl/libdwflP.h:92 #, fuzzy msgid "Not an ET_CORE ELF file" msgstr "no es un archivo ELF válido" @@ -474,14 +528,14 @@ msgstr "no es un archivo ELF válido" msgid "No backend" msgstr "No hay segundo plano (Backend)" -#: libebl/eblcorenotetypename.c:99 libebl/eblobjnotetypename.c:76 +#: libebl/eblcorenotetypename.c:100 libebl/eblobjnotetypename.c:76 #: libebl/eblobjnotetypename.c:83 libebl/eblobjnotetypename.c:102 #: libebl/eblosabiname.c:73 libebl/eblsectionname.c:83 #: libebl/eblsectiontypename.c:115 libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:101 +#: libebl/ebldynamictagname.c:103 #, c-format msgid ": %#" msgstr ": %#" @@ -571,7 +625,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:5112 +#: libelf/elf_error.c:87 src/readelf.c:6107 #, c-format msgid "invalid encoding" msgstr "codificación inválida" @@ -581,222 +635,227 @@ msgid "invalid file descriptor" msgstr "descriptor de archivo inválido" #: libelf/elf_error.c:99 +#, fuzzy +msgid "invalid ELF file data" +msgstr "Archivo ELF inválido" + +#: libelf/elf_error.c:103 msgid "invalid operation" msgstr "operación inválida" -#: libelf/elf_error.c:103 +#: libelf/elf_error.c:107 msgid "ELF version not set" msgstr "no se estableció la versión de ELF" -#: libelf/elf_error.c:115 +#: libelf/elf_error.c:119 msgid "invalid fmag field in archive header" msgstr "campo fmag no válido en el encabezamiento del archivo" -#: libelf/elf_error.c:119 +#: libelf/elf_error.c:123 msgid "invalid archive file" msgstr "fichero de archivo inválido" -#: libelf/elf_error.c:123 +#: libelf/elf_error.c:127 msgid "descriptor is not for an archive" msgstr "el descriptor no es de un archivo" -#: libelf/elf_error.c:127 +#: libelf/elf_error.c:131 msgid "no index available" msgstr "no hay índice disponible" -#: libelf/elf_error.c:131 +#: libelf/elf_error.c:135 msgid "cannot read data from file" msgstr "no se pueden leer los datos del archivo" -#: libelf/elf_error.c:135 +#: libelf/elf_error.c:139 msgid "cannot write data to file" msgstr "no se puede escribir los datos al archivo" -#: libelf/elf_error.c:139 +#: libelf/elf_error.c:143 msgid "invalid binary class" msgstr "clase de binario inválida" -#: libelf/elf_error.c:143 +#: libelf/elf_error.c:147 msgid "invalid section index" msgstr "índice de sección inválido" -#: libelf/elf_error.c:147 +#: libelf/elf_error.c:151 msgid "invalid operand" msgstr "operando inválido" -#: libelf/elf_error.c:151 +#: libelf/elf_error.c:155 msgid "invalid section" msgstr "sección inválida" -#: libelf/elf_error.c:159 +#: libelf/elf_error.c:163 msgid "executable header not created first" msgstr "no se ha creado primero el encabezamiento ejecutable" -#: libelf/elf_error.c:163 +#: libelf/elf_error.c:167 msgid "file descriptor disabled" msgstr "descriptor de archivo inhabilitada" -#: libelf/elf_error.c:167 +#: libelf/elf_error.c:171 msgid "archive/member file descriptor mismatch" msgstr "archivo/miembro no coincide el descriptor de archivos" -#: libelf/elf_error.c:175 +#: libelf/elf_error.c:179 msgid "cannot manipulate null section" msgstr "no se pudo manipular una sección nula" -#: libelf/elf_error.c:179 +#: libelf/elf_error.c:183 msgid "data/scn mismatch" msgstr "no coinciden los datos/scn" -#: libelf/elf_error.c:183 +#: libelf/elf_error.c:187 msgid "invalid section header" msgstr "encabezamiento de sección inválida" -#: libelf/elf_error.c:187 src/readelf.c:7359 src/readelf.c:7807 -#: src/readelf.c:7908 src/readelf.c:8089 +#: libelf/elf_error.c:191 src/readelf.c:9742 src/readelf.c:10313 +#: src/readelf.c:10414 src/readelf.c:10595 #, c-format msgid "invalid data" msgstr "datos inválidos" -#: libelf/elf_error.c:191 +#: libelf/elf_error.c:195 msgid "unknown data encoding" msgstr "codificación de caracteres desconocida" -#: libelf/elf_error.c:195 +#: libelf/elf_error.c:199 msgid "section `sh_size' too small for data" msgstr "el tamaño de la sección `sh_size' es demasiado pequeño para los datos " -#: libelf/elf_error.c:199 +#: libelf/elf_error.c:203 msgid "invalid section alignment" msgstr "alineación de la sección inválida" -#: libelf/elf_error.c:203 +#: libelf/elf_error.c:207 msgid "invalid section entry size" msgstr "tamaño de la entrada de la sección inválida" -#: libelf/elf_error.c:207 +#: libelf/elf_error.c:211 msgid "update() for write on read-only file" msgstr "update() para escribir sobre archivo de sólo lectura" -#: libelf/elf_error.c:211 +#: libelf/elf_error.c:215 msgid "no such file" msgstr "no hay tal archivo" -#: libelf/elf_error.c:215 +#: libelf/elf_error.c:219 msgid "only relocatable files can contain section groups" msgstr "solo los archivos reubicables pueden contener grupos de sección" -#: libelf/elf_error.c:220 +#: libelf/elf_error.c:224 msgid "" "program header only allowed in executables, shared objects, and core files" msgstr "" "los encabezamientos de los programas solo son permitidos en archivos " "ejecutables, archivos principales, u objetos compartidos" -#: libelf/elf_error.c:227 +#: libelf/elf_error.c:231 msgid "file has no program header" msgstr "el archivo no tiene encabezamiento de programa" -#: libelf/elf_error.c:237 +#: libelf/elf_error.c:241 #, fuzzy msgid "invalid section type" msgstr "sección inválida" -#: libelf/elf_error.c:242 +#: libelf/elf_error.c:246 #, fuzzy msgid "invalid section flags" msgstr "sección inválida" -#: libelf/elf_error.c:247 +#: libelf/elf_error.c:251 #, fuzzy msgid "section does not contain compressed data" msgstr "sección [%2zu] '%s' no debe ser ejecutable\n" -#: libelf/elf_error.c:252 +#: libelf/elf_error.c:256 msgid "section contains compressed data" msgstr "" -#: libelf/elf_error.c:257 +#: libelf/elf_error.c:261 #, fuzzy msgid "unknown compression type" msgstr "tipo desconocido" -#: libelf/elf_error.c:262 +#: libelf/elf_error.c:266 #, fuzzy msgid "cannot compress data" msgstr "no pueden copiar datos de sección: %s" -#: libelf/elf_error.c:267 +#: libelf/elf_error.c:271 #, fuzzy msgid "cannot decompress data" msgstr "no pueden copiar datos de sección: %s" -#: src/addr2line.c:57 +#: src/addr2line.c:58 #, fuzzy msgid "Input format options:" msgstr "Opciones de selección de entrada:" -#: src/addr2line.c:59 +#: src/addr2line.c:60 msgid "Treat addresses as offsets relative to NAME section." msgstr "Manejar direcciones como compensaciones relativas a sección de NOMBRE." -#: src/addr2line.c:61 +#: src/addr2line.c:62 #, fuzzy msgid "Output format options:" msgstr "Formato de salida:" -#: src/addr2line.c:62 +#: src/addr2line.c:63 #, fuzzy msgid "Print address before each entry" msgstr "Imprimir nombre de archivo antes de cada cadena." -#: src/addr2line.c:63 +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Mostrar sólo nombres de base de ficheros fuente" -#: src/addr2line.c:65 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "" "Mostrar nombres de fichero absolutos mediante directorio de compilación" -#: src/addr2line.c:66 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "También mostrar nombres de función" -#: src/addr2line.c:67 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "También mostrar símbolo o nombres de sección" -#: src/addr2line.c:68 +#: src/addr2line.c:69 #, fuzzy msgid "Also show symbol and the section names" msgstr "También mostrar símbolo o nombres de sección" -#: src/addr2line.c:69 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "También mostrar marcas de líneas de tabla" -#: src/addr2line.c:71 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" -#: src/addr2line.c:74 +#: src/addr2line.c:75 msgid "Show demangled symbols (ARG is always ignored)" msgstr "" -#: src/addr2line.c:76 +#: src/addr2line.c:77 msgid "Print all information on one line, and indent inlines" msgstr "" -#: src/addr2line.c:78 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:99 -#: src/strings.c:78 +#: src/addr2line.c:79 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:101 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Misceláneos:" #. Short description of program. -#: src/addr2line.c:86 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" @@ -804,279 +863,304 @@ msgstr "" "por defecto)." #. Strings for arguments in help texts. -#: src/addr2line.c:90 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "[DIREC...]" -#: src/addr2line.c:518 +#: src/addr2line.c:520 #, c-format msgid "Section syntax requires exactly one module" msgstr "Sintaxis de sección requiere exactamente un módulo" -#: src/addr2line.c:541 +#: src/addr2line.c:543 #, c-format msgid "offset %# lies outside section '%s'" msgstr "Compensación %# se encuentra fuera de sección '%s'" -#: src/addr2line.c:631 +#: src/addr2line.c:633 #, c-format msgid "cannot find symbol '%s'" msgstr "no se puede encontrar símbolo '%s'" -#: src/addr2line.c:636 +#: src/addr2line.c:638 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "compensación %# se encuentra fuera de contenido de '%s'" -#: src/ar.c:67 +#: src/ar.c:68 msgid "Commands:" msgstr "Comandos:" -#: src/ar.c:68 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Borrar archivos de un archivo" -#: src/ar.c:69 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Desplazar ficheros en archivo." -#: src/ar.c:70 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Imprimir ficheros en archivo." -#: src/ar.c:71 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Adición rápida de ficheros para archivar" -#: src/ar.c:73 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Remplazar fichero existente o insertar uno nuevo en el archivo." -#: src/ar.c:74 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Mostrar contenido de archivo" -#: src/ar.c:75 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "extraer ficheros de un archivo" -#: src/ar.c:77 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Modificadores de comandos:" -#: src/ar.c:78 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Preservar fechas originales." -#: src/ar.c:79 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Usar instancia [COUNT] de nombre." -#: src/ar.c:81 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "No remplazar los archivos existentes por los archivos extractados." -#: src/ar.c:82 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Permitir truncamiento del nombre de archivo de ser necesario." -#: src/ar.c:84 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Proporcionar salida detallada" -#: src/ar.c:85 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Forzar regeneración de tabla de símbolos." -#: src/ar.c:86 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Insertar archivo después de [MIEMBRO]." -#: src/ar.c:87 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Introducir fichero antes de [MIEMBRO]." -#: src/ar.c:88 +#: src/ar.c:89 msgid "Same as -b." msgstr "Igual que -b." -#: src/ar.c:89 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Suprimir mensaje cuando se tenga que crear la biblioteca." -#: src/ar.c:91 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Usar la ruta total para fichero coincidente." -#: src/ar.c:92 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Actualizar sólo ficheros antiguos en archivo." #. Short description of program. -#: src/ar.c:98 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Crear, modificar, y extraer de archivos." #. Strings for arguments in help texts. -#: src/ar.c:101 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[MIEMBRO] [CONTAR] ARCHIVO [FICHERO...]" -#: src/ar.c:180 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "'a', 'b', é 'i' sólo se permiten con las opciones 'm' y 'r'." -#: src/ar.c:185 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "Parámetro MIEMBRO requerido para modificadores 'a', 'b', e 'i'" -#: src/ar.c:201 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "'N' sólo es significativa con las opciones `x' y `d'." -#: src/ar.c:206 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "Parámetro CONTAR requerido" -#: src/ar.c:218 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "Parámetro CONTAR inválido %s" -#: src/ar.c:225 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "'%c' es sólo significativo con la opción 'x'" -#: src/ar.c:231 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "nombre de archivo requerido" -#: src/ar.c:244 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "" -#: src/ar.c:295 +#: src/ar.c:296 #, c-format msgid "More than one operation specified" msgstr "Más de una operación especificada" -#: src/ar.c:389 +#: src/ar.c:390 #, c-format msgid "cannot open archive '%s'" msgstr "Imposible abrir el archivo '%s'" -#: src/ar.c:399 +#: src/ar.c:400 #, c-format msgid "cannot open archive '%s': %s" msgstr "Imposible abrir el archivo '%s': %s" -#: src/ar.c:403 +#: src/ar.c:404 #, c-format msgid "%s: not an archive file" msgstr "%s: no es un fichero de archivo" -#: src/ar.c:407 +#: src/ar.c:408 #, c-format msgid "cannot stat archive '%s'" msgstr "no sepuede stat el archivo '%s'" -#: src/ar.c:419 +#: src/ar.c:420 #, c-format msgid "no entry %s in archive\n" msgstr "no hay entrada %s en archivo\n" -#: src/ar.c:472 src/ar.c:917 src/ar.c:1117 +#: src/ar.c:473 src/ar.c:918 src/ar.c:1122 #, c-format msgid "cannot create hash table" msgstr "Falló al crear la tabla de dispersión" -#: src/ar.c:479 src/ar.c:924 src/ar.c:1126 +#: src/ar.c:480 src/ar.c:925 src/ar.c:1131 #, c-format msgid "cannot insert into hash table" msgstr "no sepuede insertar en tabla de dispersión" -#: src/ar.c:487 src/ranlib.c:148 +#: src/ar.c:488 src/ranlib.c:149 #, c-format msgid "cannot stat '%s'" msgstr "no se puede stat '%s'" -#: src/ar.c:583 +#: src/ar.c:584 #, c-format msgid "cannot read content of %s: %s" msgstr "no se puede leer el contenido de %s: %s" -#: src/ar.c:626 +#: src/ar.c:627 #, c-format msgid "cannot open %.*s" msgstr " Imposible abrir %.*s" -#: src/ar.c:648 +#: src/ar.c:649 #, c-format msgid "failed to write %s" msgstr "Falló al escribir %s" -#: src/ar.c:660 +#: src/ar.c:661 #, c-format msgid "cannot change mode of %s" msgstr "No se puede cambiar el modo de %s" -#: src/ar.c:676 +#: src/ar.c:677 #, c-format msgid "cannot change modification time of %s" msgstr "No puede cambiar tiempo de modificación de %s" -#: src/ar.c:722 +#: src/ar.c:723 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "no sepuede renombrar fichero temporal para %.*s" -#: src/ar.c:758 src/ar.c:1009 src/ar.c:1408 src/ranlib.c:222 +#: src/ar.c:759 src/ar.c:1010 src/ar.c:1411 src/ranlib.c:223 #, c-format msgid "cannot create new file" msgstr "no sepuede crear fichero nuevo" -#: src/ar.c:1208 +#: src/ar.c:1213 #, c-format msgid "position member %s not found" msgstr "no se encuentra miembro de posición %s " -#: src/ar.c:1218 +#: src/ar.c:1223 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: ¡no hay entrada %s en archive!\n" -#: src/ar.c:1247 src/objdump.c:240 +#: src/ar.c:1252 src/objdump.c:242 #, c-format msgid "cannot open %s" msgstr "no sepuede abrir %s" -#: src/ar.c:1252 +#: src/ar.c:1257 #, c-format msgid "cannot stat %s" msgstr "no sepuede efectuar stat %s" -#: src/ar.c:1258 +#: src/ar.c:1263 #, c-format msgid "%s is no regular file" msgstr " %s no es un fichero ordinario " -#: src/ar.c:1271 +#: src/ar.c:1276 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "no sepuede obtener descriptor ELF para %s: %s\n" -#: src/ar.c:1291 +#: src/ar.c:1296 #, c-format msgid "cannot read %s: %s" msgstr "no sepuede leer %s: %s" +#: src/ar.c:1471 +#, fuzzy, c-format +msgid "cannot represent ar_date" +msgstr "no pueden copiar datos de sección: %s" + +#: src/ar.c:1477 +#, fuzzy, c-format +msgid "cannot represent ar_uid" +msgstr "no pueden copiar datos de sección: %s" + +#: src/ar.c:1483 +#, fuzzy, c-format +msgid "cannot represent ar_gid" +msgstr "no pueden copiar datos de sección: %s" + +#: src/ar.c:1489 +#, fuzzy, c-format +msgid "cannot represent ar_mode" +msgstr "no se puede obtener encabezamiento de sección\n" + +#: src/ar.c:1495 +#, fuzzy, c-format +msgid "cannot represent ar_size" +msgstr "no sepuede abrir %s" + #: src/arlib-argp.c:32 msgid "Use zero for uid, gid, and date in archive members." msgstr "" @@ -1210,121 +1294,121 @@ msgstr "%s %s differ: tabla de símbolos [%zu]" msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s differ: tabla de símbolos [%zu,%zu]" -#: src/elfcmp.c:427 src/elfcmp.c:496 +#: src/elfcmp.c:428 src/elfcmp.c:498 #, 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:435 +#: src/elfcmp.c:436 #, fuzzy, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "No se puede obtener contenido de sección %zu en '%s': %s" -#: src/elfcmp.c:445 +#: src/elfcmp.c:447 #, fuzzy, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:453 +#: src/elfcmp.c:455 #, 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:468 +#: src/elfcmp.c:470 #, fuzzy, c-format msgid "%s %s differ: build ID length" msgstr "%s %s differ: brecha" -#: src/elfcmp.c:476 +#: src/elfcmp.c:478 #, fuzzy, c-format msgid "%s %s differ: build ID content" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:485 +#: src/elfcmp.c:487 #, 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:526 +#: src/elfcmp.c:528 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s differ: sección [%zu] contenido '%s'" -#: src/elfcmp.c:530 +#: src/elfcmp.c:532 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "%s %s differ: sección [%zu,%zu] contenido '%s'" -#: src/elfcmp.c:545 +#: src/elfcmp.c:547 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "%s %s differ: cantidad desigual de secciones importantes" -#: src/elfcmp.c:578 src/elfcmp.c:583 +#: src/elfcmp.c:580 src/elfcmp.c:585 #, c-format msgid "cannot load data of '%s': %s" msgstr "no se pueden cargar los datos de '%s': %s" -#: src/elfcmp.c:602 src/elfcmp.c:608 +#: src/elfcmp.c:604 src/elfcmp.c:610 #, 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:614 +#: src/elfcmp.c:616 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s differ: encabezamiento de programa %d" -#: src/elfcmp.c:638 +#: src/elfcmp.c:640 #, c-format msgid "%s %s differ: gap" msgstr "%s %s differ: brecha" -#: src/elfcmp.c:689 +#: src/elfcmp.c:691 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Valor inválido '%s' para parámetro --gaps" -#: src/elfcmp.c:717 src/findtextrel.c:206 src/nm.c:363 src/ranlib.c:141 -#: src/size.c:273 src/strings.c:185 src/strip.c:452 src/strip.c:489 -#: src/unstrip.c:2020 src/unstrip.c:2049 +#: src/elfcmp.c:719 src/findtextrel.c:206 src/nm.c:365 src/ranlib.c:142 +#: src/size.c:273 src/strings.c:186 src/strip.c:518 src/strip.c:555 +#: src/unstrip.c:2023 src/unstrip.c:2052 #, c-format msgid "cannot open '%s'" msgstr "Imposible abrir '%s'" -#: src/elfcmp.c:721 src/findtextrel.c:213 src/ranlib.c:158 +#: src/elfcmp.c:723 src/findtextrel.c:213 src/ranlib.c:159 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "No puede crear descriptor ELF para '%s': %s" -#: src/elfcmp.c:726 +#: src/elfcmp.c:728 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "no se puede crear el descriptor EBL para '%s'" -#: src/elfcmp.c:744 src/findtextrel.c:394 +#: src/elfcmp.c:746 src/findtextrel.c:394 #, 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:754 +#: src/elfcmp.c:756 #, c-format msgid "cannot get content of section %zu: %s" msgstr "No se puede obtener contenido de sección %zu: %s" -#: src/elfcmp.c:764 src/elfcmp.c:778 +#: src/elfcmp.c:766 src/elfcmp.c:780 #, c-format msgid "cannot get relocation: %s" msgstr "No se puede obtener reubicación: %s" -#: src/elfcompress.c:115 src/strip.c:240 src/unstrip.c:121 +#: src/elfcompress.c:115 src/strip.c:297 src/unstrip.c:121 #, c-format msgid "-o option specified twice" msgstr "opción -o especificada dos veces" #: src/elfcompress.c:122 -#, fuzzy +#, fuzzy, c-format msgid "-t option specified twice" msgstr "opción -f especificada dos veces" @@ -1335,12 +1419,12 @@ msgstr "tipo desconocido" #. We need at least one input file. #: src/elfcompress.c:143 src/elfcompress.c:1305 -#, fuzzy +#, fuzzy, c-format msgid "No input file given" msgstr "archivo de entrada vacío" #: src/elfcompress.c:149 src/elfcompress.c:1310 -#, fuzzy +#, fuzzy, c-format msgid "Only one input file allowed together with '-o'" msgstr "Sólo se permite ingresar un archivo junto con '-o' y '-f'" @@ -1370,7 +1454,7 @@ msgstr "" msgid "Force compression of section even if it would become larger" msgstr "" -#: src/elfcompress.c:1282 src/strip.c:87 +#: src/elfcompress.c:1282 src/strip.c:91 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "Relaja algunas reglas para manejar ficheros ELF rotos" @@ -1381,7 +1465,7 @@ msgstr "" "Sección [%2zu] '%s': dirección de secciones de datos de hilo-local no cero\n" #. Strings for arguments in help texts. -#: src/elfcompress.c:1294 src/elflint.c:77 src/readelf.c:126 +#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154 msgid "FILE..." msgstr "FICHERO..." @@ -1389,19 +1473,19 @@ msgstr "FICHERO..." msgid "Compress or decompress sections in an ELF file." msgstr "" -#: src/elflint.c:63 +#: src/elflint.c:64 msgid "Be extremely strict, flag level 2 features." msgstr "Sea extremadamente estricto, característica de marca de nivel 2." -#: src/elflint.c:64 +#: src/elflint.c:65 msgid "Do not print anything if successful" msgstr "No imprime nada si está correcto" -#: src/elflint.c:65 +#: src/elflint.c:66 msgid "Binary is a separate debuginfo file" msgstr "Binario es un archivo debuginfo independiente" -#: src/elflint.c:67 +#: src/elflint.c:68 msgid "" "Binary has been created with GNU ld and is therefore known to be broken in " "certain ways" @@ -1410,164 +1494,174 @@ msgstr "" "roto de alguna forma" #. Short description of program. -#: src/elflint.c:73 +#: src/elflint.c:74 msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "Chequeo minucioso de ficheros ELF de acuerdo con gABI/psABI " -#: src/elflint.c:154 src/readelf.c:301 +#: src/elflint.c:155 src/readelf.c:347 #, c-format msgid "cannot open input file" msgstr "no se puede abrir el fichero de entrada" -#: src/elflint.c:161 +#: src/elflint.c:162 #, c-format msgid "cannot generate Elf descriptor: %s\n" msgstr "no se puede crear descriptor ELF: %s\n" -#: src/elflint.c:180 +#: src/elflint.c:181 #, c-format msgid "error while closing Elf descriptor: %s\n" msgstr "error al cerrar el descriptor ELF: %s\n" -#: src/elflint.c:184 +#: src/elflint.c:185 msgid "No errors" msgstr "No hay errores" -#: src/elflint.c:219 src/readelf.c:478 +#: src/elflint.c:220 src/readelf.c:546 msgid "Missing file name.\n" msgstr "Falta el nombre de archivo.\n" -#: src/elflint.c:284 +#: src/elflint.c:285 #, c-format msgid " error while freeing sub-ELF descriptor: %s\n" msgstr " error al liberar descriptor sub-ELF: %s\n" #. We cannot do anything. -#: src/elflint.c:292 +#: src/elflint.c:293 #, c-format msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "No es un fichero ELF - tiene los bytes mágicos errados en el inicio\n" -#: src/elflint.c:357 +#: src/elflint.c:358 #, c-format msgid "e_ident[%d] == %d is no known class\n" msgstr "e_ident[%d] == %d es una clase desconocida\n" -#: src/elflint.c:362 +#: src/elflint.c:363 #, c-format msgid "e_ident[%d] == %d is no known data encoding\n" msgstr "e_ident[%d] == %d es una codificación de datos desconocida\n" -#: src/elflint.c:366 +#: src/elflint.c:367 #, c-format msgid "unknown ELF header version number e_ident[%d] == %d\n" msgstr "" "número de versión de encabezamiento ELF desconocido e_ident[%d] == %d\n" -#: src/elflint.c:374 +#: src/elflint.c:375 #, c-format msgid "unsupported OS ABI e_ident[%d] == '%s'\n" msgstr "Sistema operativo OS ABI e_ident[%d] == '%s' incompatible\n" -#: src/elflint.c:380 -#, c-format -msgid "unsupport ABI version e_ident[%d] == %d\n" +#: src/elflint.c:381 +#, fuzzy, c-format +msgid "unsupported ABI version e_ident[%d] == %d\n" msgstr "Versión incompatible ABI e_ident[%d] == %d\n" -#: src/elflint.c:385 +#: src/elflint.c:386 #, c-format msgid "e_ident[%zu] is not zero\n" msgstr "e_ident[%zu] no es cero\n" -#: src/elflint.c:390 +#: src/elflint.c:391 #, c-format msgid "unknown object file type %d\n" msgstr "tipo de fichero objeto desconocido %d\n" -#: src/elflint.c:397 +#: src/elflint.c:398 #, c-format msgid "unknown machine type %d\n" msgstr "tipo de máquina desconocido %d\n" -#: src/elflint.c:401 +#: src/elflint.c:402 #, c-format msgid "unknown object file version\n" msgstr "versión de fichero objeto desconocido\n" -#: src/elflint.c:407 +#: src/elflint.c:408 #, c-format msgid "invalid program header offset\n" msgstr "Compensación de encabezamiento de programa inválida\n" -#: src/elflint.c:409 +#: src/elflint.c:410 #, c-format msgid "executables and DSOs cannot have zero program header offset\n" msgstr "" "tanto los ejecutables como los DSO no pueden tener compensación de " "encabezamiento de programa cero\n" -#: src/elflint.c:413 +#: src/elflint.c:414 #, c-format msgid "invalid number of program header entries\n" msgstr "cantidad no válida de entradas del encabezamiento del programa\n" -#: src/elflint.c:421 +#: src/elflint.c:422 #, c-format msgid "invalid section header table offset\n" msgstr "compensación de sección de tabla de encabezamiento inválida\n" -#: src/elflint.c:424 +#: src/elflint.c:425 #, c-format msgid "section header table must be present\n" msgstr "tabla de encabezamiento de sección debe estar presente\n" -#: src/elflint.c:438 +#: src/elflint.c:439 #, c-format msgid "invalid number of section header table entries\n" msgstr "" "cantidad no válida de entradas en la tabla del encabezamiento de sección\n" -#: src/elflint.c:455 +#: src/elflint.c:456 #, c-format msgid "invalid section header index\n" msgstr "Índice de sección de encabezamiento inválido\n" -#: src/elflint.c:469 +#: src/elflint.c:474 +#, c-format +msgid "Can only check %u headers, shnum was %u\n" +msgstr "" + +#: src/elflint.c:488 #, c-format msgid "invalid number of program header table entries\n" msgstr "cantidad no válida de entradas de tabla de encabezado del programa\n" -#: src/elflint.c:478 +#: src/elflint.c:505 +#, c-format +msgid "Can only check %u headers, phnum was %u\n" +msgstr "" + +#: src/elflint.c:510 #, c-format msgid "invalid machine flags: %s\n" msgstr "Indicadores de máquina inválidos: %s\n" -#: src/elflint.c:485 src/elflint.c:502 +#: src/elflint.c:517 src/elflint.c:534 #, c-format msgid "invalid ELF header size: %hd\n" msgstr "tamaño inválido del encabezamiento ELF: %hd\n" -#: src/elflint.c:488 src/elflint.c:505 +#: src/elflint.c:520 src/elflint.c:537 #, c-format msgid "invalid program header size: %hd\n" msgstr "tamaño inválido del encabezamiento del programa: %hd\n" -#: src/elflint.c:491 src/elflint.c:508 +#: src/elflint.c:523 src/elflint.c:540 #, c-format msgid "invalid program header position or size\n" msgstr "tamaño o posición inválidos del encabezamiento del programa\n" -#: src/elflint.c:494 src/elflint.c:511 +#: src/elflint.c:526 src/elflint.c:543 #, c-format msgid "invalid section header size: %hd\n" msgstr "tamaño inválido del encabezamiento de sección: %hd\n" -#: src/elflint.c:497 src/elflint.c:514 +#: src/elflint.c:529 src/elflint.c:546 #, c-format msgid "invalid section header position or size\n" msgstr "tamaño o posición no válidos del encabezamiento de sección\n" -#: src/elflint.c:559 +#: src/elflint.c:591 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1576,7 +1670,7 @@ msgstr "" "sección [%2d] '%s': sección con la bandera SHF_GROUP no es parte de una " "sección de grupo\n" -#: src/elflint.c:563 +#: src/elflint.c:595 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" @@ -1584,14 +1678,14 @@ msgstr "" "sección [%2d] '%s': el grupo de sección [%2zu] '%s' no precede al miembro de " "grupo\n" -#: src/elflint.c:579 src/elflint.c:1463 src/elflint.c:1514 src/elflint.c:1620 -#: src/elflint.c:1956 src/elflint.c:2272 src/elflint.c:2886 src/elflint.c:3049 -#: src/elflint.c:3197 src/elflint.c:3387 src/elflint.c:4355 +#: src/elflint.c:611 src/elflint.c:1495 src/elflint.c:1546 src/elflint.c:1652 +#: src/elflint.c:1988 src/elflint.c:2311 src/elflint.c:2930 src/elflint.c:3093 +#: src/elflint.c:3241 src/elflint.c:3431 src/elflint.c:4399 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "Sección [%2d] '%s': No se pueden obtener datos de sección\n" -#: src/elflint.c:592 src/elflint.c:1627 +#: src/elflint.c:624 src/elflint.c:1659 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1600,7 +1694,7 @@ msgstr "" "sección [%2d] '%s': nombrado como una tabla de cadena para la sección [%2d] " "'%s' pero el tipo no es SHT_STRTAB\n" -#: src/elflint.c:615 +#: src/elflint.c:647 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1609,39 +1703,39 @@ msgstr "" "sección [%2d] '%s': la tabla de símbolo no puede tener más de una sección de " "índice extendido\n" -#: src/elflint.c:627 +#: src/elflint.c:659 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "" "sección [%2u] '%s': el tamaño de la entrada no coincide con ElfXX_Sym\n" -#: src/elflint.c:636 +#: src/elflint.c:668 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "Sección [%2d] '%s': no se puede obtener símbolo %d: %s\n" -#: src/elflint.c:641 src/elflint.c:644 src/elflint.c:647 src/elflint.c:650 -#: src/elflint.c:653 src/elflint.c:656 +#: src/elflint.c:673 src/elflint.c:676 src/elflint.c:679 src/elflint.c:682 +#: src/elflint.c:685 src/elflint.c:688 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "Sección [%2d] '%s': '%s' en la entrada zeroth no es cero\n" -#: src/elflint.c:659 +#: src/elflint.c:691 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "sección [%2d] '%s': XINDEX en la entrada zeroth no es cero\n" -#: src/elflint.c:669 +#: src/elflint.c:701 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "sección [%2d] '%s': no es posible obtener el símbolo %zu: %s\n" -#: src/elflint.c:678 +#: src/elflint.c:710 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "sección [%2d] '%s': símbolo %zu: valor de nombre inválido\n" -#: src/elflint.c:693 +#: src/elflint.c:725 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1650,7 +1744,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: el índice de sección es demasiado extenso, " "pero no la sección extendida de la sección de índice\n" -#: src/elflint.c:699 +#: src/elflint.c:731 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1660,27 +1754,27 @@ msgstr "" "caber en st_shndx (%)\n" #. || sym->st_shndx > SHN_HIRESERVE always false -#: src/elflint.c:711 +#: src/elflint.c:743 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "sección [%2d] '%s': símbolo %zu: índice de sección inválido\n" -#: src/elflint.c:719 +#: src/elflint.c:751 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "sección [%2d] '%s': símbolo %zu: tipo desconocido\n" -#: src/elflint.c:725 +#: src/elflint.c:757 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "sección [%2d] '%s': símbolo %zu: asociación de símbolo desconocida\n" -#: src/elflint.c:730 +#: src/elflint.c:762 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "Sección [%2d] '%s': símbolo %zu: símbolo único no de tipo de objeto\n" -#: src/elflint.c:738 +#: src/elflint.c:770 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" @@ -1688,25 +1782,25 @@ msgstr "" "sección [%2d] '%s': símbolo %zu: COMMON solo es permitido en archivos " "realojables\n" -#: src/elflint.c:742 +#: src/elflint.c:774 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolos locales COMMON no tienen sentido\n" -#: src/elflint.c:746 +#: src/elflint.c:778 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "" "Sección [%2d] '%s': símbolo %zu: función en sección COMMON no tiene sentido\n" -#: src/elflint.c:797 +#: src/elflint.c:829 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "sección [%2d] '%s': símbolo %zu: st_value fuera de límites\n" -#: src/elflint.c:803 src/elflint.c:828 src/elflint.c:877 +#: src/elflint.c:835 src/elflint.c:860 src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1715,7 +1809,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu no se ajusta totalmente en la sección [%2d] " "'%s'\n" -#: src/elflint.c:812 +#: src/elflint.c:844 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1724,7 +1818,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: sección de referencia [%2d] '%s' no tiene " "establecida bandera SHF_TLS\n" -#: src/elflint.c:822 src/elflint.c:870 +#: src/elflint.c:854 src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1733,7 +1827,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: st_value fuera de límites de sección de " "referencia [%2d] '%s'\n" -#: src/elflint.c:849 +#: src/elflint.c:881 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" @@ -1741,7 +1835,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo TLS, pero no hay entrada de " "programa TLS\n" -#: src/elflint.c:855 +#: src/elflint.c:887 #, fuzzy, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " @@ -1750,7 +1844,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo TLS, pero no hay entrada de " "programa TLS\n" -#: src/elflint.c:863 +#: src/elflint.c:895 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1759,7 +1853,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: st_value falta sección de referencia [%2d] " "'%s'\n" -#: src/elflint.c:890 +#: src/elflint.c:922 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1768,7 +1862,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo local fuera del rango descrito en " "sh_info\n" -#: src/elflint.c:897 +#: src/elflint.c:929 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1777,12 +1871,12 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo non-local fuera del rango descrito " "en sh_info\n" -#: src/elflint.c:904 +#: src/elflint.c:936 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "Sección [%2d] '%s': símbolo %zu: símbolo de sección non-local\n" -#: src/elflint.c:954 +#: src/elflint.c:986 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1791,7 +1885,7 @@ msgstr "" "Sección [%2d] '%s': símbolo _GLOBAL_OFFSET_TABLE_ se refiere a sección " "errada [%2d]\n" -#: src/elflint.c:961 +#: src/elflint.c:993 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1803,7 +1897,7 @@ msgstr "" #. This test is more strict than the psABIs which #. usually allow the symbol to be in the middle of #. the .got section, allowing negative offsets. -#: src/elflint.c:977 +#: src/elflint.c:1009 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1812,7 +1906,7 @@ msgstr "" "Sección [%2d] '%s': valor del símbolo _GLOBAL_OFFSET_TABLE_ %# no " "coincide con dirección de sección %s %#\n" -#: src/elflint.c:984 +#: src/elflint.c:1016 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1821,7 +1915,7 @@ msgstr "" "Sección [%2d] '%s': tamaño de símbolo _GLOBAL_OFFSET_TABLE_ % no " "coincide con tamaño de sección %s %\n" -#: src/elflint.c:992 +#: src/elflint.c:1024 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1830,7 +1924,7 @@ msgstr "" "Sección [%2d] '%s': símbolo _GLOBAL_OFFSET_TABLE_ presente, pero no. sección " "got\n" -#: src/elflint.c:1008 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1839,7 +1933,7 @@ msgstr "" "sección [%2d] '%s': Valor de símbolo _DYNAMIC_ %# no coincide con la " "dirección de segmento%#\n" -#: src/elflint.c:1015 +#: src/elflint.c:1047 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1848,7 +1942,7 @@ msgstr "" "Sección [%2d] '%s': tamaño de símbolo _DYNAMIC % no coincide con " "tamaño de segmento %\n" -#: src/elflint.c:1028 +#: src/elflint.c:1060 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1857,29 +1951,29 @@ msgstr "" "Sección [%2d] '%s': símbolo %zu: símbolo en tabla de símbolos dinámicos sin " "visibilidad predeterminada\n" -#: src/elflint.c:1032 +#: src/elflint.c:1064 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "" "Sección [%2d] '%s': símbolo %zu: bit desconocido establecido en st_other\n" -#: src/elflint.c:1070 +#: src/elflint.c:1102 #, fuzzy, c-format msgid "section [%2d] '%s': cannot get section data.\n" msgstr "Sección [%2d] '%s': No se pueden obtener datos de sección\n" -#: src/elflint.c:1086 +#: src/elflint.c:1118 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "Sección [%2d] '%s': DT_RELCOUNT utilizada para esta sección RELA\n" -#: src/elflint.c:1097 src/elflint.c:1150 +#: src/elflint.c:1129 src/elflint.c:1182 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" "Sección [%2d] '%s': valor DT_RELCOUNT %d demasiado alto para esta sección\n" -#: src/elflint.c:1122 src/elflint.c:1175 +#: src/elflint.c:1154 src/elflint.c:1207 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1888,7 +1982,7 @@ msgstr "" "Sección [%2d] '%s': reubicaciones relativas después de que el %d de índice " "haya sido especificado por DT_RELCOUNT\n" -#: src/elflint.c:1128 src/elflint.c:1181 +#: src/elflint.c:1160 src/elflint.c:1213 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1897,50 +1991,50 @@ msgstr "" "Sección [%2d] '%s': reubicación no-relativa en %zu de índice; DT_RELCOUNT " "especificado %d reubicaciones relativas\n" -#: src/elflint.c:1140 +#: src/elflint.c:1172 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "sección [%2d] '%s': DT_RELACOUNT utilizado para esta sección REL\n" -#: src/elflint.c:1223 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "Sección [%2d] '%s': índice de sección de destino inválido\n" -#: src/elflint.c:1235 +#: src/elflint.c:1267 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "Sección [%2d] '%s': tipo de sección de destino inválido\n" -#: src/elflint.c:1243 +#: src/elflint.c:1275 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "Sección [%2d] '%s': sh_info debe ser cero\n" -#: src/elflint.c:1251 +#: src/elflint.c:1283 #, fuzzy, c-format msgid "" "section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" "Sección [%2d] '%s': no reubicaciones para secciones de fusión posibles\n" -#: src/elflint.c:1259 +#: src/elflint.c:1291 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" "Sección [%2d] '%s': tamaño de entrada de sección no coincide con ElfXX_Rela\n" -#: src/elflint.c:1319 +#: src/elflint.c:1351 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "Reubicación de bandera pero no hay segmento de sólo lectura\n" -#: src/elflint.c:1346 +#: src/elflint.c:1378 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "Sección [%2d] '%s': reubicación %zu: tipo inválido\n" -#: src/elflint.c:1354 +#: src/elflint.c:1386 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1949,12 +2043,12 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: tipo de reubicación inválido para el " "tipo de archivo\n" -#: src/elflint.c:1362 +#: src/elflint.c:1394 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "Sección [%2d] '%s': reubicación %zu: índice de símbolo inválido\n" -#: src/elflint.c:1380 +#: src/elflint.c:1412 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1963,12 +2057,12 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: sólo el símbolo '_GLOBAL_OFFSET_TABLE_' " "puede utilizarse con %s\n" -#: src/elflint.c:1397 +#: src/elflint.c:1429 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "Sección [%2d] '%s': reubicación %zu: compensación fuera de límites\n" -#: src/elflint.c:1412 +#: src/elflint.c:1444 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1977,7 +2071,7 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: reubicación de copia con símbolo de " "tipo %s\n" -#: src/elflint.c:1433 +#: src/elflint.c:1465 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1986,24 +2080,24 @@ msgstr "" "Sección [%2d] '%s': reubicación %zu: sección de sólo-lectura modificada, " "pero no se estableció bandera de reubicación\n" -#: src/elflint.c:1448 +#: src/elflint.c:1480 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" "Sección [%2d] '%s': las reubicaciones se hacen con datos cargados y " "descargados\n" -#: src/elflint.c:1488 src/elflint.c:1539 +#: src/elflint.c:1520 src/elflint.c:1571 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "Sección [%2d] '%s': no puede obtener reubicación %zu: %s\n" -#: src/elflint.c:1615 +#: src/elflint.c:1647 #, c-format msgid "more than one dynamic section present\n" msgstr "más de una sección dinámica presente\n" -#: src/elflint.c:1633 +#: src/elflint.c:1665 #, fuzzy, c-format msgid "" "section [%2d]: referenced as string table for section [%2d] '%s' but section " @@ -2012,44 +2106,44 @@ msgstr "" "sección [%2d] '%s': nombrado como una tabla de cadena para la sección [%2d] " "'%s' pero el tipo no es SHT_STRTAB\n" -#: src/elflint.c:1641 +#: src/elflint.c:1673 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" "Sección [%2d] '%s': tamaño de entrada de sección no coincide con ElfXX_Dyn\n" -#: src/elflint.c:1646 src/elflint.c:1935 +#: src/elflint.c:1678 src/elflint.c:1967 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "Sección [%2d] '%s': sh_info no es cero\n" -#: src/elflint.c:1656 +#: src/elflint.c:1688 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" "Sección [%2d] '%s': no puede obtener entrada de sección dinámica %zu: %s\n" -#: src/elflint.c:1664 +#: src/elflint.c:1696 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "Sección [%2d] '%s': entradas non-DT_NULL siguen a la entrada DT_NULL\n" -#: src/elflint.c:1671 +#: src/elflint.c:1703 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "Sección [%2d] '%s': entrada %zu: etiqueta desconocida\n" -#: src/elflint.c:1682 +#: src/elflint.c:1714 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "Sección [%2d] '%s': entrada %zu: más de una entrada con etiqueta %s\n" -#: src/elflint.c:1692 +#: src/elflint.c:1724 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "Sección [%2d] '%s': entrada %zu: nivel 2 etiqueta %s utilizada\n" -#: src/elflint.c:1710 +#: src/elflint.c:1742 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" @@ -2057,7 +2151,7 @@ msgstr "" "Sección [%2d] '%s': entrada %zu: el valor DT_PLTREL debe ser DT_REL or " "DT_RELA\n" -#: src/elflint.c:1723 +#: src/elflint.c:1755 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " @@ -2066,14 +2160,14 @@ msgstr "" "Sección [%2d] '%s': entrada %zu: puntero no coincide con dirección de " "sección [%2d] '%s' al que hace referencia sh_link\n" -#: src/elflint.c:1766 +#: src/elflint.c:1798 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" "Sección [%2d] '%s': entrada %zu: valor %s debe apuntar en segmento cargado\n" -#: src/elflint.c:1781 +#: src/elflint.c:1813 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " @@ -2082,46 +2176,46 @@ msgstr "" "sección [%2d] '%s': entrada %zu: valor %s debe ser compensación válida en " "sección [%2d] '%s'\n" -#: src/elflint.c:1801 src/elflint.c:1829 +#: src/elflint.c:1833 src/elflint.c:1861 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "Sección [%2d] '%s': contiene entrada %s pero no %s\n" -#: src/elflint.c:1813 +#: src/elflint.c:1845 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "Sección [%2d] '%s': etiqueta obligatoria %s no está presente\n" -#: src/elflint.c:1822 +#: src/elflint.c:1854 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "Sección [%2d] '%s': no hay sección de dispersión presente\n" -#: src/elflint.c:1837 src/elflint.c:1844 +#: src/elflint.c:1869 src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "Sección [%2d] '%s': no todas las %s, %s, y %s están presentes\n" -#: src/elflint.c:1854 src/elflint.c:1858 +#: src/elflint.c:1886 src/elflint.c:1890 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" "Sección [%2d] '%s': etiqueta %s faltante en DSO marcada durante el pre-" "enlace\n" -#: src/elflint.c:1864 +#: src/elflint.c:1896 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" "Sección [%2d] '%s': archivo no-DSO marcado como dependencia durante el pre-" "enlace\n" -#: src/elflint.c:1875 src/elflint.c:1879 src/elflint.c:1883 src/elflint.c:1887 +#: src/elflint.c:1907 src/elflint.c:1911 src/elflint.c:1915 src/elflint.c:1919 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "Sección [%2d] '%s': etiqueta %s faltante en pre-enlace ejecutable\n" -#: src/elflint.c:1899 +#: src/elflint.c:1931 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" @@ -2129,37 +2223,37 @@ msgstr "" "Sección [%2d] '%s': sólo los archivos reubicables pueden tener índice de " "sección extendido\n" -#: src/elflint.c:1909 +#: src/elflint.c:1941 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" "Sección [%2d] '%s': índice de sección extendido no para tabla de símbolos\n" -#: src/elflint.c:1913 +#: src/elflint.c:1945 #, fuzzy, c-format msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" msgstr "" "Sección [%2d] '%s': índice de sección extendido no para tabla de símbolos\n" -#: src/elflint.c:1918 +#: src/elflint.c:1950 #, c-format msgid "cannot get data for symbol section\n" msgstr "no se puede obtener sección para símbolos\n" -#: src/elflint.c:1921 +#: src/elflint.c:1953 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "Sección [%2d] '%s': tamaño de entrada no coincide con Elf32_Word\n" -#: src/elflint.c:1930 +#: src/elflint.c:1962 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" "Sección [%2d] '%s': tabla de índice extendida demasiado pequeña para tabla " "de símbolos\n" -#: src/elflint.c:1945 +#: src/elflint.c:1977 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " @@ -2168,24 +2262,24 @@ msgstr "" "Sección [%2d] '%s': índice de sección extendida en sección [%2zu] '%s' se " "refiere a la misma tabla de símbolos\n" -#: src/elflint.c:1962 +#: src/elflint.c:1995 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "símbolo 0 debe tener índice de sección extendida cero\n" -#: src/elflint.c:1974 +#: src/elflint.c:2007 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "no puede obtener datos para símbolo %zu\n" -#: src/elflint.c:1979 +#: src/elflint.c:2012 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" "índice de sección extendida es % pero índice de símbolo no es " "XINDEX\n" -#: src/elflint.c:1995 src/elflint.c:2046 +#: src/elflint.c:2029 src/elflint.c:2083 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" @@ -2193,42 +2287,42 @@ msgstr "" "Sección [%2d] '%s': sección de tabla de dispersión es demasiado pequeña (es " "%ld, se espera %ld)\n" -#: src/elflint.c:2007 src/elflint.c:2058 +#: src/elflint.c:2043 src/elflint.c:2097 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "Sección [%2d] '%s': índice de la cadena es demasiado grande\n" -#: src/elflint.c:2021 src/elflint.c:2072 +#: src/elflint.c:2057 src/elflint.c:2111 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" "Sección [%2d] '%s': referencia de cubetas de dispersión %zu fuera de " "límites\n" -#: src/elflint.c:2031 +#: src/elflint.c:2067 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" "Sección [%2d] '%s': referencia de cadena de dispersión %zu fuera de límites\n" -#: src/elflint.c:2082 +#: src/elflint.c:2121 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" "Sección [%2d] '%s': referencia de cadena de dispersión % fuera de " "límites\n" -#: src/elflint.c:2095 +#: src/elflint.c:2134 #, fuzzy, c-format msgid "section [%2d] '%s': not enough data\n" msgstr "Sección [%2d] '%s': no puede obtener datos: %s\n" -#: src/elflint.c:2107 +#: src/elflint.c:2146 #, fuzzy, c-format msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "Sección [%2d] '%s': tamaño de bitmask no es potencia de 2: %u\n" -#: src/elflint.c:2123 +#: src/elflint.c:2162 #, fuzzy, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " @@ -2237,14 +2331,14 @@ msgstr "" "Sección [%2d] '%s': sección de tabla de dispersión es demasiado pequeña (es " "%ld, se espera al menos least%ld)\n" -#: src/elflint.c:2132 +#: src/elflint.c:2171 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" "Sección [%2d] '%s': segundo cambio de función de dispersión demasiado " "grande: %u\n" -#: src/elflint.c:2166 +#: src/elflint.c:2205 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" @@ -2252,7 +2346,7 @@ msgstr "" "Sección [%2d] '%s': cadena de dispersión para cubetas %zu inferior a " "polarización de índice de símbolo\n" -#: src/elflint.c:2187 +#: src/elflint.c:2226 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " @@ -2261,7 +2355,7 @@ msgstr "" "Sección [%2d] '%s': el símbolo %u al que se hace referencia en cadena para " "cubeta %zu es indefinido\n" -#: src/elflint.c:2200 +#: src/elflint.c:2239 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" @@ -2269,7 +2363,7 @@ msgstr "" "Sección [%2d] '%s': valor de dispersión para símbolo %u en cadena para " "cubeta %zu está errado\n" -#: src/elflint.c:2209 +#: src/elflint.c:2248 #, fuzzy, c-format msgid "" "section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" @@ -2277,13 +2371,13 @@ msgstr "" "Sección [%2d] '%s': valor de dispersión para símbolo %u en cadena para " "cubeta %zu está errado\n" -#: src/elflint.c:2239 +#: src/elflint.c:2278 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" "Sección [%2d] '%s': cadena de dispersión para cubeta %zu fuera de limites\n" -#: src/elflint.c:2244 +#: src/elflint.c:2283 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" @@ -2291,43 +2385,43 @@ msgstr "" "Sección [%2d] '%s': referencia de símbolo en cadena para cubeta %zu fuera de " "límites\n" -#: src/elflint.c:2250 +#: src/elflint.c:2289 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" "Sección [%2d] '%s': bitmask no coincide con nombres en la tabla de " "dispersión\n" -#: src/elflint.c:2263 +#: src/elflint.c:2302 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" "Sección [%2d] '%s': archivos reubicables no pueden tener tablas de " "dispersión\n" -#: src/elflint.c:2281 +#: src/elflint.c:2320 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" "Sección [%2d] '%s': tabla de dispersión no para tabla de símbolos dinámicos\n" -#: src/elflint.c:2285 +#: src/elflint.c:2324 #, fuzzy, c-format msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" msgstr "Sección [%2d] '%s': índice de sección de destino inválido\n" -#: src/elflint.c:2293 +#: src/elflint.c:2334 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "" "Sección [%2d] '%s': tamaño incorrecto de entrada de tabla de dispersión\n" -#: src/elflint.c:2298 +#: src/elflint.c:2339 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "Sección [%2d] '%s': no marcada para ser asignada\n" -#: src/elflint.c:2303 +#: src/elflint.c:2344 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " @@ -2336,46 +2430,46 @@ msgstr "" "Sección [%2d] '%s': tabla de dispersión no tiene ni siquiera espacio para " "entradas administrativas iniciales\n" -#: src/elflint.c:2352 +#: src/elflint.c:2393 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" "sh_link en secciones de dispersión [%2zu] '%s' y [%2zu] '%s' no son " "idénticas\n" -#: src/elflint.c:2376 src/elflint.c:2441 src/elflint.c:2476 +#: src/elflint.c:2417 src/elflint.c:2482 src/elflint.c:2517 #, fuzzy, c-format msgid "hash section [%2zu] '%s' does not contain enough data\n" msgstr "sección [%2zu] '%s' no debe ser ejecutable\n" -#: src/elflint.c:2397 +#: src/elflint.c:2438 #, fuzzy, c-format msgid "hash section [%2zu] '%s' has zero bit mask words\n" msgstr "Sección [%2d] '%s': grupo de sección sin palabra de banderas\n" -#: src/elflint.c:2408 src/elflint.c:2452 src/elflint.c:2489 +#: src/elflint.c:2449 src/elflint.c:2493 src/elflint.c:2530 #, fuzzy, c-format msgid "hash section [%2zu] '%s' uses too much data\n" msgstr "sección [%2zu] '%s' debe ser asignada\n" -#: src/elflint.c:2423 +#: src/elflint.c:2464 #, c-format msgid "" "hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " "%, nentries: %\n" msgstr "" -#: src/elflint.c:2510 +#: src/elflint.c:2551 #, fuzzy, c-format msgid "hash section [%2zu] '%s' invalid sh_entsize\n" msgstr "Sección [%2zu]: nombre inválido\n" -#: src/elflint.c:2520 src/elflint.c:2524 +#: src/elflint.c:2561 src/elflint.c:2565 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "Sección [%2zu] '%s': referencia al índice de símbolo 0\n" -#: src/elflint.c:2531 +#: src/elflint.c:2572 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " @@ -2384,7 +2478,7 @@ msgstr "" "Símbolo %d nombrado en nueva tabla de dispersión en [%2zu] '%s' pero no en " "la tabla de dispersión anterior en [%2zu] '%s'\n" -#: src/elflint.c:2543 +#: src/elflint.c:2584 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " @@ -2393,12 +2487,12 @@ msgstr "" "Símbolo %d nombrado en la tabla de dispersión anterior en [%2zu] '%s' pero " "no en la nueva tabla de dispersión en [%2zu] '%s'\n" -#: src/elflint.c:2559 +#: src/elflint.c:2600 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "Sección [%2d] '%s': nonzero sh_%s para sección NULL\n" -#: src/elflint.c:2579 +#: src/elflint.c:2620 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" @@ -2406,99 +2500,99 @@ msgstr "" "Sección [%2d] '%s': grupos de sección sólo permitidos en archivos de objeto " "reubicables\n" -#: src/elflint.c:2590 +#: src/elflint.c:2631 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "Sección [%2d] '%s': no puede obtener tabla de símbolos: %s\n" -#: src/elflint.c:2595 +#: src/elflint.c:2636 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" "Sección [%2d] '%s': referencia de sección en sh_link no es una tabla de " "símbolos\n" -#: src/elflint.c:2601 +#: src/elflint.c:2642 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "Sección [%2d] '%s': índice de símbolo inválido en sh_info\n" -#: src/elflint.c:2606 +#: src/elflint.c:2647 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "Sección [%2d] '%s': sh_flags no cero\n" -#: src/elflint.c:2613 +#: src/elflint.c:2654 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "Sección [%2d] '%s': no puede obtener símbolo para firma\n" -#: src/elflint.c:2617 +#: src/elflint.c:2658 #, fuzzy, c-format msgid "section [%2d] '%s': cannot get symbol name for signature\n" msgstr "Sección [%2d] '%s': no puede obtener símbolo para firma\n" -#: src/elflint.c:2622 +#: src/elflint.c:2663 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "" "sección [%2d] '%s': el símbolo de firma no puede ser una cadena vacía\n" -#: src/elflint.c:2628 +#: src/elflint.c:2669 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "Sección [%2d] '%s': sh_flags no establecida correctamente\n" -#: src/elflint.c:2634 +#: src/elflint.c:2675 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "Sección [%2d] '%s': no puede obtener datos: %s\n" -#: src/elflint.c:2643 +#: src/elflint.c:2684 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" "Sección [%2d] '%s': tamaño de sección no es múltiplo de tamaño de " "(Elf32_Word)\n" -#: src/elflint.c:2648 +#: src/elflint.c:2690 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "Sección [%2d] '%s': grupo de sección sin palabra de banderas\n" -#: src/elflint.c:2654 +#: src/elflint.c:2698 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "Sección [%2d] '%s': grupo de sección sin miembro\n" -#: src/elflint.c:2658 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "Sección [%2d] '%s': grupo de sección con sólo un miembro\n" -#: src/elflint.c:2669 +#: src/elflint.c:2713 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "Sección [%2d] '%s': banderas de grupo de sección desconocido\n" -#: src/elflint.c:2681 +#: src/elflint.c:2725 #, fuzzy, c-format msgid "section [%2d] '%s': section index %zu out of range\n" msgstr "Sección [%2d] '%s': índice de sección %Zu fuera de rango\n" -#: src/elflint.c:2690 +#: src/elflint.c:2734 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" "Sección [%2d] '%s': no se puede obtener encabezamiento de sección para " "elemento %zu: %s\n" -#: src/elflint.c:2697 +#: src/elflint.c:2741 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "Sección [%2d] '%s': grupo de sección contiene otro grupo [%2d] '%s'\n" -#: src/elflint.c:2703 +#: src/elflint.c:2747 #, fuzzy, c-format msgid "" "section [%2d] '%s': element %zu references section [%2d] '%s' without " @@ -2507,12 +2601,12 @@ msgstr "" "Sección [%2d] '%s': elemento %Zu hace referencia a sección [%2d] '%s' sin " "establecer bandera SHF_GROUP\n" -#: src/elflint.c:2710 +#: src/elflint.c:2754 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "Sección [%2d] '%s' está contenida en más de un grupo de sección\n" -#: src/elflint.c:2900 +#: src/elflint.c:2944 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " @@ -2521,7 +2615,7 @@ msgstr "" "Sección [%2d] '%s' se refiere en sh_link a la sección [%2d] '%s' la cual no " "es una tabla de símbolos dinámicos\n" -#: src/elflint.c:2912 +#: src/elflint.c:2956 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " @@ -2530,29 +2624,29 @@ msgstr "" "Sección [%2d] '%s' tiene un número diferente de entradas a la de la tabla de " "símbolos [%2d] '%s'\n" -#: src/elflint.c:2928 +#: src/elflint.c:2972 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "" "Sección [%2d] '%s': el símbolo %d: no se pueden leer datos de versión\n" -#: src/elflint.c:2944 +#: src/elflint.c:2988 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" "Sección [%2d] '%s': el símbolo %d: el símbolo local con alcance mundial\n" -#: src/elflint.c:2952 +#: src/elflint.c:2996 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "Sección [%2d] '%s': símbolo %d: símbolo local con versión\n" -#: src/elflint.c:2966 +#: src/elflint.c:3010 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "Sección [%2d] '%s': símbolo %d: índice de versión inválida %d\n" -#: src/elflint.c:2971 +#: src/elflint.c:3015 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" @@ -2560,7 +2654,7 @@ msgstr "" "Sección [%2d] '%s': símbolo %d: índice de versión %d es para versión " "definida\n" -#: src/elflint.c:2981 +#: src/elflint.c:3025 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" @@ -2568,46 +2662,46 @@ msgstr "" "Sección [%2d] '%s': símbolo %d: índice de versión %d es para la versión " "solicitada\n" -#: src/elflint.c:3034 +#: src/elflint.c:3078 #, c-format msgid "more than one version reference section present\n" msgstr "Más de una sección de referencia de versión presente\n" -#: src/elflint.c:3042 src/elflint.c:3189 +#: src/elflint.c:3086 src/elflint.c:3233 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "Sección [%2d] '%s': sh_link no se enlaza a la tabla de cadenas\n" -#: src/elflint.c:3067 src/elflint.c:3243 +#: src/elflint.c:3111 src/elflint.c:3287 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "Sección [%2d] '%s': entrada %d tiene versión %d errada\n" -#: src/elflint.c:3074 src/elflint.c:3250 +#: src/elflint.c:3118 src/elflint.c:3294 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene compensación errada de datos " "auxiliares\n" -#: src/elflint.c:3084 +#: src/elflint.c:3128 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "Sección [%2d] '%s': entrada %d tiene referencia de archivo inválida\n" -#: src/elflint.c:3092 +#: src/elflint.c:3136 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "Sección [%2d] '%s': %d hace referencia a dependencia desconocida\n" -#: src/elflint.c:3104 +#: src/elflint.c:3148 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" "sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene bandera " "desconocida\n" -#: src/elflint.c:3112 +#: src/elflint.c:3156 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " @@ -2616,7 +2710,7 @@ msgstr "" "Sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene referencia de " "nombre inválida\n" -#: src/elflint.c:3121 +#: src/elflint.c:3165 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " @@ -2625,7 +2719,7 @@ msgstr "" "Sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene valor de " "dispersión: %#x, esperado %#x\n" -#: src/elflint.c:3130 +#: src/elflint.c:3174 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " @@ -2634,7 +2728,7 @@ msgstr "" "sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene nombre duplicado " "'%s'\n" -#: src/elflint.c:3141 +#: src/elflint.c:3185 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" @@ -2642,14 +2736,14 @@ msgstr "" "sección [%2d] '%s': entrada auxiliar %d de entrada %d tiene próximo campo " "errado\n" -#: src/elflint.c:3158 src/elflint.c:3334 +#: src/elflint.c:3202 src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" "sección [%2d] '%s': entrada %d tiene compensación inválida para próxima " "entrada\n" -#: src/elflint.c:3166 src/elflint.c:3342 +#: src/elflint.c:3210 src/elflint.c:3386 #, fuzzy, c-format msgid "" "section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " @@ -2658,46 +2752,46 @@ msgstr "" "sección [%2d] '%s': entrada %d tiene compensación inválida para próxima " "entrada\n" -#: src/elflint.c:3181 +#: src/elflint.c:3225 #, c-format msgid "more than one version definition section present\n" msgstr "más de una definición de versión presente de sección\n" -#: src/elflint.c:3228 +#: src/elflint.c:3272 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "Sección [%2d] '%s': más de una definición de BASE\n" -#: src/elflint.c:3232 +#: src/elflint.c:3276 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" "Sección [%2d] '%s': definición de BASE debe tener índice VER_NDX_GLOBAL\n" -#: src/elflint.c:3238 +#: src/elflint.c:3282 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "Sección [%2d] '%s': entrada %d tiene bandera desconocida\n" -#: src/elflint.c:3265 +#: src/elflint.c:3309 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "Sección [%2d] '%s': entrada %d tiene referencia de nombre inválida\n" -#: src/elflint.c:3272 +#: src/elflint.c:3316 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene valor de dispersión errado: %#x, " "esperado %#x\n" -#: src/elflint.c:3280 +#: src/elflint.c:3324 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene nombre de versión duplicado '%s'\n" -#: src/elflint.c:3300 +#: src/elflint.c:3344 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" @@ -2705,34 +2799,34 @@ msgstr "" "Sección [%2d] '%s': entrada %d tiene referencia de nombre inválida en datos " "auxiliares\n" -#: src/elflint.c:3317 +#: src/elflint.c:3361 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" "Sección [%2d] '%s': entrada %d tiene próximo campo errado en datos " "auxiliares\n" -#: src/elflint.c:3350 +#: src/elflint.c:3394 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "Sección [%2d] '%s': no hay definición de BASE\n" -#: src/elflint.c:3366 +#: src/elflint.c:3410 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "Sección [%2d] '%s': desconocida versión principal '%s'\n" -#: src/elflint.c:3379 +#: src/elflint.c:3423 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "Sección [%2d] '%s': sección de atributos de objeto vacío\n" -#: src/elflint.c:3400 +#: src/elflint.c:3444 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "Sección[%2d] '%s': formato de atributo no reconocido\n" -#: src/elflint.c:3416 +#: src/elflint.c:3460 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" @@ -2740,21 +2834,21 @@ msgstr "" "Sección[%2d] '%s': compensación %zu: campo de longitud cero en sección de " "atributo\n" -#: src/elflint.c:3425 +#: src/elflint.c:3469 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" "Sección[%2d] '%s': compensación %zu: longitud inválida en sección de " "atributo\n" -#: src/elflint.c:3437 +#: src/elflint.c:3481 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" "Sección[%2d] '%s': compensación %zu: cadena de nombre de proveedor sin " "terminar\n" -#: src/elflint.c:3454 +#: src/elflint.c:3498 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" @@ -2762,12 +2856,12 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: sin fin ULEB128 en etiqueta de sub-" "sección de atributo\n" -#: src/elflint.c:3463 +#: src/elflint.c:3507 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "Sección [%2d] '%s': compensación %zu: sección de atributo truncado\n" -#: src/elflint.c:3472 +#: src/elflint.c:3516 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" @@ -2775,7 +2869,7 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: campo de longitud cero length en sub-" "sección de atributo\n" -#: src/elflint.c:3487 +#: src/elflint.c:3531 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" @@ -2784,7 +2878,7 @@ msgstr "" "atributo\n" #. Tag_File -#: src/elflint.c:3498 +#: src/elflint.c:3542 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" @@ -2792,26 +2886,26 @@ msgstr "" "Sección[%2d] '%s': compensación %zu: sub-sección de atributo tiene etiqueta " "inesperada %u\n" -#: src/elflint.c:3516 +#: src/elflint.c:3560 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" "Sección[%2d] '%s': compensación %zu: sin fin ULEB128 en etiqueta de " "atributo\n" -#: src/elflint.c:3527 +#: src/elflint.c:3571 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "" "Sección [%2d] '%s': compensación %zu: cadena sin terminar en atributo\n" -#: src/elflint.c:3540 +#: src/elflint.c:3584 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "" "Sección [%2d] '%s': compensación %zu: etiqueta de atributo no reconocida %u\n" -#: src/elflint.c:3544 +#: src/elflint.c:3588 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" @@ -2819,12 +2913,12 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: no reconocido %s valor de atributo " "%\n" -#: src/elflint.c:3554 +#: src/elflint.c:3598 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "Sección [%2d] '%s': compensación %zu: proveedor '%s' desconocido\n" -#: src/elflint.c:3560 +#: src/elflint.c:3604 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" @@ -2832,47 +2926,47 @@ msgstr "" "Sección [%2d] '%s': compensación %zu: extra bytes después de la última " "sección de atributo\n" -#: src/elflint.c:3649 +#: src/elflint.c:3693 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "no puede obtener encabezamiento de sección de sección zeroth\n" -#: src/elflint.c:3653 +#: src/elflint.c:3697 #, c-format msgid "zeroth section has nonzero name\n" msgstr "Sección zeroth tiene nombre nonzero\n" -#: src/elflint.c:3655 +#: src/elflint.c:3699 #, c-format msgid "zeroth section has nonzero type\n" msgstr "Sección zeroth tiene tipo nonzero\n" -#: src/elflint.c:3657 +#: src/elflint.c:3701 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "Sección zeroth tiene banderas nonzero\n" -#: src/elflint.c:3659 +#: src/elflint.c:3703 #, c-format msgid "zeroth section has nonzero address\n" msgstr "Sección zeroth tiene dirección nonzero\n" -#: src/elflint.c:3661 +#: src/elflint.c:3705 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "Sección zeroth tiene compensación nonzero\n" -#: src/elflint.c:3663 +#: src/elflint.c:3707 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "Sección zeroth tiene valor de alineación nonzero\n" -#: src/elflint.c:3665 +#: src/elflint.c:3709 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "Sección zeroth tiene valor de tamaño de entrada nonzero\n" -#: src/elflint.c:3668 +#: src/elflint.c:3712 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2881,7 +2975,7 @@ msgstr "" "Sección zeroth tiene valor de tamaño nonzero mientras que el encabezamiento " "ELF tiene valor shnum nonzero\n" -#: src/elflint.c:3672 +#: src/elflint.c:3716 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2890,7 +2984,7 @@ msgstr "" "Sección zeroth tiene valor de enlace nonzero mientras que el encabezamiento " "ELF no señala sobreflujo en shstrndx\n" -#: src/elflint.c:3676 +#: src/elflint.c:3720 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2899,27 +2993,27 @@ msgstr "" "la sección zeroth tiene un valor de enlace distinto a cero mientras que el " "encabezamiento ELF no señala desbordamiento en phnum\n" -#: src/elflint.c:3694 +#: src/elflint.c:3738 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "No se puede obtener encabezamiento para sección [%2zu] '%s': %s\n" -#: src/elflint.c:3703 +#: src/elflint.c:3747 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "Sección [%2zu]: nombre inválido\n" -#: src/elflint.c:3730 +#: src/elflint.c:3774 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "Sección [%2d] '%s' tiene tipo errado: %s esperado, es %s\n" -#: src/elflint.c:3748 +#: src/elflint.c:3792 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "Sección [%2zu] '%s' tiene banderas erradas: %s esperado, es %s\n" -#: src/elflint.c:3766 +#: src/elflint.c:3810 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" @@ -2927,12 +3021,12 @@ msgstr "" "Sección [%2zu] '%s' tiene banderas erradas: %s esperado y posiblemente %s, " "es %s\n" -#: src/elflint.c:3784 +#: src/elflint.c:3828 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "Sección [%2zu] '%s' presente en archivo objeto\n" -#: src/elflint.c:3790 src/elflint.c:3822 +#: src/elflint.c:3834 src/elflint.c:3866 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" @@ -2940,7 +3034,7 @@ msgstr "" "Sección [%2zu] '%s' tiene bandera SHF_ALLOC establecida pero no es un " "segmento cargable\n" -#: src/elflint.c:3795 src/elflint.c:3827 +#: src/elflint.c:3839 src/elflint.c:3871 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " @@ -2949,7 +3043,7 @@ msgstr "" "Sección [%2zu] '%s' no tiene bandera SHF_ALLOC establecida pero hay " "segmentos cargables\n" -#: src/elflint.c:3803 +#: src/elflint.c:3847 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" @@ -2957,22 +3051,22 @@ msgstr "" "Sección [%2zu] '%s' es tabla de índice de sección de extensión en archivo no-" "objeto\n" -#: src/elflint.c:3846 +#: src/elflint.c:3890 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "Sección [%2zu] '%s': tamaño no es múltiplo de tamaño de entrada\n" -#: src/elflint.c:3851 +#: src/elflint.c:3895 #, c-format msgid "cannot get section header\n" msgstr "no se puede obtener encabezamiento de sección\n" -#: src/elflint.c:3861 +#: src/elflint.c:3905 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "sección [%2zu] '%s' tiene tipo %d incompatible \n" -#: src/elflint.c:3876 +#: src/elflint.c:3920 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" @@ -2980,76 +3074,76 @@ msgstr "" "Sección [%2zu] '%s' contiene bandera(s) de procesador-específico inválidas " "%#\n" -#: src/elflint.c:3883 +#: src/elflint.c:3927 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "Sección [%2zu] '%s' contiene bandera(s) desconocidas %#\n" -#: src/elflint.c:3891 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" "Sección [%2zu] '%s': dirección de secciones de datos de hilo-local no cero\n" -#: src/elflint.c:3901 +#: src/elflint.c:3945 #, fuzzy, c-format msgid "section [%2zu] '%s': allocated section cannot be compressed\n" msgstr "" "Sección [%2zu] '%s': dirección de secciones de datos de hilo-local no cero\n" -#: src/elflint.c:3906 +#: src/elflint.c:3950 #, fuzzy, c-format msgid "section [%2zu] '%s': nobits section cannot be compressed\n" msgstr "Sección [%2d] '%s': no hay sección de dispersión presente\n" -#: src/elflint.c:3912 +#: src/elflint.c:3956 #, fuzzy, c-format msgid "" "section [%2zu] '%s': compressed section with no compression header: %s\n" msgstr "Sección [%2d] '%s': grupo de sección con sólo un miembro\n" -#: src/elflint.c:3918 +#: src/elflint.c:3962 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" "Sección [%2zu] '%s': referencia de sección inválida en valor de enlace\n" -#: src/elflint.c:3923 +#: src/elflint.c:3967 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" "Sección [%2zu] '%s': referencia de sección inválida en valor de información\n" -#: src/elflint.c:3930 +#: src/elflint.c:3974 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "" "Sección [%2zu] '%s': bandera de cadenas establecida sin bandera de fusión\n" -#: src/elflint.c:3935 +#: src/elflint.c:3979 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" "Sección [%2zu] '%s': bandera de fusión establecida pero tamaño de entrada es " "cero\n" -#: src/elflint.c:3954 +#: src/elflint.c:3998 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" "Sección [%2zu] '%s' tiene un tipo %d inesperado para una sección ejecutable\n" -#: src/elflint.c:3963 +#: src/elflint.c:4007 #, fuzzy, c-format msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" msgstr "sección [%2zu] '%s' no debe tener permiso de escritura\n" -#: src/elflint.c:3970 +#: src/elflint.c:4014 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "Sección [%2zu] '%s' es tanto de ejecución como de escritura\n" -#: src/elflint.c:4001 +#: src/elflint.c:4045 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " @@ -3058,7 +3152,7 @@ msgstr "" "Sección [%2zu] '%s' no contenida totalmente en segmento de entrada de " "encabezamiento de programa %d\n" -#: src/elflint.c:4011 +#: src/elflint.c:4055 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -3067,7 +3161,7 @@ msgstr "" "Sección [%2zu] '%s' no tiene tipo NOBITS pero es leída desde el archivo en " "segmento de entrada de encabezamiento de programa %d\n" -#: src/elflint.c:4037 +#: src/elflint.c:4081 #, fuzzy, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -3076,7 +3170,7 @@ msgstr "" "Sección [%2zu] '%s' no tiene tipo NOBITS pero es leída desde el archivo en " "segmento de entrada de encabezamiento de programa %d\n" -#: src/elflint.c:4048 +#: src/elflint.c:4092 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " @@ -3085,18 +3179,18 @@ msgstr "" "Sección [%2zu] '%s' no tiene tipo NOBITS pero no es leída desde el fichero " "en segmento de entrada de encabezamiento de programa %d\n" -#: src/elflint.c:4059 +#: src/elflint.c:4103 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "Sección [%2zu] '%s' es ejecutable en segmento no ejecutable %d\n" -#: src/elflint.c:4069 +#: src/elflint.c:4113 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" "Sección [%2zu] '%s' es de escritura en segmento que no es de escritura %d\n" -#: src/elflint.c:4079 +#: src/elflint.c:4123 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" @@ -3104,7 +3198,7 @@ msgstr "" "Sección [%2zu] '%s': asignación de bandera establecida pero sección no en " "ningún segmento cargado\n" -#: src/elflint.c:4085 +#: src/elflint.c:4129 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " @@ -3113,7 +3207,7 @@ msgstr "" "Sección [%2zu] '%s': encabezamiento ELF dice esta es la tabla de cadena de " "encabezamiento de sección, pero el tipo no es SHT_TYPE\n" -#: src/elflint.c:4093 +#: src/elflint.c:4137 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" @@ -3121,32 +3215,32 @@ msgstr "" "sección [%2zu] '%s': ficheros reubicables no pueden tener tablas de símbolos " "dinámicos\n" -#: src/elflint.c:4144 +#: src/elflint.c:4188 #, c-format msgid "more than one version symbol table present\n" msgstr "Más de una tabla de símbolos presente\n" -#: src/elflint.c:4167 +#: src/elflint.c:4211 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "" "Entrada de encabezamiento de programa INTERP pero no la sección .interp\n" -#: src/elflint.c:4178 +#: src/elflint.c:4222 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" "segmento cargable [%u] es ejecutable pero no contiene secciones ejecutables\n" -#: src/elflint.c:4184 +#: src/elflint.c:4228 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" "segmento cargable [%u] es de escritura pero contiene secciones protegidas " "contra escritura\n" -#: src/elflint.c:4195 +#: src/elflint.c:4239 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -3155,26 +3249,26 @@ msgstr "" "Sección no .gnu.versym presente, pero la sección .gnu.versym_d o la sección ." "gnu.versym_r existen\n" -#: src/elflint.c:4208 +#: src/elflint.c:4252 #, c-format msgid "duplicate version index %d\n" msgstr "Duplicar índice de versión %d\n" -#: src/elflint.c:4222 +#: src/elflint.c:4266 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" "Sección .gnu.versym presente sin las secciones .gnu.versym_d o .gnu." "versym_r\n" -#: src/elflint.c:4271 +#: src/elflint.c:4315 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" "phdr[%d]: tipo de nota de fichero core desconocido % en compensación " "%\n" -#: src/elflint.c:4275 +#: src/elflint.c:4319 #, fuzzy, c-format msgid "" "section [%2d] '%s': unknown core file note type % at offset %zu\n" @@ -3182,14 +3276,14 @@ msgstr "" "Sección [%2d] '%s': tipo de nota de fichero core desconocido % en " "compensación %Zu\n" -#: src/elflint.c:4298 +#: src/elflint.c:4342 #, fuzzy, c-format msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" "phdr[%d]: tipo de nota de fichero objeto desconocido % en " "compensación %Zu\n" -#: src/elflint.c:4302 +#: src/elflint.c:4346 #, fuzzy, c-format msgid "" "section [%2d] '%s': unknown object file note type % at offset %zu\n" @@ -3197,40 +3291,40 @@ msgstr "" "Sección [%2d] '%s': tipo de nota de fichero objeto desconocido % en " "compensación %Zu\n" -#: src/elflint.c:4319 +#: src/elflint.c:4363 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: no hay entradas de nota definidas para el tipo de archivo\n" -#: src/elflint.c:4338 +#: src/elflint.c:4382 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: no puede obtener contenido de sección de nota: %s\n" -#: src/elflint.c:4341 +#: src/elflint.c:4385 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: extra % bytes después de la última nota\n" -#: src/elflint.c:4362 +#: src/elflint.c:4406 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" "Sección [%2d] '%s': no hay entradas de nota definidas para el tipo de " "archivo\n" -#: src/elflint.c:4369 +#: src/elflint.c:4413 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "" "Sección[%2d] '%s': no se puede obtener el contenido de sección de nota\n" -#: src/elflint.c:4372 +#: src/elflint.c:4416 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "Sección[%2d] '%s': extra % bytes después de la última nota\n" -#: src/elflint.c:4390 +#: src/elflint.c:4434 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" @@ -3238,145 +3332,145 @@ msgstr "" "Sólo ejecutables, objetos compartidos y ficheros core pueden tener " "encabezamientos de programas\n" -#: src/elflint.c:4405 +#: src/elflint.c:4449 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "no se puede obtener entrada de encabezamiento %d: %s\n" -#: src/elflint.c:4414 +#: src/elflint.c:4458 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "entrada de encabezamiento de programa %d: tipo %# de entrada de " "encabezamiento de programa desconocido\n" -#: src/elflint.c:4425 +#: src/elflint.c:4469 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "Más de una entrada INTERP en encabezamiento de programa\n" -#: src/elflint.c:4433 +#: src/elflint.c:4477 #, c-format msgid "more than one TLS entry in program header\n" msgstr "más de una entrada TLS en encabezamiento de programa\n" -#: src/elflint.c:4440 +#: src/elflint.c:4484 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "ejecutable estático no puede tener secciones dinámicas\n" -#: src/elflint.c:4454 +#: src/elflint.c:4498 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" "Referencia de sección dinámica en encabezamiento de programa tiene " "compensación errada\n" -#: src/elflint.c:4457 +#: src/elflint.c:4501 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" "No coinciden tamaño de sección dinámica en programa y encabezamiento de " "sección\n" -#: src/elflint.c:4467 +#: src/elflint.c:4511 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "Más de una entrada GNU_RELRO en encabezamiento de programa\n" -#: src/elflint.c:4488 +#: src/elflint.c:4532 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "Segmento cargable GNU_RELRO que se aplica no es de escritura\n" -#: src/elflint.c:4499 +#: src/elflint.c:4543 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" "Banderas de segmento cargable [%u] no coinciden con banderas GNU_RELRO [%u]\n" -#: src/elflint.c:4506 +#: src/elflint.c:4550 #, c-format msgid "" "GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" msgstr "" -#: src/elflint.c:4515 src/elflint.c:4538 +#: src/elflint.c:4559 src/elflint.c:4582 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "Segmento %s no contenido en un segmento cargable\n" -#: src/elflint.c:4544 +#: src/elflint.c:4588 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" "Compensación de encabezamiento de programa en encabezamiento ELF y entrada " "PHDR no coinciden" -#: src/elflint.c:4569 +#: src/elflint.c:4613 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" "Referencia de tabla de búsqueda de marco de llamada en encabezamiento de " "programa tiene una compensación errada\n" -#: src/elflint.c:4572 +#: src/elflint.c:4616 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" "Tamaño de tabla de búsqueda de marco de llamada no coincide con programa y " "encabezamiento de sección\n" -#: src/elflint.c:4585 +#: src/elflint.c:4629 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "PT_GNU_EH_FRAME presente pero no la sección.eh_frame_hdr\n" -#: src/elflint.c:4593 +#: src/elflint.c:4637 #, c-format msgid "call frame search table must be allocated\n" msgstr "tabla de búsqueda de marco de llamada debe ser asignada\n" -#: src/elflint.c:4596 +#: src/elflint.c:4640 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "sección [%2zu] '%s' debe ser asignada\n" -#: src/elflint.c:4600 +#: src/elflint.c:4644 #, c-format msgid "call frame search table must not be writable\n" msgstr "" "tabla de búsqueda de marco de llamada no debe tener permiso de escritura\n" -#: src/elflint.c:4603 +#: src/elflint.c:4647 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "sección [%2zu] '%s' no debe tener permiso de escritura\n" -#: src/elflint.c:4608 +#: src/elflint.c:4652 #, c-format msgid "call frame search table must not be executable\n" msgstr "tabla de búsqueda de marco de llamada no debe ser ejecutable\n" -#: src/elflint.c:4611 +#: src/elflint.c:4655 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "sección [%2zu] '%s' no debe ser ejecutable\n" -#: src/elflint.c:4622 +#: src/elflint.c:4666 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "" "entrada de encabezamiento de programa %d: tamaño de fichero mayor que el " "tamaño de memoria\n" -#: src/elflint.c:4629 +#: src/elflint.c:4673 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "" "entrada de encabezamiento de programa %d: alineamiento no es potencia de 2\n" -#: src/elflint.c:4632 +#: src/elflint.c:4676 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -3385,7 +3479,7 @@ msgstr "" "entrada de encabezamiento de programa %d: compensación de fichero y " "dirección virtual no módulo de alineación\n" -#: src/elflint.c:4645 +#: src/elflint.c:4689 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -3394,12 +3488,12 @@ msgstr "" "ejecutable/DSO con sección .eh_frame_hdr no tiene una entrada de " "encabezamiento de programa PT_GNU_EH_FRAME" -#: src/elflint.c:4679 +#: src/elflint.c:4723 #, c-format msgid "cannot read ELF header: %s\n" msgstr "No se puede leer encabezamiento ELF: %s\n" -#: src/elflint.c:4705 +#: src/elflint.c:4749 #, c-format msgid "text relocation flag set but not needed\n" msgstr "Bandera de reubicación de texto establecida pero no necesaria\n" @@ -3423,8 +3517,8 @@ msgstr "" "Localizar origen de reubicaciones de texto en FICHEROS (a.out por defecto)." #. Strings for arguments in help texts. -#: src/findtextrel.c:75 src/nm.c:107 src/objdump.c:70 src/size.c:81 -#: src/strings.c:87 src/strip.c:95 +#: src/findtextrel.c:75 src/nm.c:109 src/objdump.c:72 src/size.c:81 +#: src/strings.c:88 src/strip.c:99 msgid "[FILE...]" msgstr "[FICHERO...]" @@ -3519,43 +3613,43 @@ msgstr "" "Una reubicación modifica memoria en compensación %llu en un segmento " "protegido contra escritura\n" -#: src/nm.c:65 src/strip.c:67 +#: src/nm.c:67 src/strip.c:70 msgid "Output selection:" msgstr "Selección de salida:" -#: src/nm.c:66 +#: src/nm.c:68 msgid "Display debugger-only symbols" msgstr "Mostrar sólo símbolos del depurador" -#: src/nm.c:67 +#: src/nm.c:69 msgid "Display only defined symbols" msgstr "Mostrar sólo símbolos definidos" -#: src/nm.c:70 +#: src/nm.c:72 msgid "Display dynamic symbols instead of normal symbols" msgstr "Mostrar símbolos dinámicos en lugar de símbolos normales" -#: src/nm.c:71 +#: src/nm.c:73 msgid "Display only external symbols" msgstr "Mostrar sólo símbolos externos" -#: src/nm.c:72 +#: src/nm.c:74 msgid "Display only undefined symbols" msgstr "Mostrar sólo símbolos indefinidos" -#: src/nm.c:74 +#: src/nm.c:76 msgid "Include index for symbols from archive members" msgstr "Incluir índices para símbolos de miembros de archivo" -#: src/nm.c:76 src/size.c:55 +#: src/nm.c:78 src/size.c:55 msgid "Output format:" msgstr "Formato de salida:" -#: src/nm.c:78 +#: src/nm.c:80 msgid "Print name of the input file before every symbol" msgstr "Imprimir nombre de archivo de entrada antes de cada símbolo" -#: src/nm.c:81 +#: src/nm.c:83 msgid "" "Use the output format FORMAT. FORMAT can be `bsd', `sysv' or `posix'. The " "default is `sysv'" @@ -3563,75 +3657,75 @@ msgstr "" "Usar el formato de salida FORMATO. FORMATO puede ser o bien `bsd', o " "`sysv', o `posix'. El establecido por defecto es `sysv'" -#: src/nm.c:83 +#: src/nm.c:85 msgid "Same as --format=bsd" msgstr "lo mismo que --format=bsd" -#: src/nm.c:84 +#: src/nm.c:86 msgid "Same as --format=posix" msgstr "lo mismo que --format=posix" -#: src/nm.c:85 src/size.c:61 +#: src/nm.c:87 src/size.c:61 msgid "Use RADIX for printing symbol values" msgstr "Utilizar RADIX para imprimir valores de símbolo" -#: src/nm.c:86 +#: src/nm.c:88 #, fuzzy msgid "Mark special symbols" msgstr "Marcar símbolos débiles" -#: src/nm.c:88 +#: src/nm.c:90 msgid "Print size of defined symbols" msgstr "Tamaño de impresión de símbolos definidos" -#: src/nm.c:90 src/size.c:69 src/strip.c:72 src/unstrip.c:73 +#: src/nm.c:92 src/size.c:69 src/strip.c:75 src/unstrip.c:73 msgid "Output options:" msgstr "Opciones de salida:" -#: src/nm.c:91 +#: src/nm.c:93 msgid "Sort symbols numerically by address" msgstr "Ordenar los símbolos numéricos por dirección" -#: src/nm.c:93 +#: src/nm.c:95 msgid "Do not sort the symbols" msgstr "No ordenar los símbolos" -#: src/nm.c:94 +#: src/nm.c:96 msgid "Reverse the sense of the sort" msgstr "Invertir el orden" -#: src/nm.c:97 +#: src/nm.c:99 msgid "Decode low-level symbol names into source code names" msgstr "" #. Short description of program. -#: src/nm.c:104 +#: src/nm.c:106 msgid "List symbols from FILEs (a.out by default)." msgstr "Listar símbolos de FICHEROS (a.out por defecto)." -#: src/nm.c:115 src/objdump.c:78 +#: src/nm.c:117 src/objdump.c:80 #, fuzzy msgid "Output formatting" msgstr "Formato de salida:" -#: src/nm.c:139 src/objdump.c:102 src/size.c:106 src/strip.c:127 +#: src/nm.c:141 src/objdump.c:104 src/size.c:106 src/strip.c:131 #, fuzzy, c-format msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: ERROR INTERNO %d (%s-%s): %s" -#: src/nm.c:380 src/nm.c:392 src/size.c:289 src/size.c:298 src/size.c:309 -#: src/strip.c:2298 +#: src/nm.c:382 src/nm.c:394 src/size.c:289 src/size.c:298 src/size.c:309 +#: src/strip.c:2421 #, c-format msgid "while closing '%s'" msgstr "error al cerrar '%s'" -#: src/nm.c:402 src/objdump.c:279 src/strip.c:377 +#: src/nm.c:404 src/objdump.c:281 src/strip.c:443 #, c-format msgid "%s: File format not recognized" msgstr "%s: No se reconoce el formato del fichero" #. Note: 0 is no valid offset. -#: src/nm.c:442 +#: src/nm.c:444 #, fuzzy msgid "" "\n" @@ -3640,44 +3734,44 @@ msgstr "" "\n" "Índice de archivo:" -#: src/nm.c:451 +#: src/nm.c:453 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "Compensación %zu inválida para símbolo %s" -#: src/nm.c:456 +#: src/nm.c:458 #, c-format msgid "%s in %s\n" msgstr "%s en %s\n" -#: src/nm.c:464 +#: src/nm.c:466 #, c-format msgid "cannot reset archive offset to beginning" msgstr "imposible restablecer compensación de archivo al inicio" -#: src/nm.c:489 src/objdump.c:327 +#: src/nm.c:491 src/objdump.c:329 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: no se reconoció el formato de fichero" -#: src/nm.c:704 +#: src/nm.c:706 #, c-format msgid "cannot create search tree" msgstr "No se puede crear el árbol de búsqueda" -#: src/nm.c:745 src/nm.c:1206 src/objdump.c:776 src/readelf.c:535 -#: src/readelf.c:1113 src/readelf.c:1313 src/readelf.c:1461 src/readelf.c:1662 -#: src/readelf.c:1868 src/readelf.c:2058 src/readelf.c:2236 src/readelf.c:2312 -#: src/readelf.c:2570 src/readelf.c:2646 src/readelf.c:2733 src/readelf.c:3313 -#: src/readelf.c:3363 src/readelf.c:3426 src/readelf.c:8337 src/readelf.c:9437 -#: src/readelf.c:9640 src/readelf.c:9708 src/size.c:397 src/size.c:466 -#: src/strip.c:506 +#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:606 +#: src/readelf.c:1196 src/readelf.c:1396 src/readelf.c:1544 src/readelf.c:1745 +#: src/readelf.c:1951 src/readelf.c:2141 src/readelf.c:2319 src/readelf.c:2395 +#: src/readelf.c:2653 src/readelf.c:2729 src/readelf.c:2816 src/readelf.c:3414 +#: src/readelf.c:3464 src/readelf.c:3527 src/readelf.c:11028 +#: src/readelf.c:12200 src/readelf.c:12403 src/readelf.c:12471 src/size.c:397 +#: src/size.c:466 src/strip.c:572 #, c-format msgid "cannot get section header string table index" msgstr "no se puede obtener índice de cadena de encabezamiento de sección" #. We always print this prolog. -#: src/nm.c:772 +#: src/nm.c:774 #, c-format msgid "" "\n" @@ -3691,7 +3785,7 @@ msgstr "" "\n" #. The header line. -#: src/nm.c:775 +#: src/nm.c:777 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -3700,82 +3794,82 @@ msgstr "" "%*s%-*s %-*s Clase Tipo %-*s %*s Sección\n" "\n" -#: src/nm.c:1217 +#: src/nm.c:1219 #, fuzzy, c-format msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "" "%s: el tamaño de la entrada en la sección `%s' no es el que esperábamos " -#: src/nm.c:1222 +#: src/nm.c:1224 #, fuzzy, c-format msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "%s: Tamaño de sección `%s' no es múltiplo de tamaño de entrada" -#: src/nm.c:1301 +#: src/nm.c:1303 #, fuzzy, c-format msgid "%s: entries (%zd) in section %zd `%s' is too large" msgstr "" "%s: el tamaño de la entrada en la sección `%s' no es el que esperábamos " #. XXX Add machine specific object file types. -#: src/nm.c:1527 +#: src/nm.c:1529 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: Operación inválida" -#: src/nm.c:1584 +#: src/nm.c:1586 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: No hay símbolos" -#: src/objdump.c:51 +#: src/objdump.c:53 msgid "Mode selection:" msgstr "Selección de modo:" -#: src/objdump.c:52 +#: src/objdump.c:54 msgid "Display relocation information." msgstr "Mostrar la reubicación de información." -#: src/objdump.c:54 +#: src/objdump.c:56 msgid "Display the full contents of all sections requested" msgstr "Mostrar el contenido total de todas las secciones solicitadas" -#: src/objdump.c:56 +#: src/objdump.c:58 msgid "Display assembler code of executable sections" msgstr "Mostrar código de ensamblador de secciones ejecutables" -#: src/objdump.c:58 +#: src/objdump.c:60 #, fuzzy msgid "Output content selection:" msgstr "Selección de opción de salida:" -#: src/objdump.c:60 +#: src/objdump.c:62 msgid "Only display information for section NAME." msgstr "Sólo muestra información para NOMBRE de sección." #. Short description of program. -#: src/objdump.c:66 +#: src/objdump.c:68 msgid "Show information from FILEs (a.out by default)." msgstr "Muestra información de FICHEROS (a.out por defecto)." -#: src/objdump.c:217 src/readelf.c:483 +#: src/objdump.c:219 src/readelf.c:551 msgid "No operation specified.\n" msgstr "No se especificó una operación.\n" -#: src/objdump.c:257 src/objdump.c:269 +#: src/objdump.c:259 src/objdump.c:271 #, c-format msgid "while close `%s'" msgstr "mientras cierra `%s'" -#: src/objdump.c:362 src/readelf.c:1963 src/readelf.c:2155 +#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238 msgid "INVALID SYMBOL" msgstr "SÍMBOLO INVÁLIDO" -#: src/objdump.c:377 src/readelf.c:1997 src/readelf.c:2191 +#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274 msgid "INVALID SECTION" msgstr "SECCIÓN INVÁLIDA" -#: src/objdump.c:497 +#: src/objdump.c:499 #, c-format msgid "" "\n" @@ -3786,300 +3880,320 @@ msgstr "" "REUBICACIÓN DE REGISTROS PARA [%s]:\n" "%-*s TIPO VALOR\n" -#: src/objdump.c:500 +#: src/objdump.c:502 msgid "OFFSET" msgstr "COMPENSACIÓN" -#: src/objdump.c:565 +#: src/objdump.c:567 #, c-format msgid "Contents of section %s:\n" msgstr "Contenido de la sección %s:\n" -#: src/objdump.c:686 +#: src/objdump.c:688 #, c-format msgid "cannot disassemble" msgstr "No se puede desensamblar" #. Short description of program. -#: src/ranlib.c:63 +#: src/ranlib.c:64 msgid "Generate an index to speed access to archives." msgstr " Generar un índice para acelerar el acceso a los archivos." #. Strings for arguments in help texts. -#: src/ranlib.c:66 +#: src/ranlib.c:67 msgid "ARCHIVE" msgstr "ARCHIVO " -#: src/ranlib.c:102 +#: src/ranlib.c:103 #, c-format msgid "Archive name required" msgstr "Se requiere nombre de archivo" -#: src/ranlib.c:166 +#: src/ranlib.c:167 #, c-format msgid "'%s' is no archive" msgstr "%s: no es un archivo" -#: src/ranlib.c:201 +#: src/ranlib.c:202 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "error al liberar descriptor sub-ELF: %s" -#: src/readelf.c:71 +#: src/readelf.c:95 #, fuzzy msgid "ELF input selection:" msgstr "Selección de salida de ELF:" -#: src/readelf.c:73 +#: src/readelf.c:97 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" -#: src/readelf.c:75 +#: src/readelf.c:100 +msgid "" +"Used with -w to find the skeleton Compile Units in FILE associated with the " +"Split Compile units in a .dwo input file" +msgstr "" + +#: src/readelf.c:102 msgid "ELF output selection:" msgstr "Selección de salida de ELF:" -#: src/readelf.c:77 +#: src/readelf.c:104 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "Todo esto mas -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:105 msgid "Display the dynamic segment" msgstr "Mostrar el segmento dinámico" -#: src/readelf.c:79 +#: src/readelf.c:106 msgid "Display the ELF file header" msgstr "Mostrar el encabezamiento del fichero ELF" -#: src/readelf.c:81 +#: src/readelf.c:108 msgid "Display histogram of bucket list lengths" msgstr "Mostrar histograma de las longitudes de las listas de cubetas" -#: src/readelf.c:82 +#: src/readelf.c:109 msgid "Display the program headers" msgstr "Mostrar encabezamientos de programa" -#: src/readelf.c:84 +#: src/readelf.c:111 msgid "Display relocations" msgstr "Mostrar reubicaciones" -#: src/readelf.c:85 +#: src/readelf.c:112 +#, fuzzy +msgid "Display the section groups" +msgstr "Mostrar los encabezados de las secciones" + +#: src/readelf.c:113 msgid "Display the sections' headers" msgstr "Mostrar los encabezados de las secciones" -#: src/readelf.c:88 +#: src/readelf.c:116 #, fuzzy msgid "Display the symbol table sections" msgstr "Mostrar la tabla de símbolos" -#: src/readelf.c:89 +#: src/readelf.c:117 msgid "Display versioning information" msgstr "Mostrar información de versión" -#: src/readelf.c:90 +#: src/readelf.c:118 msgid "Display the ELF notes" msgstr "Mostrar las notas ELF" -#: src/readelf.c:92 +#: src/readelf.c:120 msgid "Display architecture specific information, if any" msgstr "Mostrar información específica de la arquitectura (si es que la hay)" -#: src/readelf.c:94 +#: src/readelf.c:122 msgid "Display sections for exception handling" msgstr "Muestra secciones para manejo de excepciones" -#: src/readelf.c:96 +#: src/readelf.c:124 msgid "Additional output selection:" msgstr "Selección de salida adicional:" -#: src/readelf.c:98 +#: src/readelf.c:126 #, fuzzy msgid "" -"Display DWARF section content. SECTION can be one of abbrev, aranges, " -"decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " -"pubnames, str, macinfo, macro or exception" +"Display DWARF section content. SECTION can be one of abbrev, addr, aranges, " +"decodedaranges, frame, gdb_index, info, info+, loc, line, decodedline, " +"ranges, pubnames, str, macinfo, macro or exception" msgstr "" "Mostrar el contenido de la sección DWARF. SECCIÓN puede ser algo de lo " "siguiente: abbrev, aranges, frame, info, loc, line, ranges, pubnames, str, " "macinfo, o exception" -#: src/readelf.c:102 +#: src/readelf.c:130 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "Vuelca los contenidos no interpretados de SECCIÓN, por número o nombre" -#: src/readelf.c:104 +#: src/readelf.c:132 msgid "Print string contents of sections" msgstr "Imprime contenido de cadena de secciones" -#: src/readelf.c:107 +#: src/readelf.c:135 msgid "Display the symbol index of an archive" msgstr "Muestra el índice de símbolos de un archivo" -#: src/readelf.c:109 +#: src/readelf.c:137 msgid "Output control:" msgstr "Control de salida:" -#: src/readelf.c:111 +#: src/readelf.c:139 msgid "Do not find symbol names for addresses in DWARF data" msgstr "" "No se encuentran los nombres de símbolos para direcciones en datos DWARF" -#: src/readelf.c:113 +#: src/readelf.c:141 #, fuzzy msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "" "No se encuentran los nombres de símbolos para direcciones en datos DWARF" -#: src/readelf.c:115 +#: src/readelf.c:143 msgid "Ignored for compatibility (lines always wide)" msgstr "" -#: src/readelf.c:117 +#: src/readelf.c:145 msgid "" "Show compression information for compressed sections (when used with -S); " "decompress section before dumping data (when used with -p or -x)" msgstr "" #. Short description of program. -#: src/readelf.c:122 +#: src/readelf.c:150 msgid "Print information from ELF file in human-readable form." msgstr "" "Imprimir información del fichero ELF en una forma comprensible para los " "seres humanos." -#: src/readelf.c:451 +#. Look up once. +#: src/readelf.c:329 +msgid "yes" +msgstr "sí" + +#: src/readelf.c:330 +msgid "no" +msgstr "no" + +#: src/readelf.c:519 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "Sección de depuración DWARF desconocida `%s'.\n" -#: src/readelf.c:519 src/readelf.c:630 +#: src/readelf.c:590 src/readelf.c:701 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "no se puede crear descriptor ELF: %s" -#: src/readelf.c:526 src/readelf.c:842 src/strip.c:575 +#: src/readelf.c:597 src/readelf.c:925 src/strip.c:641 #, c-format msgid "cannot determine number of sections: %s" msgstr "no se pudieron determinar el número de secciones: %s" -#: src/readelf.c:544 src/readelf.c:1135 src/readelf.c:1337 +#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420 #, c-format msgid "cannot get section: %s" msgstr "No se puede encontrar la sección: %s" -#: src/readelf.c:553 src/readelf.c:1142 src/readelf.c:1345 src/readelf.c:9660 +#: src/readelf.c:624 src/readelf.c:1225 src/readelf.c:1428 src/readelf.c:12423 #: src/unstrip.c:375 src/unstrip.c:406 src/unstrip.c:455 src/unstrip.c:565 -#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1106 -#: src/unstrip.c:1298 src/unstrip.c:1359 src/unstrip.c:1532 src/unstrip.c:1647 -#: src/unstrip.c:1787 src/unstrip.c:1882 +#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1109 +#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650 +#: src/unstrip.c:1790 src/unstrip.c:1885 #, c-format msgid "cannot get section header: %s" msgstr "No se puede obtener encabezamiento de sección: %s" -#: src/readelf.c:561 +#: src/readelf.c:632 #, fuzzy, c-format msgid "cannot get section name" msgstr "no se puede obtener encabezamiento de sección\n" -#: src/readelf.c:570 src/readelf.c:5521 src/readelf.c:7795 src/readelf.c:7897 -#: src/readelf.c:8074 +#: src/readelf.c:641 src/readelf.c:6517 src/readelf.c:10301 src/readelf.c:10403 +#: src/readelf.c:10580 #, c-format msgid "cannot get %s content: %s" msgstr "No se puede obtener el contenido %s: %s" -#: src/readelf.c:586 +#: src/readelf.c:657 #, fuzzy, c-format msgid "cannot create temp file '%s'" msgstr "no se puede crear fichero nuevo '%s': %s" -#: src/readelf.c:595 +#: src/readelf.c:666 #, fuzzy, c-format msgid "cannot write section data" msgstr "no se puede leer la sección de datos: %s" -#: src/readelf.c:601 src/readelf.c:618 src/readelf.c:647 +#: src/readelf.c:672 src/readelf.c:689 src/readelf.c:718 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "error al cerrar el descriptor ELF: %s" -#: src/readelf.c:608 +#: src/readelf.c:679 #, fuzzy, c-format msgid "error while rewinding file descriptor" msgstr "error al cerrar el descriptor ELF: %s" -#: src/readelf.c:642 +#: src/readelf.c:713 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "'%s' no es un archivo, no se puede imprimir índice de archivo" -#: src/readelf.c:741 -#, fuzzy, c-format -msgid "No such section '%s' in '%s'" -msgstr "No se puede obtener contenido de sección %zu en '%s': %s" - -#: src/readelf.c:768 +#: src/readelf.c:817 #, c-format msgid "cannot stat input file" msgstr "no sepudo stat archivo de entrada" -#: src/readelf.c:770 +#: src/readelf.c:819 #, c-format msgid "input file is empty" msgstr "archivo de entrada vacío" -#: src/readelf.c:772 +#: src/readelf.c:821 #, c-format msgid "failed reading '%s': %s" msgstr "Falló lectura de '%s': %s" -#: src/readelf.c:827 +#: src/readelf.c:850 +#, fuzzy, c-format +msgid "No such section '%s' in '%s'" +msgstr "No se puede obtener contenido de sección %zu en '%s': %s" + +#: src/readelf.c:910 #, c-format msgid "cannot read ELF header: %s" msgstr "no se pudo leer encabezamiento ELF: %s" -#: src/readelf.c:835 +#: src/readelf.c:918 #, c-format msgid "cannot create EBL handle" msgstr "no se puede crear EBL" -#: src/readelf.c:848 +#: src/readelf.c:931 #, c-format msgid "cannot determine number of program headers: %s" msgstr "no se pudo determinar la cantidad de encabezados de programa: %s" -#: src/readelf.c:938 +#: src/readelf.c:1021 msgid "NONE (None)" msgstr "NONE (Ninguno)" -#: src/readelf.c:939 +#: src/readelf.c:1022 msgid "REL (Relocatable file)" msgstr "REL (Fichero reubicable)" -#: src/readelf.c:940 +#: src/readelf.c:1023 msgid "EXEC (Executable file)" msgstr "EXEC (Fichero ejecutable)" -#: src/readelf.c:941 +#: src/readelf.c:1024 msgid "DYN (Shared object file)" msgstr "DYN (Fichero objeto compartido)" -#: src/readelf.c:942 +#: src/readelf.c:1025 msgid "CORE (Core file)" msgstr "CORE (Fichero núcleo)" -#: src/readelf.c:947 +#: src/readelf.c:1030 #, c-format msgid "OS Specific: (%x)\n" msgstr "OS Specific: (%x)\n" #. && e_type <= ET_HIPROC always true -#: src/readelf.c:949 +#: src/readelf.c:1032 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Específico del procesador: (%x)\n" -#: src/readelf.c:959 +#: src/readelf.c:1042 msgid "" "ELF Header:\n" " Magic: " @@ -4087,7 +4201,7 @@ msgstr "" "Encabezamiento ELF:\n" " Mágico: " -#: src/readelf.c:963 +#: src/readelf.c:1046 #, c-format msgid "" "\n" @@ -4096,120 +4210,120 @@ msgstr "" "\n" " Clase: %s\n" -#: src/readelf.c:968 +#: src/readelf.c:1051 #, c-format msgid " Data: %s\n" msgstr " Datos: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1057 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Versión ident: %hhd %s\n" -#: src/readelf.c:976 src/readelf.c:993 +#: src/readelf.c:1059 src/readelf.c:1076 msgid "(current)" msgstr "(actual)" -#: src/readelf.c:980 +#: src/readelf.c:1063 #, c-format msgid " OS/ABI: %s\n" msgstr " OS/ABI: %s\n" -#: src/readelf.c:983 +#: src/readelf.c:1066 #, c-format msgid " ABI Version: %hhd\n" msgstr " Versión ABI: %hhd\n" -#: src/readelf.c:986 +#: src/readelf.c:1069 msgid " Type: " msgstr " Tipo: " -#: src/readelf.c:989 +#: src/readelf.c:1072 #, c-format msgid " Machine: %s\n" msgstr " Máquina: %s\n" -#: src/readelf.c:991 +#: src/readelf.c:1074 #, c-format msgid " Version: %d %s\n" msgstr " Versión: %d %s\n" -#: src/readelf.c:995 +#: src/readelf.c:1078 #, c-format msgid " Entry point address: %#\n" msgstr " Dirección de punto de entrada: %#\n" -#: src/readelf.c:998 +#: src/readelf.c:1081 #, c-format msgid " Start of program headers: % %s\n" msgstr " Inicio de encabezamientos de programa: % %s\n" -#: src/readelf.c:999 src/readelf.c:1002 +#: src/readelf.c:1082 src/readelf.c:1085 msgid "(bytes into file)" msgstr " (bytes en el archivo)" -#: src/readelf.c:1001 +#: src/readelf.c:1084 #, c-format msgid " Start of section headers: % %s\n" msgstr " Inicio de encabezamientos de sección: % %s\n" -#: src/readelf.c:1004 +#: src/readelf.c:1087 #, c-format msgid " Flags: %s\n" msgstr " Indicadores: %s\n" -#: src/readelf.c:1007 +#: src/readelf.c:1090 #, c-format msgid " Size of this header: % %s\n" msgstr " Tamaño de este encabezamiento: % %s\n" -#: src/readelf.c:1008 src/readelf.c:1011 src/readelf.c:1028 +#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111 msgid "(bytes)" msgstr "(bytes)" -#: src/readelf.c:1010 +#: src/readelf.c:1093 #, c-format msgid " Size of program header entries: % %s\n" msgstr "" " Tamaño de las entradas en encabezamiento del programa: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1096 #, c-format msgid " Number of program headers entries: %" msgstr " Cantidad de entradas de encabezados de programa: %" -#: src/readelf.c:1020 +#: src/readelf.c:1103 #, c-format msgid " (% in [0].sh_info)" msgstr " (% in [0].sh_info)" -#: src/readelf.c:1023 src/readelf.c:1040 src/readelf.c:1054 +#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137 msgid " ([0] not available)" msgstr " ([0] no disponible)" -#: src/readelf.c:1027 +#: src/readelf.c:1110 #, c-format msgid " Size of section header entries: % %s\n" msgstr "" " Tamaño de las entradas en el encabezamiento de sección: % %s\n" -#: src/readelf.c:1030 +#: src/readelf.c:1113 #, c-format msgid " Number of section headers entries: %" msgstr " Cantidad de entradas en los encabezamientos de sección: %" -#: src/readelf.c:1037 +#: src/readelf.c:1120 #, c-format msgid " (% in [0].sh_size)" msgstr " (% en [0].sh_size)" #. We managed to get the zeroth section. -#: src/readelf.c:1050 +#: src/readelf.c:1133 #, c-format msgid " (% in [0].sh_link)" msgstr " (% en [0].sh_link)" -#: src/readelf.c:1058 +#: src/readelf.c:1141 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4218,14 +4332,14 @@ msgstr "" " Índice de tabla de cadenas de sección de encabezamiento de : XINDEX%s\n" "\n" -#: src/readelf.c:1062 +#: src/readelf.c:1145 #, c-format msgid "" " Section header string table index: %\n" "\n" msgstr " Índice de tabla de cadenas de sección de encabezamiento: %\n" -#: src/readelf.c:1105 +#: src/readelf.c:1188 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4234,11 +4348,11 @@ msgstr "" "Hay %d encabezamientos de sección, comenzando en compensación %#:\n" "\n" -#: src/readelf.c:1115 +#: src/readelf.c:1198 msgid "Section Headers:" msgstr "encabezamientos de sección:" -#: src/readelf.c:1118 +#: src/readelf.c:1201 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4246,7 +4360,7 @@ msgstr "" "[Nr] Nombre Tipo Dirección Off Tamaño Inf Al " "Enlace banderas ES" -#: src/readelf.c:1120 +#: src/readelf.c:1203 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4254,36 +4368,36 @@ msgstr "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" -#: src/readelf.c:1125 +#: src/readelf.c:1208 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1127 +#: src/readelf.c:1210 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1203 +#: src/readelf.c:1286 #, fuzzy, c-format msgid "bad compression header for section %zd: %s" msgstr "No se puede obtener el encabezamiento de sección %zu: %s" -#: src/readelf.c:1214 +#: src/readelf.c:1297 #, fuzzy, c-format msgid "bad gnu compressed size for section %zd: %s" msgstr "No se pueden obtener datos para la sección %d: %s" -#: src/readelf.c:1232 +#: src/readelf.c:1315 msgid "Program Headers:" msgstr "encabezamientos de programa:" -#: src/readelf.c:1234 +#: src/readelf.c:1317 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Tipo Compensación Dirección Virtual Dirección " "Física Tamaño de Fichero Tamaño de Memoria Alineación de bandera" -#: src/readelf.c:1237 +#: src/readelf.c:1320 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4291,12 +4405,12 @@ msgstr "" " Tipo Compensación Dirección Virtual Dirección " "Física Tamaño de Fichero Tamaño de Memoria Alineación de bandera" -#: src/readelf.c:1294 +#: src/readelf.c:1377 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Solicitando intérprete de programa: %s]\n" -#: src/readelf.c:1315 +#: src/readelf.c:1398 msgid "" "\n" " Section to Segment mapping:\n" @@ -4306,12 +4420,12 @@ msgstr "" " Sección para asignación de segmento:\n" " Secciones de segmento..." -#: src/readelf.c:1326 src/unstrip.c:1941 src/unstrip.c:1983 src/unstrip.c:1990 +#: src/readelf.c:1409 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993 #, c-format msgid "cannot get program header: %s" msgstr "no se puede obtener memoria para encabezamiento del programa: %s" -#: src/readelf.c:1469 +#: src/readelf.c:1552 #, c-format msgid "" "\n" @@ -4326,7 +4440,7 @@ msgstr[1] "" "\n" "Grupo de sección COMDAT [%2zu] '%s' con firma '%s' contiene entradas %zu:\n" -#: src/readelf.c:1474 +#: src/readelf.c:1557 #, c-format msgid "" "\n" @@ -4341,31 +4455,31 @@ msgstr[1] "" "\n" "Grupo de sección [%2zu] '%s' con firma '%s' contiene entradas %zu:\n" -#: src/readelf.c:1482 +#: src/readelf.c:1565 msgid "" msgstr "" -#: src/readelf.c:1496 +#: src/readelf.c:1579 msgid "" msgstr "" -#: src/readelf.c:1519 src/readelf.c:2246 src/readelf.c:3329 src/readelf.c:9531 -#: src/readelf.c:9538 src/readelf.c:9582 src/readelf.c:9589 +#: src/readelf.c:1602 src/readelf.c:2329 src/readelf.c:3430 src/readelf.c:12294 +#: src/readelf.c:12301 src/readelf.c:12345 src/readelf.c:12352 msgid "Couldn't uncompress section" msgstr "" -#: src/readelf.c:1524 src/readelf.c:2251 src/readelf.c:3334 +#: src/readelf.c:1607 src/readelf.c:2334 src/readelf.c:3435 #, fuzzy, c-format msgid "cannot get section [%zd] header: %s" msgstr "No se puede obtener encabezamiento de sección: %s" -#: src/readelf.c:1668 src/readelf.c:2318 src/readelf.c:2576 src/readelf.c:2652 -#: src/readelf.c:2956 src/readelf.c:3030 src/readelf.c:4732 +#: src/readelf.c:1751 src/readelf.c:2401 src/readelf.c:2659 src/readelf.c:2735 +#: src/readelf.c:3039 src/readelf.c:3113 src/readelf.c:5308 #, fuzzy, c-format msgid "invalid sh_link value in section %zu" msgstr ".debug_line section inválida" -#: src/readelf.c:1671 +#: src/readelf.c:1754 #, c-format msgid "" "\n" @@ -4386,36 +4500,36 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:1681 +#: src/readelf.c:1764 msgid " Type Value\n" msgstr " Tipo Valor\n" -#: src/readelf.c:1705 +#: src/readelf.c:1788 #, c-format msgid "Shared library: [%s]\n" msgstr "Biblioteca compartida: [%s]\n" -#: src/readelf.c:1710 +#: src/readelf.c:1793 #, c-format msgid "Library soname: [%s]\n" msgstr "Nombre-so de la biblioteca: [%s]\n" -#: src/readelf.c:1715 +#: src/readelf.c:1798 #, c-format msgid "Library rpath: [%s]\n" msgstr "Rpath de la biblioteca: [%s]\n" -#: src/readelf.c:1720 +#: src/readelf.c:1803 #, c-format msgid "Library runpath: [%s]\n" msgstr "Ruta de ejecución de la biblioteca: [%s]\n" -#: src/readelf.c:1740 +#: src/readelf.c:1823 #, c-format msgid "% (bytes)\n" msgstr "% (bytes)\n" -#: src/readelf.c:1853 src/readelf.c:2043 +#: src/readelf.c:1936 src/readelf.c:2126 #, c-format msgid "" "\n" @@ -4424,7 +4538,7 @@ msgstr "" "\n" "Tabla de símbolos inválida en compensación %#0\n" -#: src/readelf.c:1871 src/readelf.c:2061 +#: src/readelf.c:1954 src/readelf.c:2144 #, c-format msgid "" "\n" @@ -4449,7 +4563,7 @@ msgstr[1] "" #. The .rela.dyn section does not refer to a specific section but #. instead of section index zero. Do not try to print a section #. name. -#: src/readelf.c:1886 src/readelf.c:2076 +#: src/readelf.c:1969 src/readelf.c:2159 #, c-format msgid "" "\n" @@ -4466,29 +4580,29 @@ msgstr[1] "" "Sección de reubicación [%2u] '%s' en compensación %#0 contiene " "entradas %d:\n" -#: src/readelf.c:1896 +#: src/readelf.c:1979 msgid " Offset Type Value Name\n" msgstr " Compensación Tipo Valor Nombre\n" -#: src/readelf.c:1898 +#: src/readelf.c:1981 msgid " Offset Type Value Name\n" msgstr " Compensación Tipo Valor Nombre\n" -#: src/readelf.c:1951 src/readelf.c:1962 src/readelf.c:1975 src/readelf.c:1996 -#: src/readelf.c:2008 src/readelf.c:2142 src/readelf.c:2154 src/readelf.c:2168 -#: src/readelf.c:2190 src/readelf.c:2203 +#: src/readelf.c:2034 src/readelf.c:2045 src/readelf.c:2058 src/readelf.c:2079 +#: src/readelf.c:2091 src/readelf.c:2225 src/readelf.c:2237 src/readelf.c:2251 +#: src/readelf.c:2273 src/readelf.c:2286 msgid "" msgstr "" -#: src/readelf.c:2086 +#: src/readelf.c:2169 msgid " Offset Type Value Addend Name\n" msgstr " Compensación Tipo Valor Nombre Adend\n" -#: src/readelf.c:2088 +#: src/readelf.c:2171 msgid " Offset Type Value Addend Name\n" msgstr " Compensación Tipo Valor Nombre Adend\n" -#: src/readelf.c:2326 +#: src/readelf.c:2409 #, c-format msgid "" "\n" @@ -4503,40 +4617,40 @@ msgstr[1] "" "\n" "La tabla de símbolos [%2u] '%s' contiene entradas %u:\n" -#: src/readelf.c:2331 +#: src/readelf.c:2414 #, 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:2339 +#: src/readelf.c:2422 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:2341 +#: src/readelf.c:2424 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:2361 +#: src/readelf.c:2444 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2449 +#: src/readelf.c:2532 #, c-format msgid "bad dynamic symbol" msgstr "símbolo dinámico erróneo" -#: src/readelf.c:2531 +#: src/readelf.c:2614 msgid "none" msgstr "nada" -#: src/readelf.c:2548 +#: src/readelf.c:2631 msgid "| " msgstr "| " -#: src/readelf.c:2579 +#: src/readelf.c:2662 #, c-format msgid "" "\n" @@ -4557,17 +4671,17 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2600 +#: src/readelf.c:2683 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Versión: %hu Fichero: %s Conteo: %hu\n" -#: src/readelf.c:2613 +#: src/readelf.c:2696 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Nombre: %s Banderas: %s Versión: %hu\n" -#: src/readelf.c:2656 +#: src/readelf.c:2739 #, c-format msgid "" "\n" @@ -4588,19 +4702,19 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:2684 +#: src/readelf.c:2767 #, 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:2699 +#: src/readelf.c:2782 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Principal %d: %s\n" #. Print the header. -#: src/readelf.c:2960 +#: src/readelf.c:3043 #, c-format msgid "" "\n" @@ -4621,15 +4735,15 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'" -#: src/readelf.c:2988 +#: src/readelf.c:3071 msgid " 0 *local* " msgstr " 0 *local* " -#: src/readelf.c:2993 +#: src/readelf.c:3076 msgid " 1 *global* " msgstr " 1 *global* " -#: src/readelf.c:3035 +#: src/readelf.c:3118 #, c-format msgid "" "\n" @@ -4654,22 +4768,22 @@ msgstr[1] "" " Dirección: %#0* Compensación: %#08 Enlace a sección: " "[%2u] '%s'\n" -#: src/readelf.c:3057 +#: src/readelf.c:3140 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Longitud Número % of total Cobertura\n" -#: src/readelf.c:3059 +#: src/readelf.c:3142 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:3066 +#: src/readelf.c:3149 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:3079 +#: src/readelf.c:3162 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4678,27 +4792,37 @@ msgstr "" " Número promedio de pruebas: búsqueda exitosa: %f\n" " búsqueda sin éxito: %f\n" -#: src/readelf.c:3097 src/readelf.c:3152 src/readelf.c:3209 +#: src/readelf.c:3180 src/readelf.c:3244 src/readelf.c:3310 #, 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:3105 +#: src/readelf.c:3188 #, fuzzy, c-format msgid "invalid data in sysv.hash section %d" msgstr "Datos inválidos en sección [%zu] '%s'" -#: src/readelf.c:3160 +#: src/readelf.c:3217 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3252 #, fuzzy, c-format msgid "invalid data in sysv.hash64 section %d" msgstr "Datos inválidos en sección [%zu] '%s'" -#: src/readelf.c:3218 +#: src/readelf.c:3283 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash64 section %d" +msgstr "Datos inválidos en sección [%zu] '%s'" + +#: src/readelf.c:3319 #, fuzzy, c-format msgid "invalid data in gnu.hash section %d" msgstr "Datos inválidos en sección [%zu] '%s'" -#: src/readelf.c:3285 +#: src/readelf.c:3386 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4708,7 +4832,7 @@ msgstr "" " Tamaño de Bitmask: %zu bytes %%% bits establecen segundo " "cambio de dispersión: %u\n" -#: src/readelf.c:3374 +#: src/readelf.c:3475 #, c-format msgid "" "\n" @@ -4725,7 +4849,7 @@ msgstr[1] "" "Sección de lista de biblioteca [%2zu] '%s' en compensación %#0 " "contiene entradas %d:\n" -#: src/readelf.c:3388 +#: src/readelf.c:3489 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4733,7 +4857,7 @@ msgstr "" " Biblioteca Marca de tiempo Indicadores " "de versión de suma de verificación" -#: src/readelf.c:3438 +#: src/readelf.c:3539 #, c-format msgid "" "\n" @@ -4744,142 +4868,102 @@ msgstr "" "Sección de atributos de objeto [%2zu] '%s' de % bytes con " "desplazamiento %#0:\n" -#: src/readelf.c:3455 +#: src/readelf.c:3556 msgid " Owner Size\n" msgstr " Propietario Tamaño\n" -#: src/readelf.c:3484 +#: src/readelf.c:3585 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" #. Unknown subsection, print and skip. -#: src/readelf.c:3523 +#: src/readelf.c:3624 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" #. Tag_File -#: src/readelf.c:3528 +#: src/readelf.c:3629 #, c-format msgid " File: %11\n" msgstr " File: %11\n" -#: src/readelf.c:3577 +#: src/readelf.c:3678 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3580 +#: src/readelf.c:3681 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3583 +#: src/readelf.c:3684 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3593 +#: src/readelf.c:3694 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3596 +#: src/readelf.c:3697 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3641 -#, c-format -msgid "%s+%# <%s+%#>" -msgstr "%s+%# <%s+%#>" - -#: src/readelf.c:3644 -#, c-format -msgid "%s+%#0* <%s+%#>" -msgstr "%s+%#0* <%s+%#>" - -#: src/readelf.c:3649 -#, c-format -msgid "%# <%s+%#>" -msgstr "%# <%s+%#>" - -#: src/readelf.c:3652 -#, c-format -msgid "%#0* <%s+%#>" -msgstr "%#0* <%s+%#>" - -#: src/readelf.c:3658 -#, c-format -msgid "%s+%# <%s>" -msgstr "%s+%# <%s>" - -#: src/readelf.c:3661 -#, c-format -msgid "%s+%#0* <%s>" -msgstr "%s+%#0* <%s>" - -#: src/readelf.c:3665 -#, c-format -msgid "%# <%s>" -msgstr "%# <%s>" - -#: src/readelf.c:3668 -#, c-format -msgid "%#0* <%s>" -msgstr "%#0* <%s>" - -#: src/readelf.c:3673 -#, c-format -msgid "%s+%#" -msgstr "%s+%#" - -#: src/readelf.c:3676 -#, c-format -msgid "%s+%#0*" -msgstr "%s+%#0*" +#: src/readelf.c:3767 +#, fuzzy, c-format +msgid "sprintf failure" +msgstr "mprotect falló" -#: src/readelf.c:4054 +#: src/readelf.c:4249 msgid "empty block" msgstr "bloque vacío" -#: src/readelf.c:4057 +#: src/readelf.c:4252 #, c-format msgid "%zu byte block:" msgstr "bloque de byte %zu:" -#: src/readelf.c:4454 -#, c-format -msgid "%*s[%4] %s \n" +#: src/readelf.c:4730 +#, fuzzy, c-format +msgid "%*s[%2] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4511 +#: src/readelf.c:4794 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# utilizado con direcciones de diferente tamaño" -#: src/readelf.c:4518 +#: src/readelf.c:4801 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# utilizado con offsetr de diferente tamaño" -#: src/readelf.c:4525 +#: src/readelf.c:4808 #, fuzzy, c-format msgid "%s %# used with different base addresses" msgstr "%s %# utilizado con direcciones de diferente tamaño" -#: src/readelf.c:4614 +#: src/readelf.c:4815 +#, fuzzy, c-format +msgid "%s %# used with different attribute %s and %s" +msgstr "%s %# utilizado con direcciones de diferente tamaño" + +#: src/readelf.c:4912 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4622 +#: src/readelf.c:4920 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr " [%6tx] ... % bytes ...\n" -#: src/readelf.c:4648 +#: src/readelf.c:4998 #, c-format msgid "" "\n" @@ -4890,7 +4974,7 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#:\n" " [ Código]\n" -#: src/readelf.c:4656 +#: src/readelf.c:5006 #, c-format msgid "" "\n" @@ -4899,30 +4983,74 @@ msgstr "" "\n" "Sección de abreviatura en compensación %:\n" -#: src/readelf.c:4669 +#: src/readelf.c:5019 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** error en lectura de abreviatura: %s\n" -#: src/readelf.c:4685 +#: src/readelf.c:5035 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] compensación: %, hijos: %s, etiqueta: %s\n" -#: src/readelf.c:4688 -msgid "yes" -msgstr "sí" +#: src/readelf.c:5068 src/readelf.c:5377 src/readelf.c:5541 src/readelf.c:5926 +#: src/readelf.c:6527 src/readelf.c:8168 src/readelf.c:8838 src/readelf.c:9274 +#: src/readelf.c:9518 src/readelf.c:9683 src/readelf.c:10044 +#: src/readelf.c:10102 +#, c-format +msgid "" +"\n" +"DWARF section [%2zu] '%s' at offset %#:\n" +msgstr "" +"\n" +"Sección DWARF [%2zu] '%s' en compensación %#:\n" -#: src/readelf.c:4688 -msgid "no" -msgstr "no" +#: src/readelf.c:5081 +#, fuzzy, c-format +msgid "cannot get .debug_addr section data: %s" +msgstr "no se pueden obtener datos de sección: %s" + +#: src/readelf.c:5181 src/readelf.c:5205 src/readelf.c:5586 src/readelf.c:8883 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr " (compensación: %#)" + +#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905 +#, fuzzy, c-format +msgid " Address size: %8\n" +msgstr " (fin de compensación: %#)" + +#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915 +#, fuzzy, c-format +msgid " Segment size: %8\n" +msgstr " establecer archivo a %\n" + +#: src/readelf.c:5224 src/readelf.c:5603 src/readelf.c:8900 src/readelf.c:10234 +#, fuzzy, c-format +msgid "Unknown version" +msgstr "versión desconocida" + +#: src/readelf.c:5234 src/readelf.c:5447 src/readelf.c:5613 src/readelf.c:8910 +#, fuzzy, c-format +msgid "unsupported address size" +msgstr "no hay valor de dirección" -#: src/readelf.c:4722 src/readelf.c:4795 +#: src/readelf.c:5245 src/readelf.c:5456 src/readelf.c:5623 src/readelf.c:8920 +#, c-format +msgid "unsupported segment size" +msgstr "" + +#: src/readelf.c:5298 src/readelf.c:5372 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "no se ha podido obtener contenido de .debug_aranges: %s" -#: src/readelf.c:4737 +#: src/readelf.c:5313 #, c-format msgid "" "\n" @@ -4937,30 +5065,20 @@ msgstr[1] "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entradas %zu:\n" -#: src/readelf.c:4768 +#: src/readelf.c:5344 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4770 +#: src/readelf.c:5346 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" -" Inicio [%*zu]: %0#*, longitud: %5, compensación CU DIE: " -"%6\n" - -#: src/readelf.c:4800 src/readelf.c:4954 src/readelf.c:5531 src/readelf.c:6485 -#: src/readelf.c:7017 src/readelf.c:7137 src/readelf.c:7301 src/readelf.c:7726 -#, c-format -msgid "" -"\n" -"DWARF section [%2zu] '%s' at offset %#:\n" -msgstr "" -"\n" -"Sección DWARF [%2zu] '%s' en compensación %#:\n" +" Inicio [%*zu]: %0#*, longitud: %5, compensación CU DIE: " +"%6\n" -#: src/readelf.c:4813 src/readelf.c:6511 +#: src/readelf.c:5390 src/readelf.c:8195 #, fuzzy, c-format msgid "" "\n" @@ -4969,113 +5087,152 @@ msgstr "" "\n" "Tabla en compensación %Zu:\n" -#: src/readelf.c:4817 src/readelf.c:5555 src/readelf.c:6522 +#: src/readelf.c:5394 src/readelf.c:5567 src/readelf.c:6551 src/readelf.c:8206 +#: src/readelf.c:8864 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "Datos inválidos en sección [%zu] '%s'" -#: src/readelf.c:4833 +#: src/readelf.c:5410 #, fuzzy, c-format msgid "" "\n" " Length: %6\n" msgstr " (compensación: %#)" -#: src/readelf.c:4845 +#: src/readelf.c:5422 #, fuzzy, c-format msgid " DWARF version: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4849 +#: src/readelf.c:5426 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4860 +#: src/readelf.c:5437 #, fuzzy, c-format msgid " CU offset: %6\n" msgstr " (compensación: %#)" -#: src/readelf.c:4866 +#: src/readelf.c:5443 #, fuzzy, c-format msgid " Address size: %6\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:4870 -#, fuzzy, c-format -msgid "unsupported address size" -msgstr "no hay valor de dirección" - -#: src/readelf.c:4875 +#: src/readelf.c:5452 #, fuzzy, c-format msgid "" " Segment size: %6\n" "\n" msgstr " establecer archivo a %\n" -#: src/readelf.c:4879 +#: src/readelf.c:5507 #, c-format -msgid "unsupported segment size" +msgid " %zu padding bytes\n" msgstr "" -#: src/readelf.c:4919 +#: src/readelf.c:5550 #, fuzzy, c-format -msgid " %s..%s (%)\n" -msgstr " %s: %\n" +msgid "cannot get .debug_rnglists content: %s" +msgstr "no se ha podido obtener contenido de .debug_ranges: %s" + +#: src/readelf.c:5573 src/readelf.c:8870 +#, fuzzy, c-format +msgid "" +"Table at Offset 0x%:\n" +"\n" +msgstr " (fin de compensación: %#)" -#: src/readelf.c:4922 +#: src/readelf.c:5628 src/readelf.c:8925 #, fuzzy, c-format -msgid " %s..%s\n" -msgstr " [%6tx] %s..%s\n" +msgid " Offset entries: %8\n" +msgstr " (compensación: %#)" -#: src/readelf.c:4931 +#: src/readelf.c:5644 src/readelf.c:8941 #, c-format -msgid " %zu padding bytes\n" +msgid " Unknown CU base: " msgstr "" -#: src/readelf.c:4949 +#: src/readelf.c:5646 src/readelf.c:8943 #, c-format -msgid "cannot get .debug_ranges content: %s" -msgstr "no se ha podido obtener contenido de .debug_ranges: %s" +msgid " CU [%6] base: " +msgstr "" -#: src/readelf.c:4979 src/readelf.c:7044 +#: src/readelf.c:5652 src/readelf.c:8949 #, c-format -msgid " [%6tx] \n" -msgstr " [%6tx] \n" +msgid " Not associated with a CU.\n" +msgstr "" -#: src/readelf.c:5001 src/readelf.c:7066 +#: src/readelf.c:5663 src/readelf.c:8960 #, c-format -msgid " [%6tx] base address %s\n" -msgstr " [%6tx] (dirección base) %s\n" +msgid "too many offset entries for unit length" +msgstr "" + +#: src/readelf.c:5667 src/readelf.c:8964 +#, fuzzy, c-format +msgid " Offsets starting at 0x%:\n" +msgstr " Propietario Tamaño\n" -#: src/readelf.c:5008 src/readelf.c:7073 +#: src/readelf.c:5719 +#, fuzzy, c-format +msgid "invalid range list data" +msgstr "datos inválidos" + +#: src/readelf.c:5904 src/readelf.c:9252 #, c-format -msgid " [%6tx] empty list\n" -msgstr " [%6tx] lista vacía\n" +msgid "" +" %zu padding bytes\n" +"\n" +msgstr "" -#. We have an address range entry. -#. First address range entry in a list. -#: src/readelf.c:5019 +#: src/readelf.c:5921 +#, c-format +msgid "cannot get .debug_ranges content: %s" +msgstr "no se ha podido obtener contenido de .debug_ranges: %s" + +#: src/readelf.c:5957 src/readelf.c:9307 #, c-format -msgid " [%6tx] %s..%s\n" -msgstr " [%6tx] %s..%s\n" +msgid "" +"\n" +" Unknown CU base: " +msgstr "" + +#: src/readelf.c:5959 src/readelf.c:9309 +#, c-format +msgid "" +"\n" +" CU [%6] base: " +msgstr "" -#: src/readelf.c:5021 +#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361 #, c-format -msgid " %s..%s\n" -msgstr " %s..%s\n" +msgid " [%6tx] \n" +msgstr " [%6tx] \n" + +#: src/readelf.c:5989 src/readelf.c:9441 +#, fuzzy, c-format +msgid "" +" [%6tx] base address\n" +" " +msgstr " [%6tx] (dirección base) %s\n" + +#: src/readelf.c:5997 src/readelf.c:9449 +#, fuzzy, c-format +msgid " [%6tx] empty list\n" +msgstr " [%6tx] lista vacía\n" -#: src/readelf.c:5257 +#: src/readelf.c:6252 #, fuzzy msgid " \n" msgstr " \n" -#: src/readelf.c:5510 +#: src/readelf.c:6505 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "no se puede leer encabezamiento ELF: %s" -#: src/readelf.c:5527 +#: src/readelf.c:6523 #, c-format msgid "" "\n" @@ -5085,7 +5242,7 @@ msgstr "" "Sección de información de marco de llamada [%2zu] '%s' en compensación " "%#:\n" -#: src/readelf.c:5577 +#: src/readelf.c:6573 #, c-format msgid "" "\n" @@ -5094,50 +5251,65 @@ msgstr "" "\n" " [%6tx] Terminator cero\n" -#: src/readelf.c:5670 src/readelf.c:5825 +#: src/readelf.c:6666 src/readelf.c:6820 #, c-format msgid "invalid augmentation length" msgstr "longitud de aumento inválida" -#: src/readelf.c:5685 +#: src/readelf.c:6681 msgid "FDE address encoding: " msgstr "Codificación de dirección FDE:" -#: src/readelf.c:5691 +#: src/readelf.c:6687 msgid "LSDA pointer encoding: " msgstr "Codificación de puntero LSDA:" -#: src/readelf.c:5802 +#: src/readelf.c:6797 #, c-format msgid " (offset: %#)" msgstr " (compensación: %#)" -#: src/readelf.c:5809 +#: src/readelf.c:6804 #, c-format msgid " (end offset: %#)" msgstr " (fin de compensación: %#)" -#: src/readelf.c:5846 +#: src/readelf.c:6841 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr "Puntero %-26sLSDA: %#\n" -#: src/readelf.c:5901 -#, c-format -msgid "cannot get attribute code: %s" +#: src/readelf.c:6926 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute code: %s" msgstr "No se puede obtener código de atributo: %s" -#: src/readelf.c:5910 -#, c-format -msgid "cannot get attribute form: %s" +#: src/readelf.c:6936 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute form: %s" msgstr "No se puede obtener forma de atributo: %s" -#: src/readelf.c:5925 -#, c-format -msgid "cannot get attribute value: %s" +#: src/readelf.c:6958 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute '%s' (%s) value: %s" msgstr "No se puede obtener valor: %s" -#: src/readelf.c:6224 +#: src/readelf.c:7291 +#, fuzzy, c-format +msgid "invalid file (%): %s" +msgstr "Archivo inválido" + +#: src/readelf.c:7295 +#, fuzzy, c-format +msgid "no srcfiles for CU [%]" +msgstr " establecer archivo a %\n" + +#: src/readelf.c:7299 +#, fuzzy, c-format +msgid "couldn't get DWARF CU: %s" +msgstr "no se puede leer encabezamiento ELF: %s" + +#: src/readelf.c:7522 #, c-format msgid "" "\n" @@ -5148,20 +5320,25 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#:\n" " [Offset]\n" -#: src/readelf.c:6256 -#, c-format +#: src/readelf.c:7572 +#, fuzzy, c-format +msgid "cannot get next unit: %s" +msgstr "No se puede obtener próximo DIE: %s" + +#: src/readelf.c:7591 +#, fuzzy, c-format msgid "" " Type unit at offset %:\n" " Version: %, Abbreviation section offset: %, Address size: " "%, Offset size: %\n" -" Type signature: %#, Type offset: %#\n" +" Type signature: %#, Type offset: %# [%]\n" msgstr "" "Tipo de unidad al compensar %:\n" " Versión: %, Abreviación de sección de compensación: %, " "Tamaño de dirección: %, Tamaño de compensación: %\n" " Tipo de firma: %#, Tipo de compensación: %#\n" -#: src/readelf.c:6265 +#: src/readelf.c:7603 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5172,34 +5349,50 @@ msgstr "" " Versión: %, Compensación de sección de abreviatura: %, " "Tamaño de dirección: %, Tamaño de compensación: %\n" -#: src/readelf.c:6290 +#: src/readelf.c:7613 src/readelf.c:7776 +#, c-format +msgid " Unit type: %s (%)" +msgstr "" + +#: src/readelf.c:7640 #, c-format -msgid "cannot get DIE at offset % in section '%s': %s" -msgstr "no se puede obtener DIE en compensación % en sección '%s': %s" +msgid "unknown version (%d) or unit type (%d)" +msgstr "" -#: src/readelf.c:6304 +#: src/readelf.c:7669 #, c-format msgid "cannot get DIE offset: %s" msgstr "no se puede obtener DIE en compensación: %s" -#: src/readelf.c:6313 -#, c-format -msgid "cannot get tag of DIE at offset % in section '%s': %s" +#: src/readelf.c:7678 +#, fuzzy, c-format +msgid "cannot get tag of DIE at offset [%] in section '%s': %s" msgstr "" "no se ha podido obtener etiqueta de DIE en compensación% en sección " "'%s': %s" -#: src/readelf.c:6345 +#: src/readelf.c:7716 #, c-format msgid "cannot get next DIE: %s\n" msgstr "No se puede obtener próximo DIE: %s\n" -#: src/readelf.c:6353 +#: src/readelf.c:7724 #, c-format msgid "cannot get next DIE: %s" msgstr "No se puede obtener próximo DIE: %s" -#: src/readelf.c:6389 +#: src/readelf.c:7768 +#, fuzzy, c-format +msgid "" +" Split compilation unit at offset %:\n" +" Version: %, Abbreviation section offset: %, Address size: " +"%, Offset size: %\n" +msgstr "" +"Unidad de compilación en compensación %:\n" +" Versión: %, Compensación de sección de abreviatura: %, " +"Tamaño de dirección: %, Tamaño de compensación: %\n" + +#: src/readelf.c:7819 #, fuzzy, c-format msgid "" "\n" @@ -5209,25 +5402,32 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %#:\n" -#: src/readelf.c:6498 +#: src/readelf.c:8151 +#, fuzzy, c-format +msgid "unknown form: %s" +msgstr "Forma % desconocida" + +#: src/readelf.c:8182 #, c-format msgid "cannot get line data section data: %s" msgstr "No se puede obtener sección de datos de línea: %s" #. Print what we got so far. -#: src/readelf.c:6568 -#, c-format +#: src/readelf.c:8284 +#, fuzzy, c-format msgid "" "\n" -" Length: %\n" -" DWARF version: %\n" -" Prologue length: %\n" -" Minimum instruction length: %\n" -" Maximum operations per instruction: %\n" -" Initial value if '%s': %\n" -" Line base: %\n" -" Line range: %\n" -" Opcode base: %\n" +" Length: %\n" +" DWARF version: %\n" +" Prologue length: %\n" +" Address size: %zd\n" +" Segment selector size: %zd\n" +" Min instruction length: %\n" +" Max operations per instruction: %\n" +" Initial value if 'is_stmt': %\n" +" Line base: %\n" +" Line range: %\n" +" Opcode base: %\n" "\n" "Opcodes:\n" msgstr "" @@ -5244,19 +5444,34 @@ msgstr "" "\n" "Códigos operativos:\n" -#: src/readelf.c:6589 +#: src/readelf.c:8306 +#, fuzzy, c-format +msgid "cannot handle .debug_line version: %u\n" +msgstr "no se puede obtener versión de símbolo: %s" + +#: src/readelf.c:8314 +#, fuzzy, c-format +msgid "cannot handle address size: %u\n" +msgstr "no hay valor de dirección" + +#: src/readelf.c:8322 +#, fuzzy, c-format +msgid "cannot handle segment selector size: %u\n" +msgstr "No se puede encontrar la sección: %s" + +#: src/readelf.c:8332 #, 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:6604 +#: src/readelf.c:8347 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] " [%*] argumento %hhu \n" msgstr[1] " [%*] argumento %hhu\n" -#: src/readelf.c:6612 +#: src/readelf.c:8358 msgid "" "\n" "Directory table:" @@ -5264,17 +5479,29 @@ msgstr "" "\n" "Tabla de Directorio:" -#: src/readelf.c:6628 +#: src/readelf.c:8364 src/readelf.c:8439 +#, fuzzy, c-format +msgid " [" +msgstr " %s: %s\n" + +#: src/readelf.c:8433 +#, fuzzy msgid "" "\n" -"File name table:\n" -" Entry Dir Time Size Name" +"File name table:" +msgstr "" +"\n" +" Tabla de sitio de llamada:" + +#: src/readelf.c:8494 +#, fuzzy +msgid " Entry Dir Time Size Name" msgstr "" "\n" "Tabla de nombre de archivo:\n" " Directorio de entrada Tiempo Tamaño Nombre" -#: src/readelf.c:6663 +#: src/readelf.c:8529 msgid "" "\n" "Line number statements:" @@ -5282,121 +5509,121 @@ msgstr "" "\n" " Declaraciones de número de Línea:" -#: src/readelf.c:6714 +#: src/readelf.c:8552 #, 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:6750 -#, c-format -msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" +#: src/readelf.c:8586 +#, fuzzy, c-format +msgid " special opcode %u: address+%u = " +msgstr " opcode especial %u: dirección+%u = %s, línea%+d = %zu\n" + +#: src/readelf.c:8590 +#, fuzzy, c-format +msgid ", 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:6755 +#: src/readelf.c:8593 #, 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" +msgid ", line%+d = %zu\n" +msgstr "" -#: src/readelf.c:6775 +#: src/readelf.c:8611 #, c-format msgid " extended opcode %u: " msgstr " Código operativo extendido %u: " -#: src/readelf.c:6780 +#: src/readelf.c:8616 #, fuzzy msgid " end of sequence" msgstr "Fin de secuencia" -#: src/readelf.c:6799 +#: src/readelf.c:8634 #, fuzzy, c-format -msgid " set address to %s\n" +msgid " set address to " msgstr "Establecer dirección a %s\n" -#: src/readelf.c:6826 +#: src/readelf.c:8662 #, fuzzy, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" "definir nuevo archivo: dir=%u, mtime=%, longitud=%, nombre=" "%s\n" -#: src/readelf.c:6839 +#: src/readelf.c:8675 #, c-format msgid " set discriminator to %u\n" msgstr " establecer discriminador a %u\n" #. Unknown, ignore it. -#: src/readelf.c:6844 +#: src/readelf.c:8680 #, fuzzy msgid " unknown opcode" msgstr "código operativo desconocido " #. Takes no argument. -#: src/readelf.c:6856 +#: src/readelf.c:8692 msgid " copy" msgstr "Copiar" -#: src/readelf.c:6867 -#, 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:6871 +#: src/readelf.c:8701 #, fuzzy, c-format -msgid " advance address by %u to %s\n" +msgid " advance address by %u to " msgstr "Dirección de avance por %u a %s\n" -#: src/readelf.c:6882 +#: src/readelf.c:8705 src/readelf.c:8761 +#, c-format +msgid ", op_index to %u" +msgstr "" + +#: src/readelf.c:8715 #, c-format msgid " advance line by constant %d to %\n" msgstr " línea de avance por la constante %d a %\n" -#: src/readelf.c:6890 +#: src/readelf.c:8723 #, c-format msgid " set file to %\n" msgstr " establecer archivo a %\n" -#: src/readelf.c:6900 +#: src/readelf.c:8733 #, c-format msgid " set column to %\n" msgstr " Establecer columna a %\n" -#: src/readelf.c:6907 +#: src/readelf.c:8740 #, c-format msgid " set '%s' to %\n" msgstr "Establecer '%s' a %\n" #. Takes no argument. -#: src/readelf.c:6913 +#: src/readelf.c:8746 msgid " set basic block flag" msgstr "Establecer bandera de bloque básico" -#: src/readelf.c:6926 -#, 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:6930 +#: src/readelf.c:8757 #, fuzzy, c-format -msgid " advance address by constant %u to %s\n" +msgid " advance address by constant %u to " msgstr "Dirección de avance por constante %u a %s\n" -#: src/readelf.c:6948 +#: src/readelf.c:8776 #, fuzzy, c-format -msgid " advance address by fixed value %u to %s\n" +msgid " advance address by fixed value %u to \n" msgstr "dirección de avance por valor corregido %u a %s\n" #. Takes no argument. -#: src/readelf.c:6957 +#: src/readelf.c:8786 msgid " set prologue end flag" msgstr " Establecer bandera prologue_end" #. Takes no argument. -#: src/readelf.c:6962 +#: src/readelf.c:8791 msgid " set epilogue begin flag" msgstr " Establecer bandera epilogue_begin" -#: src/readelf.c:6971 +#: src/readelf.c:8800 #, c-format msgid " set isa to %u\n" msgstr " establecer isa para %u\n" @@ -5404,111 +5631,105 @@ msgstr " establecer isa para %u\n" #. 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. -#: src/readelf.c:6980 +#: src/readelf.c:8809 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] " opcódigo con parámetro % desconocido:" msgstr[1] " opcódigo con parámetros % desconocido:" -#: src/readelf.c:7012 -#, c-format -msgid "cannot get .debug_loc content: %s" +#: src/readelf.c:8847 +#, fuzzy, c-format +msgid "cannot get .debug_loclists content: %s" msgstr "no es posible obtener contenido de .debug_loc: %s" -#. First entry in a list. -#: src/readelf.c:7087 -#, c-format -msgid " [%6tx] %s..%s" -msgstr " [%6tx] %s..%s" +#: src/readelf.c:9016 +#, fuzzy, c-format +msgid "invalid loclists data" +msgstr "datos inválidos" -#: src/readelf.c:7089 +#: src/readelf.c:9269 #, c-format -msgid " %s..%s" -msgstr " %s..%s" +msgid "cannot get .debug_loc content: %s" +msgstr "no es posible obtener contenido de .debug_loc: %s" -#: src/readelf.c:7096 src/readelf.c:7984 +#: src/readelf.c:9476 src/readelf.c:10490 msgid " \n" msgstr " \n" -#: src/readelf.c:7148 src/readelf.c:7310 +#: src/readelf.c:9530 src/readelf.c:9693 #, 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:7228 +#: src/readelf.c:9610 #, 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:7251 +#: src/readelf.c:9633 #, 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:7351 +#: src/readelf.c:9734 #, fuzzy, c-format msgid " Offset: 0x%\n" msgstr " Propietario Tamaño\n" -#: src/readelf.c:7363 +#: src/readelf.c:9746 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:7369 src/readelf.c:8103 +#: src/readelf.c:9752 src/readelf.c:10609 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:7376 +#: src/readelf.c:9759 #, fuzzy, c-format msgid " Flag: 0x%\n" msgstr " Dirección de punto de entrada: %#\n" -#: src/readelf.c:7379 +#: src/readelf.c:9762 #, fuzzy, c-format msgid " Offset length: %\n" msgstr " (compensación: %#)" -#: src/readelf.c:7387 +#: src/readelf.c:9770 #, fuzzy, c-format msgid " .debug_line offset: 0x%\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:7400 +#: src/readelf.c:9795 #, fuzzy, c-format msgid " extension opcode table, % items:\n" msgstr " opcódigo con parámetro % desconocido:" -#: src/readelf.c:7407 +#: src/readelf.c:9802 #, c-format msgid " [%]" msgstr "" -#: src/readelf.c:7419 +#: src/readelf.c:9814 #, fuzzy, c-format msgid " % arguments:" msgstr " [%*] argumento %hhu \n" -#: src/readelf.c:7447 +#: src/readelf.c:9829 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7684 -#, c-format -msgid "vendor opcode not verified?" -msgstr "" - -#: src/readelf.c:7712 +#: src/readelf.c:10030 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" " Compensación [%5d] DIE: %6, Compensación CU DIE: %6, " "nombre: %s\n" -#: src/readelf.c:7753 +#: src/readelf.c:10072 #, c-format msgid "" "\n" @@ -5519,12 +5740,37 @@ msgstr "" "Sección DWARF [%2zu] '%s' en compensación %#:\n" " %*s String\n" -#: src/readelf.c:7767 -#, c-format -msgid " *** error while reading strings: %s\n" +#: src/readelf.c:10087 +#, fuzzy, c-format +msgid " *** error, missing string terminator\n" msgstr " *** error en lectura de cadenas: %s\n" -#: src/readelf.c:7787 +#: src/readelf.c:10115 +#, fuzzy, c-format +msgid "cannot get .debug_str_offsets section data: %s" +msgstr "no se pueden obtener datos de sección: %s" + +#: src/readelf.c:10214 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr " (compensación: %#)" + +#: src/readelf.c:10216 +#, fuzzy, c-format +msgid " Offset size: %8\n" +msgstr " (compensación: %#)" + +#: src/readelf.c:10230 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:10239 +#, fuzzy, c-format +msgid " Padding: %8\n" +msgstr " (compensación: %#)" + +#: src/readelf.c:10293 #, c-format msgid "" "\n" @@ -5533,7 +5779,7 @@ msgstr "" "\n" "Sección de tabla de búsqueda de marco de llamada [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7889 +#: src/readelf.c:10395 #, c-format msgid "" "\n" @@ -5542,22 +5788,22 @@ msgstr "" "\n" "Excepción en el manejo de la sección de tabla [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7912 +#: src/readelf.c:10418 #, c-format msgid " LPStart encoding: %#x " msgstr "Codificación LPStart: %#x " -#: src/readelf.c:7924 +#: src/readelf.c:10430 #, c-format msgid " TType encoding: %#x " msgstr "Codificación TType: %#x " -#: src/readelf.c:7939 +#: src/readelf.c:10445 #, c-format msgid " Call site encoding: %#x " msgstr "Codificación de sitio de llamada: %#x " -#: src/readelf.c:7952 +#: src/readelf.c:10458 msgid "" "\n" " Call site table:" @@ -5565,7 +5811,7 @@ msgstr "" "\n" " Tabla de sitio de llamada:" -#: src/readelf.c:7966 +#: src/readelf.c:10472 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5578,12 +5824,12 @@ msgstr "" " Landing pad: %#\n" " Action: %u\n" -#: src/readelf.c:8039 +#: src/readelf.c:10545 #, c-format msgid "invalid TType encoding" msgstr "Codificación TType inválida" -#: src/readelf.c:8065 +#: src/readelf.c:10571 #, fuzzy, c-format msgid "" "\n" @@ -5592,37 +5838,37 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:8094 +#: src/readelf.c:10600 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:8112 +#: src/readelf.c:10618 #, fuzzy, c-format msgid " CU offset: %#\n" msgstr " (compensación: %#)" -#: src/readelf.c:8119 +#: src/readelf.c:10625 #, fuzzy, c-format msgid " TU offset: %#\n" msgstr " (compensación: %#)" -#: src/readelf.c:8126 +#: src/readelf.c:10632 #, fuzzy, c-format msgid " address offset: %#\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:8133 +#: src/readelf.c:10639 #, fuzzy, c-format msgid " symbol offset: %#\n" msgstr " (compensación: %#)" -#: src/readelf.c:8140 +#: src/readelf.c:10646 #, fuzzy, c-format msgid " constant offset: %#\n" msgstr " (fin de compensación: %#)" -#: src/readelf.c:8154 +#: src/readelf.c:10660 #, fuzzy, c-format msgid "" "\n" @@ -5631,7 +5877,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:8179 +#: src/readelf.c:10685 #, fuzzy, c-format msgid "" "\n" @@ -5640,7 +5886,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:8208 +#: src/readelf.c:10714 #, fuzzy, c-format msgid "" "\n" @@ -5649,7 +5895,7 @@ msgstr "" "\n" "Sección DWARF [%2zu] '%s' en compensación %# contiene entrada %zu:\n" -#: src/readelf.c:8241 +#: src/readelf.c:10746 #, fuzzy, c-format msgid "" "\n" @@ -5658,17 +5904,18 @@ msgstr "" "\n" "Tabla de símbolos inválida en compensación %#0\n" -#: src/readelf.c:8328 +#: src/readelf.c:10884 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "no se puede depurar descriptor de contexto: %s" -#: src/readelf.c:8484 src/readelf.c:9106 src/readelf.c:9217 src/readelf.c:9275 +#: src/readelf.c:11247 src/readelf.c:11869 src/readelf.c:11980 +#: src/readelf.c:12038 #, c-format msgid "cannot convert core note data: %s" msgstr "no es posible convertir datos de la nota principal: %s" -#: src/readelf.c:8847 +#: src/readelf.c:11610 #, c-format msgid "" "\n" @@ -5677,21 +5924,21 @@ msgstr "" "\n" "%*s... ..." -#: src/readelf.c:9354 +#: src/readelf.c:12117 msgid " Owner Data size Type\n" msgstr " Owner Data size Type\n" -#: src/readelf.c:9372 +#: src/readelf.c:12135 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:9422 -#, c-format -msgid "cannot get content of note section: %s" +#: src/readelf.c:12185 +#, fuzzy, c-format +msgid "cannot get content of note: %s" msgstr "no se puede obtener el contenido de sección de nota: %s" -#: src/readelf.c:9449 +#: src/readelf.c:12212 #, c-format msgid "" "\n" @@ -5700,7 +5947,7 @@ msgstr "" "\n" "Sección de nota [%2zu] '%s' de % bytes en compensación %#0:\n" -#: src/readelf.c:9472 +#: src/readelf.c:12235 #, c-format msgid "" "\n" @@ -5709,7 +5956,7 @@ msgstr "" "\n" "Segmento de nota de % bytes en compensación %#0:\n" -#: src/readelf.c:9518 +#: src/readelf.c:12281 #, fuzzy, c-format msgid "" "\n" @@ -5718,12 +5965,12 @@ msgstr "" "\n" "Sección [%Zu] '%s' no tiene datos para volcar.\n" -#: src/readelf.c:9545 src/readelf.c:9596 +#: src/readelf.c:12308 src/readelf.c:12359 #, fuzzy, c-format msgid "cannot get data for section [%zu] '%s': %s" msgstr "no se pueden obtener datos para sección [%Zu] '%s': %s" -#: src/readelf.c:9550 +#: src/readelf.c:12313 #, fuzzy, c-format msgid "" "\n" @@ -5733,7 +5980,7 @@ msgstr "" "Volcado Hex de sección [%Zu] '%s', % bytes en compensación " "%#0:\n" -#: src/readelf.c:9555 +#: src/readelf.c:12318 #, fuzzy, c-format msgid "" "\n" @@ -5744,7 +5991,7 @@ msgstr "" "Volcado Hex de sección [%Zu] '%s', % bytes en compensación " "%#0:\n" -#: src/readelf.c:9569 +#: src/readelf.c:12332 #, fuzzy, c-format msgid "" "\n" @@ -5753,7 +6000,7 @@ msgstr "" "\n" "Sección [%Zu] '%s' no tiene datos para volcar.\n" -#: src/readelf.c:9601 +#: src/readelf.c:12364 #, fuzzy, c-format msgid "" "\n" @@ -5763,7 +6010,7 @@ msgstr "" "Sección de cadena [%Zu] '%s' contiene % bytes en compensación " "%#0:\n" -#: src/readelf.c:9606 +#: src/readelf.c:12369 #, fuzzy, c-format msgid "" "\n" @@ -5774,7 +6021,7 @@ msgstr "" "Sección de cadena [%Zu] '%s' contiene % bytes en compensación " "%#0:\n" -#: src/readelf.c:9655 +#: src/readelf.c:12418 #, c-format msgid "" "\n" @@ -5783,7 +6030,7 @@ msgstr "" "\n" "sección [%lu] no existe" -#: src/readelf.c:9684 +#: src/readelf.c:12447 #, c-format msgid "" "\n" @@ -5792,12 +6039,12 @@ msgstr "" "\n" "sección '%s' no existe" -#: src/readelf.c:9741 +#: src/readelf.c:12504 #, 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:9744 +#: src/readelf.c:12507 #, c-format msgid "" "\n" @@ -5806,7 +6053,7 @@ msgstr "" "\n" "Archivo '%s' no tiene índice de símbolo\n" -#: src/readelf.c:9748 +#: src/readelf.c:12511 #, fuzzy, c-format msgid "" "\n" @@ -5815,12 +6062,12 @@ msgstr "" "\n" "Índice de archivo '%s' tiene %Zu entradas:\n" -#: src/readelf.c:9766 +#: src/readelf.c:12529 #, fuzzy, c-format msgid "cannot extract member at offset %zu in '%s': %s" msgstr "no es posible extraer miembro en compensación %Zu en '%s': %s" -#: src/readelf.c:9771 +#: src/readelf.c:12534 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Miembro de archivo contiene '%s':\n" @@ -5896,130 +6143,137 @@ msgstr " (ex %s)" msgid "(TOTALS)\n" msgstr "(TOTALES)\n" -#: src/stack.c:481 +#: src/stack.c:483 +#, c-format msgid "-p PID should be a positive process id." msgstr "" -#: src/stack.c:487 +#: src/stack.c:489 #, fuzzy, c-format msgid "Cannot open core file '%s'" msgstr "Imposible abrir el archivo '%s'" -#: src/stack.c:547 +#: src/stack.c:549 +#, c-format msgid "-n MAXFRAMES should be 0 or higher." msgstr "" -#: src/stack.c:559 +#: src/stack.c:561 +#, c-format msgid "-e EXEC needs a core given by --core." msgstr "" -#: src/stack.c:563 +#: src/stack.c:565 +#, c-format msgid "-1 needs a thread id given by -p." msgstr "" -#: src/stack.c:567 +#: src/stack.c:569 +#, c-format msgid "One of -p PID or --core COREFILE should be given." msgstr "" -#: src/stack.c:637 +#: src/stack.c:641 #, fuzzy msgid "Show stack of process PID" msgstr "No se puede crear el árbol de búsqueda" -#: src/stack.c:639 +#: src/stack.c:643 msgid "Show stack found in COREFILE" msgstr "" -#: src/stack.c:640 +#: src/stack.c:644 msgid "(optional) EXECUTABLE that produced COREFILE" msgstr "" -#: src/stack.c:644 +#: src/stack.c:648 msgid "Output selection options:" msgstr "Opciones de selección de salida:" -#: src/stack.c:646 +#: src/stack.c:650 #, fuzzy msgid "Additionally show frame activation" msgstr "Selección de salida adicional:" -#: src/stack.c:648 +#: src/stack.c:652 msgid "Additionally try to lookup DWARF debuginfo name for frame address" msgstr "" -#: src/stack.c:651 +#: src/stack.c:655 msgid "" "Additionally show inlined function frames using DWARF debuginfo if available " "(implies -d)" msgstr "" -#: src/stack.c:653 +#: src/stack.c:657 msgid "Additionally show module file information" msgstr "" -#: src/stack.c:655 +#: src/stack.c:659 #, fuzzy msgid "Additionally show source file information" msgstr "Selección de salida adicional:" -#: src/stack.c:657 +#: src/stack.c:661 msgid "" "Show all additional information (activation, debugname, inlines, module and " "source)" msgstr "" -#: src/stack.c:659 +#: src/stack.c:663 msgid "Do not resolve address to function symbol name" msgstr "" -#: src/stack.c:661 +#: src/stack.c:665 msgid "Show raw function symbol names, do not try to demangle names" msgstr "" -#: src/stack.c:663 +#: src/stack.c:667 msgid "Show module build-id, load address and pc offset" msgstr "" -#: src/stack.c:665 +#: src/stack.c:669 msgid "Show the backtrace of only one thread" msgstr "" -#: src/stack.c:667 +#: src/stack.c:671 msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" msgstr "" -#: src/stack.c:669 +#: src/stack.c:673 msgid "Show module memory map with build-id, elf and debug files detected" msgstr "" -#: src/stack.c:677 +#: src/stack.c:681 msgid "" -"Print a stack for each thread in a process or core file.\vProgram exits with " -"return code 0 if all frames were shown without any errors. If some frames " -"were shown, but there were some non-fatal errors, possibly causing an " -"incomplete backtrace, the program exits with return code 1. If no frames " -"could be shown, or a fatal error occured the program exits with return code " -"2. If the program was invoked with bad or missing arguments it will exit " -"with return code 64." +"Print a stack for each thread in a process or core file.\n" +"\n" +"Program exits with return code 0 if all frames were shown without any " +"errors. If some frames were shown, but there were some non-fatal errors, " +"possibly causing an incomplete backtrace, the program exits with return code " +"1. If no frames could be shown, or a fatal error occured the program exits " +"with return code 2. If the program was invoked with bad or missing " +"arguments it will exit with return code 64." msgstr "" -#: src/stack.c:750 +#: src/stack.c:756 +#, c-format msgid "Couldn't show any frames." msgstr "" -#: src/strings.c:65 +#: src/strings.c:66 msgid "Output Selection:" msgstr "Selección de salida:" -#: src/strings.c:66 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Explorar todo el archivo, no sólo las secciones cargadas" -#: src/strings.c:68 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "Sólo secuencias NUL-terminated de caracteres MIN-LEN o más se imprimen" -#: src/strings.c:69 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6027,129 +6281,141 @@ msgstr "" "Seleccionar tamaño de caracter y Endianess: s = 7-bit, S = 8-bit, {b,l} = 16-" "bit, {B,L} = 32-bit" -#: src/strings.c:73 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Imprimir nombre de archivo antes de cada cadena." -#: src/strings.c:75 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Imprimir ubicación de la cadena en base 8, 10, o 16 respectivamente." -#: src/strings.c:76 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias para --radix=o" #. Short description of program. -#: src/strings.c:83 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Imprimir las cadenas de caracteres imprimibles en archivos." -#: src/strings.c:256 src/strings.c:291 +#: src/strings.c:257 src/strings.c:292 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "Valor inválido '%s' para parámetro %s" -#: src/strings.c:302 +#: src/strings.c:303 #, c-format msgid "invalid minimum length of matched string size" msgstr "longitud mínima inválida de tamaño de cadena coincidente" -#: src/strings.c:585 +#: src/strings.c:586 #, fuzzy, c-format msgid "lseek failed" msgstr "lseek64 falló" -#: src/strings.c:602 src/strings.c:666 +#: src/strings.c:603 src/strings.c:667 #, c-format msgid "re-mmap failed" msgstr "re-mmap falló" -#: src/strings.c:639 +#: src/strings.c:640 #, c-format msgid "mprotect failed" msgstr "mprotect falló" -#: src/strings.c:728 +#: src/strings.c:729 #, c-format msgid "Skipping section %zd '%s' data outside file" msgstr "" -#: src/strip.c:68 +#: src/strip.c:71 msgid "Place stripped output into FILE" msgstr "Colocar la salida obtenida en FICHERO" -#: src/strip.c:69 +#: src/strip.c:72 msgid "Extract the removed sections into FILE" msgstr "Extraer secciones eliminadas en FICHERO" -#: src/strip.c:70 +#: src/strip.c:73 msgid "Embed name FILE instead of -f argument" msgstr "Incorporar nombre FILE en lugar de argumento -f" -#: src/strip.c:74 +#: src/strip.c:77 msgid "Remove all debugging symbols" msgstr "Elimina todos los símbolos de depuración" -#: src/strip.c:78 +#: src/strip.c:81 msgid "Remove section headers (not recommended)" msgstr "Quitar sección de cabeceras (no recomendado)" -#: src/strip.c:80 +#: src/strip.c:83 msgid "Copy modified/access timestamps to the output" msgstr "Copiar marcas de tiempo modificadas/acceso a la salida" -#: src/strip.c:82 +#: src/strip.c:85 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" msgstr "" -#: src/strip.c:84 +#: src/strip.c:87 msgid "Remove .comment section" msgstr "Quitar sección de comentario" +#: src/strip.c:88 +msgid "" +"Remove the named section. SECTION is an extended wildcard pattern. May be " +"given more than once. Only non-allocated sections can be removed." +msgstr "" + +#: src/strip.c:89 +msgid "" +"Keep the named section. SECTION is an extended wildcard pattern. May be " +"given more than once." +msgstr "" + #. Short description of program. -#: src/strip.c:92 +#: src/strip.c:96 msgid "Discard symbols from object files." msgstr "Descarta símbolos de archivos objeto." -#: src/strip.c:186 +#: src/strip.c:242 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "" -#: src/strip.c:200 +#: src/strip.c:256 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "Sólo se permite ingresar un archivo junto con '-o' y '-f'" -#: src/strip.c:222 +#: src/strip.c:279 #, c-format msgid "-f option specified twice" msgstr "opción -f especificada dos veces" -#: src/strip.c:231 +#: src/strip.c:288 #, c-format msgid "-F option specified twice" msgstr "opción -F especificada dos veces" -#: src/strip.c:264 -#, c-format -msgid "-R option supports only .comment section" -msgstr "la opción -R soporta únicamente. sección de comentario" +#: src/strip.c:347 +#, fuzzy, c-format +msgid "cannot both keep and remove .comment section" +msgstr "Quitar sección de comentario" -#: src/strip.c:306 src/strip.c:330 +#: src/strip.c:372 src/strip.c:396 #, c-format msgid "cannot stat input file '%s'" msgstr "no sepuede stat fichero de entrada '%s'" -#: src/strip.c:320 +#: src/strip.c:386 #, c-format msgid "while opening '%s'" msgstr "mientras se abría '%s'" -#: src/strip.c:358 +#: src/strip.c:424 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: no puede utilizarse -o o -f cuando se extrae un archivo" @@ -6160,107 +6426,117 @@ msgstr "%s: no puede utilizarse -o o -f cuando se extrae un archivo" #. result = handle_ar (fd, elf, NULL, fname, #. preserve_dates ? tv : NULL); #. -#: src/strip.c:370 +#: src/strip.c:436 #, fuzzy, c-format msgid "%s: no support for stripping archive" msgstr "%s: no puede utilizarse -o o -f cuando se extrae un archivo" -#: src/strip.c:469 +#: src/strip.c:535 #, c-format msgid "cannot open EBL backend" msgstr "No se puede abrir el segundo plano EBL" -#: src/strip.c:514 +#: src/strip.c:580 #, fuzzy, c-format msgid "cannot get number of phdrs" msgstr "no se pudo determinar la cantidad de encabezados de programa: %s" -#: src/strip.c:530 src/strip.c:554 +#: src/strip.c:596 src/strip.c:620 #, c-format msgid "cannot create new file '%s': %s" msgstr "no se puede crear fichero nuevo '%s': %s" -#: src/strip.c:620 +#: src/strip.c:686 #, c-format msgid "illformed file '%s'" msgstr "Fichero illformed '%s'" -#: src/strip.c:954 src/strip.c:1053 +#: src/strip.c:696 +#, fuzzy, c-format +msgid "Cannot remove allocated section '%s'" +msgstr "No se puede asignar sección PLT: %s" + +#: src/strip.c:705 +#, fuzzy, c-format +msgid "Cannot both keep and remove section '%s'" +msgstr "No se puede añadir nueva sección: %s" + +#: src/strip.c:1061 src/strip.c:1160 #, c-format msgid "while generating output file: %s" msgstr "al generar fichero de salida: %s" -#: src/strip.c:1019 src/strip.c:2089 +#: src/strip.c:1126 src/strip.c:2208 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: error al crear encabezamiento ELF: %s" -#: src/strip.c:1036 +#: src/strip.c:1143 #, c-format msgid "while preparing output for '%s'" msgstr "al preparar salida para '%s'" -#: src/strip.c:1094 src/strip.c:1157 +#: src/strip.c:1205 src/strip.c:1268 #, c-format msgid "while create section header section: %s" msgstr "al crear sección de encabezamiento de sección: %s" -#: src/strip.c:1103 +#: src/strip.c:1214 #, c-format msgid "cannot allocate section data: %s" msgstr "no se puede asignar espacio para los datos: %s" -#: src/strip.c:1169 +#: src/strip.c:1280 #, 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:1176 +#: src/strip.c:1287 #, fuzzy, c-format msgid "no memory to create section header string table" msgstr "al crear tabla de cadenas de encabezamiento de sección: %s" -#: src/strip.c:1383 +#: src/strip.c:1497 #, c-format msgid "Cannot remove symbol [%zd] from allocated symbol table [%zd]" msgstr "" -#: src/strip.c:1875 +#: src/strip.c:1994 #, fuzzy, c-format msgid "bad relocation" msgstr "Mostrar reubicaciones" -#: src/strip.c:2000 src/strip.c:2113 +#: src/strip.c:2119 src/strip.c:2232 #, c-format msgid "while writing '%s': %s" msgstr "al escribir '%s': %s" -#: src/strip.c:2011 +#: src/strip.c:2130 #, c-format msgid "while creating '%s'" msgstr "al crear '%s'" -#: src/strip.c:2034 +#: src/strip.c:2153 #, 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:2098 +#: src/strip.c:2217 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: error al leer el fichero: %s" -#: src/strip.c:2138 src/strip.c:2158 +#: src/strip.c:2257 src/strip.c:2277 #, c-format msgid "while writing '%s'" msgstr "al escribir '%s'" -#: src/strip.c:2195 src/strip.c:2202 +#: src/strip.c:2314 src/strip.c:2321 #, c-format msgid "error while finishing '%s': %s" msgstr "Error al terminar '%s': %s" -#: src/strip.c:2219 src/strip.c:2291 +#: src/strip.c:2338 src/strip.c:2414 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "no es posible establecer acceso y fecha de modificación de '%s'" @@ -6348,12 +6624,12 @@ 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:249 src/unstrip.c:1930 src/unstrip.c:1973 +#: src/unstrip.c:249 src/unstrip.c:1933 src/unstrip.c:1976 #, 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:254 src/unstrip.c:1934 +#: src/unstrip.c:254 src/unstrip.c:1937 #, c-format msgid "cannot create program headers: %s" msgstr "No pueden crear encabezamientos de programa: %s" @@ -6368,12 +6644,12 @@ msgstr "no puede copiar encabezamiento de programa: %s" msgid "cannot copy section header: %s" msgstr "no se puede copiar encabezamiento de sección: %s" -#: src/unstrip.c:273 src/unstrip.c:1565 +#: src/unstrip.c:273 src/unstrip.c:1568 #, c-format msgid "cannot get section data: %s" msgstr "no se pueden obtener datos de sección: %s" -#: src/unstrip.c:275 src/unstrip.c:1567 +#: src/unstrip.c:275 src/unstrip.c:1570 #, c-format msgid "cannot copy section data: %s" msgstr "no pueden copiar datos de sección: %s" @@ -6383,13 +6659,13 @@ msgstr "no pueden copiar datos de sección: %s" msgid "cannot create directory '%s'" msgstr "no se puede crear el directorio '%s'" -#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1599 +#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1602 #, c-format msgid "cannot get symbol table entry: %s" msgstr "no se puede obtener entrada de tabla de símbolos: %s" #: src/unstrip.c:387 src/unstrip.c:608 src/unstrip.c:629 src/unstrip.c:641 -#: src/unstrip.c:1620 src/unstrip.c:1796 src/unstrip.c:1820 +#: src/unstrip.c:1623 src/unstrip.c:1799 src/unstrip.c:1823 #, c-format msgid "cannot update symbol table: %s" msgstr "no se puede actualizar tabla de símbolos: %s" @@ -6419,110 +6695,110 @@ msgstr "tipo de sección inesperado en [%Zu] con sh_link para symtab" msgid "invalid string offset in symbol [%zu]" msgstr "compensación de cadena inválida en símbolo [%Zu]" -#: src/unstrip.c:955 src/unstrip.c:1302 +#: src/unstrip.c:955 src/unstrip.c:1305 #, fuzzy, c-format msgid "cannot read section [%zu] name: %s" msgstr "no se puede leer nombre [%Zu]: %s" -#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1050 +#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1053 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "no se puede leer sección '.gnu.prelink_undo': %s" -#: src/unstrip.c:1036 -#, c-format -msgid "invalid contents in '%s' section" -msgstr "contenido inválido en sección '%s'" - -#: src/unstrip.c:1042 +#: src/unstrip.c:1033 #, c-format msgid "overflow with shnum = %zu in '%s' section" msgstr "" -#: src/unstrip.c:1096 src/unstrip.c:1424 +#: src/unstrip.c:1044 +#, c-format +msgid "invalid contents in '%s' section" +msgstr "contenido inválido en sección '%s'" + +#: src/unstrip.c:1099 src/unstrip.c:1427 #, fuzzy, c-format msgid "cannot find matching section for [%zu] '%s'" msgstr "no se puede hallar sección coincidente para [%Zu] '%s'" -#: src/unstrip.c:1221 src/unstrip.c:1236 src/unstrip.c:1503 src/unstrip.c:1755 +#: src/unstrip.c:1224 src/unstrip.c:1239 src/unstrip.c:1506 src/unstrip.c:1758 #, 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:1245 +#: src/unstrip.c:1248 #, 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:1273 src/unstrip.c:1277 +#: src/unstrip.c:1276 src/unstrip.c:1280 #, 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:1281 src/unstrip.c:1285 src/unstrip.c:1518 +#: src/unstrip.c:1284 src/unstrip.c:1288 src/unstrip.c:1521 #, c-format msgid "cannot get section count: %s" msgstr "No se puede obtener cuenta de sección: %s" -#: src/unstrip.c:1288 +#: src/unstrip.c:1291 #, 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:1347 src/unstrip.c:1439 +#: src/unstrip.c:1350 src/unstrip.c:1442 #, 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:1497 +#: src/unstrip.c:1500 #, c-format msgid "cannot add new section: %s" msgstr "No se puede añadir nueva sección: %s" -#: src/unstrip.c:1607 +#: src/unstrip.c:1610 #, fuzzy, c-format msgid "symbol [%zu] has invalid section index" msgstr "símbolo [%Zu] tiene índice de sección inválido" -#: src/unstrip.c:1891 +#: src/unstrip.c:1894 #, c-format msgid "cannot read section data: %s" msgstr "no se puede leer la sección de datos: %s" -#: src/unstrip.c:1912 +#: src/unstrip.c:1915 #, c-format msgid "cannot get ELF header: %s" msgstr "no se puede leer encabezamiento ELF: %s" -#: src/unstrip.c:1920 +#: src/unstrip.c:1923 #, c-format msgid "cannot update ELF header: %s" msgstr "No se puede actualizar encabezamiento ELF: %s" -#: src/unstrip.c:1944 +#: src/unstrip.c:1947 #, c-format msgid "cannot update program header: %s" msgstr "no se puede actualizar encabezamiento de programa: %s" -#: src/unstrip.c:1949 src/unstrip.c:2031 +#: src/unstrip.c:1952 src/unstrip.c:2034 #, c-format msgid "cannot write output file: %s" msgstr "no se puede escribir al archivo de salida: %s" -#: src/unstrip.c:2000 +#: src/unstrip.c:2003 #, 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:2003 +#: src/unstrip.c:2006 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6530,77 +6806,77 @@ msgstr "" "Datos DWARF en '%s' no se ajustan a polarización de pre-enlace; considere " "prelink -u" -#: src/unstrip.c:2022 src/unstrip.c:2073 src/unstrip.c:2085 src/unstrip.c:2171 +#: src/unstrip.c:2025 src/unstrip.c:2076 src/unstrip.c:2088 src/unstrip.c:2174 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "no se puede crear un descriptor ELF: %s" -#: src/unstrip.c:2064 +#: src/unstrip.c:2067 msgid "WARNING: " msgstr "" -#: src/unstrip.c:2066 +#: src/unstrip.c:2069 msgid ", use --force" msgstr "" -#: src/unstrip.c:2089 +#: src/unstrip.c:2092 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:2092 +#: src/unstrip.c:2095 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:2095 +#: src/unstrip.c:2098 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:2098 +#: src/unstrip.c:2101 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2128 +#: src/unstrip.c:2131 #, 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:2132 +#: src/unstrip.c:2135 #, 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:2147 +#: src/unstrip.c:2150 #, 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:2151 +#: src/unstrip.c:2154 #, 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:2164 +#: src/unstrip.c:2167 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "No se obtuvo el archivo '%s' de módulo '%s' " -#: src/unstrip.c:2195 +#: src/unstrip.c:2198 #, 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:2328 +#: src/unstrip.c:2331 #, c-format msgid "no matching modules found" msgstr "No se encontraron módulos coincidentes" -#: src/unstrip.c:2337 +#: src/unstrip.c:2340 #, c-format msgid "matched more than one module" msgstr "coincidió con más de un módulo" -#: src/unstrip.c:2381 +#: src/unstrip.c:2384 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6608,10 +6884,12 @@ msgstr "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" -#: src/unstrip.c:2382 +#: src/unstrip.c:2385 +#, fuzzy 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" +"Combine stripped files with separate symbols and debug information.\n" +"\n" +"The first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" "With -f these match the file name of the main (stripped) file (slashes are " @@ -6634,8 +6912,9 @@ msgid "" "file. DEBUGFILE is the separate debuginfo file name, or - if no debuginfo " "was found, or . if FILE contains the debug information." msgstr "" -"Combine stripped files with separate symbols and debug information.\vThe " -"first form puts the result in DEBUG-FILE if -o was not given.\n" +"Combine stripped files with separate symbols and debug information.\n" +"\n" +"The first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" "With -f these match the file name of the main (stripped) file (slashes are " @@ -6658,7 +6937,7 @@ msgstr "" "file. DEBUGFILE is the separate debuginfo file name, or - if no debuginfo " "was found, or . if FILE contains the debug information." -#: tests/backtrace.c:430 +#: tests/backtrace.c:442 msgid "Run executable" msgstr "" @@ -6671,25 +6950,74 @@ msgstr "También mostrar nombres de función" msgid "Show instances of inlined functions" msgstr "" -#~ msgid "" -#~ "Copyright (C) %s Red Hat, Inc.\n" -#~ "This is free software; see the source for copying conditions. There is " -#~ "NO\n" -#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " -#~ "PURPOSE.\n" +#~ msgid "%s+%# <%s+%#>" +#~ msgstr "%s+%# <%s+%#>" + +#~ msgid "%s+%#0* <%s+%#>" +#~ msgstr "%s+%#0* <%s+%#>" + +#~ msgid "%# <%s+%#>" +#~ msgstr "%# <%s+%#>" + +#~ msgid "%#0* <%s+%#>" +#~ msgstr "%#0* <%s+%#>" + +#~ msgid "%s+%# <%s>" +#~ msgstr "%s+%# <%s>" + +#~ msgid "%s+%#0* <%s>" +#~ msgstr "%s+%#0* <%s>" + +#~ msgid "%# <%s>" +#~ msgstr "%# <%s>" + +#~ msgid "%#0* <%s>" +#~ msgstr "%#0* <%s>" + +#~ msgid "%s+%#" +#~ msgstr "%s+%#" + +#~ msgid "%s+%#0*" +#~ msgstr "%s+%#0*" + +#, fuzzy +#~ msgid " %s..%s (%)\n" +#~ msgstr " %s: %\n" + +#, fuzzy +#~ msgid " %s..%s\n" +#~ msgstr " [%6tx] %s..%s\n" + +#, fuzzy +#~ 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" + +#, fuzzy +#~ 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" + +#~ msgid " [%6tx] %s..%s\n" +#~ msgstr " [%6tx] %s..%s\n" + +#~ msgid " %s..%s\n" +#~ msgstr " %s..%s\n" + +#~ msgid "cannot get DIE at offset % in section '%s': %s" #~ msgstr "" -#~ "Copyright (C) %s Red Hat, Inc.\n" -#~ "El siguiente es un software libre; consulte el código para conocer las " -#~ "condiciones de copiado. NO tiene\n" -#~ "garantía, ni siquiera para SU COMERCIALIZACIÓN o PARA SER USADO CON UN " -#~ "FIN DETERMINADO.\n" +#~ "no se puede obtener DIE en compensación % en sección '%s': %s" + +#~ msgid " [%6tx] %s..%s" +#~ msgstr " [%6tx] %s..%s" + +#~ msgid " %s..%s" +#~ msgstr " %s..%s" + +#~ msgid "-R option supports only .comment section" +#~ msgstr "la opción -R soporta únicamente. sección de comentario" #~ msgid "Written by %s.\n" #~ msgstr "Escrito por %s.\n" -#~ msgid "cannot allocate PLT section: %s" -#~ msgstr "No se puede asignar sección PLT: %s" - #~ msgid "cannot allocate PLTREL section: %s" #~ msgstr "No se puede asignar sección PLTREL: %s" @@ -7214,10 +7542,6 @@ msgstr "" #~ msgid "unknown user attribute %hx" #~ msgstr "Atributo de usuario desconocido %hx" -#, fuzzy -#~ msgid "unknown form %#" -#~ msgstr "Forma % desconocida" - #~ msgid "" #~ "\n" #~ "\n" diff --git a/po/fr.po b/po/fr.po index 53c1fb10..1a7a3f87 100644 --- a/po/fr.po +++ b/po/fr.po @@ -5639,7 +5639,7 @@ msgstr "" #: src/unstrip.c:2248 msgid "" -"Combine stripped files with separate symbols and debug information.\vThe " +"Combine stripped files with separate symbols and debug information.\n\nThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" diff --git a/po/it.po b/po/it.po index 0e2d3b27..61e8ae03 100644 --- a/po/it.po +++ b/po/it.po @@ -5640,7 +5640,7 @@ msgstr "" #: src/unstrip.c:2248 msgid "" -"Combine stripped files with separate symbols and debug information.\vThe " +"Combine stripped files with separate symbols and debug information.\n\nThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" diff --git a/po/ja.po b/po/ja.po index bdc645fe..63fb6de2 100644 --- a/po/ja.po +++ b/po/ja.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ja\n" "Report-Msgid-Bugs-To: https://sourceware.org/bugzilla/\n" -"POT-Creation-Date: 2016-12-27 15:20+0100\n" +"POT-Creation-Date: 2018-06-29 20:47+0200\n" "PO-Revision-Date: 2009-09-20 15:32+0900\n" "Last-Translator: Hyu_gabaru Ryu_ichi \n" "Language-Team: Japanese \n" @@ -34,23 +34,34 @@ msgid "" " - 'auto', 'tty', 'if-tty'\n" msgstr "" -#: lib/color.c:190 src/objdump.c:725 +#: lib/color.c:190 src/objdump.c:727 #, fuzzy, c-format msgid "cannot allocate memory" msgstr "PLT セクションを割り当てられません: %s" -#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3294 -#: src/readelf.c:3685 src/readelf.c:8433 src/unstrip.c:2224 src/unstrip.c:2429 +#: lib/printversion.c:40 +#, fuzzy, c-format +msgid "" +"Copyright (C) %s The elfutils developers <%s>.\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +msgstr "" +"Copyright (C) %s Red Hat, Inc.\n" +"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" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3395 +#: src/readelf.c:11196 src/unstrip.c:2227 src/unstrip.c:2433 #, c-format msgid "memory exhausted" msgstr "メモリー消費済み" -#: libasm/asm_error.c:65 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:53 +#: libasm/asm_error.c:65 libdw/dwarf_error.c:57 libdwfl/libdwflP.h:50 #: libelf/elf_error.c:60 msgid "no error" msgstr "エラー無し" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:52 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "メモリー不足" @@ -87,177 +98,218 @@ msgstr "データの出力中にエラー" msgid "no backend support available" msgstr "バックエンドサポートが利用できません" -#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:51 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "不明なエラー" -#: libdw/dwarf_error.c:60 +#: libdw/dwarf_error.c:59 msgid "invalid access" msgstr "不当なアクセス" -#: libdw/dwarf_error.c:61 +#: libdw/dwarf_error.c:60 msgid "no regular file" msgstr "一般ファイルではありません" -#: libdw/dwarf_error.c:62 +#: libdw/dwarf_error.c:61 msgid "I/O error" msgstr "I/O エラー" -#: libdw/dwarf_error.c:63 +#: libdw/dwarf_error.c:62 msgid "invalid ELF file" msgstr "不当な ELF ファイル" -#: libdw/dwarf_error.c:64 +#: libdw/dwarf_error.c:63 msgid "no DWARF information" msgstr "DWARF 情報がありません" -#: libdw/dwarf_error.c:65 +#: libdw/dwarf_error.c:64 msgid "cannot decompress DWARF" msgstr "" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:65 msgid "no ELF file" msgstr "ELF ファイルがありません" -#: libdw/dwarf_error.c:67 +#: libdw/dwarf_error.c:66 msgid "cannot get ELF header" msgstr "ELF ヘッダーを得られません" -#: libdw/dwarf_error.c:69 +#: libdw/dwarf_error.c:68 msgid "not implemented" msgstr "未実装" -#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:69 libelf/elf_error.c:111 libelf/elf_error.c:159 msgid "invalid command" msgstr "不当なコマンド" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:70 msgid "invalid version" msgstr "不当なバージョン" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:71 msgid "invalid file" msgstr "不当なファイル" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:72 msgid "no entries found" msgstr "項目が見つかりません" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:73 msgid "invalid DWARF" msgstr "不当な DWARF" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:74 msgid "no string data" msgstr "文字データがありません" +#: libdw/dwarf_error.c:75 +#, fuzzy +msgid ".debug_str section missing" +msgstr ".debug_ranges セクションがありません" + #: libdw/dwarf_error.c:76 +#, fuzzy +msgid ".debug_line_str section missing" +msgstr ".debug_line セクションがありません" + +#: libdw/dwarf_error.c:77 +#, fuzzy +msgid ".debug_str_offsets section missing" +msgstr ".debug_ranges セクションがありません" + +#: libdw/dwarf_error.c:78 msgid "no address value" msgstr "アドレス値ではありません" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:79 msgid "no constant value" msgstr "固定値ではありません" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:80 msgid "no reference value" msgstr "参照値がありません" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:81 msgid "invalid reference value" msgstr "不当な参照値" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:82 msgid ".debug_line section missing" msgstr ".debug_line セクションがありません" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:83 msgid "invalid .debug_line section" msgstr "不当な .debug_line セクション" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:84 msgid "debug information too big" msgstr "デバッグ情報が大きすぎます" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:85 msgid "invalid DWARF version" msgstr "不当な DWARF バージョン" -#: libdw/dwarf_error.c:84 +#: libdw/dwarf_error.c:86 msgid "invalid directory index" msgstr "不当なディレクトリー索引" -#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:87 libdwfl/libdwflP.h:71 msgid "address out of range" msgstr "アドレスが範囲外です" -#: libdw/dwarf_error.c:86 -msgid "no location list value" +#: libdw/dwarf_error.c:88 +#, fuzzy +msgid ".debug_loc section missing" +msgstr ".debug_line セクションがありません" + +#: libdw/dwarf_error.c:89 +#, fuzzy +msgid ".debug_loclists section missing" +msgstr ".debug_line セクションがありません" + +#: libdw/dwarf_error.c:90 +#, fuzzy +msgid "not a location list value" msgstr "ロケーションリスト値ではありません" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:91 msgid "no block data" msgstr "ブロックデータではありません" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:92 msgid "invalid line index" msgstr "不当な行索引" -#: libdw/dwarf_error.c:89 +#: libdw/dwarf_error.c:93 msgid "invalid address range index" msgstr "不当なアドレス範囲索引" -#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:94 libdwfl/libdwflP.h:72 msgid "no matching address range" msgstr "アドレス範囲に対応しません" -#: libdw/dwarf_error.c:91 +#: libdw/dwarf_error.c:95 msgid "no flag value" msgstr "フラグ値がありません" -#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:96 libelf/elf_error.c:236 msgid "invalid offset" msgstr "不当なオフセット" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:97 msgid ".debug_ranges section missing" msgstr ".debug_ranges セクションがありません" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:98 +#, fuzzy +msgid ".debug_rnglists section missing" +msgstr ".debug_ranges セクションがありません" + +#: libdw/dwarf_error.c:99 msgid "invalid CFI section" msgstr "不当な CFI セクション" -#: libdw/dwarf_error.c:95 +#: libdw/dwarf_error.c:100 msgid "no alternative debug link found" msgstr "" -#: libdw/dwarf_error.c:96 +#: libdw/dwarf_error.c:101 #, fuzzy msgid "invalid opcode" msgstr "不当なオペランド" -#: libdw/dwarf_error.c:97 +#: libdw/dwarf_error.c:102 msgid "not a CU (unit) DIE" msgstr "" -#: libdwfl/argp-std.c:46 src/stack.c:635 src/unstrip.c:2371 +#: libdw/dwarf_error.c:103 +#, fuzzy +msgid "unknown language code" +msgstr "不明な命令コード" + +#: libdw/dwarf_error.c:104 +#, fuzzy +msgid ".debug_addr section missing" +msgstr ".debug_ranges セクションがありません" + +#: libdwfl/argp-std.c:50 src/stack.c:639 src/unstrip.c:2374 msgid "Input selection options:" msgstr "選択オプションを入力してください:" -#: libdwfl/argp-std.c:47 +#: libdwfl/argp-std.c:51 msgid "Find addresses in FILE" msgstr "ふぁいる 中のアドレスを探す" -#: libdwfl/argp-std.c:49 +#: libdwfl/argp-std.c:53 msgid "Find addresses from signatures found in COREFILE" msgstr "COREFILE 中で見つかった署名からアドレスを探す" -#: libdwfl/argp-std.c:51 +#: libdwfl/argp-std.c:55 msgid "Find addresses in files mapped into process PID" msgstr "プロセス PID に対応するファイル中のアドレスを探す" -#: libdwfl/argp-std.c:53 +#: libdwfl/argp-std.c:57 msgid "" "Find addresses in files mapped as read from FILE in Linux /proc/PID/maps " "format" @@ -265,208 +317,208 @@ msgstr "" "Linux の /proc/PID/maps 形式の ふぁいる から読み込んだものに対応するファイル" "のアドレスを探す" -#: libdwfl/argp-std.c:55 +#: libdwfl/argp-std.c:59 msgid "Find addresses in the running kernel" msgstr "実行中のカーネルのアドレスを探す" -#: libdwfl/argp-std.c:57 +#: libdwfl/argp-std.c:61 msgid "Kernel with all modules" msgstr "全てのモジュール付きのカーネル" -#: libdwfl/argp-std.c:59 src/stack.c:642 +#: libdwfl/argp-std.c:63 src/stack.c:646 msgid "Search path for separate debuginfo files" msgstr "分離した debuginfo ファイルべきパスを探す" -#: libdwfl/argp-std.c:157 +#: libdwfl/argp-std.c:164 msgid "only one of -e, -p, -k, -K, or --core allowed" msgstr "-e か、-p、-k、-K、--core のひとつだけが認められます" -#: libdwfl/argp-std.c:230 +#: libdwfl/argp-std.c:237 msgid "cannot load kernel symbols" msgstr "カーネルシンボルをロードできません" #. Non-fatal to have no modules since we do have the kernel. -#: libdwfl/argp-std.c:234 +#: libdwfl/argp-std.c:241 msgid "cannot find kernel modules" msgstr "カーネルモジュールを見つけられません" -#: libdwfl/argp-std.c:251 +#: libdwfl/argp-std.c:258 msgid "cannot find kernel or modules" msgstr "カーネルかモジュールを見つけられません" -#: libdwfl/argp-std.c:290 +#: libdwfl/argp-std.c:297 #, c-format msgid "cannot read ELF core file: %s" msgstr "ELF コアファイルを読めません: %s" -#: libdwfl/argp-std.c:313 +#: libdwfl/argp-std.c:320 #, fuzzy msgid "Not enough memory" msgstr "メモリー不足" -#: libdwfl/argp-std.c:323 +#: libdwfl/argp-std.c:330 msgid "No modules recognized in core file" msgstr "コアファイルの中にモジュールを認識できません" -#: libdwfl/libdwflP.h:56 +#: libdwfl/libdwflP.h:53 msgid "See errno" msgstr "" -#: libdwfl/libdwflP.h:57 +#: libdwfl/libdwflP.h:54 msgid "See elf_errno" msgstr "" -#: libdwfl/libdwflP.h:58 +#: libdwfl/libdwflP.h:55 msgid "See dwarf_errno" msgstr "" -#: libdwfl/libdwflP.h:59 +#: libdwfl/libdwflP.h:56 msgid "See ebl_errno (XXX missing)" msgstr "" -#: libdwfl/libdwflP.h:60 +#: libdwfl/libdwflP.h:57 msgid "gzip decompression failed" msgstr "" -#: libdwfl/libdwflP.h:61 +#: libdwfl/libdwflP.h:58 msgid "bzip2 decompression failed" msgstr "" -#: libdwfl/libdwflP.h:62 +#: libdwfl/libdwflP.h:59 msgid "LZMA decompression failed" msgstr "" -#: libdwfl/libdwflP.h:63 +#: libdwfl/libdwflP.h:60 msgid "no support library found for machine" msgstr "" -#: libdwfl/libdwflP.h:64 +#: libdwfl/libdwflP.h:61 msgid "Callbacks missing for ET_REL file" msgstr "" -#: libdwfl/libdwflP.h:65 +#: libdwfl/libdwflP.h:62 msgid "Unsupported relocation type" msgstr "" -#: libdwfl/libdwflP.h:66 +#: libdwfl/libdwflP.h:63 msgid "r_offset is bogus" msgstr "" -#: libdwfl/libdwflP.h:67 libelf/elf_error.c:111 libelf/elf_error.c:171 +#: libdwfl/libdwflP.h:64 libelf/elf_error.c:115 libelf/elf_error.c:175 msgid "offset out of range" msgstr "オフセットが範囲を越えている" -#: libdwfl/libdwflP.h:68 +#: libdwfl/libdwflP.h:65 #, fuzzy msgid "relocation refers to undefined symbol" msgstr "定義されたシンボルの印刷サイズ" -#: libdwfl/libdwflP.h:69 +#: libdwfl/libdwflP.h:66 msgid "Callback returned failure" msgstr "" -#: libdwfl/libdwflP.h:70 +#: libdwfl/libdwflP.h:67 #, fuzzy msgid "No DWARF information found" msgstr "DWARF 情報がありません" -#: libdwfl/libdwflP.h:71 +#: libdwfl/libdwflP.h:68 msgid "No symbol table found" msgstr "" -#: libdwfl/libdwflP.h:72 +#: libdwfl/libdwflP.h:69 #, fuzzy msgid "No ELF program headers" msgstr "プログラムヘッダーを得られません: %s" -#: libdwfl/libdwflP.h:73 +#: libdwfl/libdwflP.h:70 msgid "address range overlaps an existing module" msgstr "" -#: libdwfl/libdwflP.h:76 +#: libdwfl/libdwflP.h:73 msgid "image truncated" msgstr "" -#: libdwfl/libdwflP.h:77 +#: libdwfl/libdwflP.h:74 #, fuzzy msgid "ELF file opened" msgstr "ファイルのオープンを追跡します。" -#: libdwfl/libdwflP.h:78 +#: libdwfl/libdwflP.h:75 #, fuzzy msgid "not a valid ELF file" msgstr "不当な ELF ファイル" -#: libdwfl/libdwflP.h:79 +#: libdwfl/libdwflP.h:76 #, fuzzy msgid "cannot handle DWARF type description" msgstr "Elf 記述子を生成できません: %s" -#: libdwfl/libdwflP.h:80 +#: libdwfl/libdwflP.h:77 msgid "ELF file does not match build ID" msgstr "" -#: libdwfl/libdwflP.h:81 +#: libdwfl/libdwflP.h:78 #, fuzzy msgid "corrupt .gnu.prelink_undo section data" msgstr "ラインデータセクションデータを得られません: %s" -#: libdwfl/libdwflP.h:82 +#: libdwfl/libdwflP.h:79 msgid "Internal error due to ebl" msgstr "" -#: libdwfl/libdwflP.h:83 +#: libdwfl/libdwflP.h:80 msgid "Missing data in core file" msgstr "" -#: libdwfl/libdwflP.h:84 +#: libdwfl/libdwflP.h:81 #, fuzzy msgid "Invalid register" msgstr "不当なパラメーター" -#: libdwfl/libdwflP.h:85 +#: libdwfl/libdwflP.h:82 msgid "Error reading process memory" msgstr "" -#: libdwfl/libdwflP.h:86 +#: libdwfl/libdwflP.h:83 msgid "Couldn't find architecture of any ELF" msgstr "" -#: libdwfl/libdwflP.h:87 +#: libdwfl/libdwflP.h:84 msgid "Error parsing /proc filesystem" msgstr "" -#: libdwfl/libdwflP.h:88 +#: libdwfl/libdwflP.h:85 #, fuzzy msgid "Invalid DWARF" msgstr "不当な DWARF" -#: libdwfl/libdwflP.h:89 +#: libdwfl/libdwflP.h:86 msgid "Unsupported DWARF" msgstr "" -#: libdwfl/libdwflP.h:90 +#: libdwfl/libdwflP.h:87 msgid "Unable to find more threads" msgstr "" -#: libdwfl/libdwflP.h:91 +#: libdwfl/libdwflP.h:88 msgid "Dwfl already has attached state" msgstr "" -#: libdwfl/libdwflP.h:92 +#: libdwfl/libdwflP.h:89 msgid "Dwfl has no attached state" msgstr "" -#: libdwfl/libdwflP.h:93 +#: libdwfl/libdwflP.h:90 msgid "Unwinding not supported for this architecture" msgstr "" -#: libdwfl/libdwflP.h:94 +#: libdwfl/libdwflP.h:91 #, fuzzy msgid "Invalid argument" msgstr "不当なパラメーター" -#: libdwfl/libdwflP.h:95 +#: libdwfl/libdwflP.h:92 #, fuzzy msgid "Not an ET_CORE ELF file" msgstr "不当な ELF ファイル" @@ -475,14 +527,14 @@ msgstr "不当な ELF ファイル" msgid "No backend" msgstr "バックエンドがありません" -#: libebl/eblcorenotetypename.c:99 libebl/eblobjnotetypename.c:76 +#: libebl/eblcorenotetypename.c:100 libebl/eblobjnotetypename.c:76 #: libebl/eblobjnotetypename.c:83 libebl/eblobjnotetypename.c:102 #: libebl/eblosabiname.c:73 libebl/eblsectionname.c:83 #: libebl/eblsectiontypename.c:115 libebl/eblsegmenttypename.c:79 msgid "" msgstr "<不明>" -#: libebl/ebldynamictagname.c:101 +#: libebl/ebldynamictagname.c:103 #, c-format msgid ": %#" msgstr "<不明>: %#" @@ -572,7 +624,7 @@ msgstr "ソース演算子の大きさが無効" msgid "invalid size of destination operand" msgstr "宛先演算子の大きさが無効" -#: libelf/elf_error.c:87 src/readelf.c:5112 +#: libelf/elf_error.c:87 src/readelf.c:6107 #, c-format msgid "invalid encoding" msgstr "無効なエンコード" @@ -582,498 +634,528 @@ msgid "invalid file descriptor" msgstr "不当なファイル記述子" #: libelf/elf_error.c:99 +#, fuzzy +msgid "invalid ELF file data" +msgstr "不当な ELF ファイル" + +#: libelf/elf_error.c:103 msgid "invalid operation" msgstr "不当な操作" -#: libelf/elf_error.c:103 +#: libelf/elf_error.c:107 msgid "ELF version not set" msgstr "ELF のバージョンが設定されていない" -#: libelf/elf_error.c:115 +#: libelf/elf_error.c:119 msgid "invalid fmag field in archive header" msgstr "アーカイブヘッダーの不当な fmag 領域" -#: libelf/elf_error.c:119 +#: libelf/elf_error.c:123 msgid "invalid archive file" msgstr "不当なアーカイブファイル" -#: libelf/elf_error.c:123 +#: libelf/elf_error.c:127 msgid "descriptor is not for an archive" msgstr "記述子はアーカイブ用ではありません" -#: libelf/elf_error.c:127 +#: libelf/elf_error.c:131 msgid "no index available" msgstr "索引が使えません" -#: libelf/elf_error.c:131 +#: libelf/elf_error.c:135 msgid "cannot read data from file" msgstr "ファイルからデータを読みません" -#: libelf/elf_error.c:135 +#: libelf/elf_error.c:139 msgid "cannot write data to file" msgstr "ファイルへデータを書けません" -#: libelf/elf_error.c:139 +#: libelf/elf_error.c:143 msgid "invalid binary class" msgstr "不当なバイナリークラス" -#: libelf/elf_error.c:143 +#: libelf/elf_error.c:147 msgid "invalid section index" msgstr "不当なセクション索引" -#: libelf/elf_error.c:147 +#: libelf/elf_error.c:151 msgid "invalid operand" msgstr "不当なオペランド" -#: libelf/elf_error.c:151 +#: libelf/elf_error.c:155 msgid "invalid section" msgstr "不当なセクション" -#: libelf/elf_error.c:159 +#: libelf/elf_error.c:163 msgid "executable header not created first" msgstr "エクゼキュータブルヘッダーが最初に作られていません" -#: libelf/elf_error.c:163 +#: libelf/elf_error.c:167 msgid "file descriptor disabled" msgstr "ファイル記述子が機能しません" -#: libelf/elf_error.c:167 +#: libelf/elf_error.c:171 #, fuzzy msgid "archive/member file descriptor mismatch" msgstr "アーカイブ/メンバー領域が不整合です" -#: libelf/elf_error.c:175 +#: libelf/elf_error.c:179 msgid "cannot manipulate null section" msgstr "null セクションを操作できません" -#: libelf/elf_error.c:179 +#: libelf/elf_error.c:183 msgid "data/scn mismatch" msgstr "データ/scnが不整合です" -#: libelf/elf_error.c:183 +#: libelf/elf_error.c:187 msgid "invalid section header" msgstr "不当なセクションヘッダー" -#: libelf/elf_error.c:187 src/readelf.c:7359 src/readelf.c:7807 -#: src/readelf.c:7908 src/readelf.c:8089 +#: libelf/elf_error.c:191 src/readelf.c:9742 src/readelf.c:10313 +#: src/readelf.c:10414 src/readelf.c:10595 #, c-format msgid "invalid data" msgstr "不当なデータ" -#: libelf/elf_error.c:191 +#: libelf/elf_error.c:195 msgid "unknown data encoding" msgstr "不明なデータエンコード" -#: libelf/elf_error.c:195 +#: libelf/elf_error.c:199 msgid "section `sh_size' too small for data" msgstr "`sh_size' セクションがデータには小さすぎます" -#: libelf/elf_error.c:199 +#: libelf/elf_error.c:203 msgid "invalid section alignment" msgstr "不当なセクション調整" -#: libelf/elf_error.c:203 +#: libelf/elf_error.c:207 msgid "invalid section entry size" msgstr "不当なセクション項目の大きさ" -#: libelf/elf_error.c:207 +#: libelf/elf_error.c:211 msgid "update() for write on read-only file" msgstr "読込み専用ファイルでの書込みのための update()" -#: libelf/elf_error.c:211 +#: libelf/elf_error.c:215 msgid "no such file" msgstr "そのようなファイルはありません" -#: libelf/elf_error.c:215 +#: libelf/elf_error.c:219 msgid "only relocatable files can contain section groups" msgstr "リロケータブルファイルのみセクショングループを含むことができます" -#: libelf/elf_error.c:220 +#: libelf/elf_error.c:224 msgid "" "program header only allowed in executables, shared objects, and core files" msgstr "" "プログラムヘッダーはエクゼキュータブルか、共用オブジェクト、コアファイルにの" "み認められています" -#: libelf/elf_error.c:227 +#: libelf/elf_error.c:231 msgid "file has no program header" msgstr "ファイルにプログラムヘッダーがありません" -#: libelf/elf_error.c:237 +#: libelf/elf_error.c:241 #, fuzzy msgid "invalid section type" msgstr "不当なセクション" -#: libelf/elf_error.c:242 +#: libelf/elf_error.c:246 #, fuzzy msgid "invalid section flags" msgstr "不当なセクション" -#: libelf/elf_error.c:247 +#: libelf/elf_error.c:251 #, fuzzy msgid "section does not contain compressed data" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: libelf/elf_error.c:252 +#: libelf/elf_error.c:256 msgid "section contains compressed data" msgstr "" -#: libelf/elf_error.c:257 +#: libelf/elf_error.c:261 #, fuzzy msgid "unknown compression type" msgstr "不明なタイプ" -#: libelf/elf_error.c:262 +#: libelf/elf_error.c:266 #, fuzzy msgid "cannot compress data" msgstr "セクションデータを割り当てられません: %s" -#: libelf/elf_error.c:267 +#: libelf/elf_error.c:271 #, fuzzy msgid "cannot decompress data" msgstr "セクションデータを割り当てられません: %s" -#: src/addr2line.c:57 +#: src/addr2line.c:58 #, fuzzy msgid "Input format options:" msgstr "選択オプションを入力してください:" -#: src/addr2line.c:59 +#: src/addr2line.c:60 msgid "Treat addresses as offsets relative to NAME section." msgstr "" -#: src/addr2line.c:61 +#: src/addr2line.c:62 #, fuzzy msgid "Output format options:" msgstr "出力形式:" -#: src/addr2line.c:62 +#: src/addr2line.c:63 msgid "Print address before each entry" msgstr "" -#: src/addr2line.c:63 +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "" -#: src/addr2line.c:65 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "" -#: src/addr2line.c:66 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "" -#: src/addr2line.c:67 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "" -#: src/addr2line.c:68 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "" -#: src/addr2line.c:69 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "" -#: src/addr2line.c:71 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." msgstr "" -#: src/addr2line.c:74 +#: src/addr2line.c:75 msgid "Show demangled symbols (ARG is always ignored)" msgstr "" -#: src/addr2line.c:76 +#: src/addr2line.c:77 msgid "Print all information on one line, and indent inlines" msgstr "" -#: src/addr2line.c:78 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:99 -#: src/strings.c:78 +#: src/addr2line.c:79 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:101 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "雑則:" #. Short description of program. -#: src/addr2line.c:86 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" #. Strings for arguments in help texts. -#: src/addr2line.c:90 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "" -#: src/addr2line.c:518 +#: src/addr2line.c:520 #, c-format msgid "Section syntax requires exactly one module" msgstr "" -#: src/addr2line.c:541 +#: src/addr2line.c:543 #, c-format msgid "offset %# lies outside section '%s'" msgstr "" -#: src/addr2line.c:631 +#: src/addr2line.c:633 #, c-format msgid "cannot find symbol '%s'" msgstr "" -#: src/addr2line.c:636 +#: src/addr2line.c:638 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "" -#: src/ar.c:67 +#: src/ar.c:68 msgid "Commands:" msgstr "コマンド:" -#: src/ar.c:68 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "アーカイブからファイルを削除。" -#: src/ar.c:69 +#: src/ar.c:70 msgid "Move files in archive." msgstr "アーカイブ内のファイルを移動。" -#: src/ar.c:70 +#: src/ar.c:71 msgid "Print files in archive." msgstr "アーカイブ内のファイルを印刷。" -#: src/ar.c:71 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "アーカイブへの即座のファイル追加。" -#: src/ar.c:73 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "アーカイブへの既存のファイルの置き換えか、新しいファイルの挿入。" -#: src/ar.c:74 +#: src/ar.c:75 msgid "Display content of archive." msgstr "アーカイブの内容の表示" -#: src/ar.c:75 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "アーカイブからのファイルの取出し" -#: src/ar.c:77 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "コマンド修飾子:" -#: src/ar.c:78 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "元データの保存。" -#: src/ar.c:79 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "名前のインスタンス [COUNT] の使用。" -#: src/ar.c:81 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "既存のファイルを抽出したファイルで置き換えない。" -#: src/ar.c:82 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "必要ならばファイル名の切り捨てを認める。" -#: src/ar.c:84 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "饒舌な出力を提供する。" -#: src/ar.c:85 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "シンボルテーブルの再生成を強制する。" -#: src/ar.c:86 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "[MEMBER]の後にファイルを挿入する。" -#: src/ar.c:87 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "[MEMBER]の前にファイルを挿入する。" -#: src/ar.c:88 +#: src/ar.c:89 msgid "Same as -b." msgstr "-b と同じ。" -#: src/ar.c:89 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "ライブラリーを生成しなければならない時にメッセージを抑止する。" -#: src/ar.c:91 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "ファイル照合にフルパスを使う。" -#: src/ar.c:92 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "アーカイブの古いファイルのみ更新する。" #. Short description of program. -#: src/ar.c:98 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "アーカイブから作成や、修正、抽出する。" #. Strings for arguments in help texts. -#: src/ar.c:101 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[メンバー] [合計] アーカイブ [ファイル...]" -#: src/ar.c:180 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "'a'や、'b'、'i'は、'm' や 'r' オプションと一緒にしか指定できません" -#: src/ar.c:185 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "'a'や、'b'、'i' 修飾子には MEMBER パラメーターが必要です" -#: src/ar.c:201 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "'N' は 'x' や 'd' オプションと一緒の時のみ意味を持ちます" -#: src/ar.c:206 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "COUNT パラメーターが必要です" -#: src/ar.c:218 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "不当な COUNT パラメーター %s" -#: src/ar.c:225 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "'%c' は 'x' オプションと一緒の時のみ意味を持ちます" -#: src/ar.c:231 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "アーカイブ名が必要です" -#: src/ar.c:244 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "" -#: src/ar.c:295 +#: src/ar.c:296 #, c-format msgid "More than one operation specified" msgstr "1つを越える操作が指定されました" -#: src/ar.c:389 +#: src/ar.c:390 #, c-format msgid "cannot open archive '%s'" msgstr "アーカイブ '%s' を開くことができません" -#: src/ar.c:399 +#: src/ar.c:400 #, c-format msgid "cannot open archive '%s': %s" msgstr "アーカイブ '%s' を開けません: %s" -#: src/ar.c:403 +#: src/ar.c:404 #, c-format msgid "%s: not an archive file" msgstr "%s: アーカイブファイルではありません" -#: src/ar.c:407 +#: src/ar.c:408 #, c-format msgid "cannot stat archive '%s'" msgstr "アーカイブに stat できません: '%s'" -#: src/ar.c:419 +#: src/ar.c:420 #, c-format msgid "no entry %s in archive\n" msgstr "アーカイブに項目 %s がありません\n" -#: src/ar.c:472 src/ar.c:917 src/ar.c:1117 +#: src/ar.c:473 src/ar.c:918 src/ar.c:1122 #, c-format msgid "cannot create hash table" msgstr "ハッシュテーブルを生成できません" -#: src/ar.c:479 src/ar.c:924 src/ar.c:1126 +#: src/ar.c:480 src/ar.c:925 src/ar.c:1131 #, c-format msgid "cannot insert into hash table" msgstr "ハッシュに挿入できません" -#: src/ar.c:487 src/ranlib.c:148 +#: src/ar.c:488 src/ranlib.c:149 #, c-format msgid "cannot stat '%s'" msgstr "'%s' に stat できません" -#: src/ar.c:583 +#: src/ar.c:584 #, c-format msgid "cannot read content of %s: %s" msgstr "%s の内容を読むことができません: %s" -#: src/ar.c:626 +#: src/ar.c:627 #, c-format msgid "cannot open %.*s" msgstr "%.*s を開けません" -#: src/ar.c:648 +#: src/ar.c:649 #, c-format msgid "failed to write %s" msgstr "%s への書込みに失敗しました" -#: src/ar.c:660 +#: src/ar.c:661 #, c-format msgid "cannot change mode of %s" msgstr "%s のモードを変更できません" -#: src/ar.c:676 +#: src/ar.c:677 #, c-format msgid "cannot change modification time of %s" msgstr "%s の更新時間を変更できません" -#: src/ar.c:722 +#: src/ar.c:723 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "一時ファイルを %.*s に名前変更できません" -#: src/ar.c:758 src/ar.c:1009 src/ar.c:1408 src/ranlib.c:222 +#: src/ar.c:759 src/ar.c:1010 src/ar.c:1411 src/ranlib.c:223 #, c-format msgid "cannot create new file" msgstr "新しいファイルを生成できません" -#: src/ar.c:1208 +#: src/ar.c:1213 #, c-format msgid "position member %s not found" msgstr "位置メンバー %s が見つかりません" -#: src/ar.c:1218 +#: src/ar.c:1223 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: 項目 %s がアーカイブにありません!\n" -#: src/ar.c:1247 src/objdump.c:240 +#: src/ar.c:1252 src/objdump.c:242 #, c-format msgid "cannot open %s" msgstr "%s を開けません" -#: src/ar.c:1252 +#: src/ar.c:1257 #, c-format msgid "cannot stat %s" msgstr "%s を stat できません" -#: src/ar.c:1258 +#: src/ar.c:1263 #, c-format msgid "%s is no regular file" msgstr "%s は一般ファイルではありません" -#: src/ar.c:1271 +#: src/ar.c:1276 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "%s の ELF 記述子を得られません: %s\n" -#: src/ar.c:1291 +#: src/ar.c:1296 #, c-format msgid "cannot read %s: %s" msgstr "%s を読みません: %s" +#: src/ar.c:1471 +#, fuzzy, c-format +msgid "cannot represent ar_date" +msgstr "セクションデータを割り当てられません: %s" + +#: src/ar.c:1477 +#, fuzzy, c-format +msgid "cannot represent ar_uid" +msgstr "セクションデータを割り当てられません: %s" + +#: src/ar.c:1483 +#, fuzzy, c-format +msgid "cannot represent ar_gid" +msgstr "セクションデータを割り当てられません: %s" + +#: src/ar.c:1489 +#, fuzzy, c-format +msgid "cannot represent ar_mode" +msgstr "セクションを得られません: %s" + +#: src/ar.c:1495 +#, fuzzy, c-format +msgid "cannot represent ar_size" +msgstr "%s を開けません" + #: src/arlib-argp.c:32 msgid "Use zero for uid, gid, and date in archive members." msgstr "" @@ -1205,120 +1287,120 @@ msgstr "" msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "" -#: src/elfcmp.c:427 src/elfcmp.c:496 +#: src/elfcmp.c:428 src/elfcmp.c:498 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "" -#: src/elfcmp.c:435 +#: src/elfcmp.c:436 #, fuzzy, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "セクション [%Zu] '%s' からデータが得られません: %s" -#: src/elfcmp.c:445 +#: src/elfcmp.c:447 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "" -#: src/elfcmp.c:453 +#: src/elfcmp.c:455 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "" -#: src/elfcmp.c:468 +#: src/elfcmp.c:470 #, c-format msgid "%s %s differ: build ID length" msgstr "" -#: src/elfcmp.c:476 +#: src/elfcmp.c:478 #, c-format msgid "%s %s differ: build ID content" msgstr "" -#: src/elfcmp.c:485 +#: src/elfcmp.c:487 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "" -#: src/elfcmp.c:526 +#: src/elfcmp.c:528 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "" -#: src/elfcmp.c:530 +#: src/elfcmp.c:532 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "" -#: src/elfcmp.c:545 +#: src/elfcmp.c:547 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "" -#: src/elfcmp.c:578 src/elfcmp.c:583 +#: src/elfcmp.c:580 src/elfcmp.c:585 #, c-format msgid "cannot load data of '%s': %s" msgstr "" -#: src/elfcmp.c:602 src/elfcmp.c:608 +#: src/elfcmp.c:604 src/elfcmp.c:610 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "" -#: src/elfcmp.c:614 +#: src/elfcmp.c:616 #, c-format msgid "%s %s differ: program header %d" msgstr "" -#: src/elfcmp.c:638 +#: src/elfcmp.c:640 #, c-format msgid "%s %s differ: gap" msgstr "" -#: src/elfcmp.c:689 +#: src/elfcmp.c:691 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "" -#: src/elfcmp.c:717 src/findtextrel.c:206 src/nm.c:363 src/ranlib.c:141 -#: src/size.c:273 src/strings.c:185 src/strip.c:452 src/strip.c:489 -#: src/unstrip.c:2020 src/unstrip.c:2049 +#: src/elfcmp.c:719 src/findtextrel.c:206 src/nm.c:365 src/ranlib.c:142 +#: src/size.c:273 src/strings.c:186 src/strip.c:518 src/strip.c:555 +#: src/unstrip.c:2023 src/unstrip.c:2052 #, c-format msgid "cannot open '%s'" msgstr "'%s' を開けません" -#: src/elfcmp.c:721 src/findtextrel.c:213 src/ranlib.c:158 +#: src/elfcmp.c:723 src/findtextrel.c:213 src/ranlib.c:159 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "" -#: src/elfcmp.c:726 +#: src/elfcmp.c:728 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "" -#: src/elfcmp.c:744 src/findtextrel.c:394 +#: src/elfcmp.c:746 src/findtextrel.c:394 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "" -#: src/elfcmp.c:754 +#: src/elfcmp.c:756 #, c-format msgid "cannot get content of section %zu: %s" msgstr "" -#: src/elfcmp.c:764 src/elfcmp.c:778 +#: src/elfcmp.c:766 src/elfcmp.c:780 #, c-format msgid "cannot get relocation: %s" msgstr "" -#: src/elfcompress.c:115 src/strip.c:240 src/unstrip.c:121 +#: src/elfcompress.c:115 src/strip.c:297 src/unstrip.c:121 #, c-format msgid "-o option specified twice" msgstr "-o オプションが 2 回指定されています" #: src/elfcompress.c:122 -#, fuzzy +#, fuzzy, c-format msgid "-t option specified twice" msgstr "-f オプションが 2 回指定されています" @@ -1329,12 +1411,12 @@ msgstr "不明なタイプ" #. We need at least one input file. #: src/elfcompress.c:143 src/elfcompress.c:1305 -#, fuzzy +#, fuzzy, c-format msgid "No input file given" msgstr "入力ファイルが空です" #: src/elfcompress.c:149 src/elfcompress.c:1310 -#, fuzzy +#, fuzzy, c-format msgid "Only one input file allowed together with '-o'" msgstr "'-o' と '-f' と一緒の場合は入力ファイルは 1 つしか認められません" @@ -1364,7 +1446,7 @@ msgstr "" msgid "Force compression of section even if it would become larger" msgstr "" -#: src/elfcompress.c:1282 src/strip.c:87 +#: src/elfcompress.c:1282 src/strip.c:91 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "少し壊れた ELF ファイルを取り扱うためにルールを少し緩和する" @@ -1374,7 +1456,7 @@ msgid "Be silent when a section cannot be compressed" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" #. Strings for arguments in help texts. -#: src/elfcompress.c:1294 src/elflint.c:77 src/readelf.c:126 +#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154 msgid "FILE..." msgstr "ふぁいる..." @@ -1382,19 +1464,19 @@ msgstr "ふぁいる..." msgid "Compress or decompress sections in an ELF file." msgstr "" -#: src/elflint.c:63 +#: src/elflint.c:64 msgid "Be extremely strict, flag level 2 features." msgstr "非常に厳密にやってください、フラグレベル 2 機能。" -#: src/elflint.c:64 +#: src/elflint.c:65 msgid "Do not print anything if successful" msgstr "成功したら何も印刷しない" -#: src/elflint.c:65 +#: src/elflint.c:66 msgid "Binary is a separate debuginfo file" msgstr "バイナリーは別の debuginfo ファイルです" -#: src/elflint.c:67 +#: src/elflint.c:68 msgid "" "Binary has been created with GNU ld and is therefore known to be broken in " "certain ways" @@ -1402,161 +1484,171 @@ msgstr "" "バイナリーは GNU ld で作成され、従ってある方法で壊れているのが知られている" #. Short description of program. -#: src/elflint.c:73 +#: src/elflint.c:74 msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "ELF ファイルが gABI/psABI 仕様へ準拠しているかの厳密なチェック。" -#: src/elflint.c:154 src/readelf.c:301 +#: src/elflint.c:155 src/readelf.c:347 #, c-format msgid "cannot open input file" msgstr "入力ファイルを開けません" -#: src/elflint.c:161 +#: src/elflint.c:162 #, c-format msgid "cannot generate Elf descriptor: %s\n" msgstr "Elf 記述子を生成できません: %s\n" -#: src/elflint.c:180 +#: src/elflint.c:181 #, c-format msgid "error while closing Elf descriptor: %s\n" msgstr "Elf 記述子を閉じている時にエラー: %s\n" -#: src/elflint.c:184 +#: src/elflint.c:185 msgid "No errors" msgstr "エラーはありません" -#: src/elflint.c:219 src/readelf.c:478 +#: src/elflint.c:220 src/readelf.c:546 msgid "Missing file name.\n" msgstr "ファイル名がありません。\n" -#: src/elflint.c:284 +#: src/elflint.c:285 #, c-format msgid " error while freeing sub-ELF descriptor: %s\n" msgstr "副-ELF 記述子を解放している時にエラー: %s\n" #. We cannot do anything. -#: src/elflint.c:292 +#: src/elflint.c:293 #, c-format msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "ELF ファイルではありません - 最初に誤ったマジックバイトがあります\n" -#: src/elflint.c:357 +#: src/elflint.c:358 #, c-format msgid "e_ident[%d] == %d is no known class\n" msgstr "e_ident[%d] == %d は既知のクラスではありません\n" -#: src/elflint.c:362 +#: src/elflint.c:363 #, c-format msgid "e_ident[%d] == %d is no known data encoding\n" msgstr "e_ident[%d] == %d は既知のデータエンコードではありません\n" -#: src/elflint.c:366 +#: src/elflint.c:367 #, c-format msgid "unknown ELF header version number e_ident[%d] == %d\n" msgstr "不明な ELF ヘッダーバージョン数 e_ident[%d] == %d\n" -#: src/elflint.c:374 +#: src/elflint.c:375 #, c-format msgid "unsupported OS ABI e_ident[%d] == '%s'\n" msgstr "不明な OS ABI e_ident[%d] == '%s'\n" -#: src/elflint.c:380 -#, c-format -msgid "unsupport ABI version e_ident[%d] == %d\n" +#: src/elflint.c:381 +#, fuzzy, c-format +msgid "unsupported ABI version e_ident[%d] == %d\n" msgstr "不明な ABI バージョン e_ident[%d] == %d\n" -#: src/elflint.c:385 +#: src/elflint.c:386 #, c-format msgid "e_ident[%zu] is not zero\n" msgstr "e_ident[%zu] がゼロではありません\n" -#: src/elflint.c:390 +#: src/elflint.c:391 #, c-format msgid "unknown object file type %d\n" msgstr "不明なオブジェクトファイルタイプ %d\n" -#: src/elflint.c:397 +#: src/elflint.c:398 #, c-format msgid "unknown machine type %d\n" msgstr "不明なマシンタイプ %d\n" -#: src/elflint.c:401 +#: src/elflint.c:402 #, c-format msgid "unknown object file version\n" msgstr "不明なオブジェクトファイルバージョン\n" -#: src/elflint.c:407 +#: src/elflint.c:408 #, c-format msgid "invalid program header offset\n" msgstr "不当なプログラムヘッダーオフセット\n" -#: src/elflint.c:409 +#: src/elflint.c:410 #, c-format msgid "executables and DSOs cannot have zero program header offset\n" msgstr "" "実行ファイルと DSO はプログラムヘッダーオフセットが 0 であってはいけません\n" -#: src/elflint.c:413 +#: src/elflint.c:414 #, c-format msgid "invalid number of program header entries\n" msgstr "プログラムヘッダー項目数として不当な数\n" -#: src/elflint.c:421 +#: src/elflint.c:422 #, c-format msgid "invalid section header table offset\n" msgstr "不当なセクションヘッダーテーブルオフセット\n" -#: src/elflint.c:424 +#: src/elflint.c:425 #, c-format msgid "section header table must be present\n" msgstr "セクションヘッダーテーブルがなければなりません\n" -#: src/elflint.c:438 +#: src/elflint.c:439 #, c-format msgid "invalid number of section header table entries\n" msgstr "セクションヘッダーテーブル項目数として不当な数\n" -#: src/elflint.c:455 +#: src/elflint.c:456 #, c-format msgid "invalid section header index\n" msgstr "不当なセクションヘッダーインデックス\n" -#: src/elflint.c:469 +#: src/elflint.c:474 +#, c-format +msgid "Can only check %u headers, shnum was %u\n" +msgstr "" + +#: src/elflint.c:488 #, fuzzy, c-format msgid "invalid number of program header table entries\n" msgstr "プログラムヘッダー項目数として不当な数\n" -#: src/elflint.c:478 +#: src/elflint.c:505 +#, c-format +msgid "Can only check %u headers, phnum was %u\n" +msgstr "" + +#: src/elflint.c:510 #, c-format msgid "invalid machine flags: %s\n" msgstr "不当なマシンフラグ: %s\n" -#: src/elflint.c:485 src/elflint.c:502 +#: src/elflint.c:517 src/elflint.c:534 #, c-format msgid "invalid ELF header size: %hd\n" msgstr "不当な ELF ヘッダーサイズ: %hd\n" -#: src/elflint.c:488 src/elflint.c:505 +#: src/elflint.c:520 src/elflint.c:537 #, c-format msgid "invalid program header size: %hd\n" msgstr "不当なプログラムヘッダーサイズ: %hd\n" -#: src/elflint.c:491 src/elflint.c:508 +#: src/elflint.c:523 src/elflint.c:540 #, c-format msgid "invalid program header position or size\n" msgstr "不当なプログラムヘッダー位置かサイズ\n" -#: src/elflint.c:494 src/elflint.c:511 +#: src/elflint.c:526 src/elflint.c:543 #, c-format msgid "invalid section header size: %hd\n" msgstr "不当なセクションヘッダーサイズ: %hd\n" -#: src/elflint.c:497 src/elflint.c:514 +#: src/elflint.c:529 src/elflint.c:546 #, c-format msgid "invalid section header position or size\n" msgstr "不当なセクションヘッダー位置かサイズ\n" -#: src/elflint.c:559 +#: src/elflint.c:591 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1565,7 +1657,7 @@ msgstr "" "セクション [%2d] '%s': SHF_GROUP フラグのあるセクションにセクショングループの" "一部分が設定されていません\n" -#: src/elflint.c:563 +#: src/elflint.c:595 #, fuzzy, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" @@ -1573,14 +1665,14 @@ msgstr "" "セクション [%2d] '%s': セクショングループ [%2zu] '%s' がグループメンバーを継" "続していません\n" -#: src/elflint.c:579 src/elflint.c:1463 src/elflint.c:1514 src/elflint.c:1620 -#: src/elflint.c:1956 src/elflint.c:2272 src/elflint.c:2886 src/elflint.c:3049 -#: src/elflint.c:3197 src/elflint.c:3387 src/elflint.c:4355 +#: src/elflint.c:611 src/elflint.c:1495 src/elflint.c:1546 src/elflint.c:1652 +#: src/elflint.c:1988 src/elflint.c:2311 src/elflint.c:2930 src/elflint.c:3093 +#: src/elflint.c:3241 src/elflint.c:3431 src/elflint.c:4399 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:592 src/elflint.c:1627 +#: src/elflint.c:624 src/elflint.c:1659 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1589,7 +1681,7 @@ msgstr "" "セクション [%2d] '%s': セクション [%2d] '%s' 用の文字列テーブルとして参照され" "ていますが、タイプが SHT_STRTAB ではありません\n" -#: src/elflint.c:615 +#: src/elflint.c:647 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1598,38 +1690,38 @@ msgstr "" "セクション [%2d] '%s': シンボルテーブルは 1 個を越える拡張インデックスセク" "ションを持てません\n" -#: src/elflint.c:627 +#: src/elflint.c:659 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "セクション [%2u] '%s': 項目サイズが ElfXX_Sym と一致しません\n" -#: src/elflint.c:636 +#: src/elflint.c:668 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "セクション [%2d] '%s': シンボル %d を得られません: %s\n" -#: src/elflint.c:641 src/elflint.c:644 src/elflint.c:647 src/elflint.c:650 -#: src/elflint.c:653 src/elflint.c:656 +#: src/elflint.c:673 src/elflint.c:676 src/elflint.c:679 src/elflint.c:682 +#: src/elflint.c:685 src/elflint.c:688 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "セクション [%2d] '%s': 0番目の項目にある '%s' ゼロではありません\n" -#: src/elflint.c:659 +#: src/elflint.c:691 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "セクション [%2d] '%s': 0番目の項目用の XINDEX がゼロではありません\n" -#: src/elflint.c:669 +#: src/elflint.c:701 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "セクション [%2d] '%s': シンボル %zu を得られません: %s\n" -#: src/elflint.c:678 +#: src/elflint.c:710 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不当な名前の値\n" -#: src/elflint.c:693 +#: src/elflint.c:725 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1638,7 +1730,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 大きすぎるセクションインデックスだが、拡" "張セクションインデックスセクションがありません\n" -#: src/elflint.c:699 +#: src/elflint.c:731 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1648,29 +1740,29 @@ msgstr "" "クス用に使われる XINDEX\n" #. || sym->st_shndx > SHN_HIRESERVE always false -#: src/elflint.c:711 +#: src/elflint.c:743 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不当なセクションインデックス\n" -#: src/elflint.c:719 +#: src/elflint.c:751 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不明なタイプ\n" -#: src/elflint.c:725 +#: src/elflint.c:757 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "セクション [%2d] '%s': シンボル %zu: 不明なシンボルバインディング\n" -#: src/elflint.c:730 +#: src/elflint.c:762 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" "セクション [%2d] '%s': シンボル %zu: オブジェクトタイプと異なる固有のシンボ" "ル\n" -#: src/elflint.c:738 +#: src/elflint.c:770 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" @@ -1678,14 +1770,14 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: COMMON はリロケータブルファイル内のみで" "許されます\n" -#: src/elflint.c:742 +#: src/elflint.c:774 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" "セクション [%2d] '%s': シンボル %zu: ローカルな COMMON シンボルは意味がありま" "せん\n" -#: src/elflint.c:746 +#: src/elflint.c:778 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" @@ -1693,12 +1785,12 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: COMMON セクションの機能は意味がありませ" "ん\n" -#: src/elflint.c:797 +#: src/elflint.c:829 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "セクション [%2d] '%s': シンボル %zu: st_value 境界外\n" -#: src/elflint.c:803 src/elflint.c:828 src/elflint.c:877 +#: src/elflint.c:835 src/elflint.c:860 src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1707,7 +1799,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu は参照されるセクション [%2d] '%s' とは完" "全に一致しません\n" -#: src/elflint.c:812 +#: src/elflint.c:844 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1716,7 +1808,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 参照されるセクション [%2d] '%s' は " "SHF_TLS フラグが設定されていません\n" -#: src/elflint.c:822 src/elflint.c:870 +#: src/elflint.c:854 src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1725,7 +1817,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: st_value 参照されるセクション [%2d] " "'%s' の境界外\n" -#: src/elflint.c:849 +#: src/elflint.c:881 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" @@ -1733,7 +1825,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: TLS プログラムヘッダー項目がない TLS シ" "ンボル\n" -#: src/elflint.c:855 +#: src/elflint.c:887 #, fuzzy, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " @@ -1742,7 +1834,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: TLS プログラムヘッダー項目がない TLS シ" "ンボル\n" -#: src/elflint.c:863 +#: src/elflint.c:895 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1751,7 +1843,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 参照されるセクション [%2d] '%s' の" "st_value 不足\n" -#: src/elflint.c:890 +#: src/elflint.c:922 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1760,7 +1852,7 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: sh_info に記述された範囲外のローカルシン" "ボル\n" -#: src/elflint.c:897 +#: src/elflint.c:929 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1769,12 +1861,12 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: sh_info に記述された範囲外の非ローカルシ" "ンボル\n" -#: src/elflint.c:904 +#: src/elflint.c:936 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "セクション [%2d] '%s': シンボル %zu: 非ローカルセクションシンボル\n" -#: src/elflint.c:954 +#: src/elflint.c:986 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1783,7 +1875,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボルが間違ったセクション " "[%2d] を参照しています\n" -#: src/elflint.c:961 +#: src/elflint.c:993 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1795,7 +1887,7 @@ msgstr "" #. This test is more strict than the psABIs which #. usually allow the symbol to be in the middle of #. the .got section, allowing negative offsets. -#: src/elflint.c:977 +#: src/elflint.c:1009 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1804,7 +1896,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボル値 %# は %s のセ" "クションアドレス %# と一致しません\n" -#: src/elflint.c:984 +#: src/elflint.c:1016 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1813,7 +1905,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボルサイズ % は %s " "のセクションサイズ % と一致しません\n" -#: src/elflint.c:992 +#: src/elflint.c:1024 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1822,7 +1914,7 @@ msgstr "" "セクション [%2d] '%s': _GLOBAL_OFFSET_TABLE_ シンボルはありますが、.got セク" "ションがありません\n" -#: src/elflint.c:1008 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1831,7 +1923,7 @@ msgstr "" "セクション [%2d] '%s': _DYNAMIC_ シンボル値 %# は動的セグメントアドレ" "ス %# と一致しません\n" -#: src/elflint.c:1015 +#: src/elflint.c:1047 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1840,7 +1932,7 @@ msgstr "" "セクション [%2d] '%s': _DYNAMIC シンボルサイズ % は動的セグメントサイ" "ズ % と一致しません\n" -#: src/elflint.c:1028 +#: src/elflint.c:1060 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1849,29 +1941,29 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 省略以外の可視性を持った動的シンボルテー" "ブル中のシンボル\n" -#: src/elflint.c:1032 +#: src/elflint.c:1064 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "" "セクション [%2d] '%s': シンボル %zu: st_other 中に設定された不明なビット\n" -#: src/elflint.c:1070 +#: src/elflint.c:1102 #, fuzzy, c-format msgid "section [%2d] '%s': cannot get section data.\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:1086 +#: src/elflint.c:1118 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "セクション [%2d] '%s': この RELA セクション用に使われる DT_RELCOUNT\n" -#: src/elflint.c:1097 src/elflint.c:1150 +#: src/elflint.c:1129 src/elflint.c:1182 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" "セクション [%2d] '%s': このセクション用には高すぎる DT_RELCOUNT 値 %d\n" -#: src/elflint.c:1122 src/elflint.c:1175 +#: src/elflint.c:1154 src/elflint.c:1207 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1880,7 +1972,7 @@ msgstr "" "セクション [%2d] '%s': UT_RELOCOUNT で指定されたインデックス %d 後の相対リロ" "ケーション\n" -#: src/elflint.c:1128 src/elflint.c:1181 +#: src/elflint.c:1160 src/elflint.c:1213 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1889,52 +1981,52 @@ msgstr "" "セクション [%2d] '%s': インデックス %zu での非相対リロケーション; %d 相対リ" "ロケーションで指定された DT_RELCOUNT\n" -#: src/elflint.c:1140 +#: src/elflint.c:1172 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "セクション [%2d] '%s': この REL セクション用に使われる DT_RELACOUNT\n" -#: src/elflint.c:1223 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "セクション [%2d] '%s': 不当な宛先セクションインデックス\n" -#: src/elflint.c:1235 +#: src/elflint.c:1267 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "セクション [%2d] '%s': 不当な宛先セクションタイプ\n" -#: src/elflint.c:1243 +#: src/elflint.c:1275 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "セクション [%2d] '%s': sh_info はゼロでなければなりません\n" -#: src/elflint.c:1251 +#: src/elflint.c:1283 #, fuzzy, c-format msgid "" "section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" "セクション [%2d] '%s': マージできるセクションのリロケーションは不可能です\n" -#: src/elflint.c:1259 +#: src/elflint.c:1291 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" "セクション [%2d] '%s': セクション項目サイズが ElfXX_Rela と一致しません\n" -#: src/elflint.c:1319 +#: src/elflint.c:1351 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" "テキストリロケーションフラグが設定されていますが、読込み専用セグメントがあり" "ません\n" -#: src/elflint.c:1346 +#: src/elflint.c:1378 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "セクション [%2d] '%s': リロケーション %zu: 不当なタイプ\n" -#: src/elflint.c:1354 +#: src/elflint.c:1386 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1943,13 +2035,13 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: このファイル用のリロケーションタイ" "プは不当です\n" -#: src/elflint.c:1362 +#: src/elflint.c:1394 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "" "セクション [%2d] '%s': リロケーション %zu: 不当なシンボルインデックス\n" -#: src/elflint.c:1380 +#: src/elflint.c:1412 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1958,12 +2050,12 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: シンボル '_GLOBAL_OFFSET_TABLE_' " "のみが %s と一緒に使用できます\n" -#: src/elflint.c:1397 +#: src/elflint.c:1429 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "セクション [%2d] '%s': リロケーション %zu: オフセット境界外\n" -#: src/elflint.c:1412 +#: src/elflint.c:1444 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1972,7 +2064,7 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: タイプ %s のシンボルに対するコピー" "リロケーション\n" -#: src/elflint.c:1433 +#: src/elflint.c:1465 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1981,24 +2073,24 @@ msgstr "" "セクション [%2d] '%s': リロケーション %zu: 読込み専用セクションが変更されまし" "たが、テキストリロケーションフラグが設定されていません\n" -#: src/elflint.c:1448 +#: src/elflint.c:1480 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" "セクション [%2d] '%s': リロケーションがロードされたデータとロードされなかった" "データに対してです\n" -#: src/elflint.c:1488 src/elflint.c:1539 +#: src/elflint.c:1520 src/elflint.c:1571 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "" -#: src/elflint.c:1615 +#: src/elflint.c:1647 #, c-format msgid "more than one dynamic section present\n" msgstr "" -#: src/elflint.c:1633 +#: src/elflint.c:1665 #, fuzzy, c-format msgid "" "section [%2d]: referenced as string table for section [%2d] '%s' but section " @@ -2007,427 +2099,427 @@ msgstr "" "セクション [%2d] '%s': セクション [%2d] '%s' 用の文字列テーブルとして参照され" "ていますが、タイプが SHT_STRTAB ではありません\n" -#: src/elflint.c:1641 +#: src/elflint.c:1673 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" -#: src/elflint.c:1646 src/elflint.c:1935 +#: src/elflint.c:1678 src/elflint.c:1967 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "" -#: src/elflint.c:1656 +#: src/elflint.c:1688 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" -#: src/elflint.c:1664 +#: src/elflint.c:1696 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "" -#: src/elflint.c:1671 +#: src/elflint.c:1703 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "" -#: src/elflint.c:1682 +#: src/elflint.c:1714 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "" -#: src/elflint.c:1692 +#: src/elflint.c:1724 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "" -#: src/elflint.c:1710 +#: src/elflint.c:1742 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" msgstr "" -#: src/elflint.c:1723 +#: src/elflint.c:1755 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " "[%2d] '%s' referenced by sh_link\n" msgstr "" -#: src/elflint.c:1766 +#: src/elflint.c:1798 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" -#: src/elflint.c:1781 +#: src/elflint.c:1813 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " "[%2d] '%s'\n" msgstr "" -#: src/elflint.c:1801 src/elflint.c:1829 +#: src/elflint.c:1833 src/elflint.c:1861 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "" -#: src/elflint.c:1813 +#: src/elflint.c:1845 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "" -#: src/elflint.c:1822 +#: src/elflint.c:1854 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "" -#: src/elflint.c:1837 src/elflint.c:1844 +#: src/elflint.c:1869 src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "" -#: src/elflint.c:1854 src/elflint.c:1858 +#: src/elflint.c:1886 src/elflint.c:1890 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" -#: src/elflint.c:1864 +#: src/elflint.c:1896 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" -#: src/elflint.c:1875 src/elflint.c:1879 src/elflint.c:1883 src/elflint.c:1887 +#: src/elflint.c:1907 src/elflint.c:1911 src/elflint.c:1915 src/elflint.c:1919 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" -#: src/elflint.c:1899 +#: src/elflint.c:1931 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" msgstr "" -#: src/elflint.c:1909 +#: src/elflint.c:1941 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" msgstr "" -#: src/elflint.c:1913 +#: src/elflint.c:1945 #, fuzzy, c-format msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" msgstr "セクション [%2d] '%s': 不当な宛先セクションインデックス\n" -#: src/elflint.c:1918 +#: src/elflint.c:1950 #, c-format msgid "cannot get data for symbol section\n" msgstr "" -#: src/elflint.c:1921 +#: src/elflint.c:1953 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "" -#: src/elflint.c:1930 +#: src/elflint.c:1962 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" -#: src/elflint.c:1945 +#: src/elflint.c:1977 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " "same symbol table\n" msgstr "" -#: src/elflint.c:1962 +#: src/elflint.c:1995 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "" -#: src/elflint.c:1974 +#: src/elflint.c:2007 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "" -#: src/elflint.c:1979 +#: src/elflint.c:2012 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" -#: src/elflint.c:1995 src/elflint.c:2046 +#: src/elflint.c:2029 src/elflint.c:2083 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" msgstr "" -#: src/elflint.c:2007 src/elflint.c:2058 +#: src/elflint.c:2043 src/elflint.c:2097 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "" -#: src/elflint.c:2021 src/elflint.c:2072 +#: src/elflint.c:2057 src/elflint.c:2111 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2031 +#: src/elflint.c:2067 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" -#: src/elflint.c:2082 +#: src/elflint.c:2121 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" -#: src/elflint.c:2095 +#: src/elflint.c:2134 #, fuzzy, c-format msgid "section [%2d] '%s': not enough data\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:2107 +#: src/elflint.c:2146 #, fuzzy, c-format msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "セクション [%2d] '%s': 0番目の項目にある '%s' ゼロではありません\n" -#: src/elflint.c:2123 +#: src/elflint.c:2162 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " "least %ld)\n" msgstr "" -#: src/elflint.c:2132 +#: src/elflint.c:2171 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" -#: src/elflint.c:2166 +#: src/elflint.c:2205 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" msgstr "" -#: src/elflint.c:2187 +#: src/elflint.c:2226 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " "undefined\n" msgstr "" -#: src/elflint.c:2200 +#: src/elflint.c:2239 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" msgstr "" -#: src/elflint.c:2209 +#: src/elflint.c:2248 #, fuzzy, c-format msgid "" "section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:2239 +#: src/elflint.c:2278 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2244 +#: src/elflint.c:2283 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" msgstr "" -#: src/elflint.c:2250 +#: src/elflint.c:2289 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" -#: src/elflint.c:2263 +#: src/elflint.c:2302 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" -#: src/elflint.c:2281 +#: src/elflint.c:2320 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" -#: src/elflint.c:2285 +#: src/elflint.c:2324 #, fuzzy, c-format msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" msgstr "セクション [%2d] '%s': 不当な宛先セクションインデックス\n" -#: src/elflint.c:2293 +#: src/elflint.c:2334 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "" -#: src/elflint.c:2298 +#: src/elflint.c:2339 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "" -#: src/elflint.c:2303 +#: src/elflint.c:2344 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " "entries\n" msgstr "" -#: src/elflint.c:2352 +#: src/elflint.c:2393 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" -#: src/elflint.c:2376 src/elflint.c:2441 src/elflint.c:2476 +#: src/elflint.c:2417 src/elflint.c:2482 src/elflint.c:2517 #, fuzzy, c-format msgid "hash section [%2zu] '%s' does not contain enough data\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:2397 +#: src/elflint.c:2438 #, fuzzy, c-format msgid "hash section [%2zu] '%s' has zero bit mask words\n" msgstr "" "\n" "セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" -#: src/elflint.c:2408 src/elflint.c:2452 src/elflint.c:2489 +#: src/elflint.c:2449 src/elflint.c:2493 src/elflint.c:2530 #, fuzzy, c-format msgid "hash section [%2zu] '%s' uses too much data\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:2423 +#: src/elflint.c:2464 #, c-format msgid "" "hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " "%, nentries: %\n" msgstr "" -#: src/elflint.c:2510 +#: src/elflint.c:2551 #, fuzzy, c-format msgid "hash section [%2zu] '%s' invalid sh_entsize\n" msgstr "セクション [%2d] '%s': 不当な宛先セクションタイプ\n" -#: src/elflint.c:2520 src/elflint.c:2524 +#: src/elflint.c:2561 src/elflint.c:2565 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "" -#: src/elflint.c:2531 +#: src/elflint.c:2572 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2543 +#: src/elflint.c:2584 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " "table in [%2zu] '%s'\n" msgstr "" -#: src/elflint.c:2559 +#: src/elflint.c:2600 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "" -#: src/elflint.c:2579 +#: src/elflint.c:2620 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" msgstr "" -#: src/elflint.c:2590 +#: src/elflint.c:2631 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "" -#: src/elflint.c:2595 +#: src/elflint.c:2636 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" -#: src/elflint.c:2601 +#: src/elflint.c:2642 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "" -#: src/elflint.c:2606 +#: src/elflint.c:2647 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "" -#: src/elflint.c:2613 +#: src/elflint.c:2654 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "" -#: src/elflint.c:2617 +#: src/elflint.c:2658 #, fuzzy, c-format msgid "section [%2d] '%s': cannot get symbol name for signature\n" msgstr "セクション [%2d] '%s': シンボル %d を得られません: %s\n" -#: src/elflint.c:2622 +#: src/elflint.c:2663 #, fuzzy, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:2628 +#: src/elflint.c:2669 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "" -#: src/elflint.c:2634 +#: src/elflint.c:2675 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "" -#: src/elflint.c:2643 +#: src/elflint.c:2684 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" -#: src/elflint.c:2648 +#: src/elflint.c:2690 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "" -#: src/elflint.c:2654 +#: src/elflint.c:2698 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "" -#: src/elflint.c:2658 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "" -#: src/elflint.c:2669 +#: src/elflint.c:2713 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "" -#: src/elflint.c:2681 +#: src/elflint.c:2725 #, fuzzy, c-format msgid "section [%2d] '%s': section index %zu out of range\n" msgstr "セクション [%2d] '%s': リロケーション %zu: オフセット境界外\n" -#: src/elflint.c:2690 +#: src/elflint.c:2734 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" -#: src/elflint.c:2697 +#: src/elflint.c:2741 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "" -#: src/elflint.c:2703 +#: src/elflint.c:2747 #, fuzzy, c-format msgid "" "section [%2d] '%s': element %zu references section [%2d] '%s' without " @@ -2436,762 +2528,762 @@ msgstr "" "セクション [%2d] '%s': シンボル %zu: 参照されるセクション [%2d] '%s' は " "SHF_TLS フラグが設定されていません\n" -#: src/elflint.c:2710 +#: src/elflint.c:2754 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "" -#: src/elflint.c:2900 +#: src/elflint.c:2944 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " "dynamic symbol table\n" msgstr "" -#: src/elflint.c:2912 +#: src/elflint.c:2956 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " "'%s'\n" msgstr "" -#: src/elflint.c:2928 +#: src/elflint.c:2972 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "" -#: src/elflint.c:2944 +#: src/elflint.c:2988 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" -#: src/elflint.c:2952 +#: src/elflint.c:2996 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "" -#: src/elflint.c:2966 +#: src/elflint.c:3010 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "" -#: src/elflint.c:2971 +#: src/elflint.c:3015 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" -#: src/elflint.c:2981 +#: src/elflint.c:3025 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" -#: src/elflint.c:3034 +#: src/elflint.c:3078 #, c-format msgid "more than one version reference section present\n" msgstr "" -#: src/elflint.c:3042 src/elflint.c:3189 +#: src/elflint.c:3086 src/elflint.c:3233 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "" -#: src/elflint.c:3067 src/elflint.c:3243 +#: src/elflint.c:3111 src/elflint.c:3287 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "" -#: src/elflint.c:3074 src/elflint.c:3250 +#: src/elflint.c:3118 src/elflint.c:3294 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" -#: src/elflint.c:3084 +#: src/elflint.c:3128 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "" -#: src/elflint.c:3092 +#: src/elflint.c:3136 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "" -#: src/elflint.c:3104 +#: src/elflint.c:3148 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:3112 +#: src/elflint.c:3156 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " "reference\n" msgstr "" -#: src/elflint.c:3121 +#: src/elflint.c:3165 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " "%#x, expected %#x\n" msgstr "" -#: src/elflint.c:3130 +#: src/elflint.c:3174 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " "name '%s'\n" msgstr "" -#: src/elflint.c:3141 +#: src/elflint.c:3185 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" -#: src/elflint.c:3158 src/elflint.c:3334 +#: src/elflint.c:3202 src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" -#: src/elflint.c:3166 src/elflint.c:3342 +#: src/elflint.c:3210 src/elflint.c:3386 #, c-format msgid "" "section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " "there are more entries\n" msgstr "" -#: src/elflint.c:3181 +#: src/elflint.c:3225 #, c-format msgid "more than one version definition section present\n" msgstr "" -#: src/elflint.c:3228 +#: src/elflint.c:3272 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "" -#: src/elflint.c:3232 +#: src/elflint.c:3276 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" -#: src/elflint.c:3238 +#: src/elflint.c:3282 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "" -#: src/elflint.c:3265 +#: src/elflint.c:3309 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "" -#: src/elflint.c:3272 +#: src/elflint.c:3316 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" -#: src/elflint.c:3280 +#: src/elflint.c:3324 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "" -#: src/elflint.c:3300 +#: src/elflint.c:3344 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" msgstr "" -#: src/elflint.c:3317 +#: src/elflint.c:3361 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" -#: src/elflint.c:3350 +#: src/elflint.c:3394 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "" -#: src/elflint.c:3366 +#: src/elflint.c:3410 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "" -#: src/elflint.c:3379 +#: src/elflint.c:3423 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "" -#: src/elflint.c:3400 +#: src/elflint.c:3444 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "" -#: src/elflint.c:3416 +#: src/elflint.c:3460 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" -#: src/elflint.c:3425 +#: src/elflint.c:3469 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" -#: src/elflint.c:3437 +#: src/elflint.c:3481 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" -#: src/elflint.c:3454 +#: src/elflint.c:3498 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" msgstr "" -#: src/elflint.c:3463 +#: src/elflint.c:3507 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "" -#: src/elflint.c:3472 +#: src/elflint.c:3516 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" -#: src/elflint.c:3487 +#: src/elflint.c:3531 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" msgstr "" #. Tag_File -#: src/elflint.c:3498 +#: src/elflint.c:3542 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" msgstr "" -#: src/elflint.c:3516 +#: src/elflint.c:3560 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" -#: src/elflint.c:3527 +#: src/elflint.c:3571 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "" -#: src/elflint.c:3540 +#: src/elflint.c:3584 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "" -#: src/elflint.c:3544 +#: src/elflint.c:3588 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" -#: src/elflint.c:3554 +#: src/elflint.c:3598 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "" -#: src/elflint.c:3560 +#: src/elflint.c:3604 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" msgstr "" -#: src/elflint.c:3649 +#: src/elflint.c:3693 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "" -#: src/elflint.c:3653 +#: src/elflint.c:3697 #, c-format msgid "zeroth section has nonzero name\n" msgstr "" -#: src/elflint.c:3655 +#: src/elflint.c:3699 #, c-format msgid "zeroth section has nonzero type\n" msgstr "" -#: src/elflint.c:3657 +#: src/elflint.c:3701 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "" -#: src/elflint.c:3659 +#: src/elflint.c:3703 #, c-format msgid "zeroth section has nonzero address\n" msgstr "" -#: src/elflint.c:3661 +#: src/elflint.c:3705 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "" -#: src/elflint.c:3663 +#: src/elflint.c:3707 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "" -#: src/elflint.c:3665 +#: src/elflint.c:3709 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "" -#: src/elflint.c:3668 +#: src/elflint.c:3712 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " "value\n" msgstr "" -#: src/elflint.c:3672 +#: src/elflint.c:3716 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in shstrndx\n" msgstr "" -#: src/elflint.c:3676 +#: src/elflint.c:3720 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " "overflow in phnum\n" msgstr "" -#: src/elflint.c:3694 +#: src/elflint.c:3738 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "" -#: src/elflint.c:3703 +#: src/elflint.c:3747 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "" -#: src/elflint.c:3730 +#: src/elflint.c:3774 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3748 +#: src/elflint.c:3792 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "" -#: src/elflint.c:3766 +#: src/elflint.c:3810 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" -#: src/elflint.c:3784 +#: src/elflint.c:3828 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "" -#: src/elflint.c:3790 src/elflint.c:3822 +#: src/elflint.c:3834 src/elflint.c:3866 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" -#: src/elflint.c:3795 src/elflint.c:3827 +#: src/elflint.c:3839 src/elflint.c:3871 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " "segments\n" msgstr "" -#: src/elflint.c:3803 +#: src/elflint.c:3847 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" msgstr "" -#: src/elflint.c:3846 +#: src/elflint.c:3890 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "" -#: src/elflint.c:3851 +#: src/elflint.c:3895 #, c-format msgid "cannot get section header\n" msgstr "" -#: src/elflint.c:3861 +#: src/elflint.c:3905 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "" -#: src/elflint.c:3876 +#: src/elflint.c:3920 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" msgstr "" -#: src/elflint.c:3883 +#: src/elflint.c:3927 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "" -#: src/elflint.c:3891 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" -#: src/elflint.c:3901 +#: src/elflint.c:3945 #, fuzzy, c-format msgid "section [%2zu] '%s': allocated section cannot be compressed\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:3906 +#: src/elflint.c:3950 #, fuzzy, c-format msgid "section [%2zu] '%s': nobits section cannot be compressed\n" msgstr "セクション [%2d] '%s': セクションデータを得られません\n" -#: src/elflint.c:3912 +#: src/elflint.c:3956 #, c-format msgid "" "section [%2zu] '%s': compressed section with no compression header: %s\n" msgstr "" -#: src/elflint.c:3918 +#: src/elflint.c:3962 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" -#: src/elflint.c:3923 +#: src/elflint.c:3967 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" -#: src/elflint.c:3930 +#: src/elflint.c:3974 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "" -#: src/elflint.c:3935 +#: src/elflint.c:3979 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" -#: src/elflint.c:3954 +#: src/elflint.c:3998 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "" -#: src/elflint.c:3963 +#: src/elflint.c:4007 #, c-format msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" msgstr "" -#: src/elflint.c:3970 +#: src/elflint.c:4014 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "" -#: src/elflint.c:4001 +#: src/elflint.c:4045 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " "%d\n" msgstr "" -#: src/elflint.c:4011 +#: src/elflint.c:4055 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d\n" msgstr "" -#: src/elflint.c:4037 +#: src/elflint.c:4081 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " "program header entry %d and file contents is non-zero\n" msgstr "" -#: src/elflint.c:4048 +#: src/elflint.c:4092 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " "segment of program header entry %d\n" msgstr "" -#: src/elflint.c:4059 +#: src/elflint.c:4103 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "" -#: src/elflint.c:4069 +#: src/elflint.c:4113 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" -#: src/elflint.c:4079 +#: src/elflint.c:4123 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" msgstr "" -#: src/elflint.c:4085 +#: src/elflint.c:4129 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " "but type is not SHT_TYPE\n" msgstr "" -#: src/elflint.c:4093 +#: src/elflint.c:4137 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" msgstr "" -#: src/elflint.c:4144 +#: src/elflint.c:4188 #, c-format msgid "more than one version symbol table present\n" msgstr "" -#: src/elflint.c:4167 +#: src/elflint.c:4211 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "" -#: src/elflint.c:4178 +#: src/elflint.c:4222 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" msgstr "" -#: src/elflint.c:4184 +#: src/elflint.c:4228 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" -#: src/elflint.c:4195 +#: src/elflint.c:4239 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " "exist\n" msgstr "" -#: src/elflint.c:4208 +#: src/elflint.c:4252 #, c-format msgid "duplicate version index %d\n" msgstr "" -#: src/elflint.c:4222 +#: src/elflint.c:4266 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" -#: src/elflint.c:4271 +#: src/elflint.c:4315 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" -#: src/elflint.c:4275 +#: src/elflint.c:4319 #, c-format msgid "" "section [%2d] '%s': unknown core file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4298 +#: src/elflint.c:4342 #, c-format msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4302 +#: src/elflint.c:4346 #, c-format msgid "" "section [%2d] '%s': unknown object file note type % at offset %zu\n" msgstr "" -#: src/elflint.c:4319 +#: src/elflint.c:4363 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4338 +#: src/elflint.c:4382 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "" -#: src/elflint.c:4341 +#: src/elflint.c:4385 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4362 +#: src/elflint.c:4406 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" -#: src/elflint.c:4369 +#: src/elflint.c:4413 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "" -#: src/elflint.c:4372 +#: src/elflint.c:4416 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "" -#: src/elflint.c:4390 +#: src/elflint.c:4434 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" msgstr "" -#: src/elflint.c:4405 +#: src/elflint.c:4449 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "" -#: src/elflint.c:4414 +#: src/elflint.c:4458 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" -#: src/elflint.c:4425 +#: src/elflint.c:4469 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "" -#: src/elflint.c:4433 +#: src/elflint.c:4477 #, c-format msgid "more than one TLS entry in program header\n" msgstr "" -#: src/elflint.c:4440 +#: src/elflint.c:4484 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "" -#: src/elflint.c:4454 +#: src/elflint.c:4498 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4457 +#: src/elflint.c:4501 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4467 +#: src/elflint.c:4511 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "" -#: src/elflint.c:4488 +#: src/elflint.c:4532 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "" -#: src/elflint.c:4499 +#: src/elflint.c:4543 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" -#: src/elflint.c:4506 +#: src/elflint.c:4550 #, c-format msgid "" "GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" msgstr "" -#: src/elflint.c:4515 src/elflint.c:4538 +#: src/elflint.c:4559 src/elflint.c:4582 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "" -#: src/elflint.c:4544 +#: src/elflint.c:4588 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" -#: src/elflint.c:4569 +#: src/elflint.c:4613 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" -#: src/elflint.c:4572 +#: src/elflint.c:4616 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" -#: src/elflint.c:4585 +#: src/elflint.c:4629 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "" -#: src/elflint.c:4593 +#: src/elflint.c:4637 #, c-format msgid "call frame search table must be allocated\n" msgstr "" -#: src/elflint.c:4596 +#: src/elflint.c:4640 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "" -#: src/elflint.c:4600 +#: src/elflint.c:4644 #, c-format msgid "call frame search table must not be writable\n" msgstr "" -#: src/elflint.c:4603 +#: src/elflint.c:4647 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "" -#: src/elflint.c:4608 +#: src/elflint.c:4652 #, c-format msgid "call frame search table must not be executable\n" msgstr "" -#: src/elflint.c:4611 +#: src/elflint.c:4655 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "" -#: src/elflint.c:4622 +#: src/elflint.c:4666 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "" -#: src/elflint.c:4629 +#: src/elflint.c:4673 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "" -#: src/elflint.c:4632 +#: src/elflint.c:4676 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " "alignment\n" msgstr "" -#: src/elflint.c:4645 +#: src/elflint.c:4689 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " "program header entry" msgstr "" -#: src/elflint.c:4679 +#: src/elflint.c:4723 #, c-format msgid "cannot read ELF header: %s\n" msgstr "" -#: src/elflint.c:4705 +#: src/elflint.c:4749 #, c-format msgid "text relocation flag set but not needed\n" msgstr "" @@ -3214,8 +3306,8 @@ msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "" #. Strings for arguments in help texts. -#: src/findtextrel.c:75 src/nm.c:107 src/objdump.c:70 src/size.c:81 -#: src/strings.c:87 src/strip.c:95 +#: src/findtextrel.c:75 src/nm.c:109 src/objdump.c:72 src/size.c:81 +#: src/strings.c:88 src/strip.c:99 msgid "[FILE...]" msgstr "[ふぁいる...]" @@ -3300,43 +3392,43 @@ msgid "" "a relocation modifies memory at offset %llu in a write-protected segment\n" msgstr "" -#: src/nm.c:65 src/strip.c:67 +#: src/nm.c:67 src/strip.c:70 msgid "Output selection:" msgstr "出力選択:" -#: src/nm.c:66 +#: src/nm.c:68 msgid "Display debugger-only symbols" msgstr "デバッガー専用シンボルを表示" -#: src/nm.c:67 +#: src/nm.c:69 msgid "Display only defined symbols" msgstr "定義されたシンボルのみを表示" -#: src/nm.c:70 +#: src/nm.c:72 msgid "Display dynamic symbols instead of normal symbols" msgstr "通常シンボルの代わりに動的シンボルを表示" -#: src/nm.c:71 +#: src/nm.c:73 msgid "Display only external symbols" msgstr "外部シンボルのみを表示" -#: src/nm.c:72 +#: src/nm.c:74 msgid "Display only undefined symbols" msgstr "未定義シンボルのみを表示" -#: src/nm.c:74 +#: src/nm.c:76 msgid "Include index for symbols from archive members" msgstr "アーカイブメンバーからのシンボルの索引を含める" -#: src/nm.c:76 src/size.c:55 +#: src/nm.c:78 src/size.c:55 msgid "Output format:" msgstr "出力形式:" -#: src/nm.c:78 +#: src/nm.c:80 msgid "Print name of the input file before every symbol" msgstr "全てのシンボルの前に入力ファイル名を印刷" -#: src/nm.c:81 +#: src/nm.c:83 msgid "" "Use the output format FORMAT. FORMAT can be `bsd', `sysv' or `posix'. The " "default is `sysv'" @@ -3344,75 +3436,75 @@ msgstr "" "出力形式として FORMATを使う。FORMAT は `bsd'か、`sysv'、`posix' のどれか。省" "略値は `sysv'" -#: src/nm.c:83 +#: src/nm.c:85 msgid "Same as --format=bsd" msgstr "--format=bsd と同じ" -#: src/nm.c:84 +#: src/nm.c:86 msgid "Same as --format=posix" msgstr "--format=posix と同じ" -#: src/nm.c:85 src/size.c:61 +#: src/nm.c:87 src/size.c:61 msgid "Use RADIX for printing symbol values" msgstr "シンボル値を印刷するために RADIX を使う" -#: src/nm.c:86 +#: src/nm.c:88 #, fuzzy msgid "Mark special symbols" msgstr "弱いシンボルに印を点ける" -#: src/nm.c:88 +#: src/nm.c:90 msgid "Print size of defined symbols" msgstr "定義されたシンボルの印刷サイズ" -#: src/nm.c:90 src/size.c:69 src/strip.c:72 src/unstrip.c:73 +#: src/nm.c:92 src/size.c:69 src/strip.c:75 src/unstrip.c:73 msgid "Output options:" msgstr "出力オプション:" -#: src/nm.c:91 +#: src/nm.c:93 msgid "Sort symbols numerically by address" msgstr "シンボルをアドレスにより数値的に並べ替える" -#: src/nm.c:93 +#: src/nm.c:95 msgid "Do not sort the symbols" msgstr "シンボルを並べ替えない" -#: src/nm.c:94 +#: src/nm.c:96 msgid "Reverse the sense of the sort" msgstr "並べ替えの意味を逆にする" -#: src/nm.c:97 +#: src/nm.c:99 msgid "Decode low-level symbol names into source code names" msgstr "" #. Short description of program. -#: src/nm.c:104 +#: src/nm.c:106 msgid "List symbols from FILEs (a.out by default)." msgstr "ふぁいる からシンボルを表示 (デフォルトではa.out)。" -#: src/nm.c:115 src/objdump.c:78 +#: src/nm.c:117 src/objdump.c:80 #, fuzzy msgid "Output formatting" msgstr "出力形式:" -#: src/nm.c:139 src/objdump.c:102 src/size.c:106 src/strip.c:127 +#: src/nm.c:141 src/objdump.c:104 src/size.c:106 src/strip.c:131 #, fuzzy, c-format msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: 内部エラー %d (%s-%s): %s" -#: src/nm.c:380 src/nm.c:392 src/size.c:289 src/size.c:298 src/size.c:309 -#: src/strip.c:2298 +#: src/nm.c:382 src/nm.c:394 src/size.c:289 src/size.c:298 src/size.c:309 +#: src/strip.c:2421 #, c-format msgid "while closing '%s'" msgstr "'%s' を閉じている最中" -#: src/nm.c:402 src/objdump.c:279 src/strip.c:377 +#: src/nm.c:404 src/objdump.c:281 src/strip.c:443 #, c-format msgid "%s: File format not recognized" msgstr "%s: ファイル形式を認識できませんでした" #. Note: 0 is no valid offset. -#: src/nm.c:442 +#: src/nm.c:444 #, fuzzy msgid "" "\n" @@ -3421,44 +3513,44 @@ msgstr "" "\n" "アーカイブ索引:" -#: src/nm.c:451 +#: src/nm.c:453 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "シンボル %2$sの不正なオフセット %1$zu " -#: src/nm.c:456 +#: src/nm.c:458 #, c-format msgid "%s in %s\n" msgstr "%2$s の中の %1$s\n" -#: src/nm.c:464 +#: src/nm.c:466 #, c-format msgid "cannot reset archive offset to beginning" msgstr "アーカイブのオフセットを最初にリセットできません" -#: src/nm.c:489 src/objdump.c:327 +#: src/nm.c:491 src/objdump.c:329 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: ファイル形式を認識できません" -#: src/nm.c:704 +#: src/nm.c:706 #, c-format msgid "cannot create search tree" msgstr "検索ツリーを生成できません" -#: src/nm.c:745 src/nm.c:1206 src/objdump.c:776 src/readelf.c:535 -#: src/readelf.c:1113 src/readelf.c:1313 src/readelf.c:1461 src/readelf.c:1662 -#: src/readelf.c:1868 src/readelf.c:2058 src/readelf.c:2236 src/readelf.c:2312 -#: src/readelf.c:2570 src/readelf.c:2646 src/readelf.c:2733 src/readelf.c:3313 -#: src/readelf.c:3363 src/readelf.c:3426 src/readelf.c:8337 src/readelf.c:9437 -#: src/readelf.c:9640 src/readelf.c:9708 src/size.c:397 src/size.c:466 -#: src/strip.c:506 +#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:606 +#: src/readelf.c:1196 src/readelf.c:1396 src/readelf.c:1544 src/readelf.c:1745 +#: src/readelf.c:1951 src/readelf.c:2141 src/readelf.c:2319 src/readelf.c:2395 +#: src/readelf.c:2653 src/readelf.c:2729 src/readelf.c:2816 src/readelf.c:3414 +#: src/readelf.c:3464 src/readelf.c:3527 src/readelf.c:11028 +#: src/readelf.c:12200 src/readelf.c:12403 src/readelf.c:12471 src/size.c:397 +#: src/size.c:466 src/strip.c:572 #, c-format msgid "cannot get section header string table index" msgstr "セクションヘッダー文字列テーブル索引が得られません" #. We always print this prolog. -#: src/nm.c:772 +#: src/nm.c:774 #, c-format msgid "" "\n" @@ -3472,7 +3564,7 @@ msgstr "" "\n" #. The header line. -#: src/nm.c:775 +#: src/nm.c:777 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -3481,80 +3573,80 @@ msgstr "" "%*s%-*s %-*s クラス タイプ %-*s %*s セクション\n" "\n" -#: src/nm.c:1217 +#: src/nm.c:1219 #, fuzzy, c-format msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "%s: セクションの項目の大きさ `%s' は予期したものとは異なります" -#: src/nm.c:1222 +#: src/nm.c:1224 #, fuzzy, c-format msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "%s: セクション `%s' の大きさは項目の大きさの整数倍ではありません" -#: src/nm.c:1301 +#: src/nm.c:1303 #, fuzzy, c-format msgid "%s: entries (%zd) in section %zd `%s' is too large" msgstr "%s: セクションの項目の大きさ `%s' は予期したものとは異なります" #. XXX Add machine specific object file types. -#: src/nm.c:1527 +#: src/nm.c:1529 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: 不当な操作" -#: src/nm.c:1584 +#: src/nm.c:1586 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: シンボルがありません" -#: src/objdump.c:51 +#: src/objdump.c:53 msgid "Mode selection:" msgstr "" -#: src/objdump.c:52 +#: src/objdump.c:54 msgid "Display relocation information." msgstr "" -#: src/objdump.c:54 +#: src/objdump.c:56 msgid "Display the full contents of all sections requested" msgstr "" -#: src/objdump.c:56 +#: src/objdump.c:58 msgid "Display assembler code of executable sections" msgstr "" -#: src/objdump.c:58 +#: src/objdump.c:60 #, fuzzy msgid "Output content selection:" msgstr "出力選択:" -#: src/objdump.c:60 +#: src/objdump.c:62 msgid "Only display information for section NAME." msgstr "" #. Short description of program. -#: src/objdump.c:66 +#: src/objdump.c:68 msgid "Show information from FILEs (a.out by default)." msgstr "" -#: src/objdump.c:217 src/readelf.c:483 +#: src/objdump.c:219 src/readelf.c:551 msgid "No operation specified.\n" msgstr "操作が指定されていません。\n" -#: src/objdump.c:257 src/objdump.c:269 +#: src/objdump.c:259 src/objdump.c:271 #, c-format msgid "while close `%s'" msgstr "" -#: src/objdump.c:362 src/readelf.c:1963 src/readelf.c:2155 +#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238 msgid "INVALID SYMBOL" msgstr "不当なシンボル" -#: src/objdump.c:377 src/readelf.c:1997 src/readelf.c:2191 +#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274 msgid "INVALID SECTION" msgstr "不当なセクション" -#: src/objdump.c:497 +#: src/objdump.c:499 #, c-format msgid "" "\n" @@ -3562,300 +3654,320 @@ msgid "" "%-*s TYPE VALUE\n" msgstr "" -#: src/objdump.c:500 +#: src/objdump.c:502 msgid "OFFSET" msgstr "" -#: src/objdump.c:565 +#: src/objdump.c:567 #, c-format msgid "Contents of section %s:\n" msgstr "" -#: src/objdump.c:686 +#: src/objdump.c:688 #, c-format msgid "cannot disassemble" msgstr "" #. Short description of program. -#: src/ranlib.c:63 +#: src/ranlib.c:64 msgid "Generate an index to speed access to archives." msgstr "" #. Strings for arguments in help texts. -#: src/ranlib.c:66 +#: src/ranlib.c:67 msgid "ARCHIVE" msgstr "" -#: src/ranlib.c:102 +#: src/ranlib.c:103 #, c-format msgid "Archive name required" msgstr "" -#: src/ranlib.c:166 +#: src/ranlib.c:167 #, c-format msgid "'%s' is no archive" msgstr "" -#: src/ranlib.c:201 +#: src/ranlib.c:202 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "" -#: src/readelf.c:71 +#: src/readelf.c:95 #, fuzzy msgid "ELF input selection:" msgstr "出力選択:" -#: src/readelf.c:73 +#: src/readelf.c:97 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" -#: src/readelf.c:75 +#: src/readelf.c:100 +msgid "" +"Used with -w to find the skeleton Compile Units in FILE associated with the " +"Split Compile units in a .dwo input file" +msgstr "" + +#: src/readelf.c:102 #, fuzzy msgid "ELF output selection:" msgstr "出力選択:" -#: src/readelf.c:77 +#: src/readelf.c:104 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "" -#: src/readelf.c:78 +#: src/readelf.c:105 msgid "Display the dynamic segment" msgstr "動的セグメントを表示" -#: src/readelf.c:79 +#: src/readelf.c:106 msgid "Display the ELF file header" msgstr "ELF ファイルヘッダーを表示" -#: src/readelf.c:81 +#: src/readelf.c:108 msgid "Display histogram of bucket list lengths" msgstr "バケットリスト長の柱状図を表示" -#: src/readelf.c:82 +#: src/readelf.c:109 msgid "Display the program headers" msgstr "プログラムヘッダーを表示" -#: src/readelf.c:84 +#: src/readelf.c:111 msgid "Display relocations" msgstr "リロケーションを表示" -#: src/readelf.c:85 +#: src/readelf.c:112 +#, fuzzy +msgid "Display the section groups" +msgstr "セクションのヘッダーを表示" + +#: src/readelf.c:113 #, fuzzy msgid "Display the sections' headers" msgstr "セクションのヘッダーを表示" -#: src/readelf.c:88 +#: src/readelf.c:116 #, fuzzy msgid "Display the symbol table sections" msgstr "シンボルテーブルを表示" -#: src/readelf.c:89 +#: src/readelf.c:117 msgid "Display versioning information" msgstr "バージョニング情報の表示" -#: src/readelf.c:90 +#: src/readelf.c:118 #, fuzzy msgid "Display the ELF notes" msgstr "コアノートを表示" -#: src/readelf.c:92 +#: src/readelf.c:120 #, fuzzy msgid "Display architecture specific information, if any" msgstr "(もしあれば)アーキテクチャー固有の情報を表示" -#: src/readelf.c:94 +#: src/readelf.c:122 msgid "Display sections for exception handling" msgstr "例外を取り扱うためのセクションを表示" -#: src/readelf.c:96 +#: src/readelf.c:124 #, fuzzy msgid "Additional output selection:" msgstr "出力選択:" -#: src/readelf.c:98 +#: src/readelf.c:126 #, fuzzy msgid "" -"Display DWARF section content. SECTION can be one of abbrev, aranges, " -"decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " -"pubnames, str, macinfo, macro or exception" +"Display DWARF section content. SECTION can be one of abbrev, addr, aranges, " +"decodedaranges, frame, gdb_index, info, info+, loc, line, decodedline, " +"ranges, pubnames, str, macinfo, macro or exception" msgstr "" "DWARF セクションの内容を表示。SECTION は addrevか、aranges、frame、info、" "loc、ranges、pubnames、str、macinfo、exception のいずれかです" -#: src/readelf.c:102 +#: src/readelf.c:130 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "数字か名前で解釈できないセクションの内容をダンプする" -#: src/readelf.c:104 +#: src/readelf.c:132 msgid "Print string contents of sections" msgstr "セクションの文字列内容を印刷する" -#: src/readelf.c:107 +#: src/readelf.c:135 msgid "Display the symbol index of an archive" msgstr "アーカイブのシンボル索引を表示" -#: src/readelf.c:109 +#: src/readelf.c:137 msgid "Output control:" msgstr "出力制御:" -#: src/readelf.c:111 +#: src/readelf.c:139 msgid "Do not find symbol names for addresses in DWARF data" msgstr "DWARFデータ中のアドレスのためのシンボル名を探さない" -#: src/readelf.c:113 +#: src/readelf.c:141 #, fuzzy msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "DWARFデータ中のアドレスのためのシンボル名を探さない" -#: src/readelf.c:115 +#: src/readelf.c:143 msgid "Ignored for compatibility (lines always wide)" msgstr "" -#: src/readelf.c:117 +#: src/readelf.c:145 msgid "" "Show compression information for compressed sections (when used with -S); " "decompress section before dumping data (when used with -p or -x)" msgstr "" #. Short description of program. -#: src/readelf.c:122 +#: src/readelf.c:150 msgid "Print information from ELF file in human-readable form." msgstr "ELF ファイルから人間が読める形で情報を印刷する。" -#: src/readelf.c:451 +#. Look up once. +#: src/readelf.c:329 +msgid "yes" +msgstr "はい" + +#: src/readelf.c:330 +msgid "no" +msgstr "いいえ" + +#: src/readelf.c:519 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "不明な DWARF デバッグセクション `%s'.\n" -#: src/readelf.c:519 src/readelf.c:630 +#: src/readelf.c:590 src/readelf.c:701 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "Elf 記述子を生成できません: %s" -#: src/readelf.c:526 src/readelf.c:842 src/strip.c:575 +#: src/readelf.c:597 src/readelf.c:925 src/strip.c:641 #, c-format msgid "cannot determine number of sections: %s" msgstr "セクション数を決定できません: %s" -#: src/readelf.c:544 src/readelf.c:1135 src/readelf.c:1337 +#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420 #, c-format msgid "cannot get section: %s" msgstr "セクションを得られません: %s" -#: src/readelf.c:553 src/readelf.c:1142 src/readelf.c:1345 src/readelf.c:9660 +#: src/readelf.c:624 src/readelf.c:1225 src/readelf.c:1428 src/readelf.c:12423 #: src/unstrip.c:375 src/unstrip.c:406 src/unstrip.c:455 src/unstrip.c:565 -#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1106 -#: src/unstrip.c:1298 src/unstrip.c:1359 src/unstrip.c:1532 src/unstrip.c:1647 -#: src/unstrip.c:1787 src/unstrip.c:1882 +#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1109 +#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650 +#: src/unstrip.c:1790 src/unstrip.c:1885 #, c-format msgid "cannot get section header: %s" msgstr "セクションヘッダーを得られません: %s" -#: src/readelf.c:561 +#: src/readelf.c:632 #, fuzzy, c-format msgid "cannot get section name" msgstr "セクションを得られません: %s" -#: src/readelf.c:570 src/readelf.c:5521 src/readelf.c:7795 src/readelf.c:7897 -#: src/readelf.c:8074 +#: src/readelf.c:641 src/readelf.c:6517 src/readelf.c:10301 src/readelf.c:10403 +#: src/readelf.c:10580 #, c-format msgid "cannot get %s content: %s" msgstr "%s の内容を得られません: %s" -#: src/readelf.c:586 +#: src/readelf.c:657 #, fuzzy, c-format msgid "cannot create temp file '%s'" msgstr "新しいファイル '%s' を生成できません: %s" -#: src/readelf.c:595 +#: src/readelf.c:666 #, fuzzy, c-format msgid "cannot write section data" msgstr "セクションデータを割り当てられません: %s" -#: src/readelf.c:601 src/readelf.c:618 src/readelf.c:647 +#: src/readelf.c:672 src/readelf.c:689 src/readelf.c:718 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "Elf 記述子を閉じている時にエラー: %s" -#: src/readelf.c:608 +#: src/readelf.c:679 #, fuzzy, c-format msgid "error while rewinding file descriptor" msgstr "Elf 記述子を閉じている時にエラー: %s" -#: src/readelf.c:642 +#: src/readelf.c:713 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "'%s' はアーカイブではなく、アーカイブ索引を印刷できません" -#: src/readelf.c:741 -#, fuzzy, c-format -msgid "No such section '%s' in '%s'" -msgstr "セクション [%Zu] '%s' からデータが得られません: %s" - -#: src/readelf.c:768 +#: src/readelf.c:817 #, c-format msgid "cannot stat input file" msgstr "入力ファイルを stat できません" -#: src/readelf.c:770 +#: src/readelf.c:819 #, c-format msgid "input file is empty" msgstr "入力ファイルが空です" -#: src/readelf.c:772 +#: src/readelf.c:821 #, c-format msgid "failed reading '%s': %s" msgstr "'%s' の読込みに失敗: %s" -#: src/readelf.c:827 +#: src/readelf.c:850 +#, fuzzy, c-format +msgid "No such section '%s' in '%s'" +msgstr "セクション [%Zu] '%s' からデータが得られません: %s" + +#: src/readelf.c:910 #, c-format msgid "cannot read ELF header: %s" msgstr "ELF ヘッダーが読めません: %s" -#: src/readelf.c:835 +#: src/readelf.c:918 #, c-format msgid "cannot create EBL handle" msgstr "EBL ヘッダーを生成できません" -#: src/readelf.c:848 +#: src/readelf.c:931 #, fuzzy, c-format msgid "cannot determine number of program headers: %s" msgstr "セクション数を決定できません: %s" -#: src/readelf.c:938 +#: src/readelf.c:1021 msgid "NONE (None)" msgstr "なし (なし)" -#: src/readelf.c:939 +#: src/readelf.c:1022 msgid "REL (Relocatable file)" msgstr "REL (リロケータブルファイル)" -#: src/readelf.c:940 +#: src/readelf.c:1023 msgid "EXEC (Executable file)" msgstr "(EXEC (実行ファイル)" -#: src/readelf.c:941 +#: src/readelf.c:1024 msgid "DYN (Shared object file)" msgstr "DYN (共用オブジェクトファイル)" -#: src/readelf.c:942 +#: src/readelf.c:1025 msgid "CORE (Core file)" msgstr "CORE (コアファイル)" -#: src/readelf.c:947 +#: src/readelf.c:1030 #, c-format msgid "OS Specific: (%x)\n" msgstr "OS 固有: (%x)\n" #. && e_type <= ET_HIPROC always true -#: src/readelf.c:949 +#: src/readelf.c:1032 #, c-format msgid "Processor Specific: (%x)\n" msgstr "プロセッサー固有: (%x)\n" -#: src/readelf.c:959 +#: src/readelf.c:1042 msgid "" "ELF Header:\n" " Magic: " @@ -3863,7 +3975,7 @@ msgstr "" "ELF ヘッダー:\n" " マジック: " -#: src/readelf.c:963 +#: src/readelf.c:1046 #, c-format msgid "" "\n" @@ -3872,118 +3984,118 @@ msgstr "" "\n" " クラス: %s\n" -#: src/readelf.c:968 +#: src/readelf.c:1051 #, c-format msgid " Data: %s\n" msgstr " データ: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1057 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " 識別バージョン: %hhd %s\n" -#: src/readelf.c:976 src/readelf.c:993 +#: src/readelf.c:1059 src/readelf.c:1076 msgid "(current)" msgstr "(現在)" -#: src/readelf.c:980 +#: src/readelf.c:1063 #, c-format msgid " OS/ABI: %s\n" msgstr " OS/ABI: %s\n" -#: src/readelf.c:983 +#: src/readelf.c:1066 #, c-format msgid " ABI Version: %hhd\n" msgstr " ABI バージョン: %hhd\n" -#: src/readelf.c:986 +#: src/readelf.c:1069 msgid " Type: " msgstr " タイプ: " -#: src/readelf.c:989 +#: src/readelf.c:1072 #, c-format msgid " Machine: %s\n" msgstr " マシン : %s\n" -#: src/readelf.c:991 +#: src/readelf.c:1074 #, c-format msgid " Version: %d %s\n" msgstr " バージョン: %d %s\n" -#: src/readelf.c:995 +#: src/readelf.c:1078 #, c-format msgid " Entry point address: %#\n" msgstr " 入口点アドレス : %#\n" -#: src/readelf.c:998 +#: src/readelf.c:1081 #, c-format msgid " Start of program headers: % %s\n" msgstr " プログラムヘッダーの開始: % %s\n" -#: src/readelf.c:999 src/readelf.c:1002 +#: src/readelf.c:1082 src/readelf.c:1085 msgid "(bytes into file)" msgstr "(ファイルへのバイト数)" -#: src/readelf.c:1001 +#: src/readelf.c:1084 #, c-format msgid " Start of section headers: % %s\n" msgstr " セクションヘッダーの開始: % %s\n" -#: src/readelf.c:1004 +#: src/readelf.c:1087 #, c-format msgid " Flags: %s\n" msgstr " フラグ: %s\n" -#: src/readelf.c:1007 +#: src/readelf.c:1090 #, c-format msgid " Size of this header: % %s\n" msgstr " このヘッダーの大きさ: % %s\n" -#: src/readelf.c:1008 src/readelf.c:1011 src/readelf.c:1028 +#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111 msgid "(bytes)" msgstr "(バイト)" -#: src/readelf.c:1010 +#: src/readelf.c:1093 #, c-format msgid " Size of program header entries: % %s\n" msgstr " プログラムヘッダー項目の大きさ:% %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1096 #, fuzzy, c-format msgid " Number of program headers entries: %" msgstr " プログラムヘッダー項目の数 : %\n" -#: src/readelf.c:1020 +#: src/readelf.c:1103 #, fuzzy, c-format msgid " (% in [0].sh_info)" msgstr "([0].sh_link の %)" -#: src/readelf.c:1023 src/readelf.c:1040 src/readelf.c:1054 +#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137 msgid " ([0] not available)" msgstr "([0]は使えません)" -#: src/readelf.c:1027 +#: src/readelf.c:1110 #, c-format msgid " Size of section header entries: % %s\n" msgstr " セクションヘッダー項目の大きさ:% %s\n" -#: src/readelf.c:1030 +#: src/readelf.c:1113 #, c-format msgid " Number of section headers entries: %" msgstr " セクションヘッダー項目の数 : %" -#: src/readelf.c:1037 +#: src/readelf.c:1120 #, c-format msgid " (% in [0].sh_size)" msgstr " ([0].sh_size の %)" #. We managed to get the zeroth section. -#: src/readelf.c:1050 +#: src/readelf.c:1133 #, c-format msgid " (% in [0].sh_link)" msgstr "([0].sh_link の %)" -#: src/readelf.c:1058 +#: src/readelf.c:1141 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -3992,7 +4104,7 @@ msgstr "" " セクションヘッダー文字列テーブル索引: XINDEX%s\n" "\n" -#: src/readelf.c:1062 +#: src/readelf.c:1145 #, c-format msgid "" " Section header string table index: %\n" @@ -4001,7 +4113,7 @@ msgstr "" " セクションヘッダー文字列テーブル索引: %\n" "\n" -#: src/readelf.c:1105 +#: src/readelf.c:1188 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4010,11 +4122,11 @@ msgstr "" "オフセット %2$# から始まる %1$d 個のセクションヘッダーがあります:\n" "\n" -#: src/readelf.c:1115 +#: src/readelf.c:1198 msgid "Section Headers:" msgstr "セクションヘッダー:" -#: src/readelf.c:1118 +#: src/readelf.c:1201 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4022,7 +4134,7 @@ msgstr "" "[番] 名前 タイプ アドレス オフセ 大きさ ES フラグLk " "Inf Al" -#: src/readelf.c:1120 +#: src/readelf.c:1203 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4030,35 +4142,35 @@ msgstr "" "[番] 名前 タイプ アドレス オフセ 大きさ ES " "フラグLk Inf Al" -#: src/readelf.c:1125 +#: src/readelf.c:1208 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1127 +#: src/readelf.c:1210 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1203 +#: src/readelf.c:1286 #, fuzzy, c-format msgid "bad compression header for section %zd: %s" msgstr "セクションヘッダー文字列セクションを生成できません: %s" -#: src/readelf.c:1214 +#: src/readelf.c:1297 #, fuzzy, c-format msgid "bad gnu compressed size for section %zd: %s" msgstr "セクションからデータを得られません %d: %s" -#: src/readelf.c:1232 +#: src/readelf.c:1315 msgid "Program Headers:" msgstr "プログラムヘッダー:" -#: src/readelf.c:1234 +#: src/readelf.c:1317 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " タイプ オフセ 仮アドレス 物アドレス ファイ量 メモ量 Flg 調整 " -#: src/readelf.c:1237 +#: src/readelf.c:1320 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4066,12 +4178,12 @@ msgstr "" " タイプ オフセ 仮想アドレス 物理アドレス ファイル量メモ" "量 Flg 調整 " -#: src/readelf.c:1294 +#: src/readelf.c:1377 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[プログラム割込みを要求: %s]\n" -#: src/readelf.c:1315 +#: src/readelf.c:1398 msgid "" "\n" " Section to Segment mapping:\n" @@ -4081,12 +4193,12 @@ msgstr "" " セクションからセグメントへのマッビング:\n" " セグメント セクション..." -#: src/readelf.c:1326 src/unstrip.c:1941 src/unstrip.c:1983 src/unstrip.c:1990 +#: src/readelf.c:1409 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993 #, c-format msgid "cannot get program header: %s" msgstr "プログラムヘッダーを得られません: %s" -#: src/readelf.c:1469 +#: src/readelf.c:1552 #, c-format msgid "" "\n" @@ -4099,7 +4211,7 @@ msgstr[0] "" "署名 '%3$s' を持つ COMDAT セクショングループ [%1$2zu] '%2$s' には %4$zu 個の" "項目があります:\n" -#: src/readelf.c:1474 +#: src/readelf.c:1557 #, c-format msgid "" "\n" @@ -4112,31 +4224,31 @@ msgstr[0] "" "署名 '%3$s' を持つセクショングループ [%1$2zu] '%2$s' には %4$zu 個の項目があ" "ります:\n" -#: src/readelf.c:1482 +#: src/readelf.c:1565 msgid "" msgstr "<不当なシンボル>" -#: src/readelf.c:1496 +#: src/readelf.c:1579 msgid "" msgstr "<不当なセクション>" -#: src/readelf.c:1519 src/readelf.c:2246 src/readelf.c:3329 src/readelf.c:9531 -#: src/readelf.c:9538 src/readelf.c:9582 src/readelf.c:9589 +#: src/readelf.c:1602 src/readelf.c:2329 src/readelf.c:3430 src/readelf.c:12294 +#: src/readelf.c:12301 src/readelf.c:12345 src/readelf.c:12352 msgid "Couldn't uncompress section" msgstr "" -#: src/readelf.c:1524 src/readelf.c:2251 src/readelf.c:3334 +#: src/readelf.c:1607 src/readelf.c:2334 src/readelf.c:3435 #, fuzzy, c-format msgid "cannot get section [%zd] header: %s" msgstr "セクションヘッダーを得られません: %s" -#: src/readelf.c:1668 src/readelf.c:2318 src/readelf.c:2576 src/readelf.c:2652 -#: src/readelf.c:2956 src/readelf.c:3030 src/readelf.c:4732 +#: src/readelf.c:1751 src/readelf.c:2401 src/readelf.c:2659 src/readelf.c:2735 +#: src/readelf.c:3039 src/readelf.c:3113 src/readelf.c:5308 #, fuzzy, c-format msgid "invalid sh_link value in section %zu" msgstr "不当な .debug_line セクション" -#: src/readelf.c:1671 +#: src/readelf.c:1754 #, c-format msgid "" "\n" @@ -4152,36 +4264,36 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:1681 +#: src/readelf.c:1764 msgid " Type Value\n" msgstr " タイプ 値\n" -#: src/readelf.c:1705 +#: src/readelf.c:1788 #, c-format msgid "Shared library: [%s]\n" msgstr "共用ライブラリー: [%s]\n" -#: src/readelf.c:1710 +#: src/readelf.c:1793 #, c-format msgid "Library soname: [%s]\n" msgstr "ライブラリー so 名: [%s]\n" -#: src/readelf.c:1715 +#: src/readelf.c:1798 #, c-format msgid "Library rpath: [%s]\n" msgstr "ライブラリー rパス: [%s]\n" -#: src/readelf.c:1720 +#: src/readelf.c:1803 #, c-format msgid "Library runpath: [%s]\n" msgstr "ライブラリー run パス: [%s]\n" -#: src/readelf.c:1740 +#: src/readelf.c:1823 #, c-format msgid "% (bytes)\n" msgstr "% (バイト)\n" -#: src/readelf.c:1853 src/readelf.c:2043 +#: src/readelf.c:1936 src/readelf.c:2126 #, c-format msgid "" "\n" @@ -4190,7 +4302,7 @@ msgstr "" "\n" "オフセット %#0 に不当なシンボルテーブル\n" -#: src/readelf.c:1871 src/readelf.c:2061 +#: src/readelf.c:1954 src/readelf.c:2144 #, c-format msgid "" "\n" @@ -4211,7 +4323,7 @@ msgstr[0] "" #. The .rela.dyn section does not refer to a specific section but #. instead of section index zero. Do not try to print a section #. name. -#: src/readelf.c:1886 src/readelf.c:2076 +#: src/readelf.c:1969 src/readelf.c:2159 #, c-format msgid "" "\n" @@ -4224,29 +4336,29 @@ msgstr[0] "" "オフセット %3$#0 のリロケーションセクション [%1$2u] '%2$s' には %4$d " "個の項目があります:\n" -#: src/readelf.c:1896 +#: src/readelf.c:1979 msgid " Offset Type Value Name\n" msgstr " オフセット タイプ 値 名前\n" -#: src/readelf.c:1898 +#: src/readelf.c:1981 msgid " Offset Type Value Name\n" msgstr " オフセット タイプ 値 名前\n" -#: src/readelf.c:1951 src/readelf.c:1962 src/readelf.c:1975 src/readelf.c:1996 -#: src/readelf.c:2008 src/readelf.c:2142 src/readelf.c:2154 src/readelf.c:2168 -#: src/readelf.c:2190 src/readelf.c:2203 +#: src/readelf.c:2034 src/readelf.c:2045 src/readelf.c:2058 src/readelf.c:2079 +#: src/readelf.c:2091 src/readelf.c:2225 src/readelf.c:2237 src/readelf.c:2251 +#: src/readelf.c:2273 src/readelf.c:2286 msgid "" msgstr "<不当なRELOC>" -#: src/readelf.c:2086 +#: src/readelf.c:2169 msgid " Offset Type Value Addend Name\n" msgstr " オフセット タイプ 値 付加名\n" -#: src/readelf.c:2088 +#: src/readelf.c:2171 msgid " Offset Type Value Addend Name\n" msgstr " オフセット タイプ 値 付加名\n" -#: src/readelf.c:2326 +#: src/readelf.c:2409 #, c-format msgid "" "\n" @@ -4258,39 +4370,39 @@ msgstr[0] "" "\n" "シンボルテーブル [%2u] '%s' には %u 個の項目があります:\n" -#: src/readelf.c:2331 +#: src/readelf.c:2414 #, 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:2339 +#: src/readelf.c:2422 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " 数 : 値 大き タイプ Bind Vis Ndx 名前\n" -#: src/readelf.c:2341 +#: src/readelf.c:2424 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " 数 : 値 大き タイプ Bind Vis Ndx 名前\n" -#: src/readelf.c:2361 +#: src/readelf.c:2444 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2449 +#: src/readelf.c:2532 #, c-format msgid "bad dynamic symbol" msgstr "不正な動的シンボル" -#: src/readelf.c:2531 +#: src/readelf.c:2614 msgid "none" msgstr "なし" -#: src/readelf.c:2548 +#: src/readelf.c:2631 msgid "| " msgstr "| <不明>" -#: src/readelf.c:2579 +#: src/readelf.c:2662 #, c-format msgid "" "\n" @@ -4306,17 +4418,17 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2600 +#: src/readelf.c:2683 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: バージョン: %hu ファイル: %s 数: %hu\n" -#: src/readelf.c:2613 +#: src/readelf.c:2696 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: 名前: %s フラグ: %s バージョン: %hu\n" -#: src/readelf.c:2656 +#: src/readelf.c:2739 #, c-format msgid "" "\n" @@ -4332,18 +4444,18 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:2684 +#: src/readelf.c:2767 #, 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:2699 +#: src/readelf.c:2782 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: 親 %d: %s\n" #. Print the header. -#: src/readelf.c:2960 +#: src/readelf.c:3043 #, c-format msgid "" "\n" @@ -4359,15 +4471,15 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'" -#: src/readelf.c:2988 +#: src/readelf.c:3071 msgid " 0 *local* " msgstr " 0 *ローカル* " -#: src/readelf.c:2993 +#: src/readelf.c:3076 msgid " 1 *global* " msgstr " 1 *グローバル* " -#: src/readelf.c:3035 +#: src/readelf.c:3118 #, c-format msgid "" "\n" @@ -4385,22 +4497,22 @@ msgstr[0] "" " アドレス: %#0* オフセット: %#08 セクションへのリンク: " "[%2u] '%s'\n" -#: src/readelf.c:3057 +#: src/readelf.c:3140 #, fuzzy, no-c-format msgid " Length Number % of total Coverage\n" msgstr " 長さ 数 全体の% 範囲 \n" -#: src/readelf.c:3059 +#: src/readelf.c:3142 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:3066 +#: src/readelf.c:3149 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:3079 +#: src/readelf.c:3162 #, fuzzy, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4409,27 +4521,37 @@ msgstr "" " テストの平均数: 検索成功: %f\n" " 検索失敗: %f\n" -#: src/readelf.c:3097 src/readelf.c:3152 src/readelf.c:3209 +#: src/readelf.c:3180 src/readelf.c:3244 src/readelf.c:3310 #, c-format msgid "cannot get data for section %d: %s" msgstr "セクションからデータを得られません %d: %s" -#: src/readelf.c:3105 +#: src/readelf.c:3188 #, fuzzy, c-format msgid "invalid data in sysv.hash section %d" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/readelf.c:3160 +#: src/readelf.c:3217 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3252 #, fuzzy, c-format msgid "invalid data in sysv.hash64 section %d" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/readelf.c:3218 +#: src/readelf.c:3283 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash64 section %d" +msgstr "セクション [%zu] '%s' の不当なデータ" + +#: src/readelf.c:3319 #, fuzzy, c-format msgid "invalid data in gnu.hash section %d" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/readelf.c:3285 +#: src/readelf.c:3386 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4439,7 +4561,7 @@ msgstr "" " ビットマスクの大きさ: %zu バイト %%% ビット設定 第2ハッシュシフ" "ト: %u\n" -#: src/readelf.c:3374 +#: src/readelf.c:3475 #, c-format msgid "" "\n" @@ -4452,7 +4574,7 @@ msgstr[0] "" "オフセット %3$#0 のライブラリー一覧セクション [%1$2zu] '%2$s' には " "%4$d 個の項目があります:\n" -#: src/readelf.c:3388 +#: src/readelf.c:3489 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4460,7 +4582,7 @@ msgstr "" " ライブラリー タイムスタンプ チェックサム バー" "ジョン フラグ" -#: src/readelf.c:3438 +#: src/readelf.c:3539 #, c-format msgid "" "\n" @@ -4471,142 +4593,102 @@ msgstr "" "オフセット %4$#0 の %3$ バイトのオブジェクト属性セクション " "[%1$2zu] '%2$s':\n" -#: src/readelf.c:3455 +#: src/readelf.c:3556 msgid " Owner Size\n" msgstr " 所有者 大きさ\n" -#: src/readelf.c:3484 +#: src/readelf.c:3585 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" #. Unknown subsection, print and skip. -#: src/readelf.c:3523 +#: src/readelf.c:3624 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" #. Tag_File -#: src/readelf.c:3528 +#: src/readelf.c:3629 #, c-format msgid " File: %11\n" msgstr " ファイル: %11\n" -#: src/readelf.c:3577 +#: src/readelf.c:3678 #, c-format msgid " %s: %, %s\n" msgstr " %s: %、%s\n" -#: src/readelf.c:3580 +#: src/readelf.c:3681 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3583 +#: src/readelf.c:3684 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3593 +#: src/readelf.c:3694 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3596 +#: src/readelf.c:3697 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3641 -#, c-format -msgid "%s+%# <%s+%#>" -msgstr "%s+%# <%s+%#>" - -#: src/readelf.c:3644 -#, c-format -msgid "%s+%#0* <%s+%#>" -msgstr "%s+%#0* <%s+%#>" - -#: src/readelf.c:3649 -#, c-format -msgid "%# <%s+%#>" -msgstr "%# <%s+%#>" - -#: src/readelf.c:3652 -#, c-format -msgid "%#0* <%s+%#>" -msgstr "%#0* <%s+%#>" - -#: src/readelf.c:3658 -#, c-format -msgid "%s+%# <%s>" -msgstr "%s+%# <%s>" - -#: src/readelf.c:3661 -#, c-format -msgid "%s+%#0* <%s>" -msgstr "%s+%#0* <%s>" - -#: src/readelf.c:3665 +#: src/readelf.c:3767 #, c-format -msgid "%# <%s>" -msgstr "%# <%s>" - -#: src/readelf.c:3668 -#, c-format -msgid "%#0* <%s>" -msgstr "%#0* <%s>" - -#: src/readelf.c:3673 -#, c-format -msgid "%s+%#" -msgstr "%s+%#" - -#: src/readelf.c:3676 -#, c-format -msgid "%s+%#0*" -msgstr "%s+%#0*" +msgid "sprintf failure" +msgstr "" -#: src/readelf.c:4054 +#: src/readelf.c:4249 msgid "empty block" msgstr "空ブロック" -#: src/readelf.c:4057 +#: src/readelf.c:4252 #, c-format msgid "%zu byte block:" msgstr "%zu バイトのブロック:" -#: src/readelf.c:4454 -#, c-format -msgid "%*s[%4] %s \n" +#: src/readelf.c:4730 +#, fuzzy, c-format +msgid "%*s[%2] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4511 +#: src/readelf.c:4794 #, c-format msgid "%s %# used with different address sizes" msgstr "" -#: src/readelf.c:4518 +#: src/readelf.c:4801 #, c-format msgid "%s %# used with different offset sizes" msgstr "" -#: src/readelf.c:4525 +#: src/readelf.c:4808 #, c-format msgid "%s %# used with different base addresses" msgstr "" -#: src/readelf.c:4614 +#: src/readelf.c:4815 +#, c-format +msgid "%s %# used with different attribute %s and %s" +msgstr "" + +#: src/readelf.c:4912 #, c-format msgid " [%6tx] \n" msgstr "" -#: src/readelf.c:4622 +#: src/readelf.c:4920 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr "" -#: src/readelf.c:4648 +#: src/readelf.c:4998 #, c-format msgid "" "\n" @@ -4617,7 +4699,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" " [ コード]\n" -#: src/readelf.c:4656 +#: src/readelf.c:5006 #, c-format msgid "" "\n" @@ -4626,30 +4708,74 @@ msgstr "" "\n" "オフセット % の略語セクション:\n" -#: src/readelf.c:4669 +#: src/readelf.c:5019 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** 略語を読んでいる間にエラー: %s\n" -#: src/readelf.c:4685 +#: src/readelf.c:5035 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] オフセット: %、子: %s、タグ: %s\n" -#: src/readelf.c:4688 -msgid "yes" -msgstr "はい" +#: src/readelf.c:5068 src/readelf.c:5377 src/readelf.c:5541 src/readelf.c:5926 +#: src/readelf.c:6527 src/readelf.c:8168 src/readelf.c:8838 src/readelf.c:9274 +#: src/readelf.c:9518 src/readelf.c:9683 src/readelf.c:10044 +#: src/readelf.c:10102 +#, c-format +msgid "" +"\n" +"DWARF section [%2zu] '%s' at offset %#:\n" +msgstr "" +"\n" +"オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" + +#: src/readelf.c:5081 +#, fuzzy, c-format +msgid "cannot get .debug_addr section data: %s" +msgstr "セクションデータを割り当てられません: %s" + +#: src/readelf.c:5181 src/readelf.c:5205 src/readelf.c:5586 src/readelf.c:8883 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr " (オフセット: %#)" + +#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905 +#, fuzzy, c-format +msgid " Address size: %8\n" +msgstr " (終了オフセット: %#)" + +#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915 +#, fuzzy, c-format +msgid " Segment size: %8\n" +msgstr " ファイルを % に設定する\n" + +#: src/readelf.c:5224 src/readelf.c:5603 src/readelf.c:8900 src/readelf.c:10234 +#, fuzzy, c-format +msgid "Unknown version" +msgstr "不明なバージョン" -#: src/readelf.c:4688 -msgid "no" -msgstr "いいえ" +#: src/readelf.c:5234 src/readelf.c:5447 src/readelf.c:5613 src/readelf.c:8910 +#, fuzzy, c-format +msgid "unsupported address size" +msgstr "アドレス値ではありません" + +#: src/readelf.c:5245 src/readelf.c:5456 src/readelf.c:5623 src/readelf.c:8920 +#, c-format +msgid "unsupported segment size" +msgstr "" -#: src/readelf.c:4722 src/readelf.c:4795 +#: src/readelf.c:5298 src/readelf.c:5372 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr ".debug_aragnes の内容を得られません: %s" -#: src/readelf.c:4737 +#: src/readelf.c:5313 #, c-format msgid "" "\n" @@ -4662,29 +4788,19 @@ msgstr[0] "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:4768 +#: src/readelf.c:5344 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4770 +#: src/readelf.c:5346 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" msgstr "" " [%*zu] 開始: %0#*、長さ: %5、CU DIE オフセット: %6\n" -#: src/readelf.c:4800 src/readelf.c:4954 src/readelf.c:5531 src/readelf.c:6485 -#: src/readelf.c:7017 src/readelf.c:7137 src/readelf.c:7301 src/readelf.c:7726 -#, c-format -msgid "" -"\n" -"DWARF section [%2zu] '%s' at offset %#:\n" -msgstr "" -"\n" -"オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" - -#: src/readelf.c:4813 src/readelf.c:6511 +#: src/readelf.c:5390 src/readelf.c:8195 #, fuzzy, c-format msgid "" "\n" @@ -4693,115 +4809,154 @@ msgstr "" "\n" "オフセット %Zu のテーブル:\n" -#: src/readelf.c:4817 src/readelf.c:5555 src/readelf.c:6522 +#: src/readelf.c:5394 src/readelf.c:5567 src/readelf.c:6551 src/readelf.c:8206 +#: src/readelf.c:8864 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/readelf.c:4833 +#: src/readelf.c:5410 #, fuzzy, c-format msgid "" "\n" " Length: %6\n" msgstr " (オフセット: %#)" -#: src/readelf.c:4845 +#: src/readelf.c:5422 #, fuzzy, c-format msgid " DWARF version: %6\n" msgstr " %s: %\n" -#: src/readelf.c:4849 +#: src/readelf.c:5426 #, c-format msgid "unsupported aranges version" msgstr "" -#: src/readelf.c:4860 +#: src/readelf.c:5437 #, fuzzy, c-format msgid " CU offset: %6\n" msgstr " (オフセット: %#)" -#: src/readelf.c:4866 +#: src/readelf.c:5443 #, fuzzy, c-format msgid " Address size: %6\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:4870 -#, fuzzy, c-format -msgid "unsupported address size" -msgstr "アドレス値ではありません" - -#: src/readelf.c:4875 +#: src/readelf.c:5452 #, fuzzy, c-format msgid "" " Segment size: %6\n" "\n" msgstr " ファイルを % に設定する\n" -#: src/readelf.c:4879 +#: src/readelf.c:5507 #, c-format -msgid "unsupported segment size" +msgid " %zu padding bytes\n" msgstr "" -#: src/readelf.c:4919 +#: src/readelf.c:5550 #, fuzzy, c-format -msgid " %s..%s (%)\n" -msgstr " %s: %\n" +msgid "cannot get .debug_rnglists content: %s" +msgstr ".degub_ranges の内容を得られません: %s" + +#: src/readelf.c:5573 src/readelf.c:8870 +#, fuzzy, c-format +msgid "" +"Table at Offset 0x%:\n" +"\n" +msgstr " (終了オフセット: %#)" -#: src/readelf.c:4922 +#: src/readelf.c:5628 src/readelf.c:8925 #, fuzzy, c-format -msgid " %s..%s\n" -msgstr " [%6tx] %s..%s\n" +msgid " Offset entries: %8\n" +msgstr " (オフセット: %#)" -#: src/readelf.c:4931 +#: src/readelf.c:5644 src/readelf.c:8941 #, c-format -msgid " %zu padding bytes\n" +msgid " Unknown CU base: " msgstr "" -#: src/readelf.c:4949 +#: src/readelf.c:5646 src/readelf.c:8943 +#, c-format +msgid " CU [%6] base: " +msgstr "" + +#: src/readelf.c:5652 src/readelf.c:8949 +#, c-format +msgid " Not associated with a CU.\n" +msgstr "" + +#: src/readelf.c:5663 src/readelf.c:8960 +#, c-format +msgid "too many offset entries for unit length" +msgstr "" + +#: src/readelf.c:5667 src/readelf.c:8964 +#, fuzzy, c-format +msgid " Offsets starting at 0x%:\n" +msgstr " 所有者 大きさ\n" + +#: src/readelf.c:5719 +#, fuzzy, c-format +msgid "invalid range list data" +msgstr "不当なデータ" + +#: src/readelf.c:5904 src/readelf.c:9252 +#, c-format +msgid "" +" %zu padding bytes\n" +"\n" +msgstr "" + +#: src/readelf.c:5921 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr ".degub_ranges の内容を得られません: %s" -#: src/readelf.c:4979 src/readelf.c:7044 +#: src/readelf.c:5957 src/readelf.c:9307 +#, c-format +msgid "" +"\n" +" Unknown CU base: " +msgstr "" + +#: src/readelf.c:5959 src/readelf.c:9309 +#, c-format +msgid "" +"\n" +" CU [%6] base: " +msgstr "" + +#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] <不当なデータ>\n" -#: src/readelf.c:5001 src/readelf.c:7066 -#, c-format -msgid " [%6tx] base address %s\n" +#: src/readelf.c:5989 src/readelf.c:9441 +#, fuzzy, c-format +msgid "" +" [%6tx] base address\n" +" " msgstr " [%6tx] ベースアドレス %s\n" -#: src/readelf.c:5008 src/readelf.c:7073 +#: src/readelf.c:5997 src/readelf.c:9449 #, fuzzy, c-format -msgid " [%6tx] empty list\n" +msgid " [%6tx] empty list\n" msgstr "" "\n" " [%6tx] ゼロ終端\n" -#. We have an address range entry. -#. First address range entry in a list. -#: src/readelf.c:5019 -#, c-format -msgid " [%6tx] %s..%s\n" -msgstr " [%6tx] %s..%s\n" - -#: src/readelf.c:5021 -#, c-format -msgid " %s..%s\n" -msgstr " %s..%s\n" - -#: src/readelf.c:5257 +#: src/readelf.c:6252 #, fuzzy msgid " \n" msgstr " [%6tx] <不当なデータ>\n" -#: src/readelf.c:5510 +#: src/readelf.c:6505 #, fuzzy, c-format msgid "cannot get ELF: %s" msgstr "次の DIE を得られません: %s" -#: src/readelf.c:5527 +#: src/readelf.c:6523 #, c-format msgid "" "\n" @@ -4810,7 +4965,7 @@ msgstr "" "\n" "オフセット %3$# の フレーム情報呼出しセクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:5577 +#: src/readelf.c:6573 #, c-format msgid "" "\n" @@ -4819,50 +4974,65 @@ msgstr "" "\n" " [%6tx] ゼロ終端\n" -#: src/readelf.c:5670 src/readelf.c:5825 +#: src/readelf.c:6666 src/readelf.c:6820 #, fuzzy, c-format msgid "invalid augmentation length" msgstr "不当な拡大エンコード" -#: src/readelf.c:5685 +#: src/readelf.c:6681 msgid "FDE address encoding: " msgstr "FDE アドレスエンコード" -#: src/readelf.c:5691 +#: src/readelf.c:6687 msgid "LSDA pointer encoding: " msgstr "LSDA ポインターエンコード:" -#: src/readelf.c:5802 +#: src/readelf.c:6797 #, c-format msgid " (offset: %#)" msgstr " (オフセット: %#)" -#: src/readelf.c:5809 +#: src/readelf.c:6804 #, c-format msgid " (end offset: %#)" msgstr " (終了オフセット: %#)" -#: src/readelf.c:5846 +#: src/readelf.c:6841 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sLSDA ポインター: %#\n" -#: src/readelf.c:5901 -#, c-format -msgid "cannot get attribute code: %s" +#: src/readelf.c:6926 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute code: %s" msgstr "属性コードを得られません: %s" -#: src/readelf.c:5910 -#, c-format -msgid "cannot get attribute form: %s" +#: src/readelf.c:6936 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute form: %s" msgstr "属性様式を得られません: %s" -#: src/readelf.c:5925 -#, c-format -msgid "cannot get attribute value: %s" +#: src/readelf.c:6958 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute '%s' (%s) value: %s" msgstr "属性値を得られません: %s" -#: src/readelf.c:6224 +#: src/readelf.c:7291 +#, fuzzy, c-format +msgid "invalid file (%): %s" +msgstr "不当なファイル" + +#: src/readelf.c:7295 +#, fuzzy, c-format +msgid "no srcfiles for CU [%]" +msgstr " ファイルを % に設定する\n" + +#: src/readelf.c:7299 +#, fuzzy, c-format +msgid "couldn't get DWARF CU: %s" +msgstr "次の DIE を得られません: %s" + +#: src/readelf.c:7522 #, c-format msgid "" "\n" @@ -4873,19 +5043,24 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" " [オフセット]\n" -#: src/readelf.c:6256 +#: src/readelf.c:7572 +#, fuzzy, c-format +msgid "cannot get next unit: %s" +msgstr "次の DIE を得られません: %s" + +#: src/readelf.c:7591 #, fuzzy, c-format msgid "" " Type unit at offset %:\n" " Version: %, Abbreviation section offset: %, Address size: " "%, Offset size: %\n" -" Type signature: %#, Type offset: %#\n" +" Type signature: %#, Type offset: %# [%]\n" msgstr "" " オフセット %1$ のコンパイル単位:\n" " バージョン: %2$、略語セクションオフセット: %3$、アドレスの大" "きさ: %4$、オフセットの大きさ: %5$\n" -#: src/readelf.c:6265 +#: src/readelf.c:7603 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -4896,35 +5071,50 @@ msgstr "" " バージョン: %2$、略語セクションオフセット: %3$、アドレスの大" "きさ: %4$、オフセットの大きさ: %5$\n" -#: src/readelf.c:6290 +#: src/readelf.c:7613 src/readelf.c:7776 +#, c-format +msgid " Unit type: %s (%)" +msgstr "" + +#: src/readelf.c:7640 #, c-format -msgid "cannot get DIE at offset % in section '%s': %s" +msgid "unknown version (%d) or unit type (%d)" msgstr "" -"セクション '%2$s' の オフセット %1$ の DIE を得られません: %3$s" -#: src/readelf.c:6304 +#: src/readelf.c:7669 #, c-format msgid "cannot get DIE offset: %s" msgstr "DIE オフセットを得られません: %s" -#: src/readelf.c:6313 -#, c-format -msgid "cannot get tag of DIE at offset % in section '%s': %s" +#: src/readelf.c:7678 +#, fuzzy, c-format +msgid "cannot get tag of DIE at offset [%] in section '%s': %s" msgstr "" "セクション '%2$s' 中のオフセット %1$ の DIE のタグを得られません: " "%3$s" -#: src/readelf.c:6345 +#: src/readelf.c:7716 #, c-format msgid "cannot get next DIE: %s\n" msgstr "次の DIE を得られません: %s\n" -#: src/readelf.c:6353 +#: src/readelf.c:7724 #, c-format msgid "cannot get next DIE: %s" msgstr "次の DIE を得られません: %s" -#: src/readelf.c:6389 +#: src/readelf.c:7768 +#, fuzzy, c-format +msgid "" +" Split compilation unit at offset %:\n" +" Version: %, Abbreviation section offset: %, Address size: " +"%, Offset size: %\n" +msgstr "" +" オフセット %1$ のコンパイル単位:\n" +" バージョン: %2$、略語セクションオフセット: %3$、アドレスの大" +"きさ: %4$、オフセットの大きさ: %5$\n" + +#: src/readelf.c:7819 #, fuzzy, c-format msgid "" "\n" @@ -4934,25 +5124,32 @@ msgstr "" "\n" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" -#: src/readelf.c:6498 +#: src/readelf.c:8151 +#, fuzzy, c-format +msgid "unknown form: %s" +msgstr "不明な様式 %" + +#: src/readelf.c:8182 #, c-format msgid "cannot get line data section data: %s" msgstr "ラインデータセクションデータを得られません: %s" #. Print what we got so far. -#: src/readelf.c:6568 +#: src/readelf.c:8284 #, fuzzy, c-format msgid "" "\n" -" Length: %\n" -" DWARF version: %\n" -" Prologue length: %\n" -" Minimum instruction length: %\n" -" Maximum operations per instruction: %\n" -" Initial value if '%s': %\n" -" Line base: %\n" -" Line range: %\n" -" Opcode base: %\n" +" Length: %\n" +" DWARF version: %\n" +" Prologue length: %\n" +" Address size: %zd\n" +" Segment selector size: %zd\n" +" Min instruction length: %\n" +" Max operations per instruction: %\n" +" Initial value if 'is_stmt': %\n" +" Line base: %\n" +" Line range: %\n" +" Opcode base: %\n" "\n" "Opcodes:\n" msgstr "" @@ -4968,18 +5165,33 @@ msgstr "" "\n" "命令コード:\n" -#: src/readelf.c:6589 +#: src/readelf.c:8306 +#, fuzzy, c-format +msgid "cannot handle .debug_line version: %u\n" +msgstr ".degub_ranges の内容を得られません: %s" + +#: src/readelf.c:8314 +#, fuzzy, c-format +msgid "cannot handle address size: %u\n" +msgstr "アドレス値ではありません" + +#: src/readelf.c:8322 +#, fuzzy, c-format +msgid "cannot handle segment selector size: %u\n" +msgstr "セクションを得られません: %s" + +#: src/readelf.c:8332 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "セクション [%2$zu] '%3$s' 中のオフセット %1$tu に不当なデータ" -#: src/readelf.c:6604 +#: src/readelf.c:8347 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" msgstr[0] " [%*] %hhu パラメーター\n" -#: src/readelf.c:6612 +#: src/readelf.c:8358 msgid "" "\n" "Directory table:" @@ -4987,17 +5199,29 @@ msgstr "" "\n" "ディレクトリーテーブル:" -#: src/readelf.c:6628 +#: src/readelf.c:8364 src/readelf.c:8439 +#, fuzzy, c-format +msgid " [" +msgstr " %s: %s\n" + +#: src/readelf.c:8433 +#, fuzzy msgid "" "\n" -"File name table:\n" -" Entry Dir Time Size Name" +"File name table:" +msgstr "" +"\n" +" 呼出しサイトテーブル:" + +#: src/readelf.c:8494 +#, fuzzy +msgid " Entry Dir Time Size Name" msgstr "" "\n" "ファイル名テーブル:\n" " Entry Dir 時刻 大きさ 名前" -#: src/readelf.c:6663 +#: src/readelf.c:8529 msgid "" "\n" "Line number statements:" @@ -5005,119 +5229,119 @@ msgstr "" "\n" "行 番号 文:" -#: src/readelf.c:6714 +#: src/readelf.c:8552 #, c-format msgid "invalid maximum operations per instruction is zero" msgstr "" -#: src/readelf.c:6750 +#: src/readelf.c:8586 #, fuzzy, c-format -msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" +msgid " special opcode %u: address+%u = " msgstr " 特殊命令コード %u: アドレス+%u = %s, 行%+d = %zu\n" -#: src/readelf.c:6755 -#, c-format -msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" +#: src/readelf.c:8590 +#, fuzzy, c-format +msgid ", op_index = %u, line%+d = %zu\n" msgstr " 特殊命令コード %u: アドレス+%u = %s, 行%+d = %zu\n" -#: src/readelf.c:6775 +#: src/readelf.c:8593 +#, c-format +msgid ", line%+d = %zu\n" +msgstr "" + +#: src/readelf.c:8611 #, c-format msgid " extended opcode %u: " msgstr " 拡張命令コード %u: " -#: src/readelf.c:6780 +#: src/readelf.c:8616 #, fuzzy msgid " end of sequence" msgstr "列の終わり" -#: src/readelf.c:6799 +#: src/readelf.c:8634 #, fuzzy, c-format -msgid " set address to %s\n" +msgid " set address to " msgstr "アドレスを %s に設定する\n" -#: src/readelf.c:6826 +#: src/readelf.c:8662 #, fuzzy, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" "新ファイルを定義する: dir=%u、mtime=%、長さh=%、名前=%s\n" -#: src/readelf.c:6839 +#: src/readelf.c:8675 #, fuzzy, c-format msgid " set discriminator to %u\n" msgstr "カラムを % に設定する\n" #. Unknown, ignore it. -#: src/readelf.c:6844 +#: src/readelf.c:8680 #, fuzzy msgid " unknown opcode" msgstr "不明な命令コード" #. Takes no argument. -#: src/readelf.c:6856 +#: src/readelf.c:8692 msgid " copy" msgstr "複写" -#: src/readelf.c:6867 +#: src/readelf.c:8701 #, fuzzy, c-format -msgid " advance address by %u to %s, op_index to %u\n" +msgid " advance address by %u to " msgstr "アドレスを %u だけ進めて %s にする\n" -#: src/readelf.c:6871 -#, fuzzy, c-format -msgid " advance address by %u to %s\n" -msgstr "アドレスを %u だけ進めて %s にする\n" +#: src/readelf.c:8705 src/readelf.c:8761 +#, c-format +msgid ", op_index to %u" +msgstr "" -#: src/readelf.c:6882 +#: src/readelf.c:8715 #, c-format msgid " advance line by constant %d to %\n" msgstr "行を定数 %d だけ進めて % にする\n" -#: src/readelf.c:6890 +#: src/readelf.c:8723 #, c-format msgid " set file to %\n" msgstr " ファイルを % に設定する\n" -#: src/readelf.c:6900 +#: src/readelf.c:8733 #, c-format msgid " set column to %\n" msgstr "カラムを % に設定する\n" -#: src/readelf.c:6907 +#: src/readelf.c:8740 #, c-format msgid " set '%s' to %\n" msgstr " '%s' を % に設定する\n" #. Takes no argument. -#: src/readelf.c:6913 +#: src/readelf.c:8746 msgid " set basic block flag" msgstr "基本ブロックフラグを設定する" -#: src/readelf.c:6926 -#, fuzzy, c-format -msgid " advance address by constant %u to %s, op_index to %u\n" -msgstr "アドレスを定数 %u だけ済めて %s にする\n" - -#: src/readelf.c:6930 +#: src/readelf.c:8757 #, fuzzy, c-format -msgid " advance address by constant %u to %s\n" +msgid " advance address by constant %u to " msgstr "アドレスを定数 %u だけ済めて %s にする\n" -#: src/readelf.c:6948 +#: src/readelf.c:8776 #, fuzzy, c-format -msgid " advance address by fixed value %u to %s\n" +msgid " advance address by fixed value %u to \n" msgstr "アドレスを固定値 %u だけ進めて %s にする\n" #. Takes no argument. -#: src/readelf.c:6957 +#: src/readelf.c:8786 msgid " set prologue end flag" msgstr "プロローグ終了フラグを設定する" #. Takes no argument. -#: src/readelf.c:6962 +#: src/readelf.c:8791 msgid " set epilogue begin flag" msgstr "エピローグ開始フラグを設定する" -#: src/readelf.c:6971 +#: src/readelf.c:8800 #, fuzzy, c-format msgid " set isa to %u\n" msgstr " ファイルを % に設定する\n" @@ -5125,104 +5349,98 @@ msgstr " ファイルを % に設定する\n" #. 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. -#: src/readelf.c:6980 +#: src/readelf.c:8809 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" msgstr[0] " % 個のパラメーターのある不明な命令コード:" -#: src/readelf.c:7012 -#, c-format -msgid "cannot get .debug_loc content: %s" +#: src/readelf.c:8847 +#, fuzzy, c-format +msgid "cannot get .debug_loclists content: %s" msgstr ".debug_loc の内容を得られません: %s" -#. First entry in a list. -#: src/readelf.c:7087 -#, c-format -msgid " [%6tx] %s..%s" -msgstr " [%6tx] %s..%s" +#: src/readelf.c:9016 +#, fuzzy, c-format +msgid "invalid loclists data" +msgstr "不当なデータ" -#: src/readelf.c:7089 +#: src/readelf.c:9269 #, c-format -msgid " %s..%s" -msgstr " %s..%s" +msgid "cannot get .debug_loc content: %s" +msgstr ".debug_loc の内容を得られません: %s" -#: src/readelf.c:7096 src/readelf.c:7984 +#: src/readelf.c:9476 src/readelf.c:10490 #, fuzzy msgid " \n" msgstr " [%6tx] <不当なデータ>\n" -#: src/readelf.c:7148 src/readelf.c:7310 +#: src/readelf.c:9530 src/readelf.c:9693 #, c-format msgid "cannot get macro information section data: %s" msgstr "マクロ情報セクションのデータを得られません: %s" -#: src/readelf.c:7228 +#: src/readelf.c:9610 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** 最後のセクションの終端していない文字列" -#: src/readelf.c:7251 +#: src/readelf.c:9633 #, fuzzy, c-format msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" msgstr "%*s*** 最後のセクションの終端していない文字列" -#: src/readelf.c:7351 +#: src/readelf.c:9734 #, fuzzy, c-format msgid " Offset: 0x%\n" msgstr " 所有者 大きさ\n" -#: src/readelf.c:7363 +#: src/readelf.c:9746 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:7369 src/readelf.c:8103 +#: src/readelf.c:9752 src/readelf.c:10609 #, c-format msgid " unknown version, cannot parse section\n" msgstr "" -#: src/readelf.c:7376 +#: src/readelf.c:9759 #, fuzzy, c-format msgid " Flag: 0x%\n" msgstr " 入口点アドレス : %#\n" -#: src/readelf.c:7379 +#: src/readelf.c:9762 #, fuzzy, c-format msgid " Offset length: %\n" msgstr " (オフセット: %#)" -#: src/readelf.c:7387 +#: src/readelf.c:9770 #, fuzzy, c-format msgid " .debug_line offset: 0x%\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:7400 +#: src/readelf.c:9795 #, fuzzy, c-format msgid " extension opcode table, % items:\n" msgstr " % 個のパラメーターのある不明な命令コード:" -#: src/readelf.c:7407 +#: src/readelf.c:9802 #, c-format msgid " [%]" msgstr "" -#: src/readelf.c:7419 +#: src/readelf.c:9814 #, fuzzy, c-format msgid " % arguments:" msgstr " [%*] %hhu パラメーター\n" -#: src/readelf.c:7447 +#: src/readelf.c:9829 #, c-format msgid " no arguments." msgstr "" -#: src/readelf.c:7684 -#, c-format -msgid "vendor opcode not verified?" -msgstr "" - -#: src/readelf.c:7712 +#: src/readelf.c:10030 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" @@ -5230,7 +5448,7 @@ msgstr "" # # "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" # # " %4$*s 文字列\n" がエラーになるのは何故? 取り敢えず fuzzy扱い -#: src/readelf.c:7753 +#: src/readelf.c:10072 #, fuzzy, c-format msgid "" "\n" @@ -5241,12 +5459,37 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s':\n" " %4$*s 文字列\n" -#: src/readelf.c:7767 -#, c-format -msgid " *** error while reading strings: %s\n" +#: src/readelf.c:10087 +#, fuzzy, c-format +msgid " *** error, missing string terminator\n" msgstr " *** 文字列の読込み中にエラー: %s\n" -#: src/readelf.c:7787 +#: src/readelf.c:10115 +#, fuzzy, c-format +msgid "cannot get .debug_str_offsets section data: %s" +msgstr ".degub_ranges の内容を得られません: %s" + +#: src/readelf.c:10214 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr " (オフセット: %#)" + +#: src/readelf.c:10216 +#, fuzzy, c-format +msgid " Offset size: %8\n" +msgstr " (オフセット: %#)" + +#: src/readelf.c:10230 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " %s: %\n" + +#: src/readelf.c:10239 +#, fuzzy, c-format +msgid " Padding: %8\n" +msgstr " (オフセット: %#)" + +#: src/readelf.c:10293 #, c-format msgid "" "\n" @@ -5255,7 +5498,7 @@ msgstr "" "\n" "呼出しフレーム検索テーブルセクション [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7889 +#: src/readelf.c:10395 #, c-format msgid "" "\n" @@ -5264,22 +5507,22 @@ msgstr "" "\n" "例外取扱いテーブルセクション [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7912 +#: src/readelf.c:10418 #, c-format msgid " LPStart encoding: %#x " msgstr " LPStart コード化: %#x " -#: src/readelf.c:7924 +#: src/readelf.c:10430 #, c-format msgid " TType encoding: %#x " msgstr "TType コード化: %#x " -#: src/readelf.c:7939 +#: src/readelf.c:10445 #, c-format msgid " Call site encoding: %#x " msgstr "呼出しサイトコード化: %#x " -#: src/readelf.c:7952 +#: src/readelf.c:10458 msgid "" "\n" " Call site table:" @@ -5287,7 +5530,7 @@ msgstr "" "\n" " 呼出しサイトテーブル:" -#: src/readelf.c:7966 +#: src/readelf.c:10472 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5300,12 +5543,12 @@ msgstr "" " 離着陸場: %#\n" " 行動: %u\n" -#: src/readelf.c:8039 +#: src/readelf.c:10545 #, c-format msgid "invalid TType encoding" msgstr "不当な TType コード化" -#: src/readelf.c:8065 +#: src/readelf.c:10571 #, fuzzy, c-format msgid "" "\n" @@ -5315,37 +5558,37 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:8094 +#: src/readelf.c:10600 #, fuzzy, c-format msgid " Version: %\n" msgstr " %s: %\n" -#: src/readelf.c:8112 +#: src/readelf.c:10618 #, fuzzy, c-format msgid " CU offset: %#\n" msgstr " (オフセット: %#)" -#: src/readelf.c:8119 +#: src/readelf.c:10625 #, fuzzy, c-format msgid " TU offset: %#\n" msgstr " (オフセット: %#)" -#: src/readelf.c:8126 +#: src/readelf.c:10632 #, fuzzy, c-format msgid " address offset: %#\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:8133 +#: src/readelf.c:10639 #, fuzzy, c-format msgid " symbol offset: %#\n" msgstr " (オフセット: %#)" -#: src/readelf.c:8140 +#: src/readelf.c:10646 #, fuzzy, c-format msgid " constant offset: %#\n" msgstr " (終了オフセット: %#)" -#: src/readelf.c:8154 +#: src/readelf.c:10660 #, fuzzy, c-format msgid "" "\n" @@ -5355,7 +5598,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:8179 +#: src/readelf.c:10685 #, fuzzy, c-format msgid "" "\n" @@ -5365,7 +5608,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:8208 +#: src/readelf.c:10714 #, fuzzy, c-format msgid "" "\n" @@ -5375,7 +5618,7 @@ msgstr "" "オフセット %3$# の DWARF セクション [%1$2zu] '%2$s' には %4$zu 個の項" "目があります:\n" -#: src/readelf.c:8241 +#: src/readelf.c:10746 #, fuzzy, c-format msgid "" "\n" @@ -5384,17 +5627,18 @@ msgstr "" "\n" "オフセット %#0 に不当なシンボルテーブル\n" -#: src/readelf.c:8328 +#: src/readelf.c:10884 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "デバッグ内容記述子を得られません: %s" -#: src/readelf.c:8484 src/readelf.c:9106 src/readelf.c:9217 src/readelf.c:9275 +#: src/readelf.c:11247 src/readelf.c:11869 src/readelf.c:11980 +#: src/readelf.c:12038 #, c-format msgid "cannot convert core note data: %s" msgstr "コアノートデータの変換ができません: %s" -#: src/readelf.c:8847 +#: src/readelf.c:11610 #, c-format msgid "" "\n" @@ -5403,21 +5647,21 @@ msgstr "" "\n" "%*s... < %u 回の繰返し> ..." -#: src/readelf.c:9354 +#: src/readelf.c:12117 msgid " Owner Data size Type\n" msgstr " 所有者 データ大きさタイプ\n" -#: src/readelf.c:9372 +#: src/readelf.c:12135 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:9422 -#, c-format -msgid "cannot get content of note section: %s" +#: src/readelf.c:12185 +#, fuzzy, c-format +msgid "cannot get content of note: %s" msgstr "ノートセクションの内容を得られません: %s" -#: src/readelf.c:9449 +#: src/readelf.c:12212 #, c-format msgid "" "\n" @@ -5427,7 +5671,7 @@ msgstr "" "オフセット %4$#0 の %3$ バイトのノートセクション [%1$2zu] " "'%2$s':\n" -#: src/readelf.c:9472 +#: src/readelf.c:12235 #, c-format msgid "" "\n" @@ -5436,7 +5680,7 @@ msgstr "" "\n" "オフセット %2$#0 の %1$ バイトのノートセグメント:\n" -#: src/readelf.c:9518 +#: src/readelf.c:12281 #, fuzzy, c-format msgid "" "\n" @@ -5445,12 +5689,12 @@ msgstr "" "\n" "セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" -#: src/readelf.c:9545 src/readelf.c:9596 +#: src/readelf.c:12308 src/readelf.c:12359 #, fuzzy, c-format msgid "cannot get data for section [%zu] '%s': %s" msgstr "セクション [%Zu] '%s' からデータが得られません: %s" -#: src/readelf.c:9550 +#: src/readelf.c:12313 #, fuzzy, c-format msgid "" "\n" @@ -5460,7 +5704,7 @@ msgstr "" "オフセット %4$#0 のセクション [%1$Zu] '%2$s' の16進ダン" "プ、%3$ バイト:\n" -#: src/readelf.c:9555 +#: src/readelf.c:12318 #, fuzzy, c-format msgid "" "\n" @@ -5471,7 +5715,7 @@ msgstr "" "オフセット %4$#0 のセクション [%1$Zu] '%2$s' の16進ダン" "プ、%3$ バイト:\n" -#: src/readelf.c:9569 +#: src/readelf.c:12332 #, fuzzy, c-format msgid "" "\n" @@ -5480,7 +5724,7 @@ msgstr "" "\n" "セクション [%Zu] '%s' にはダンプすべきデータがありません。\n" -#: src/readelf.c:9601 +#: src/readelf.c:12364 #, fuzzy, c-format msgid "" "\n" @@ -5490,7 +5734,7 @@ msgstr "" "オフセット %4$#0 文字列セクション [%1$Zu] '%2$s' には %3$ バ" "イトあります:\n" -#: src/readelf.c:9606 +#: src/readelf.c:12369 #, fuzzy, c-format msgid "" "\n" @@ -5501,7 +5745,7 @@ msgstr "" "オフセット %4$#0 文字列セクション [%1$Zu] '%2$s' には %3$ バ" "イトあります:\n" -#: src/readelf.c:9655 +#: src/readelf.c:12418 #, c-format msgid "" "\n" @@ -5510,7 +5754,7 @@ msgstr "" "\n" "セクション [%lu] がありません" -#: src/readelf.c:9684 +#: src/readelf.c:12447 #, c-format msgid "" "\n" @@ -5519,12 +5763,12 @@ msgstr "" "\n" "セクション '%s' がありません" -#: src/readelf.c:9741 +#: src/readelf.c:12504 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "アーカイブのシンボル索引 '%s' を得られません: %s" -#: src/readelf.c:9744 +#: src/readelf.c:12507 #, c-format msgid "" "\n" @@ -5533,7 +5777,7 @@ msgstr "" "\n" "アーカイブ '%s' にはシンボル索引がありません\n" -#: src/readelf.c:9748 +#: src/readelf.c:12511 #, fuzzy, c-format msgid "" "\n" @@ -5542,12 +5786,12 @@ msgstr "" "\n" "アーカイブ '%s' の索引には %Zu 項目あります:\n" -#: src/readelf.c:9766 +#: src/readelf.c:12529 #, fuzzy, c-format msgid "cannot extract member at offset %zu in '%s': %s" msgstr "'%2$s' の オフセット %1$Zu のメンバーを抽出できません: %3$s" -#: src/readelf.c:9771 +#: src/readelf.c:12534 #, c-format msgid "Archive member '%s' contains:\n" msgstr "アーカイブメンバー '%s' には以下があります:\n" @@ -5621,259 +5865,278 @@ msgstr " (ex %s)" msgid "(TOTALS)\n" msgstr "(合計)\n" -#: src/stack.c:481 +#: src/stack.c:483 +#, c-format msgid "-p PID should be a positive process id." msgstr "" -#: src/stack.c:487 +#: src/stack.c:489 #, fuzzy, c-format msgid "Cannot open core file '%s'" msgstr "アーカイブ '%s' を開くことができません" -#: src/stack.c:547 +#: src/stack.c:549 +#, c-format msgid "-n MAXFRAMES should be 0 or higher." msgstr "" -#: src/stack.c:559 +#: src/stack.c:561 +#, c-format msgid "-e EXEC needs a core given by --core." msgstr "" -#: src/stack.c:563 +#: src/stack.c:565 +#, c-format msgid "-1 needs a thread id given by -p." msgstr "" -#: src/stack.c:567 +#: src/stack.c:569 +#, c-format msgid "One of -p PID or --core COREFILE should be given." msgstr "" -#: src/stack.c:637 +#: src/stack.c:641 #, fuzzy msgid "Show stack of process PID" msgstr "検索ツリーを生成できません" -#: src/stack.c:639 +#: src/stack.c:643 msgid "Show stack found in COREFILE" msgstr "" -#: src/stack.c:640 +#: src/stack.c:644 msgid "(optional) EXECUTABLE that produced COREFILE" msgstr "" -#: src/stack.c:644 +#: src/stack.c:648 #, fuzzy msgid "Output selection options:" msgstr "選択オプションを入力してください:" -#: src/stack.c:646 +#: src/stack.c:650 #, fuzzy msgid "Additionally show frame activation" msgstr "出力選択:" -#: src/stack.c:648 +#: src/stack.c:652 msgid "Additionally try to lookup DWARF debuginfo name for frame address" msgstr "" -#: src/stack.c:651 +#: src/stack.c:655 msgid "" "Additionally show inlined function frames using DWARF debuginfo if available " "(implies -d)" msgstr "" -#: src/stack.c:653 +#: src/stack.c:657 msgid "Additionally show module file information" msgstr "" -#: src/stack.c:655 +#: src/stack.c:659 #, fuzzy msgid "Additionally show source file information" msgstr "出力選択:" -#: src/stack.c:657 +#: src/stack.c:661 msgid "" "Show all additional information (activation, debugname, inlines, module and " "source)" msgstr "" -#: src/stack.c:659 +#: src/stack.c:663 msgid "Do not resolve address to function symbol name" msgstr "" -#: src/stack.c:661 +#: src/stack.c:665 msgid "Show raw function symbol names, do not try to demangle names" msgstr "" -#: src/stack.c:663 +#: src/stack.c:667 msgid "Show module build-id, load address and pc offset" msgstr "" -#: src/stack.c:665 +#: src/stack.c:669 msgid "Show the backtrace of only one thread" msgstr "" -#: src/stack.c:667 +#: src/stack.c:671 msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" msgstr "" -#: src/stack.c:669 +#: src/stack.c:673 msgid "Show module memory map with build-id, elf and debug files detected" msgstr "" -#: src/stack.c:677 +#: src/stack.c:681 msgid "" -"Print a stack for each thread in a process or core file.\vProgram exits with " -"return code 0 if all frames were shown without any errors. If some frames " -"were shown, but there were some non-fatal errors, possibly causing an " -"incomplete backtrace, the program exits with return code 1. If no frames " -"could be shown, or a fatal error occured the program exits with return code " -"2. If the program was invoked with bad or missing arguments it will exit " -"with return code 64." +"Print a stack for each thread in a process or core file.\n" +"\n" +"Program exits with return code 0 if all frames were shown without any " +"errors. If some frames were shown, but there were some non-fatal errors, " +"possibly causing an incomplete backtrace, the program exits with return code " +"1. If no frames could be shown, or a fatal error occured the program exits " +"with return code 2. If the program was invoked with bad or missing " +"arguments it will exit with return code 64." msgstr "" -#: src/stack.c:750 +#: src/stack.c:756 +#, c-format msgid "Couldn't show any frames." msgstr "" -#: src/strings.c:65 +#: src/strings.c:66 msgid "Output Selection:" msgstr "" -#: src/strings.c:66 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "" -#: src/strings.c:68 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" -#: src/strings.c:69 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" msgstr "" -#: src/strings.c:73 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "" -#: src/strings.c:75 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "" -#: src/strings.c:76 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "" #. Short description of program. -#: src/strings.c:83 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "" -#: src/strings.c:256 src/strings.c:291 +#: src/strings.c:257 src/strings.c:292 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "" -#: src/strings.c:302 +#: src/strings.c:303 #, c-format msgid "invalid minimum length of matched string size" msgstr "" -#: src/strings.c:585 +#: src/strings.c:586 #, c-format msgid "lseek failed" msgstr "" -#: src/strings.c:602 src/strings.c:666 +#: src/strings.c:603 src/strings.c:667 #, c-format msgid "re-mmap failed" msgstr "" -#: src/strings.c:639 +#: src/strings.c:640 #, c-format msgid "mprotect failed" msgstr "" -#: src/strings.c:728 +#: src/strings.c:729 #, c-format msgid "Skipping section %zd '%s' data outside file" msgstr "" -#: src/strip.c:68 +#: src/strip.c:71 msgid "Place stripped output into FILE" msgstr "はぎ取った出力を ふぁいる に置く" -#: src/strip.c:69 +#: src/strip.c:72 msgid "Extract the removed sections into FILE" msgstr "抽出した取り除いたセクションを ふぁいる に置く" -#: src/strip.c:70 +#: src/strip.c:73 msgid "Embed name FILE instead of -f argument" msgstr "-f パラメーターの代わりに 名前 ふぁいる を有効にする" -#: src/strip.c:74 +#: src/strip.c:77 msgid "Remove all debugging symbols" msgstr "デバッグ用のシンボルを全て取り除く" -#: src/strip.c:78 +#: src/strip.c:81 msgid "Remove section headers (not recommended)" msgstr "" -#: src/strip.c:80 +#: src/strip.c:83 msgid "Copy modified/access timestamps to the output" msgstr "修正/アクセスタイムスタンプを出力へ複写する" -#: src/strip.c:82 +#: src/strip.c:85 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " "operation is not reversable, needs -f)" msgstr "" -#: src/strip.c:84 +#: src/strip.c:87 msgid "Remove .comment section" msgstr ".comment セクションを取り除く" +#: src/strip.c:88 +msgid "" +"Remove the named section. SECTION is an extended wildcard pattern. May be " +"given more than once. Only non-allocated sections can be removed." +msgstr "" + +#: src/strip.c:89 +msgid "" +"Keep the named section. SECTION is an extended wildcard pattern. May be " +"given more than once." +msgstr "" + #. Short description of program. -#: src/strip.c:92 +#: src/strip.c:96 msgid "Discard symbols from object files." msgstr "オブジェクトファイルからシンボルを破棄する" -#: src/strip.c:186 +#: src/strip.c:242 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "" -#: src/strip.c:200 +#: src/strip.c:256 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "'-o' と '-f' と一緒の場合は入力ファイルは 1 つしか認められません" -#: src/strip.c:222 +#: src/strip.c:279 #, c-format msgid "-f option specified twice" msgstr "-f オプションが 2 回指定されています" -#: src/strip.c:231 +#: src/strip.c:288 #, c-format msgid "-F option specified twice" msgstr "-F オプションが 2 回指定されています" -#: src/strip.c:264 -#, c-format -msgid "-R option supports only .comment section" -msgstr "-R オプションは .comment セクションのみをサポートします" +#: src/strip.c:347 +#, fuzzy, c-format +msgid "cannot both keep and remove .comment section" +msgstr ".comment セクションを取り除く" -#: src/strip.c:306 src/strip.c:330 +#: src/strip.c:372 src/strip.c:396 #, c-format msgid "cannot stat input file '%s'" msgstr "入力ファイル '%s' を stat できません" -#: src/strip.c:320 +#: src/strip.c:386 #, c-format msgid "while opening '%s'" msgstr "'%s' を開いている間" -#: src/strip.c:358 +#: src/strip.c:424 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: アーカイブから抜き出している時は -o や -f は使えません" @@ -5884,107 +6147,117 @@ msgstr "%s: アーカイブから抜き出している時は -o や -f は使え #. result = handle_ar (fd, elf, NULL, fname, #. preserve_dates ? tv : NULL); #. -#: src/strip.c:370 +#: src/strip.c:436 #, fuzzy, c-format msgid "%s: no support for stripping archive" msgstr "%s: アーカイブから抜き出している時は -o や -f は使えません" -#: src/strip.c:469 +#: src/strip.c:535 #, c-format msgid "cannot open EBL backend" msgstr "EBL バックエンドを開けません" -#: src/strip.c:514 +#: src/strip.c:580 #, fuzzy, c-format msgid "cannot get number of phdrs" msgstr "セクション数を決定できません: %s" -#: src/strip.c:530 src/strip.c:554 +#: src/strip.c:596 src/strip.c:620 #, c-format msgid "cannot create new file '%s': %s" msgstr "新しいファイル '%s' を生成できません: %s" -#: src/strip.c:620 +#: src/strip.c:686 #, c-format msgid "illformed file '%s'" msgstr "不適格なファイル '%s'" -#: src/strip.c:954 src/strip.c:1053 +#: src/strip.c:696 +#, fuzzy, c-format +msgid "Cannot remove allocated section '%s'" +msgstr "PLT セクションを割り当てられません: %s" + +#: src/strip.c:705 +#, fuzzy, c-format +msgid "Cannot both keep and remove section '%s'" +msgstr "0番目のセクションのヘッダーを得られません: %s" + +#: src/strip.c:1061 src/strip.c:1160 #, c-format msgid "while generating output file: %s" msgstr "出力ファイルを生成している間: %s" -#: src/strip.c:1019 src/strip.c:2089 +#: src/strip.c:1126 src/strip.c:2208 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: ELF ヘッダーを生成している間にエラー: %s" -#: src/strip.c:1036 +#: src/strip.c:1143 #, c-format msgid "while preparing output for '%s'" msgstr "'%s' のための出力を準備している間" -#: src/strip.c:1094 src/strip.c:1157 +#: src/strip.c:1205 src/strip.c:1268 #, c-format msgid "while create section header section: %s" msgstr "セクションヘッダーセクションを生成している間: %s" -#: src/strip.c:1103 +#: src/strip.c:1214 #, c-format msgid "cannot allocate section data: %s" msgstr "セクションデータを割り当てられません: %s" -#: src/strip.c:1169 +#: src/strip.c:1280 #, c-format msgid "while create section header string table: %s" msgstr "セクションヘッダー文字列テーブルを生成中: %s" -#: src/strip.c:1176 +#: src/strip.c:1287 #, fuzzy, c-format msgid "no memory to create section header string table" msgstr "セクションヘッダー文字列テーブルを生成中: %s" -#: src/strip.c:1383 +#: src/strip.c:1497 #, c-format msgid "Cannot remove symbol [%zd] from allocated symbol table [%zd]" msgstr "" -#: src/strip.c:1875 +#: src/strip.c:1994 #, fuzzy, c-format msgid "bad relocation" msgstr "リロケーションを表示" -#: src/strip.c:2000 src/strip.c:2113 +#: src/strip.c:2119 src/strip.c:2232 #, c-format msgid "while writing '%s': %s" msgstr "'%s' を書込み中: %s" -#: src/strip.c:2011 +#: src/strip.c:2130 #, c-format msgid "while creating '%s'" msgstr "'%s' を生成中" -#: src/strip.c:2034 +#: src/strip.c:2153 #, c-format msgid "while computing checksum for debug information" msgstr "デバッグ情報のチェックサムを計算中" -#: src/strip.c:2098 +#: src/strip.c:2217 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: ファイルを読込み中にエラー: %s" -#: src/strip.c:2138 src/strip.c:2158 +#: src/strip.c:2257 src/strip.c:2277 #, fuzzy, c-format msgid "while writing '%s'" msgstr "'%s' を書込み中: %s" -#: src/strip.c:2195 src/strip.c:2202 +#: src/strip.c:2314 src/strip.c:2321 #, c-format msgid "error while finishing '%s': %s" msgstr "'%s' の終了中にエラー: %s" -#: src/strip.c:2219 src/strip.c:2291 +#: src/strip.c:2338 src/strip.c:2414 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "'%s' のアクセスと変更日付を設定できません" @@ -6070,12 +6343,12 @@ msgstr "" msgid "cannot copy ELF header: %s" msgstr "" -#: src/unstrip.c:249 src/unstrip.c:1930 src/unstrip.c:1973 +#: src/unstrip.c:249 src/unstrip.c:1933 src/unstrip.c:1976 #, fuzzy, c-format msgid "cannot get number of program headers: %s" msgstr "セクション数を決定できません: %s" -#: src/unstrip.c:254 src/unstrip.c:1934 +#: src/unstrip.c:254 src/unstrip.c:1937 #, c-format msgid "cannot create program headers: %s" msgstr "" @@ -6090,12 +6363,12 @@ msgstr "" msgid "cannot copy section header: %s" msgstr "" -#: src/unstrip.c:273 src/unstrip.c:1565 +#: src/unstrip.c:273 src/unstrip.c:1568 #, c-format msgid "cannot get section data: %s" msgstr "" -#: src/unstrip.c:275 src/unstrip.c:1567 +#: src/unstrip.c:275 src/unstrip.c:1570 #, c-format msgid "cannot copy section data: %s" msgstr "" @@ -6105,13 +6378,13 @@ msgstr "" msgid "cannot create directory '%s'" msgstr "" -#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1599 +#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1602 #, c-format msgid "cannot get symbol table entry: %s" msgstr "" #: src/unstrip.c:387 src/unstrip.c:608 src/unstrip.c:629 src/unstrip.c:641 -#: src/unstrip.c:1620 src/unstrip.c:1796 src/unstrip.c:1820 +#: src/unstrip.c:1623 src/unstrip.c:1799 src/unstrip.c:1823 #, c-format msgid "cannot update symbol table: %s" msgstr "" @@ -6141,186 +6414,187 @@ msgstr "" msgid "invalid string offset in symbol [%zu]" msgstr "シンボル %2$sの不正なオフセット %1$zu " -#: src/unstrip.c:955 src/unstrip.c:1302 +#: src/unstrip.c:955 src/unstrip.c:1305 #, fuzzy, c-format msgid "cannot read section [%zu] name: %s" msgstr "セクションデータを割り当てられません: %s" -#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1050 +#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1053 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "" -#: src/unstrip.c:1036 +#: src/unstrip.c:1033 #, c-format -msgid "invalid contents in '%s' section" +msgid "overflow with shnum = %zu in '%s' section" msgstr "" -#: src/unstrip.c:1042 +#: src/unstrip.c:1044 #, c-format -msgid "overflow with shnum = %zu in '%s' section" +msgid "invalid contents in '%s' section" msgstr "" -#: src/unstrip.c:1096 src/unstrip.c:1424 +#: src/unstrip.c:1099 src/unstrip.c:1427 #, fuzzy, c-format msgid "cannot find matching section for [%zu] '%s'" msgstr "セクション [%zu] '%s' の不当なデータ" -#: src/unstrip.c:1221 src/unstrip.c:1236 src/unstrip.c:1503 src/unstrip.c:1755 +#: src/unstrip.c:1224 src/unstrip.c:1239 src/unstrip.c:1506 src/unstrip.c:1758 #, c-format msgid "cannot add section name to string table: %s" msgstr "" -#: src/unstrip.c:1245 +#: src/unstrip.c:1248 #, c-format msgid "cannot update section header string table data: %s" msgstr "" -#: src/unstrip.c:1273 src/unstrip.c:1277 +#: src/unstrip.c:1276 src/unstrip.c:1280 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" -#: src/unstrip.c:1281 src/unstrip.c:1285 src/unstrip.c:1518 +#: src/unstrip.c:1284 src/unstrip.c:1288 src/unstrip.c:1521 #, c-format msgid "cannot get section count: %s" msgstr "" -#: src/unstrip.c:1288 +#: src/unstrip.c:1291 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" -#: src/unstrip.c:1347 src/unstrip.c:1439 +#: src/unstrip.c:1350 src/unstrip.c:1442 #, c-format msgid "cannot read section header string table: %s" msgstr "" -#: src/unstrip.c:1497 +#: src/unstrip.c:1500 #, c-format msgid "cannot add new section: %s" msgstr "" -#: src/unstrip.c:1607 +#: src/unstrip.c:1610 #, fuzzy, c-format msgid "symbol [%zu] has invalid section index" msgstr "不当なセクション索引" -#: src/unstrip.c:1891 +#: src/unstrip.c:1894 #, fuzzy, c-format msgid "cannot read section data: %s" msgstr "セクションデータを割り当てられません: %s" -#: src/unstrip.c:1912 +#: src/unstrip.c:1915 #, c-format msgid "cannot get ELF header: %s" msgstr "" -#: src/unstrip.c:1920 +#: src/unstrip.c:1923 #, c-format msgid "cannot update ELF header: %s" msgstr "ELF ヘッダーを更新できません: %s" -#: src/unstrip.c:1944 +#: src/unstrip.c:1947 #, c-format msgid "cannot update program header: %s" msgstr "" -#: src/unstrip.c:1949 src/unstrip.c:2031 +#: src/unstrip.c:1952 src/unstrip.c:2034 #, c-format msgid "cannot write output file: %s" msgstr "" -#: src/unstrip.c:2000 +#: src/unstrip.c:2003 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:2003 +#: src/unstrip.c:2006 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" msgstr "" -#: src/unstrip.c:2022 src/unstrip.c:2073 src/unstrip.c:2085 src/unstrip.c:2171 +#: src/unstrip.c:2025 src/unstrip.c:2076 src/unstrip.c:2088 src/unstrip.c:2174 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "" -#: src/unstrip.c:2064 +#: src/unstrip.c:2067 msgid "WARNING: " msgstr "" -#: src/unstrip.c:2066 +#: src/unstrip.c:2069 msgid ", use --force" msgstr "" -#: src/unstrip.c:2089 +#: src/unstrip.c:2092 msgid "ELF header identification (e_ident) different" msgstr "" -#: src/unstrip.c:2092 +#: src/unstrip.c:2095 msgid "ELF header type (e_type) different" msgstr "" -#: src/unstrip.c:2095 +#: src/unstrip.c:2098 msgid "ELF header machine type (e_machine) different" msgstr "" -#: src/unstrip.c:2098 +#: src/unstrip.c:2101 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "" -#: src/unstrip.c:2128 +#: src/unstrip.c:2131 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "" -#: src/unstrip.c:2132 +#: src/unstrip.c:2135 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2147 +#: src/unstrip.c:2150 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "" -#: src/unstrip.c:2151 +#: src/unstrip.c:2154 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "" -#: src/unstrip.c:2164 +#: src/unstrip.c:2167 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "" -#: src/unstrip.c:2195 +#: src/unstrip.c:2198 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "" -#: src/unstrip.c:2328 +#: src/unstrip.c:2331 #, c-format msgid "no matching modules found" msgstr "" -#: src/unstrip.c:2337 +#: src/unstrip.c:2340 #, c-format msgid "matched more than one module" msgstr "" -#: src/unstrip.c:2381 +#: src/unstrip.c:2384 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" msgstr "" -#: src/unstrip.c:2382 +#: src/unstrip.c:2385 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" +"Combine stripped files with separate symbols and debug information.\n" +"\n" +"The first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" "With -f these match the file name of the main (stripped) file (slashes are " @@ -6344,7 +6618,7 @@ msgid "" "was found, or . if FILE contains the debug information." msgstr "" -#: tests/backtrace.c:430 +#: tests/backtrace.c:442 msgid "Run executable" msgstr "" @@ -6357,25 +6631,74 @@ msgstr "出力選択:" msgid "Show instances of inlined functions" msgstr "" -#~ msgid "" -#~ "Copyright (C) %s Red Hat, Inc.\n" -#~ "This is free software; see the source for copying conditions. There is " -#~ "NO\n" -#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " -#~ "PURPOSE.\n" +#~ msgid "%s+%# <%s+%#>" +#~ msgstr "%s+%# <%s+%#>" + +#~ msgid "%s+%#0* <%s+%#>" +#~ msgstr "%s+%#0* <%s+%#>" + +#~ msgid "%# <%s+%#>" +#~ msgstr "%# <%s+%#>" + +#~ msgid "%#0* <%s+%#>" +#~ msgstr "%#0* <%s+%#>" + +#~ msgid "%s+%# <%s>" +#~ msgstr "%s+%# <%s>" + +#~ msgid "%s+%#0* <%s>" +#~ msgstr "%s+%#0* <%s>" + +#~ msgid "%# <%s>" +#~ msgstr "%# <%s>" + +#~ msgid "%#0* <%s>" +#~ msgstr "%#0* <%s>" + +#~ msgid "%s+%#" +#~ msgstr "%s+%#" + +#~ msgid "%s+%#0*" +#~ msgstr "%s+%#0*" + +#, fuzzy +#~ msgid " %s..%s (%)\n" +#~ msgstr " %s: %\n" + +#, fuzzy +#~ msgid " %s..%s\n" +#~ msgstr " [%6tx] %s..%s\n" + +#, fuzzy +#~ msgid " advance address by %u to %s, op_index to %u\n" +#~ msgstr "アドレスを %u だけ進めて %s にする\n" + +#, fuzzy +#~ msgid " advance address by constant %u to %s, op_index to %u\n" +#~ msgstr "アドレスを定数 %u だけ済めて %s にする\n" + +#~ msgid " [%6tx] %s..%s\n" +#~ msgstr " [%6tx] %s..%s\n" + +#~ msgid " %s..%s\n" +#~ msgstr " %s..%s\n" + +#~ msgid "cannot get DIE at offset % in section '%s': %s" #~ msgstr "" -#~ "Copyright (C) %s Red Hat, Inc.\n" -#~ "This is free software; see the source for copying conditions. There is " -#~ "NO\n" -#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " -#~ "PURPOSE.\n" +#~ "セクション '%2$s' の オフセット %1$ の DIE を得られません: %3$s" + +#~ msgid " [%6tx] %s..%s" +#~ msgstr " [%6tx] %s..%s" + +#~ msgid " %s..%s" +#~ msgstr " %s..%s" + +#~ msgid "-R option supports only .comment section" +#~ msgstr "-R オプションは .comment セクションのみをサポートします" #~ msgid "Written by %s.\n" #~ msgstr "%s によって書かれました。\n" -#~ msgid "cannot allocate PLT section: %s" -#~ msgstr "PLT セクションを割り当てられません: %s" - #~ msgid "cannot allocate PLTREL section: %s" #~ msgstr "PLTREL セクションを割り当てられません: %s" @@ -6801,9 +7124,6 @@ msgstr "" #~ msgid "internal error: non-nobits section follows nobits section" #~ msgstr "内部エラー: 非 nobits セクションが nobits セクションに続きます" -#~ msgid "cannot get header of 0th section: %s" -#~ msgstr "0番目のセクションのヘッダーを得られません: %s" - #~ msgid "linker backend didn't specify function to relocate section" #~ msgstr "" #~ "リンカーバックエンドがセクションをリロケートするための機能を指定していませ" @@ -6862,10 +7182,6 @@ msgstr "" #~ msgid "unknown user attribute %hx" #~ msgstr "不明な利用者属性 %hx" -#, fuzzy -#~ msgid "unknown form %#" -#~ msgstr "不明な様式 %" - #~ msgid "" #~ "\n" #~ "\n" diff --git a/po/nl.po b/po/nl.po index fa608682..ff3e5d5f 100644 --- a/po/nl.po +++ b/po/nl.po @@ -5640,7 +5640,7 @@ msgstr "" #: src/unstrip.c:2248 msgid "" -"Combine stripped files with separate symbols and debug information.\vThe " +"Combine stripped files with separate symbols and debug information.\n\nThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" diff --git a/po/pl.po b/po/pl.po index 33f01bc3..5bb15501 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: elfutils\n" "Report-Msgid-Bugs-To: https://sourceware.org/bugzilla/\n" -"POT-Creation-Date: 2016-12-29 17:47+0100\n" +"POT-Creation-Date: 2018-06-29 20:47+0200\n" "PO-Revision-Date: 2016-12-29 17:48+0100\n" "Last-Translator: Piotr Drąg \n" "Language-Team: Polish \n" @@ -41,12 +41,12 @@ msgstr "" " • „never”, „no”, „none”\n" " • „auto”, „tty”, „if-tty”\n" -#: lib/color.c:190 src/objdump.c:725 +#: lib/color.c:190 src/objdump.c:727 #, c-format msgid "cannot allocate memory" msgstr "nie można przydzielić pamięci" -#: lib/version.c:42 +#: lib/printversion.c:40 #, c-format msgid "" "Copyright (C) %s The elfutils developers <%s>.\n" @@ -59,18 +59,18 @@ msgstr "" "BEZ JAKIEJKOLWIEK GWARANCJI, nawet domyślnej gwarancji PRZYDATNOŚCI\n" "HANDLOWEJ albo PRZYDATNOŚCI DO OKREŚLONYCH ZASTOSOWAŃ.\n" -#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3294 -#: src/readelf.c:3685 src/readelf.c:8433 src/unstrip.c:2224 src/unstrip.c:2429 +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3395 +#: src/readelf.c:11196 src/unstrip.c:2227 src/unstrip.c:2433 #, c-format msgid "memory exhausted" msgstr "pamięć wyczerpana" -#: libasm/asm_error.c:65 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:53 +#: libasm/asm_error.c:65 libdw/dwarf_error.c:57 libdwfl/libdwflP.h:50 #: libelf/elf_error.c:60 msgid "no error" msgstr "brak błędu" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:52 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "brak pamięci" @@ -107,176 +107,217 @@ msgstr "błąd podczas wyprowadzania danych" msgid "no backend support available" msgstr "brak dostępnej obsługi zaplecza" -#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:51 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "nieznany błąd" -#: libdw/dwarf_error.c:60 +#: libdw/dwarf_error.c:59 msgid "invalid access" msgstr "nieprawidłowy dostęp" -#: libdw/dwarf_error.c:61 +#: libdw/dwarf_error.c:60 msgid "no regular file" msgstr "nie jest zwykłym plikiem" -#: libdw/dwarf_error.c:62 +#: libdw/dwarf_error.c:61 msgid "I/O error" msgstr "błąd wejścia/wyjścia" -#: libdw/dwarf_error.c:63 +#: libdw/dwarf_error.c:62 msgid "invalid ELF file" msgstr "nieprawidłowy plik ELF" -#: libdw/dwarf_error.c:64 +#: libdw/dwarf_error.c:63 msgid "no DWARF information" msgstr "brak informacji DWARF" -#: libdw/dwarf_error.c:65 +#: libdw/dwarf_error.c:64 msgid "cannot decompress DWARF" msgstr "nie można dekompresować DWARF" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:65 msgid "no ELF file" msgstr "brak pliku ELF" -#: libdw/dwarf_error.c:67 +#: libdw/dwarf_error.c:66 msgid "cannot get ELF header" msgstr "nie można uzyskać nagłówka ELF" -#: libdw/dwarf_error.c:69 +#: libdw/dwarf_error.c:68 msgid "not implemented" msgstr "niezaimplementowane" -#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:69 libelf/elf_error.c:111 libelf/elf_error.c:159 msgid "invalid command" msgstr "nieprawidłowe polecenie" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:70 msgid "invalid version" msgstr "nieprawidłowa wersja" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:71 msgid "invalid file" msgstr "nieprawidłowy plik" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:72 msgid "no entries found" msgstr "nie odnaleziono wpisów" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:73 msgid "invalid DWARF" msgstr "nieprawidłowy DWARF" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:74 msgid "no string data" msgstr "brak danych w postaci ciągu" +#: libdw/dwarf_error.c:75 +#, fuzzy +msgid ".debug_str section missing" +msgstr "brak sekcji .debug_ranges" + #: libdw/dwarf_error.c:76 +#, fuzzy +msgid ".debug_line_str section missing" +msgstr "brak sekcji .debug_line" + +#: libdw/dwarf_error.c:77 +#, fuzzy +msgid ".debug_str_offsets section missing" +msgstr "brak sekcji .debug_ranges" + +#: libdw/dwarf_error.c:78 msgid "no address value" msgstr "brak wartości adresu" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:79 msgid "no constant value" msgstr "brak wartości stałej" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:80 msgid "no reference value" msgstr "brak wartości odwołania" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:81 msgid "invalid reference value" msgstr "nieprawidłowa wartość odwołania" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:82 msgid ".debug_line section missing" msgstr "brak sekcji .debug_line" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:83 msgid "invalid .debug_line section" msgstr "nieprawidłowa sekcja .debug_line" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:84 msgid "debug information too big" msgstr "informacje debugowania są za duże" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:85 msgid "invalid DWARF version" msgstr "nieprawidłowa wersja DWARF" -#: libdw/dwarf_error.c:84 +#: libdw/dwarf_error.c:86 msgid "invalid directory index" msgstr "nieprawidłowy indeks katalogu" -#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:87 libdwfl/libdwflP.h:71 msgid "address out of range" msgstr "adres jest spoza zakresu" -#: libdw/dwarf_error.c:86 -msgid "no location list value" +#: libdw/dwarf_error.c:88 +#, fuzzy +msgid ".debug_loc section missing" +msgstr "brak sekcji .debug_line" + +#: libdw/dwarf_error.c:89 +#, fuzzy +msgid ".debug_loclists section missing" +msgstr "brak sekcji .debug_line" + +#: libdw/dwarf_error.c:90 +#, fuzzy +msgid "not a location list value" msgstr "brak wartości listy położeń" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:91 msgid "no block data" msgstr "brak danych blokowych" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:92 msgid "invalid line index" msgstr "nieprawidłowy indeks wiersza" -#: libdw/dwarf_error.c:89 +#: libdw/dwarf_error.c:93 msgid "invalid address range index" msgstr "nieprawidłowy indeks zakresu adresów" -#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:94 libdwfl/libdwflP.h:72 msgid "no matching address range" msgstr "brak pasującego zakresu adresów" -#: libdw/dwarf_error.c:91 +#: libdw/dwarf_error.c:95 msgid "no flag value" msgstr "brak wartości flagi" -#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:96 libelf/elf_error.c:236 msgid "invalid offset" msgstr "nieprawidłowy offset" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:97 msgid ".debug_ranges section missing" msgstr "brak sekcji .debug_ranges" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:98 +#, fuzzy +msgid ".debug_rnglists section missing" +msgstr "brak sekcji .debug_ranges" + +#: libdw/dwarf_error.c:99 msgid "invalid CFI section" msgstr "nieprawidłowa wersja CFI" -#: libdw/dwarf_error.c:95 +#: libdw/dwarf_error.c:100 msgid "no alternative debug link found" msgstr "nie odnaleziono alternatywnego dowiązania debugowania" -#: libdw/dwarf_error.c:96 +#: libdw/dwarf_error.c:101 msgid "invalid opcode" msgstr "nieprawidłowa instrukcja" -#: libdw/dwarf_error.c:97 +#: libdw/dwarf_error.c:102 msgid "not a CU (unit) DIE" msgstr "nie jest CU (jednostką) DIE" -#: libdwfl/argp-std.c:46 src/stack.c:635 src/unstrip.c:2371 +#: libdw/dwarf_error.c:103 +#, fuzzy +msgid "unknown language code" +msgstr " nieznana instrukcja" + +#: libdw/dwarf_error.c:104 +#, fuzzy +msgid ".debug_addr section missing" +msgstr "brak sekcji .debug_ranges" + +#: libdwfl/argp-std.c:50 src/stack.c:639 src/unstrip.c:2374 msgid "Input selection options:" msgstr "Opcje wyboru wejścia:" -#: libdwfl/argp-std.c:47 +#: libdwfl/argp-std.c:51 msgid "Find addresses in FILE" msgstr "Wyszukuje adresy w PLIKU" -#: libdwfl/argp-std.c:49 +#: libdwfl/argp-std.c:53 msgid "Find addresses from signatures found in COREFILE" msgstr "Wyszukuje adresy z podpisów odnalezionych w PLIKU_CORE" -#: libdwfl/argp-std.c:51 +#: libdwfl/argp-std.c:55 msgid "Find addresses in files mapped into process PID" msgstr "Wyszukuje adresy w plikach zmapowanych do PID procesów" -#: libdwfl/argp-std.c:53 +#: libdwfl/argp-std.c:57 msgid "" "Find addresses in files mapped as read from FILE in Linux /proc/PID/maps " "format" @@ -284,197 +325,197 @@ msgstr "" "Wyszukuje adresy w plikach zmapowanych jako odczyt z PLIKU w formacie /proc/" "PID/maps systemu Linux" -#: libdwfl/argp-std.c:55 +#: libdwfl/argp-std.c:59 msgid "Find addresses in the running kernel" msgstr "Wyszukuje adresy w uruchomionych jądrze" -#: libdwfl/argp-std.c:57 +#: libdwfl/argp-std.c:61 msgid "Kernel with all modules" msgstr "Jądro ze wszystkimi modułami" -#: libdwfl/argp-std.c:59 src/stack.c:642 +#: libdwfl/argp-std.c:63 src/stack.c:646 msgid "Search path for separate debuginfo files" msgstr "Wyszukuje ścieżkę dla oddzielnych plików debuginfo" -#: libdwfl/argp-std.c:157 +#: libdwfl/argp-std.c:164 msgid "only one of -e, -p, -k, -K, or --core allowed" msgstr "dopuszczalna jest tylko jedna z opcji -e, -p, -k, -K lub --core" -#: libdwfl/argp-std.c:230 +#: libdwfl/argp-std.c:237 msgid "cannot load kernel symbols" msgstr "nie można wczytać symboli jądra" #. Non-fatal to have no modules since we do have the kernel. -#: libdwfl/argp-std.c:234 +#: libdwfl/argp-std.c:241 msgid "cannot find kernel modules" msgstr "nie można odnaleźć modułów jądra" -#: libdwfl/argp-std.c:251 +#: libdwfl/argp-std.c:258 msgid "cannot find kernel or modules" msgstr "nie można odnaleźć jądra lub modułów" -#: libdwfl/argp-std.c:290 +#: libdwfl/argp-std.c:297 #, c-format msgid "cannot read ELF core file: %s" msgstr "nie można odczytać pliku core ELF: %s" -#: libdwfl/argp-std.c:313 +#: libdwfl/argp-std.c:320 msgid "Not enough memory" msgstr "Za mało pamięci" -#: libdwfl/argp-std.c:323 +#: libdwfl/argp-std.c:330 msgid "No modules recognized in core file" msgstr "Nie rozpoznano żadnych modułów w pliku core" -#: libdwfl/libdwflP.h:56 +#: libdwfl/libdwflP.h:53 msgid "See errno" msgstr "Proszę zobaczyć errno" -#: libdwfl/libdwflP.h:57 +#: libdwfl/libdwflP.h:54 msgid "See elf_errno" msgstr "Proszę zobaczyć elf_errno" -#: libdwfl/libdwflP.h:58 +#: libdwfl/libdwflP.h:55 msgid "See dwarf_errno" msgstr "Proszę zobaczyć dwarf_errno" -#: libdwfl/libdwflP.h:59 +#: libdwfl/libdwflP.h:56 msgid "See ebl_errno (XXX missing)" msgstr "Proszę zobaczyć ebl_errno (brak XXX)" -#: libdwfl/libdwflP.h:60 +#: libdwfl/libdwflP.h:57 msgid "gzip decompression failed" msgstr "dekompresja gzip się nie powiodła" -#: libdwfl/libdwflP.h:61 +#: libdwfl/libdwflP.h:58 msgid "bzip2 decompression failed" msgstr "dekompresja bzip2 się nie powiodła" -#: libdwfl/libdwflP.h:62 +#: libdwfl/libdwflP.h:59 msgid "LZMA decompression failed" msgstr "dekompresja LZMA się nie powiodła" -#: libdwfl/libdwflP.h:63 +#: libdwfl/libdwflP.h:60 msgid "no support library found for machine" msgstr "nie odnaleziono biblioteki obsługi dla komputera" -#: libdwfl/libdwflP.h:64 +#: libdwfl/libdwflP.h:61 msgid "Callbacks missing for ET_REL file" msgstr "Brak wywołań zwrotnych dla pliku ET_REL" -#: libdwfl/libdwflP.h:65 +#: libdwfl/libdwflP.h:62 msgid "Unsupported relocation type" msgstr "Nieobsługiwany typ relokacji" -#: libdwfl/libdwflP.h:66 +#: libdwfl/libdwflP.h:63 msgid "r_offset is bogus" msgstr "r_offset jest fałszywe" -#: libdwfl/libdwflP.h:67 libelf/elf_error.c:111 libelf/elf_error.c:171 +#: libdwfl/libdwflP.h:64 libelf/elf_error.c:115 libelf/elf_error.c:175 msgid "offset out of range" msgstr "offset spoza zakresu" -#: libdwfl/libdwflP.h:68 +#: libdwfl/libdwflP.h:65 msgid "relocation refers to undefined symbol" msgstr "relokacja odnosi się do nieokreślonego symbolu" -#: libdwfl/libdwflP.h:69 +#: libdwfl/libdwflP.h:66 msgid "Callback returned failure" msgstr "Wywołanie zwrotne zwróciło niepowodzenie" -#: libdwfl/libdwflP.h:70 +#: libdwfl/libdwflP.h:67 msgid "No DWARF information found" msgstr "Nie odnaleziono informacji DWARF" -#: libdwfl/libdwflP.h:71 +#: libdwfl/libdwflP.h:68 msgid "No symbol table found" msgstr "Nie odnaleziono tabeli symboli" -#: libdwfl/libdwflP.h:72 +#: libdwfl/libdwflP.h:69 msgid "No ELF program headers" msgstr "Brak nagłówków programu ELF" -#: libdwfl/libdwflP.h:73 +#: libdwfl/libdwflP.h:70 msgid "address range overlaps an existing module" msgstr "zakres adresów pokrywa się z istniejącym modułem" -#: libdwfl/libdwflP.h:76 +#: libdwfl/libdwflP.h:73 msgid "image truncated" msgstr "skrócono obraz" -#: libdwfl/libdwflP.h:77 +#: libdwfl/libdwflP.h:74 msgid "ELF file opened" msgstr "otwarto plik ELF" -#: libdwfl/libdwflP.h:78 +#: libdwfl/libdwflP.h:75 msgid "not a valid ELF file" msgstr "nie jest prawidłowym plikiem ELF" -#: libdwfl/libdwflP.h:79 +#: libdwfl/libdwflP.h:76 msgid "cannot handle DWARF type description" msgstr "nie można obsłużyć opisu typu DWARF" -#: libdwfl/libdwflP.h:80 +#: libdwfl/libdwflP.h:77 msgid "ELF file does not match build ID" msgstr "plik ELF nie ma pasującego identyfikatora kopii" -#: libdwfl/libdwflP.h:81 +#: libdwfl/libdwflP.h:78 msgid "corrupt .gnu.prelink_undo section data" msgstr "uszkodzone dane sekcji .gnu.prelink_undo" -#: libdwfl/libdwflP.h:82 +#: libdwfl/libdwflP.h:79 msgid "Internal error due to ebl" msgstr "Wewnętrzny błąd z powodu ebl" -#: libdwfl/libdwflP.h:83 +#: libdwfl/libdwflP.h:80 msgid "Missing data in core file" msgstr "Brak danych w pliku core" -#: libdwfl/libdwflP.h:84 +#: libdwfl/libdwflP.h:81 msgid "Invalid register" msgstr "Nieprawidłowy rejestr" -#: libdwfl/libdwflP.h:85 +#: libdwfl/libdwflP.h:82 msgid "Error reading process memory" msgstr "Błąd podczas odczytywania pamięci procesu" -#: libdwfl/libdwflP.h:86 +#: libdwfl/libdwflP.h:83 msgid "Couldn't find architecture of any ELF" msgstr "Nie można odnaleźć architektury żadnego ELF" -#: libdwfl/libdwflP.h:87 +#: libdwfl/libdwflP.h:84 msgid "Error parsing /proc filesystem" msgstr "Błąd podczas przetwarzania systemu plików /proc" -#: libdwfl/libdwflP.h:88 +#: libdwfl/libdwflP.h:85 msgid "Invalid DWARF" msgstr "Nieprawidłowy DWARF" -#: libdwfl/libdwflP.h:89 +#: libdwfl/libdwflP.h:86 msgid "Unsupported DWARF" msgstr "Nieobsługiwany DWARF" -#: libdwfl/libdwflP.h:90 +#: libdwfl/libdwflP.h:87 msgid "Unable to find more threads" msgstr "Nie można odnaleźć więcej wątków" -#: libdwfl/libdwflP.h:91 +#: libdwfl/libdwflP.h:88 msgid "Dwfl already has attached state" msgstr "Dwfl już ma załączony stan" -#: libdwfl/libdwflP.h:92 +#: libdwfl/libdwflP.h:89 msgid "Dwfl has no attached state" msgstr "Dwfl nie ma załączonego stanu" -#: libdwfl/libdwflP.h:93 +#: libdwfl/libdwflP.h:90 msgid "Unwinding not supported for this architecture" msgstr "Odwijanie nie jest obsługiwane dla tej architektury" -#: libdwfl/libdwflP.h:94 +#: libdwfl/libdwflP.h:91 msgid "Invalid argument" msgstr "Nieprawidłowy parametr" -#: libdwfl/libdwflP.h:95 +#: libdwfl/libdwflP.h:92 msgid "Not an ET_CORE ELF file" msgstr "Nie jest plikiem ELF ET_CORE" @@ -482,14 +523,14 @@ msgstr "Nie jest plikiem ELF ET_CORE" msgid "No backend" msgstr "Brak zaplecza" -#: libebl/eblcorenotetypename.c:99 libebl/eblobjnotetypename.c:76 +#: libebl/eblcorenotetypename.c:100 libebl/eblobjnotetypename.c:76 #: libebl/eblobjnotetypename.c:83 libebl/eblobjnotetypename.c:102 #: libebl/eblosabiname.c:73 libebl/eblsectionname.c:83 #: libebl/eblsectiontypename.c:115 libebl/eblsegmenttypename.c:79 msgid "" msgstr "" -#: libebl/ebldynamictagname.c:101 +#: libebl/ebldynamictagname.c:103 #, c-format msgid ": %#" msgstr ": %#" @@ -579,7 +620,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:5112 +#: libelf/elf_error.c:87 src/readelf.c:6107 #, c-format msgid "invalid encoding" msgstr "nieprawidłowe kodowanie" @@ -589,191 +630,196 @@ msgid "invalid file descriptor" msgstr "nieprawidłowy deskryptor pliku" #: libelf/elf_error.c:99 +#, fuzzy +msgid "invalid ELF file data" +msgstr "nieprawidłowy plik ELF" + +#: libelf/elf_error.c:103 msgid "invalid operation" msgstr "nieprawidłowe działanie" -#: libelf/elf_error.c:103 +#: libelf/elf_error.c:107 msgid "ELF version not set" msgstr "wersja ELF nie została ustawiona" -#: libelf/elf_error.c:115 +#: libelf/elf_error.c:119 msgid "invalid fmag field in archive header" msgstr "nieprawidłowe pole fmag w nagłówku archiwum" -#: libelf/elf_error.c:119 +#: libelf/elf_error.c:123 msgid "invalid archive file" msgstr "nieprawidłowy plik archiwum" -#: libelf/elf_error.c:123 +#: libelf/elf_error.c:127 msgid "descriptor is not for an archive" msgstr "deskryptor nie jest dla archiwum" -#: libelf/elf_error.c:127 +#: libelf/elf_error.c:131 msgid "no index available" msgstr "brak dostępnego indeksu" -#: libelf/elf_error.c:131 +#: libelf/elf_error.c:135 msgid "cannot read data from file" msgstr "nie można odczytać danych z pliku" -#: libelf/elf_error.c:135 +#: libelf/elf_error.c:139 msgid "cannot write data to file" msgstr "nie można zapisać danych do pliku" -#: libelf/elf_error.c:139 +#: libelf/elf_error.c:143 msgid "invalid binary class" msgstr "nieprawidłowa klasa pliku binarnego" -#: libelf/elf_error.c:143 +#: libelf/elf_error.c:147 msgid "invalid section index" msgstr "nieprawidłowy indeks sekcji" -#: libelf/elf_error.c:147 +#: libelf/elf_error.c:151 msgid "invalid operand" msgstr "nieprawidłowy operand" -#: libelf/elf_error.c:151 +#: libelf/elf_error.c:155 msgid "invalid section" msgstr "nieprawidłowa sekcja" -#: libelf/elf_error.c:159 +#: libelf/elf_error.c:163 msgid "executable header not created first" msgstr "nie utworzono najpierw nagłówka pliku wykonywalnego" -#: libelf/elf_error.c:163 +#: libelf/elf_error.c:167 msgid "file descriptor disabled" msgstr "deskryptor pliku jest wyłączony" -#: libelf/elf_error.c:167 +#: libelf/elf_error.c:171 msgid "archive/member file descriptor mismatch" msgstr "deskryptory archiwum/elementu nie zgadzają się" -#: libelf/elf_error.c:175 +#: libelf/elf_error.c:179 msgid "cannot manipulate null section" msgstr "nie można zmieniać pustej sekcji" -#: libelf/elf_error.c:179 +#: libelf/elf_error.c:183 msgid "data/scn mismatch" msgstr "dane/scn nie zgadzają się" -#: libelf/elf_error.c:183 +#: libelf/elf_error.c:187 msgid "invalid section header" msgstr "nieprawidłowy nagłówek sekcji" -#: libelf/elf_error.c:187 src/readelf.c:7359 src/readelf.c:7807 -#: src/readelf.c:7908 src/readelf.c:8089 +#: libelf/elf_error.c:191 src/readelf.c:9742 src/readelf.c:10313 +#: src/readelf.c:10414 src/readelf.c:10595 #, c-format msgid "invalid data" msgstr "nieprawidłowe dane" -#: libelf/elf_error.c:191 +#: libelf/elf_error.c:195 msgid "unknown data encoding" msgstr "nieznane kodowanie danych" -#: libelf/elf_error.c:195 +#: libelf/elf_error.c:199 msgid "section `sh_size' too small for data" msgstr "sekcja „sh_size” jest za mała dla danych" -#: libelf/elf_error.c:199 +#: libelf/elf_error.c:203 msgid "invalid section alignment" msgstr "nieprawidłowe wyrównanie sekcji" -#: libelf/elf_error.c:203 +#: libelf/elf_error.c:207 msgid "invalid section entry size" msgstr "nieprawidłowy rozmiar wpisu sekcji" -#: libelf/elf_error.c:207 +#: libelf/elf_error.c:211 msgid "update() for write on read-only file" msgstr "update() dla zapisu pliku tylko do odczytu" -#: libelf/elf_error.c:211 +#: libelf/elf_error.c:215 msgid "no such file" msgstr "nie ma takiego pliku" -#: libelf/elf_error.c:215 +#: libelf/elf_error.c:219 msgid "only relocatable files can contain section groups" msgstr "tylko relokowalne pliki mogą zawierać grupy sekcji" -#: libelf/elf_error.c:220 +#: libelf/elf_error.c:224 msgid "" "program header only allowed in executables, shared objects, and core files" msgstr "" "tylko pliki wykonywalne, obiektów współdzielone i pliki core mogą mieć " "nagłówki programu" -#: libelf/elf_error.c:227 +#: libelf/elf_error.c:231 msgid "file has no program header" msgstr "plik nie ma nagłówków programu" -#: libelf/elf_error.c:237 +#: libelf/elf_error.c:241 msgid "invalid section type" msgstr "nieprawidłowy typ sekcji" -#: libelf/elf_error.c:242 +#: libelf/elf_error.c:246 msgid "invalid section flags" msgstr "nieprawidłowe flagi sekcji" -#: libelf/elf_error.c:247 +#: libelf/elf_error.c:251 msgid "section does not contain compressed data" msgstr "sekcja nie zawiera skompresowanych danych" -#: libelf/elf_error.c:252 +#: libelf/elf_error.c:256 msgid "section contains compressed data" msgstr "sekcja zawiera skompresowane dane" -#: libelf/elf_error.c:257 +#: libelf/elf_error.c:261 msgid "unknown compression type" msgstr "nieznany typ kompresji" -#: libelf/elf_error.c:262 +#: libelf/elf_error.c:266 msgid "cannot compress data" msgstr "nie można kompresować danych" -#: libelf/elf_error.c:267 +#: libelf/elf_error.c:271 msgid "cannot decompress data" msgstr "nie można dekompresować danych" -#: src/addr2line.c:57 +#: src/addr2line.c:58 msgid "Input format options:" msgstr "Opcje formatowania wejścia:" -#: src/addr2line.c:59 +#: src/addr2line.c:60 msgid "Treat addresses as offsets relative to NAME section." msgstr "Traktuje adresy jako offsety względne do sekcji NAZWA." -#: src/addr2line.c:61 +#: src/addr2line.c:62 msgid "Output format options:" msgstr "Opcje formatowania wyjścia:" -#: src/addr2line.c:62 +#: src/addr2line.c:63 msgid "Print address before each entry" msgstr "Wyświetla adres pliku przed każdym wpisem" -#: src/addr2line.c:63 +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Wyświetla tylko podstawowe nazwy plików źródłowych" -#: src/addr2line.c:65 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "Wyświetla bezwzględne nazwy plików używając katalogu kompilacji" -#: src/addr2line.c:66 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "Wyświetla także nazwy funkcji" -#: src/addr2line.c:67 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "Wyświetla także nazwy symboli lub sekcji" -#: src/addr2line.c:68 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "Wyświetla także nazwy symboli i sekcji" -#: src/addr2line.c:69 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "Wyświetla także flagi tabeli wierszy" -#: src/addr2line.c:71 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." @@ -781,22 +827,22 @@ msgstr "" "Wyświetla wszystkie położenia źródłowe, które spowodowały wstawione " "rozszerzenie podprogramów pod tym adresem." -#: src/addr2line.c:74 +#: src/addr2line.c:75 msgid "Show demangled symbols (ARG is always ignored)" msgstr "" "Wyświetla symbole z usuniętym dekorowaniem (PARAMETR jest zawsze ignorowany)" -#: src/addr2line.c:76 +#: src/addr2line.c:77 msgid "Print all information on one line, and indent inlines" msgstr "Wyświetla wszystkie informacje w jednym wierszy i wyrównuje wstawki" -#: src/addr2line.c:78 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:99 -#: src/strings.c:78 +#: src/addr2line.c:79 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:101 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Różne:" #. Short description of program. -#: src/addr2line.c:86 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "" @@ -804,279 +850,304 @@ msgstr "" "w a.out)." #. Strings for arguments in help texts. -#: src/addr2line.c:90 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "[ADRES…]" -#: src/addr2line.c:518 +#: src/addr2line.c:520 #, c-format msgid "Section syntax requires exactly one module" msgstr "Składnia sekcji wymaga dokładnie jednego modułu" -#: src/addr2line.c:541 +#: src/addr2line.c:543 #, c-format msgid "offset %# lies outside section '%s'" msgstr "offset %# leży poza sekcją „%s”" -#: src/addr2line.c:631 +#: src/addr2line.c:633 #, c-format msgid "cannot find symbol '%s'" msgstr "nie można odnaleźć symbolu „%s”" -#: src/addr2line.c:636 +#: src/addr2line.c:638 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "offset %# leży poza zawartością „%s”" -#: src/ar.c:67 +#: src/ar.c:68 msgid "Commands:" msgstr "Polecenia:" -#: src/ar.c:68 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Usuwa pliki z archiwum." -#: src/ar.c:69 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Przenosi pliki w archiwum." -#: src/ar.c:70 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Wyświetla pliki w archiwum." -#: src/ar.c:71 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Szybko dodaje pliki do archiwum." -#: src/ar.c:73 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Zastępuje istniejący lub umieszcza nowy plik w archiwum." -#: src/ar.c:74 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Wyświetla zawartość archiwum." -#: src/ar.c:75 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Wypakowuje pliki z archiwum." -#: src/ar.c:77 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Modyfikatory poleceń:" -#: src/ar.c:78 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Zachowuje pierwotne daty." -#: src/ar.c:79 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Używa wystąpienia [LICZNIK] nazwy." -#: src/ar.c:81 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Nie zastępuje istniejących plików wypakowanymi plikami." -#: src/ar.c:82 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Zezwala na skrócenie nazwy pliku, jeśli jest to wymagane." -#: src/ar.c:84 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Wyświetla więcej informacji." -#: src/ar.c:85 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Wymusza ponowne utworzenie tabeli symboli." -#: src/ar.c:86 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Umieszcza plik po [ELEMENCIE]." -#: src/ar.c:87 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Umieszcza plik przed [ELEMENTEM]." -#: src/ar.c:88 +#: src/ar.c:89 msgid "Same as -b." msgstr "To samo, co -b." -#: src/ar.c:89 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Zmniejsza komunikat, jeśli biblioteka musi zostać utworzona." -#: src/ar.c:91 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Używa pełnej ścieżki do dopasowywania plików." -#: src/ar.c:92 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Aktualizuje tylko starsze pliki w archiwum." #. Short description of program. -#: src/ar.c:98 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Tworzenie, modyfikowanie i wypakowywanie archiwów." #. Strings for arguments in help texts. -#: src/ar.c:101 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[ELEMENT] [LICZNIK] ARCHIWUM [PLIK…]" -#: src/ar.c:180 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "„a”, „b” i „i” są dozwolone tylko z opcjami „m” i „r”" -#: src/ar.c:185 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "parametr ELEMENT jest wymagany dla modyfikatorów „a”, „b” i „i”" -#: src/ar.c:201 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "„N” ma znaczenie tylko z opcjami „x” i „d”" -#: src/ar.c:206 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "wymagany jest parametr LICZNIK" -#: src/ar.c:218 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "nieprawidłowy parametr LICZNIK %s" -#: src/ar.c:225 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "„%c” ma znaczenie tylko z opcją „x”" -#: src/ar.c:231 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "wymagana jest nazwa archiwum" -#: src/ar.c:244 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "wymagana jest opcja polecenia" -#: src/ar.c:295 +#: src/ar.c:296 #, c-format msgid "More than one operation specified" msgstr "Podano więcej niż jedno działanie" -#: src/ar.c:389 +#: src/ar.c:390 #, c-format msgid "cannot open archive '%s'" msgstr "nie można otworzyć archiwum „%s”" -#: src/ar.c:399 +#: src/ar.c:400 #, c-format msgid "cannot open archive '%s': %s" msgstr "nie można otworzyć archiwum „%s”: %s" -#: src/ar.c:403 +#: src/ar.c:404 #, c-format msgid "%s: not an archive file" msgstr "%s: nie jest plikiem archiwum" -#: src/ar.c:407 +#: src/ar.c:408 #, c-format msgid "cannot stat archive '%s'" msgstr "nie można wykonać stat na archiwum „%s”" -#: src/ar.c:419 +#: src/ar.c:420 #, c-format msgid "no entry %s in archive\n" msgstr "brak wpisu %s w archiwum\n" -#: src/ar.c:472 src/ar.c:917 src/ar.c:1117 +#: src/ar.c:473 src/ar.c:918 src/ar.c:1122 #, c-format msgid "cannot create hash table" msgstr "nie można utworzyć tabeli mieszającej" -#: src/ar.c:479 src/ar.c:924 src/ar.c:1126 +#: src/ar.c:480 src/ar.c:925 src/ar.c:1131 #, c-format msgid "cannot insert into hash table" msgstr "nie można umieścić w tabeli mieszającej" -#: src/ar.c:487 src/ranlib.c:148 +#: src/ar.c:488 src/ranlib.c:149 #, c-format msgid "cannot stat '%s'" msgstr "nie można wykonać stat na „%s”" -#: src/ar.c:583 +#: src/ar.c:584 #, c-format msgid "cannot read content of %s: %s" msgstr "nie można odczytać zawartości %s: %s" -#: src/ar.c:626 +#: src/ar.c:627 #, c-format msgid "cannot open %.*s" msgstr "nie można otworzyć %.*s" -#: src/ar.c:648 +#: src/ar.c:649 #, c-format msgid "failed to write %s" msgstr "zapisanie %s się nie powiodło" -#: src/ar.c:660 +#: src/ar.c:661 #, c-format msgid "cannot change mode of %s" msgstr "nie można zmienić trybu %s" -#: src/ar.c:676 +#: src/ar.c:677 #, c-format msgid "cannot change modification time of %s" msgstr "nie można zmienić czasu modyfikacji %s" -#: src/ar.c:722 +#: src/ar.c:723 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "nie można zmienić nazwy pliku tymczasowego na %.*s" -#: src/ar.c:758 src/ar.c:1009 src/ar.c:1408 src/ranlib.c:222 +#: src/ar.c:759 src/ar.c:1010 src/ar.c:1411 src/ranlib.c:223 #, c-format msgid "cannot create new file" msgstr "nie można utworzyć nowego pliku" -#: src/ar.c:1208 +#: src/ar.c:1213 #, c-format msgid "position member %s not found" msgstr "nie odnaleziono położenia elementu %s" -#: src/ar.c:1218 +#: src/ar.c:1223 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: brak wpisu %s w archiwum.\n" -#: src/ar.c:1247 src/objdump.c:240 +#: src/ar.c:1252 src/objdump.c:242 #, c-format msgid "cannot open %s" msgstr "nie można otworzyć %s" -#: src/ar.c:1252 +#: src/ar.c:1257 #, c-format msgid "cannot stat %s" msgstr "nie można wykonać stat na %s" -#: src/ar.c:1258 +#: src/ar.c:1263 #, c-format msgid "%s is no regular file" msgstr "%s nie jest zwykłym plikiem" -#: src/ar.c:1271 +#: src/ar.c:1276 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "nie można uzyskać deskryptora ELF dla %s: %s\n" -#: src/ar.c:1291 +#: src/ar.c:1296 #, c-format msgid "cannot read %s: %s" msgstr "nie można odczytać %s: %s" +#: src/ar.c:1471 +#, fuzzy, c-format +msgid "cannot represent ar_date" +msgstr "nie można dekompresować danych" + +#: src/ar.c:1477 +#, fuzzy, c-format +msgid "cannot represent ar_uid" +msgstr "nie można dekompresować danych" + +#: src/ar.c:1483 +#, fuzzy, c-format +msgid "cannot represent ar_gid" +msgstr "nie można dekompresować danych" + +#: src/ar.c:1489 +#, fuzzy, c-format +msgid "cannot represent ar_mode" +msgstr "nie można uzyskać nazwy sekcji" + +#: src/ar.c:1495 +#, fuzzy, c-format +msgid "cannot represent ar_size" +msgstr "nie można otworzyć %s" + #: src/arlib-argp.c:32 msgid "Use zero for uid, gid, and date in archive members." msgstr "Używa zero jako UID, GID i datę w elementach archiwum." @@ -1208,119 +1279,120 @@ msgstr "%s %s różnią się: tabela symboli [%zu]" msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s różnią się: tabela symboli [%zu,%zu]" -#: src/elfcmp.c:427 src/elfcmp.c:496 +#: src/elfcmp.c:428 src/elfcmp.c:498 #, 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:435 +#: src/elfcmp.c:436 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "nie można odczytać notatki sekcji [%zu] „%s” w „%s”: %s" -#: src/elfcmp.c:445 +#: src/elfcmp.c:447 #, 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:453 +#: src/elfcmp.c:455 #, 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:468 +#: src/elfcmp.c:470 #, c-format msgid "%s %s differ: build ID length" msgstr "%s %s różnią się: długość identyfikatora kopii" -#: src/elfcmp.c:476 +#: src/elfcmp.c:478 #, c-format msgid "%s %s differ: build ID content" msgstr "%s %s różnią się: zawartość identyfikatora kopii" -#: src/elfcmp.c:485 +#: src/elfcmp.c:487 #, 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:526 +#: src/elfcmp.c:528 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s różnią się: zawartość sekcji [%zu] „%s”" -#: src/elfcmp.c:530 +#: src/elfcmp.c:532 #, 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:545 +#: src/elfcmp.c:547 #, 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:578 src/elfcmp.c:583 +#: src/elfcmp.c:580 src/elfcmp.c:585 #, c-format msgid "cannot load data of '%s': %s" msgstr "nie można wczytać danych z „%s”: %s" -#: src/elfcmp.c:602 src/elfcmp.c:608 +#: src/elfcmp.c:604 src/elfcmp.c:610 #, 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:614 +#: src/elfcmp.c:616 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s różnią się: nagłówek programu %d" -#: src/elfcmp.c:638 +#: src/elfcmp.c:640 #, c-format msgid "%s %s differ: gap" msgstr "%s %s różnią się: luka" -#: src/elfcmp.c:689 +#: src/elfcmp.c:691 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Nieprawidłowa wartość „%s” dla parametru --gaps." -#: src/elfcmp.c:717 src/findtextrel.c:206 src/nm.c:363 src/ranlib.c:141 -#: src/size.c:273 src/strings.c:185 src/strip.c:452 src/strip.c:489 -#: src/unstrip.c:2020 src/unstrip.c:2049 +#: src/elfcmp.c:719 src/findtextrel.c:206 src/nm.c:365 src/ranlib.c:142 +#: src/size.c:273 src/strings.c:186 src/strip.c:518 src/strip.c:555 +#: src/unstrip.c:2023 src/unstrip.c:2052 #, c-format msgid "cannot open '%s'" msgstr "nie można otworzyć „%s”" -#: src/elfcmp.c:721 src/findtextrel.c:213 src/ranlib.c:158 +#: src/elfcmp.c:723 src/findtextrel.c:213 src/ranlib.c:159 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "nie można utworzyć deskryptora ELF dla „%s”: %s" -#: src/elfcmp.c:726 +#: src/elfcmp.c:728 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "nie można utworzyć deskryptora EBL dla „%s”" -#: src/elfcmp.c:744 src/findtextrel.c:394 +#: src/elfcmp.c:746 src/findtextrel.c:394 #, 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:754 +#: src/elfcmp.c:756 #, c-format msgid "cannot get content of section %zu: %s" msgstr "nie można uzyskać zawartości sekcji %zu: %s" -#: src/elfcmp.c:764 src/elfcmp.c:778 +#: src/elfcmp.c:766 src/elfcmp.c:780 #, c-format msgid "cannot get relocation: %s" msgstr "nie można uzyskać relokacji: %s" -#: src/elfcompress.c:115 src/strip.c:240 src/unstrip.c:121 +#: src/elfcompress.c:115 src/strip.c:297 src/unstrip.c:121 #, c-format msgid "-o option specified twice" msgstr "Opcję -o podano dwukrotnie" #: src/elfcompress.c:122 +#, c-format msgid "-t option specified twice" msgstr "Opcję -t podano dwukrotnie" @@ -1331,10 +1403,12 @@ msgstr "nieznany typ kompresji „%s”" #. We need at least one input file. #: src/elfcompress.c:143 src/elfcompress.c:1305 +#, c-format msgid "No input file given" msgstr "Nie podano pliku wejściowego" #: src/elfcompress.c:149 src/elfcompress.c:1310 +#, c-format msgid "Only one input file allowed together with '-o'" msgstr "Tylko jeden plik wejściowy jest dozwolony z „-o”" @@ -1368,7 +1442,7 @@ msgstr "Wyświetla komunikat dla każdej (de)kompresowanej sekcji" msgid "Force compression of section even if it would become larger" msgstr "Wymusza kompresję sekcji nawet, jeśli spowodowałoby to jej zwiększenie" -#: src/elfcompress.c:1282 src/strip.c:87 +#: src/elfcompress.c:1282 src/strip.c:91 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "Łagodzi kilka reguł, aby obsłużyć lekko uszkodzone pliki ELF" @@ -1377,7 +1451,7 @@ msgid "Be silent when a section cannot be compressed" msgstr "Bez zgłaszania, kiedy nie można zdekompresować sekcji" #. Strings for arguments in help texts. -#: src/elfcompress.c:1294 src/elflint.c:77 src/readelf.c:126 +#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154 msgid "FILE..." msgstr "PLIK…" @@ -1385,19 +1459,19 @@ msgstr "PLIK…" msgid "Compress or decompress sections in an ELF file." msgstr "Kompresuje lub dekompresuje sekcje w pliku ELF." -#: src/elflint.c:63 +#: src/elflint.c:64 msgid "Be extremely strict, flag level 2 features." msgstr "Bardzo ścisłe sprawdzanie, cechy poziomu 2 flag." -#: src/elflint.c:64 +#: src/elflint.c:65 msgid "Do not print anything if successful" msgstr "Nie wypisywanie niczego w przypadku powodzenia" -#: src/elflint.c:65 +#: src/elflint.c:66 msgid "Binary is a separate debuginfo file" msgstr "Plik binarny jest oddzielnym plikiem debuginfo" -#: src/elflint.c:67 +#: src/elflint.c:68 msgid "" "Binary has been created with GNU ld and is therefore known to be broken in " "certain ways" @@ -1406,162 +1480,172 @@ msgstr "" "w pewien sposób" #. Short description of program. -#: src/elflint.c:73 +#: src/elflint.c:74 msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "" "Szczegółowe sprawdzanie zgodności plików ELF ze specyfikacją gABI/psABI." -#: src/elflint.c:154 src/readelf.c:301 +#: src/elflint.c:155 src/readelf.c:347 #, c-format msgid "cannot open input file" msgstr "nie można otworzyć pliku wejściowego" -#: src/elflint.c:161 +#: src/elflint.c:162 #, c-format msgid "cannot generate Elf descriptor: %s\n" msgstr "nie można utworzyć deskryptora ELF: %s\n" -#: src/elflint.c:180 +#: src/elflint.c:181 #, c-format msgid "error while closing Elf descriptor: %s\n" msgstr "błąd podczas zamykania deskryptora ELF: %s\n" -#: src/elflint.c:184 +#: src/elflint.c:185 msgid "No errors" msgstr "Brak błędów" -#: src/elflint.c:219 src/readelf.c:478 +#: src/elflint.c:220 src/readelf.c:546 msgid "Missing file name.\n" msgstr "Brak nazwy pliku.\n" -#: src/elflint.c:284 +#: src/elflint.c:285 #, c-format msgid " error while freeing sub-ELF descriptor: %s\n" msgstr " błąd podczas zwalniania deskryptora pod-ELF: %s\n" #. We cannot do anything. -#: src/elflint.c:292 +#: src/elflint.c:293 #, c-format msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "To nie jest plik ELF — ma błędne bajty magiczne na początku\n" -#: src/elflint.c:357 +#: src/elflint.c:358 #, c-format msgid "e_ident[%d] == %d is no known class\n" msgstr "e_ident[%d] == %d nie jest znaną klasą\n" -#: src/elflint.c:362 +#: src/elflint.c:363 #, c-format msgid "e_ident[%d] == %d is no known data encoding\n" msgstr "e_ident[%d] == %d nie jest znanym kodowaniem danych\n" -#: src/elflint.c:366 +#: src/elflint.c:367 #, c-format msgid "unknown ELF header version number e_ident[%d] == %d\n" msgstr "nieznany numer wersji nagłówka ELF e_ident[%d] == %d\n" -#: src/elflint.c:374 +#: src/elflint.c:375 #, c-format msgid "unsupported OS ABI e_ident[%d] == '%s'\n" msgstr "nieobsługiwane ABI systemu operacyjnego e_ident[%d] == „%s”\n" -#: src/elflint.c:380 -#, c-format -msgid "unsupport ABI version e_ident[%d] == %d\n" +#: src/elflint.c:381 +#, fuzzy, c-format +msgid "unsupported ABI version e_ident[%d] == %d\n" msgstr "nieobsługiwana wersja ABI e_ident[%d] == %d\n" -#: src/elflint.c:385 +#: src/elflint.c:386 #, c-format msgid "e_ident[%zu] is not zero\n" msgstr "e_ident[%zu] nie wynosi zero\n" -#: src/elflint.c:390 +#: src/elflint.c:391 #, c-format msgid "unknown object file type %d\n" msgstr "nieznany typ pliku obiektu %d\n" -#: src/elflint.c:397 +#: src/elflint.c:398 #, c-format msgid "unknown machine type %d\n" msgstr "nieznany typ komputera %d\n" -#: src/elflint.c:401 +#: src/elflint.c:402 #, c-format msgid "unknown object file version\n" msgstr "nieznana wersja pliku obiektu\n" -#: src/elflint.c:407 +#: src/elflint.c:408 #, c-format msgid "invalid program header offset\n" msgstr "nieprawidłowy offset nagłówka programu\n" -#: src/elflint.c:409 +#: src/elflint.c:410 #, c-format msgid "executables and DSOs cannot have zero program header offset\n" msgstr "" "pliki wykonywalne i DSO nie mogą mieć zerowego offsetu nagłówka programu\n" -#: src/elflint.c:413 +#: src/elflint.c:414 #, c-format msgid "invalid number of program header entries\n" msgstr "nieprawidłowa liczba wpisów nagłówka programu\n" -#: src/elflint.c:421 +#: src/elflint.c:422 #, c-format msgid "invalid section header table offset\n" msgstr "nieprawidłowy offset tabeli nagłówków sekcji\n" -#: src/elflint.c:424 +#: src/elflint.c:425 #, c-format msgid "section header table must be present\n" msgstr "tabela nagłówków sekcji musi istnieć\n" -#: src/elflint.c:438 +#: src/elflint.c:439 #, c-format msgid "invalid number of section header table entries\n" msgstr "nieprawidłowa liczba wpisów tabeli nagłówków sekcji\n" -#: src/elflint.c:455 +#: src/elflint.c:456 #, c-format msgid "invalid section header index\n" msgstr "nieprawidłowy indeks nagłówka sekcji\n" -#: src/elflint.c:469 +#: src/elflint.c:474 +#, c-format +msgid "Can only check %u headers, shnum was %u\n" +msgstr "" + +#: src/elflint.c:488 #, c-format msgid "invalid number of program header table entries\n" msgstr "nieprawidłowa liczba wpisów tabeli nagłówka programu\n" -#: src/elflint.c:478 +#: src/elflint.c:505 +#, c-format +msgid "Can only check %u headers, phnum was %u\n" +msgstr "" + +#: src/elflint.c:510 #, c-format msgid "invalid machine flags: %s\n" msgstr "nieprawidłowe flagi komputera: %s\n" -#: src/elflint.c:485 src/elflint.c:502 +#: src/elflint.c:517 src/elflint.c:534 #, c-format msgid "invalid ELF header size: %hd\n" msgstr "nieprawidłowy rozmiar nagłówka ELF: %hd\n" -#: src/elflint.c:488 src/elflint.c:505 +#: src/elflint.c:520 src/elflint.c:537 #, c-format msgid "invalid program header size: %hd\n" msgstr "nieprawidłowa rozmiar nagłówka programu: %hd\n" -#: src/elflint.c:491 src/elflint.c:508 +#: src/elflint.c:523 src/elflint.c:540 #, c-format msgid "invalid program header position or size\n" msgstr "nieprawidłowe położenie lub rozmiar nagłówka programu\n" -#: src/elflint.c:494 src/elflint.c:511 +#: src/elflint.c:526 src/elflint.c:543 #, c-format msgid "invalid section header size: %hd\n" msgstr "nieprawidłowy rozmiar nagłówka sekcji: %hd\n" -#: src/elflint.c:497 src/elflint.c:514 +#: src/elflint.c:529 src/elflint.c:546 #, c-format msgid "invalid section header position or size\n" msgstr "nieprawidłowe położenie lub rozmiar nagłówka sekcji\n" -#: src/elflint.c:559 +#: src/elflint.c:591 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1569,21 +1653,21 @@ msgid "" msgstr "" "sekcja [%2d] „%s”: sekcja z flagą SHF_GROUP nie jest częścią grupy sekcji\n" -#: src/elflint.c:563 +#: src/elflint.c:595 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" msgstr "" "sekcja [%2d] „%s”: grupa sekcji [%2zu] „%s” nie poprzedza elementu grupy\n" -#: src/elflint.c:579 src/elflint.c:1463 src/elflint.c:1514 src/elflint.c:1620 -#: src/elflint.c:1956 src/elflint.c:2272 src/elflint.c:2886 src/elflint.c:3049 -#: src/elflint.c:3197 src/elflint.c:3387 src/elflint.c:4355 +#: src/elflint.c:611 src/elflint.c:1495 src/elflint.c:1546 src/elflint.c:1652 +#: src/elflint.c:1988 src/elflint.c:2311 src/elflint.c:2930 src/elflint.c:3093 +#: src/elflint.c:3241 src/elflint.c:3431 src/elflint.c:4399 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać danych sekcji\n" -#: src/elflint.c:592 src/elflint.c:1627 +#: src/elflint.c:624 src/elflint.c:1659 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1592,7 +1676,7 @@ msgstr "" "sekcja [%2d] „%s”: użyta jako tabela ciągów dla sekcji [%2d] „%s”, ale nie " "jest typu SHT_STRTAB\n" -#: src/elflint.c:615 +#: src/elflint.c:647 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1601,38 +1685,38 @@ msgstr "" "sekcja [%2d] „%s”: tabela symboli nie może mieć więcej niż jednej " "rozszerzonej sekcji indeksów\n" -#: src/elflint.c:627 +#: src/elflint.c:659 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "sekcja [%2u] „%s”: rozmiar wpisu nie zgadza się z ElfXX_Sym\n" -#: src/elflint.c:636 +#: src/elflint.c:668 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać symbolu %d: %s\n" -#: src/elflint.c:641 src/elflint.c:644 src/elflint.c:647 src/elflint.c:650 -#: src/elflint.c:653 src/elflint.c:656 +#: src/elflint.c:673 src/elflint.c:676 src/elflint.c:679 src/elflint.c:682 +#: src/elflint.c:685 src/elflint.c:688 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "sekcja [%2d] „%s”: „%s” w zerowym wpisie nie jest zerem\n" -#: src/elflint.c:659 +#: src/elflint.c:691 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "sekcja [%2d] „%s”: XINDEX dla zerowego wpisu nie jest zerem\n" -#: src/elflint.c:669 +#: src/elflint.c:701 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać symbolu %zu: %s\n" -#: src/elflint.c:678 +#: src/elflint.c:710 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "sekcja [%2d] „%s”: symbol %zu: nieprawidłowa wartość nazwy\n" -#: src/elflint.c:693 +#: src/elflint.c:725 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1641,7 +1725,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: za duży indeks sekcji, ale nie ma sekcji " "rozszerzonych indeksów sekcji\n" -#: src/elflint.c:699 +#: src/elflint.c:731 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1651,28 +1735,28 @@ msgstr "" "się w st_shndx (%)\n" #. || sym->st_shndx > SHN_HIRESERVE always false -#: src/elflint.c:711 +#: src/elflint.c:743 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "sekcja [%2d] „%s”: symbol %zu: nieprawidłowy indeks sekcji\n" -#: src/elflint.c:719 +#: src/elflint.c:751 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "sekcja [%2d] „%s”: symbol %zu: nieznany typ\n" -#: src/elflint.c:725 +#: src/elflint.c:757 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "sekcja [%2d] „%s”: symbol %zu: nieznane dowiązanie symbolu\n" -#: src/elflint.c:730 +#: src/elflint.c:762 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" "sekcja [%2d] „%s”: symbol %zu: unikalny symbol nie jest typem obiektu\n" -#: src/elflint.c:738 +#: src/elflint.c:770 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" @@ -1680,23 +1764,23 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: COMMON jest dozwolone tylko w plikach " "relokowalnych\n" -#: src/elflint.c:742 +#: src/elflint.c:774 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "sekcja [%2d] „%s”: symbol %zu: lokalne symbole COMMON to nonsens\n" -#: src/elflint.c:746 +#: src/elflint.c:778 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" msgstr "sekcja [%2d] „%s”: symbol %zu: funkcja w sekcji COMMON to nonsens\n" -#: src/elflint.c:797 +#: src/elflint.c:829 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "sekcja [%2d] „%s”: symbol %zu: st_value spoza zakresu\n" -#: src/elflint.c:803 src/elflint.c:828 src/elflint.c:877 +#: src/elflint.c:835 src/elflint.c:860 src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1705,7 +1789,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu nie mieści się w całości we wskazywanej sekcji " "[%2d] „%s”\n" -#: src/elflint.c:812 +#: src/elflint.c:844 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1714,7 +1798,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: wskazywana sekcja [%2d] „%s” nie ma " "ustawionej flagi SHF_TLS\n" -#: src/elflint.c:822 src/elflint.c:870 +#: src/elflint.c:854 src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1723,7 +1807,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: st_value spoza zakresu wskazywanej sekcji " "[%2d] „%s”\n" -#: src/elflint.c:849 +#: src/elflint.c:881 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" @@ -1731,7 +1815,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: symbol TLS, ale brak wpisu TLS nagłówka " "programu\n" -#: src/elflint.c:855 +#: src/elflint.c:887 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " @@ -1740,7 +1824,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: symbol TLS, ale nie można uzyskać wpisu TLS " "nagłówka programu\n" -#: src/elflint.c:863 +#: src/elflint.c:895 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1748,7 +1832,7 @@ msgid "" msgstr "" "sekcja [%2d] „%s”: symbol %zu: st_value pomija wskazywaną sekcję [%2d] „%s”\n" -#: src/elflint.c:890 +#: src/elflint.c:922 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1757,7 +1841,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: lokalny symbol spoza zakresu określonego " "w sh_info\n" -#: src/elflint.c:897 +#: src/elflint.c:929 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1766,12 +1850,12 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: nielokalny symbol spoza zakresu określonego " "w sh_info\n" -#: src/elflint.c:904 +#: src/elflint.c:936 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "sekcja [%2d] „%s”: symbol %zu: nielokalny symbol sekcji\n" -#: src/elflint.c:954 +#: src/elflint.c:986 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1780,7 +1864,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol _GLOBAL_OFFSET_TABLE_ odnosi się do błędnej sekcji " "[%2d]\n" -#: src/elflint.c:961 +#: src/elflint.c:993 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1792,7 +1876,7 @@ msgstr "" #. This test is more strict than the psABIs which #. usually allow the symbol to be in the middle of #. the .got section, allowing negative offsets. -#: src/elflint.c:977 +#: src/elflint.c:1009 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1801,7 +1885,7 @@ msgstr "" "sekcja [%2d] „%s”: wartość symbolu _GLOBAL_OFFSET_TABLE_ %# nie " "pasuje do adresu sekcji %s %#\n" -#: src/elflint.c:984 +#: src/elflint.c:1016 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1810,7 +1894,7 @@ msgstr "" "sekcja [%2d] „%s”: rozmiar symbolu _GLOBAL_OFFSET_TABLE_ % nie " "pasuje do rozmiaru sekcji %s %\n" -#: src/elflint.c:992 +#: src/elflint.c:1024 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1819,7 +1903,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol _GLOBAL_OFFSET_TABLE_ istnieje, ale brak sekcji ." "got\n" -#: src/elflint.c:1008 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1828,7 +1912,7 @@ msgstr "" "sekcja [%2d] „%s”: wartość symbolu _DYNAMIC_ %# nie pasuje do adresu " "segmentu dynamicznego %#\n" -#: src/elflint.c:1015 +#: src/elflint.c:1047 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1837,7 +1921,7 @@ msgstr "" "sekcja [%2d] „%s”: rozmiar symbolu _DYNAMIC_ % nie pasuje do " "rozmiaru segmentu dynamicznego %\n" -#: src/elflint.c:1028 +#: src/elflint.c:1060 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1846,27 +1930,27 @@ msgstr "" "sekcja [%2d] „%s”: symbol %zu: symbol w dynamicznej tabeli symboli " "z niedomyślną widocznością\n" -#: src/elflint.c:1032 +#: src/elflint.c:1064 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "sekcja [%2d] „%s”: symbol %zu: ustawiono nieznany bit w st_other\n" -#: src/elflint.c:1070 +#: src/elflint.c:1102 #, c-format msgid "section [%2d] '%s': cannot get section data.\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać danych sekcji.\n" -#: src/elflint.c:1086 +#: src/elflint.c:1118 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "sekcja [%2d] „%s”: DT_RELCOUNT użyte dla tej sekcji RELA\n" -#: src/elflint.c:1097 src/elflint.c:1150 +#: src/elflint.c:1129 src/elflint.c:1182 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "sekcja [%2d] „%s”: DT_RELCOUNT %d za duże dla tej sekcji\n" -#: src/elflint.c:1122 src/elflint.c:1175 +#: src/elflint.c:1154 src/elflint.c:1207 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1875,7 +1959,7 @@ msgstr "" "sekcja [%2d] „%s”: relokacje względne po indeksie %d podanym przez " "DT_RELCOUNT\n" -#: src/elflint.c:1128 src/elflint.c:1181 +#: src/elflint.c:1160 src/elflint.c:1213 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1884,50 +1968,50 @@ msgstr "" "sekcja [%2d] „%s”: relokacja bezwzględna pod indeksem %zu; DT_RELCOUNT podał " "%d relokacji względnych\n" -#: src/elflint.c:1140 +#: src/elflint.c:1172 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "sekcja [%2d] „%s”: DT_RELACOUNT użyte dla tej sekcji REL\n" -#: src/elflint.c:1223 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "sekcja [%2d] „%s”: nieprawidłowy indeks sekcji docelowej\n" -#: src/elflint.c:1235 +#: src/elflint.c:1267 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "sekcja [%2d] „%s”: nieprawidłowy typ sekcji docelowej\n" -#: src/elflint.c:1243 +#: src/elflint.c:1275 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "sekcja [%2d] „%s”: sh_info powinno wynosić zero\n" -#: src/elflint.c:1251 +#: src/elflint.c:1283 #, c-format msgid "" "section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" "sekcja [%2d] „%s”: relokacje dla sekcji złączalnych ciągów są niemożliwe\n" -#: src/elflint.c:1259 +#: src/elflint.c:1291 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "sekcja [%2d] „%s”: rozmiar wpisu sekcji nie zgadza się z ElfXX_Rela\n" -#: src/elflint.c:1319 +#: src/elflint.c:1351 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" "flaga relokacji tekstu jest ustawiona, ale nie ma segmentu tylko do odczytu\n" -#: src/elflint.c:1346 +#: src/elflint.c:1378 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "sekcja [%2d] „%s”: relokacja %zu: nieprawidłowy typ\n" -#: src/elflint.c:1354 +#: src/elflint.c:1386 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1936,12 +2020,12 @@ msgstr "" "sekcja [%2d] „%s”: relokacja %zu: typ relokacji nieprawidłowy dla tego typu " "pliku\n" -#: src/elflint.c:1362 +#: src/elflint.c:1394 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "sekcja [%2d] „%s”: relokacja %zu: nieprawidłowy indeks symbolu\n" -#: src/elflint.c:1380 +#: src/elflint.c:1412 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1950,12 +2034,12 @@ msgstr "" "sekcja [%2d] „%s”: relokacja %zu: z %s można użyć tylko symbolu " "„_GLOBAL_OFFSET_TABLE_”\n" -#: src/elflint.c:1397 +#: src/elflint.c:1429 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "sekcja [%2d] „%s”: relokacja %zu: offset spoza zakresu\n" -#: src/elflint.c:1412 +#: src/elflint.c:1444 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1963,7 +2047,7 @@ msgid "" msgstr "" "sekcja [%2d] „%s”: relokacja %zu: relokacja kopii względem symbolu typu %s\n" -#: src/elflint.c:1433 +#: src/elflint.c:1465 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1972,23 +2056,23 @@ msgstr "" "sekcja [%2d] „%s”: relokacja %zu: sekcja tylko do odczytu została " "zmodyfikowana, ale nie ustawiono flagi relokacji tekstu\n" -#: src/elflint.c:1448 +#: src/elflint.c:1480 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "" "sekcja [%2d] „%s”: relokacje względem wczytanych i niewczytanych danych\n" -#: src/elflint.c:1488 src/elflint.c:1539 +#: src/elflint.c:1520 src/elflint.c:1571 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać relokacji %zu: %s\n" -#: src/elflint.c:1615 +#: src/elflint.c:1647 #, c-format msgid "more than one dynamic section present\n" msgstr "obecna jest więcej niż jedna sekcja dynamiczna\n" -#: src/elflint.c:1633 +#: src/elflint.c:1665 #, c-format msgid "" "section [%2d]: referenced as string table for section [%2d] '%s' but section " @@ -1997,43 +2081,43 @@ msgstr "" "sekcja [%2d]: wskazane jako tabela ciągów dla sekcji [%2d] „%s”, ale wartość " "dowiązania sekcji jest nieprawidłowa\n" -#: src/elflint.c:1641 +#: src/elflint.c:1673 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "sekcja [%2d] „%s”: rozmiar wpisu sekcji nie zgadza się z ElfXX_Dyn\n" -#: src/elflint.c:1646 src/elflint.c:1935 +#: src/elflint.c:1678 src/elflint.c:1967 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "sekcja [%2d] „%s”: sh_info nie wynosi zero\n" -#: src/elflint.c:1656 +#: src/elflint.c:1688 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" "sekcja [%2d] „%s”: nie można uzyskać wpisu %zu sekcji dynamicznej: %s\n" -#: src/elflint.c:1664 +#: src/elflint.c:1696 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "sekcja [%2d] „%s”: wpisy nie-DT_NULL występują po wpisie DT_NULL\n" -#: src/elflint.c:1671 +#: src/elflint.c:1703 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "sekcja [%2d] „%s”: wpis %zu: nieznany znacznik\n" -#: src/elflint.c:1682 +#: src/elflint.c:1714 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "sekcja [%2d] „%s”: wpis %zu: więcej niż jeden wpis ze znacznikiem %s\n" -#: src/elflint.c:1692 +#: src/elflint.c:1724 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "sekcja [%2d] „%s”: wpis %zu: użyto znacznika %s poziomu 2\n" -#: src/elflint.c:1710 +#: src/elflint.c:1742 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" @@ -2041,7 +2125,7 @@ msgstr "" "sekcja [%2d] „%s”: wpis %zu: wartość DT_PLTREL musi wynosić DT_REL lub " "DT_RELA\n" -#: src/elflint.c:1723 +#: src/elflint.c:1755 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " @@ -2050,14 +2134,14 @@ msgstr "" "sekcja [%2d] „%s”: wpis %zu: wskaźnik nie pasuje do adresu sekcji [%2d] „%s” " "wskazywanej przez sh_link\n" -#: src/elflint.c:1766 +#: src/elflint.c:1798 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" msgstr "" "sekcja [%2d] „%s”: wpis %zu: wartość %s musi wskazywać na wczytany segment\n" -#: src/elflint.c:1781 +#: src/elflint.c:1813 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " @@ -2066,48 +2150,48 @@ msgstr "" "sekcja [%2d] „%s”: wpis %zu: wartość %s musi być prawidłowym offsetem " "w sekcji [%2d] „%s”\n" -#: src/elflint.c:1801 src/elflint.c:1829 +#: src/elflint.c:1833 src/elflint.c:1861 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "sekcja [%2d] „%s”: zawiera wpis %s, ale nie %s\n" -#: src/elflint.c:1813 +#: src/elflint.c:1845 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "sekcja [%2d] „%s”: brak obowiązkowego znacznika %s\n" -#: src/elflint.c:1822 +#: src/elflint.c:1854 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "sekcja [%2d] „%s”: brak sekcji skrótów\n" -#: src/elflint.c:1837 src/elflint.c:1844 +#: src/elflint.c:1869 src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "sekcja [%2d] „%s”: nie wszystkie z %s, %s i %s są obecne\n" -#: src/elflint.c:1854 src/elflint.c:1858 +#: src/elflint.c:1886 src/elflint.c:1890 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" "sekcja [%2d] „%s”: brak znacznika %s w DSO oznaczonym podczas wstępnej " "konsolidacji\n" -#: src/elflint.c:1864 +#: src/elflint.c:1896 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" "sekcja [%2d] „%s”: plik nie-DSO oznaczony jako zależność podczas wstępnej " "konsolidacji\n" -#: src/elflint.c:1875 src/elflint.c:1879 src/elflint.c:1883 src/elflint.c:1887 +#: src/elflint.c:1907 src/elflint.c:1911 src/elflint.c:1915 src/elflint.c:1919 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" "sekcja [%2d] „%s”: brak znacznika %s we wstępnie konsolidowanym pliku " "wykonywalnym\n" -#: src/elflint.c:1899 +#: src/elflint.c:1931 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" @@ -2115,7 +2199,7 @@ msgstr "" "sekcja [%2d] „%s”: tylko pliki relokowalne mogą mieć rozszerzoną sekcję " "indeksów\n" -#: src/elflint.c:1909 +#: src/elflint.c:1941 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" @@ -2123,31 +2207,31 @@ msgstr "" "sekcja [%2d] „%s”: sekcja rozszerzonych indeksów sekcji nie dla tabeli " "symboli\n" -#: src/elflint.c:1913 +#: src/elflint.c:1945 #, c-format msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" msgstr "" "sekcja [%2d] „%s”: rozszerzony indeks sekcji sh_link [%2d] jest " "nieprawidłowy\n" -#: src/elflint.c:1918 +#: src/elflint.c:1950 #, c-format msgid "cannot get data for symbol section\n" msgstr "nie można uzyskać danych dla sekcji symboli\n" -#: src/elflint.c:1921 +#: src/elflint.c:1953 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "sekcja [%2d] „%s”: rozmiar wpisu nie zgadza się z Elf32_Word\n" -#: src/elflint.c:1930 +#: src/elflint.c:1962 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" "sekcja [%2d] „%s”: tabela rozszerzonych indeksów jest za mała dla tabeli " "symboli\n" -#: src/elflint.c:1945 +#: src/elflint.c:1977 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " @@ -2156,24 +2240,24 @@ msgstr "" "sekcja [%2d] „%s”: rozszerzony indeks sekcji w sekcji [%2zu] „%s” odwołuje " "się do tej samej tabeli symboli\n" -#: src/elflint.c:1962 +#: src/elflint.c:1995 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "symbol 0 powinien mieć zerowy rozszerzony indeks sekcji\n" -#: src/elflint.c:1974 +#: src/elflint.c:2007 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "nie można uzyskać danych dla symbolu %zu\n" -#: src/elflint.c:1979 +#: src/elflint.c:2012 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" "rozszerzony indeks sekcji wynosi %, ale indeks symbolu nie wynosi " "XINDEX\n" -#: src/elflint.c:1995 src/elflint.c:2046 +#: src/elflint.c:2029 src/elflint.c:2083 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" @@ -2181,43 +2265,43 @@ msgstr "" "sekcja [%2d] „%s”: sekcja tabeli mieszającej jest za mała (%ld, oczekiwano " "%ld)\n" -#: src/elflint.c:2007 src/elflint.c:2058 +#: src/elflint.c:2043 src/elflint.c:2097 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "sekcja [%2d] „%s”: tabela łańcuchowa jest za duża\n" -#: src/elflint.c:2021 src/elflint.c:2072 +#: src/elflint.c:2057 src/elflint.c:2111 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" "sekcja [%2d] „%s”: odwołanie do kubełka skrótu %zu jest spoza zakresu\n" -#: src/elflint.c:2031 +#: src/elflint.c:2067 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" "sekcja [%2d] „%s”: odwołanie do łańcucha skrótu %zu jest spoza zakresu\n" -#: src/elflint.c:2082 +#: src/elflint.c:2121 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" "sekcja [%2d] „%s”: odwołanie do łańcucha skrótu % jest spoza " "zakresu\n" -#: src/elflint.c:2095 +#: src/elflint.c:2134 #, c-format msgid "section [%2d] '%s': not enough data\n" msgstr "sekcja [%2d] „%s”: brak wystarczającej ilości danych\n" -#: src/elflint.c:2107 +#: src/elflint.c:2146 #, c-format msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "" "sekcja [%2d] „%s”: rozmiar maski bitowej wynosi zero lub nie jest potęgą 2: " "%u\n" -#: src/elflint.c:2123 +#: src/elflint.c:2162 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " @@ -2226,13 +2310,13 @@ msgstr "" "sekcja [%2d] „%s”: sekcja tabeli mieszającej jest za mała (wynosi %ld, " "oczekiwano co najmniej %ld)\n" -#: src/elflint.c:2132 +#: src/elflint.c:2171 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "" "sekcja [%2d] „%s”: drugie przesunięcie funkcji mieszającej jest za duże: %u\n" -#: src/elflint.c:2166 +#: src/elflint.c:2205 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" @@ -2240,7 +2324,7 @@ msgstr "" "sekcja [%2d] „%s”: łańcuch mieszający dla kubełka %zu jest mniejszy niż " "przesunięcie indeksu symboli\n" -#: src/elflint.c:2187 +#: src/elflint.c:2226 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " @@ -2249,7 +2333,7 @@ msgstr "" "sekcja [%2d] „%s”: symbol %u wskazywany w łańcuchu dla kubełka %zu jest " "nieokreślony\n" -#: src/elflint.c:2200 +#: src/elflint.c:2239 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" @@ -2257,7 +2341,7 @@ msgstr "" "sekcja [%2d] „%s”: wartość skrótu dla symbolu %u w łańcuchu dla kubełka %zu " "jest błędna\n" -#: src/elflint.c:2209 +#: src/elflint.c:2248 #, c-format msgid "" "section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" @@ -2265,12 +2349,12 @@ msgstr "" "sekcja [%2d] „%s”: indeks maski dla symbolu %u w łańcuchu dla kubełka %zu " "jest błędny\n" -#: src/elflint.c:2239 +#: src/elflint.c:2278 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "sekcja [%2d] „%s”: łańcuch skrótu dla kubełka %zu jest spoza zakresu\n" -#: src/elflint.c:2244 +#: src/elflint.c:2283 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" @@ -2278,41 +2362,41 @@ msgstr "" "sekcja [%2d] „%s”: odwołanie do symbolu w łańcuchu dla kubełka %zu jest " "spoza zakresu\n" -#: src/elflint.c:2250 +#: src/elflint.c:2289 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "" "sekcja [%2d] „%s”: maska bitowa nie pasuje do nazw w tabeli mieszającej\n" -#: src/elflint.c:2263 +#: src/elflint.c:2302 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" "sekcja [%2d] „%s”: pliki relokowalne nie mogą mieć tabeli mieszających\n" -#: src/elflint.c:2281 +#: src/elflint.c:2320 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" "sekcja [%2d] „%s”: tabela mieszająca nie dla tabeli dynamicznych symboli\n" -#: src/elflint.c:2285 +#: src/elflint.c:2324 #, c-format msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" msgstr "" "sekcja [%2d] „%s”: nieprawidłowy indeks sekcji tabeli symboli sh_link [%2d]\n" -#: src/elflint.c:2293 +#: src/elflint.c:2334 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "sekcja [%2d] „%s”: niepoprawny rozmiar wpisu tabeli mieszającej\n" -#: src/elflint.c:2298 +#: src/elflint.c:2339 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "sekcja [%2d] „%s”: nieoznaczona do przydzielenia\n" -#: src/elflint.c:2303 +#: src/elflint.c:2344 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " @@ -2321,29 +2405,29 @@ msgstr "" "sekcja [%2d] „%s”: tabela mieszająca nie ma miejsca nawet na początkowe " "wpisy administracyjne\n" -#: src/elflint.c:2352 +#: src/elflint.c:2393 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "" "sh_link w sekcjach skrótu [%2zu] „%s” i [%2zu] „%s” nie są identyczne\n" -#: src/elflint.c:2376 src/elflint.c:2441 src/elflint.c:2476 +#: src/elflint.c:2417 src/elflint.c:2482 src/elflint.c:2517 #, c-format msgid "hash section [%2zu] '%s' does not contain enough data\n" msgstr "" "sekcja mieszania [%2zu] „%s” nie zawiera wystarczającej ilości danych\n" -#: src/elflint.c:2397 +#: src/elflint.c:2438 #, c-format msgid "hash section [%2zu] '%s' has zero bit mask words\n" msgstr "sekcja mieszania [%2zu] „%s” ma zerowe słowa maski bitów\n" -#: src/elflint.c:2408 src/elflint.c:2452 src/elflint.c:2489 +#: src/elflint.c:2449 src/elflint.c:2493 src/elflint.c:2530 #, c-format msgid "hash section [%2zu] '%s' uses too much data\n" msgstr "sekcja mieszania [%2zu] „%s” używa za dużo danych\n" -#: src/elflint.c:2423 +#: src/elflint.c:2464 #, c-format msgid "" "hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " @@ -2352,17 +2436,17 @@ msgstr "" "sekcja mieszająca [%2zu] „%s” nieprawidłowy indeks symboli % " "(max_nsyms: %, nentries: %\n" -#: src/elflint.c:2510 +#: src/elflint.c:2551 #, c-format msgid "hash section [%2zu] '%s' invalid sh_entsize\n" msgstr "sekcja mieszania [%2zu] „%s” nieprawidłowe sh_entsize\n" -#: src/elflint.c:2520 src/elflint.c:2524 +#: src/elflint.c:2561 src/elflint.c:2565 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "sekcja [%2zu] „%s”: odwołanie do symbolu o indeksie 0\n" -#: src/elflint.c:2531 +#: src/elflint.c:2572 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " @@ -2371,7 +2455,7 @@ msgstr "" "symbol %d wymieniony w nowej tabeli mieszającej w [%2zu] „%s”, ale nie " "w poprzedniej tabeli mieszającej [%2zu] „%s”\n" -#: src/elflint.c:2543 +#: src/elflint.c:2584 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " @@ -2380,12 +2464,12 @@ msgstr "" "symbol %d wymieniony w poprzedniej tabeli mieszającej w [%2zu] „%s”, ale nie " "w nowej tabeli mieszającej w [%2zu] „%s”\n" -#: src/elflint.c:2559 +#: src/elflint.c:2600 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "sekcja [%2d] „%s”: niezerowe sh_%s dla sekcji NULL\n" -#: src/elflint.c:2579 +#: src/elflint.c:2620 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" @@ -2393,96 +2477,96 @@ msgstr "" "sekcja [%2d] „%s”: w plikach obiektów relokowalnych dozwolone są tylko grupy " "sekcji\n" -#: src/elflint.c:2590 +#: src/elflint.c:2631 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać tabeli symboli: %s\n" -#: src/elflint.c:2595 +#: src/elflint.c:2636 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" "sekcja [%2d] „%s”: odwołanie do sekcji w sh_link nie ma tabeli symboli\n" -#: src/elflint.c:2601 +#: src/elflint.c:2642 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "sekcja [%2d] „%s”: nieprawidłowy indeks symbolu w sh_info\n" -#: src/elflint.c:2606 +#: src/elflint.c:2647 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "sekcja [%2d] „%s”: niezerowe sh_flags\n" -#: src/elflint.c:2613 +#: src/elflint.c:2654 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać symbolu dla podpisu\n" -#: src/elflint.c:2617 +#: src/elflint.c:2658 #, c-format msgid "section [%2d] '%s': cannot get symbol name for signature\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać nazwy symbolu dla podpisu\n" -#: src/elflint.c:2622 +#: src/elflint.c:2663 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "sekcja [%2d] „%s”: symbol podpisu nie można być pustym ciągiem\n" -#: src/elflint.c:2628 +#: src/elflint.c:2669 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "sekcja [%2d] „%s”: sh_flags nie ustawione poprawnie\n" -#: src/elflint.c:2634 +#: src/elflint.c:2675 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać danych: %s\n" -#: src/elflint.c:2643 +#: src/elflint.c:2684 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "" "sekcja [%2d] „%s”: rozmiar sekcji nie jest wielokrotnością " "sizeof(Elf32_Word)\n" -#: src/elflint.c:2648 +#: src/elflint.c:2690 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "sekcja [%2d] „%s”: grupa sekcji bez słowa flag\n" -#: src/elflint.c:2654 +#: src/elflint.c:2698 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "sekcja [%2d] „%s”: grupa sekcji bez elementów\n" -#: src/elflint.c:2658 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "sekcja [%2d] „%s”: grupa sekcji z tylko jednym elementem\n" -#: src/elflint.c:2669 +#: src/elflint.c:2713 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "sekcja [%2d] „%s”: nieznane flagi grupy sekcji\n" -#: src/elflint.c:2681 +#: src/elflint.c:2725 #, c-format msgid "section [%2d] '%s': section index %zu out of range\n" msgstr "sekcja [%2d] „%s”: indeks sekcji %zu jest spoza zakresu\n" -#: src/elflint.c:2690 +#: src/elflint.c:2734 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" "sekcja [%2d] „%s”: nie można uzyskać nagłówka sekcji dla elementu %zu: %s\n" -#: src/elflint.c:2697 +#: src/elflint.c:2741 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "sekcja [%2d] „%s”: grupa sekcji zawiera inną grupę [%2d] „%s”\n" -#: src/elflint.c:2703 +#: src/elflint.c:2747 #, c-format msgid "" "section [%2d] '%s': element %zu references section [%2d] '%s' without " @@ -2491,12 +2575,12 @@ msgstr "" "sekcja [%2d] „%s”: element %zu odwołuje się do sekcji [%2d] „%s” bez flagi " "SHF_GROUP\n" -#: src/elflint.c:2710 +#: src/elflint.c:2754 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "sekcja [%2d] „%s” jest zawarta w więcej niż jednej grupie sekcji\n" -#: src/elflint.c:2900 +#: src/elflint.c:2944 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " @@ -2505,7 +2589,7 @@ msgstr "" "sekcja [%2d] „%s” odwołuje się w sh_link do sekcji [%2d] „%s”, która nie " "jest tabelą symboli dynamicznych\n" -#: src/elflint.c:2912 +#: src/elflint.c:2956 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " @@ -2513,76 +2597,76 @@ msgid "" msgstr "" "sekcja [%2d] „%s” ma inną liczbę wpisów niż tabela symboli [%2d] „%s”\n" -#: src/elflint.c:2928 +#: src/elflint.c:2972 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "sekcja [%2d] „%s”: symbol %d: nie można odczytać danych wersji\n" -#: src/elflint.c:2944 +#: src/elflint.c:2988 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "sekcja [%2d] „%s”: symbol %d: symbol lokalny z zakresem globalnym\n" -#: src/elflint.c:2952 +#: src/elflint.c:2996 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "sekcja [%2d] „%s”: symbol %d: symbol lokalny z wersją\n" -#: src/elflint.c:2966 +#: src/elflint.c:3010 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "sekcja [%2d] „%s”: symbol %d: nieprawidłowy indeks wersji %d\n" -#: src/elflint.c:2971 +#: src/elflint.c:3015 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" msgstr "" "sekcja [%2d] „%s”: symbol %d: indeks wersji %d jest dla wersji określonej\n" -#: src/elflint.c:2981 +#: src/elflint.c:3025 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" msgstr "" "sekcja [%2d] „%s”: symbol %d: indeks wersji %d jest dla wersji żądanej\n" -#: src/elflint.c:3034 +#: src/elflint.c:3078 #, c-format msgid "more than one version reference section present\n" msgstr "obecna jest więcej niż jedna sekcja odniesienia wersji\n" -#: src/elflint.c:3042 src/elflint.c:3189 +#: src/elflint.c:3086 src/elflint.c:3233 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "sekcja [%2d] „%s”: sh_link nie łączy się z tabelą ciągów\n" -#: src/elflint.c:3067 src/elflint.c:3243 +#: src/elflint.c:3111 src/elflint.c:3287 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "sekcja [%2d] „%s”: wpis %d ma błędną wersję %d\n" -#: src/elflint.c:3074 src/elflint.c:3250 +#: src/elflint.c:3118 src/elflint.c:3294 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "sekcja [%2d] „%s”: wpis %d ma błędny offset dla danych dodatkowych\n" -#: src/elflint.c:3084 +#: src/elflint.c:3128 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "sekcja [%2d] „%s”: symbol %d ma błędne odniesienie do pliku\n" -#: src/elflint.c:3092 +#: src/elflint.c:3136 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "sekcja [%2d] „%s”: wpis %d odnosi się do nieznanej zależności\n" -#: src/elflint.c:3104 +#: src/elflint.c:3148 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d ma nieznaną flagę\n" -#: src/elflint.c:3112 +#: src/elflint.c:3156 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " @@ -2591,7 +2675,7 @@ msgstr "" "sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d ma nieprawidłowe " "odniesienie do nazwy\n" -#: src/elflint.c:3121 +#: src/elflint.c:3165 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " @@ -2600,7 +2684,7 @@ msgstr "" "sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d ma błędną wartość skrótu: " "%#x, oczekiwano %#x\n" -#: src/elflint.c:3130 +#: src/elflint.c:3174 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " @@ -2609,19 +2693,19 @@ msgstr "" "sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d ma powtórzoną nazwę wersji " "„%s”\n" -#: src/elflint.c:3141 +#: src/elflint.c:3185 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" msgstr "" "sekcja [%2d] „%s”: wpis dodatkowy %d do wpisu %d ma błędne następne pole\n" -#: src/elflint.c:3158 src/elflint.c:3334 +#: src/elflint.c:3202 src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "sekcja [%2d] „%s”: wpis %d ma błędny offset do następnego wpisu\n" -#: src/elflint.c:3166 src/elflint.c:3342 +#: src/elflint.c:3210 src/elflint.c:3386 #, c-format msgid "" "section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " @@ -2630,43 +2714,43 @@ msgstr "" "sekcja [%2d] „%s”: wpis %d ma zerowy offset do następnego wpisu, ale sh_info " "zawiera informacje o większej liczbie wpisów\n" -#: src/elflint.c:3181 +#: src/elflint.c:3225 #, c-format msgid "more than one version definition section present\n" msgstr "obecna jest więcej niż jedna sekcja definicji wersji\n" -#: src/elflint.c:3228 +#: src/elflint.c:3272 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "sekcja [%2d] „%s”: jest więcej niż jedna definicja BASE\n" -#: src/elflint.c:3232 +#: src/elflint.c:3276 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "sekcja [%2d] „%s”: definicja BASE musi mieć indeks VER_NDX_GLOBAL\n" -#: src/elflint.c:3238 +#: src/elflint.c:3282 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "sekcja [%2d] „%s”: wpis %d ma nieznaną flagę\n" -#: src/elflint.c:3265 +#: src/elflint.c:3309 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "sekcja [%2d] „%s”: wpis %d ma nieprawidłowe odniesienie do nazwy\n" -#: src/elflint.c:3272 +#: src/elflint.c:3316 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" "sekcja [%2d] „%s”: wpis %d ma błędną wartość skrótu: %#x, oczekiwano %#x\n" -#: src/elflint.c:3280 +#: src/elflint.c:3324 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "sekcja [%2d] „%s”: wpis %d ma powtórzoną nazwę wersji „%s”\n" -#: src/elflint.c:3300 +#: src/elflint.c:3344 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" @@ -2674,51 +2758,51 @@ msgstr "" "sekcja [%2d] „%s”: wpis %d ma nieprawidłowe odniesienie do nazwy w danych " "dodatkowych\n" -#: src/elflint.c:3317 +#: src/elflint.c:3361 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" "sekcja [%2d] „%s”: wpis %d ma błędne następne pole w danych dodatkowych\n" -#: src/elflint.c:3350 +#: src/elflint.c:3394 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "sekcja [%2d] „%s”: brak definicji BASE\n" -#: src/elflint.c:3366 +#: src/elflint.c:3410 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "sekcja [%2d] „%s”: nieznana wersja rodzica „%s”\n" -#: src/elflint.c:3379 +#: src/elflint.c:3423 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "sekcja [%2d] „%s”: pusta sekcja atrybutów obiektu\n" -#: src/elflint.c:3400 +#: src/elflint.c:3444 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "sekcja [%2d] „%s”: nierozpoznany format atrybutu\n" -#: src/elflint.c:3416 +#: src/elflint.c:3460 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" "sekcja [%2d] „%s”: offset %zu: pole o zerowej długości w sekcji atrybutów\n" -#: src/elflint.c:3425 +#: src/elflint.c:3469 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" "sekcja [%2d] „%s”: offset %zu: nieprawidłowa długość w sekcji atrybutów\n" -#: src/elflint.c:3437 +#: src/elflint.c:3481 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "sekcja [%2d] „%s”: offset %zu: niezakończony ciąg nazwy producenta\n" -#: src/elflint.c:3454 +#: src/elflint.c:3498 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" @@ -2726,19 +2810,19 @@ msgstr "" "sekcja [%2d] „%s”: offset %zu: niekończące się ULEB128 w znaczniku podsekcji " "atrybutów\n" -#: src/elflint.c:3463 +#: src/elflint.c:3507 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "sekcja [%2d] „%s”: offset %zu: skrócona sekcja atrybutów\n" -#: src/elflint.c:3472 +#: src/elflint.c:3516 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" msgstr "" "sekcja [%2d] „%s”: offset %zu: zerowej długości pole w podsekcji atrybutów\n" -#: src/elflint.c:3487 +#: src/elflint.c:3531 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" @@ -2746,7 +2830,7 @@ msgstr "" "sekcja [%2d] „%s”: offset %zu: nieprawidłowa długość w podsekcji atrybutów\n" #. Tag_File -#: src/elflint.c:3498 +#: src/elflint.c:3542 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" @@ -2754,23 +2838,23 @@ msgstr "" "sekcja [%2d] „%s”: offset %zu: podsekcja atrybutów ma nieoczekiwany znacznik " "%u\n" -#: src/elflint.c:3516 +#: src/elflint.c:3560 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" "sekcja [%2d] „%s”: offset %zu: niekończące się ULEB128 w znaczniku atrybutu\n" -#: src/elflint.c:3527 +#: src/elflint.c:3571 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "sekcja [%2d] „%s”: offset %zu: niezakończony ciąg w atrybucie\n" -#: src/elflint.c:3540 +#: src/elflint.c:3584 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "sekcja [%2d] „%s”: offset %zu: nierozpoznany znacznik atrybutu %u\n" -#: src/elflint.c:3544 +#: src/elflint.c:3588 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" @@ -2778,12 +2862,12 @@ msgstr "" "sekcja [%2d] „%s”: offset %zu: atrybut %s ma nierozpoznaną wartość " "%\n" -#: src/elflint.c:3554 +#: src/elflint.c:3598 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "sekcja [%2d] „%s”: offset %zu: producent „%s” jest nieznany\n" -#: src/elflint.c:3560 +#: src/elflint.c:3604 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" @@ -2791,47 +2875,47 @@ msgstr "" "sekcja [%2d] „%s”: offset %zu: dodatkowe bajty po ostatniej sekcji " "atrybutów\n" -#: src/elflint.c:3649 +#: src/elflint.c:3693 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "nie można uzyskać nagłówka sekcji zerowej\n" -#: src/elflint.c:3653 +#: src/elflint.c:3697 #, c-format msgid "zeroth section has nonzero name\n" msgstr "sekcja zerowa ma niezerową nazwę\n" -#: src/elflint.c:3655 +#: src/elflint.c:3699 #, c-format msgid "zeroth section has nonzero type\n" msgstr "sekcja zerowa ma niezerowy typ\n" -#: src/elflint.c:3657 +#: src/elflint.c:3701 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "sekcja zerowa ma niezerowe flagi\n" -#: src/elflint.c:3659 +#: src/elflint.c:3703 #, c-format msgid "zeroth section has nonzero address\n" msgstr "sekcja zerowa ma niezerowy adres\n" -#: src/elflint.c:3661 +#: src/elflint.c:3705 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "sekcja zerowa ma niezerowy offset\n" -#: src/elflint.c:3663 +#: src/elflint.c:3707 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "sekcja zerowa ma niezerową wartość wyrównania\n" -#: src/elflint.c:3665 +#: src/elflint.c:3709 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "sekcja zerowa ma niezerową wartość rozmiaru wpisu\n" -#: src/elflint.c:3668 +#: src/elflint.c:3712 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2840,7 +2924,7 @@ msgstr "" "sekcja zerowa ma niezerową wartość rozmiaru, a nagłówek ELF ma niezerową " "wartość shnum\n" -#: src/elflint.c:3672 +#: src/elflint.c:3716 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2849,7 +2933,7 @@ msgstr "" "sekcja zerowa ma niezerową wartość dowiązań, a nagłówek ELF nie wskazuje " "przepełnienia w shstrndx\n" -#: src/elflint.c:3676 +#: src/elflint.c:3720 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2858,46 +2942,46 @@ msgstr "" "sekcja zerowa ma niezerową wartość dowiązań, a nagłówek ELF nie wskazuje " "przepełnienia w phnum\n" -#: src/elflint.c:3694 +#: src/elflint.c:3738 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "nie można uzyskać nagłówka sekcji dla sekcji [%2zu] „%s”: %s\n" -#: src/elflint.c:3703 +#: src/elflint.c:3747 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "sekcja [%2zu]: nieprawidłowa nazwa\n" -#: src/elflint.c:3730 +#: src/elflint.c:3774 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "sekcja [%2d] „%s” ma błędny typ: oczekiwano %s, jest %s\n" -#: src/elflint.c:3748 +#: src/elflint.c:3792 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "sekcja [%2zu] „%s” ma błędne flagi: oczekiwano %s, jest %s\n" -#: src/elflint.c:3766 +#: src/elflint.c:3810 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" msgstr "" "sekcja [%2zu] „%s” ma błędne flagi: oczekiwano %s i być może %s, jest %s\n" -#: src/elflint.c:3784 +#: src/elflint.c:3828 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "sekcja [%2zu] „%s” jest obecna w pliku obiektu\n" -#: src/elflint.c:3790 src/elflint.c:3822 +#: src/elflint.c:3834 src/elflint.c:3866 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" msgstr "" "sekcja [%2zu] „%s” ma flagę SHF_ALLOC, ale nie ma segmentu wczytywalnego\n" -#: src/elflint.c:3795 src/elflint.c:3827 +#: src/elflint.c:3839 src/elflint.c:3871 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " @@ -2905,7 +2989,7 @@ msgid "" msgstr "" "sekcja [%2zu] „%s” nie ma flagi SHF_ALLOC, ale są segmenty wczytywalne\n" -#: src/elflint.c:3803 +#: src/elflint.c:3847 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" @@ -2913,22 +2997,22 @@ msgstr "" "sekcja [%2zu] „%s” jest tabelą indeksów sekcji rozszerzeń w pliku " "nieobiektowym\n" -#: src/elflint.c:3846 +#: src/elflint.c:3890 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "sekcja [%2zu] „%s”: rozmiar nie jest wielokrotnością rozmiaru wpisu\n" -#: src/elflint.c:3851 +#: src/elflint.c:3895 #, c-format msgid "cannot get section header\n" msgstr "nie można uzyskać nagłówka sekcji\n" -#: src/elflint.c:3861 +#: src/elflint.c:3905 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "sekcja [%2zu] „%s” ma nieobsługiwany typ %d\n" -#: src/elflint.c:3876 +#: src/elflint.c:3920 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" @@ -2936,74 +3020,74 @@ msgstr "" "sekcja [%2zu] „%s” zawiera nieprawidłowe flagi dla konkretnego procesora " "%#\n" -#: src/elflint.c:3883 +#: src/elflint.c:3927 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "sekcja [%2zu] „%s” zawiera nieznane flagi %#\n" -#: src/elflint.c:3891 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" "sekcja [%2zu] „%s”: adres sekcji danych lokalnych dla wątków nie jest zerem\n" -#: src/elflint.c:3901 +#: src/elflint.c:3945 #, c-format msgid "section [%2zu] '%s': allocated section cannot be compressed\n" msgstr "sekcja [%2zu] „%s”: nie można skompresować przydzielonej sekcji\n" -#: src/elflint.c:3906 +#: src/elflint.c:3950 #, c-format msgid "section [%2zu] '%s': nobits section cannot be compressed\n" msgstr "sekcja [%2zu] „%s”: nie można skompresować sekcji „nobits”\n" -#: src/elflint.c:3912 +#: src/elflint.c:3956 #, c-format msgid "" "section [%2zu] '%s': compressed section with no compression header: %s\n" msgstr "sekcja [%2zu] „%s”: skompresowana sekcja bez nagłówka kompresji: %s\n" -#: src/elflint.c:3918 +#: src/elflint.c:3962 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" "sekcja [%2zu] „%s”: nieprawidłowe odwołanie do sekcji w wartości dowiązania\n" -#: src/elflint.c:3923 +#: src/elflint.c:3967 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" "sekcja [%2zu] „%s”: nieprawidłowe odwołanie do sekcji w wartości " "informacyjnej\n" -#: src/elflint.c:3930 +#: src/elflint.c:3974 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "sekcja [%2zu] „%s”: flaga ciągów jest ustawiona bez flagi merge\n" -#: src/elflint.c:3935 +#: src/elflint.c:3979 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" "sekcja [%2zu] „%s”: flaga merge jest ustawiona, ale rozmiar wpisu jest " "zerowy\n" -#: src/elflint.c:3954 +#: src/elflint.c:3998 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "sekcja [%2zu] „%s” ma nieoczekiwany typ %d dla sekcji wykonywalnej\n" -#: src/elflint.c:3963 +#: src/elflint.c:4007 #, c-format msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" msgstr "sekcja [%2zu] „%s” musi być typu NOBITS w plikach debuginfo\n" -#: src/elflint.c:3970 +#: src/elflint.c:4014 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "sekcja [%2zu] „%s” jest wykonywalne i zapisywalne\n" -#: src/elflint.c:4001 +#: src/elflint.c:4045 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " @@ -3012,7 +3096,7 @@ msgstr "" "sekcja [%2zu] „%s” nie jest w całości zawarta w segmencie wpisu %d nagłówka " "programu\n" -#: src/elflint.c:4011 +#: src/elflint.c:4055 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -3021,7 +3105,7 @@ msgstr "" "sekcja [%2zu] „%s” ma typ NOBITS, a jest odczytywana z pliku w segmencie " "wpisu %d nagłówka programu\n" -#: src/elflint.c:4037 +#: src/elflint.c:4081 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -3030,7 +3114,7 @@ msgstr "" "sekcja [%2zu] „%s” ma typ NOBITS, ale jest odczytywana z pliku w segmencie " "wpisu %d nagłówka programu, a zawartość pliku jest niezerowa\n" -#: src/elflint.c:4048 +#: src/elflint.c:4092 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " @@ -3039,17 +3123,17 @@ msgstr "" "sekcja [%2zu] „%s” nie ma typu NOBITS, a nie jest odczytywana z pliku " "w segmencie wpisu %d nagłówka programu\n" -#: src/elflint.c:4059 +#: src/elflint.c:4103 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "sekcja [%2zu] „%s” jest wykonywalne w segmencie niewykonywalnym %d\n" -#: src/elflint.c:4069 +#: src/elflint.c:4113 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "sekcja [%2zu] „%s” jest zapisywalne w niezapisywalnym segmencie %d\n" -#: src/elflint.c:4079 +#: src/elflint.c:4123 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" @@ -3057,7 +3141,7 @@ msgstr "" "sekcja [%2zu] „%s”: ma flagę alloc, ale sekcja nie jest w żadnym segmencie " "wczytywalnym\n" -#: src/elflint.c:4085 +#: src/elflint.c:4129 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " @@ -3066,7 +3150,7 @@ msgstr "" "sekcja [%2zu] „%s”: według nagłówka ELF to jest tabela ciągów nagłówków " "sekcji, ale typ nie jest SHT_TYPE\n" -#: src/elflint.c:4093 +#: src/elflint.c:4137 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" @@ -3074,17 +3158,17 @@ msgstr "" "sekcja [%2zu] „%s”: pliki relokowalne nie mogą mieć tabeli symboli " "dynamicznych\n" -#: src/elflint.c:4144 +#: src/elflint.c:4188 #, c-format msgid "more than one version symbol table present\n" msgstr "obecna jest więcej niż jedna tabela symboli wersji\n" -#: src/elflint.c:4167 +#: src/elflint.c:4211 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "jest wpis nagłówka programu INTERP, ale nie ma sekcji .interp\n" -#: src/elflint.c:4178 +#: src/elflint.c:4222 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" @@ -3092,14 +3176,14 @@ msgstr "" "wczytywalny segment [%u] jest wykonywalny, ale nie zawiera wykonywalnych " "sekcji\n" -#: src/elflint.c:4184 +#: src/elflint.c:4228 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" "wczytywalny segment [%u] jest zapisywalny, ale nie zawiera zapisywalnych " "sekcji\n" -#: src/elflint.c:4195 +#: src/elflint.c:4239 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -3108,23 +3192,23 @@ msgstr "" "brak sekcji .gnu.versym, ale istnieje sekcja .gnu.versym_d lub .gnu." "versym_r\n" -#: src/elflint.c:4208 +#: src/elflint.c:4252 #, c-format msgid "duplicate version index %d\n" msgstr "powtórzony indeks wersji %d\n" -#: src/elflint.c:4222 +#: src/elflint.c:4266 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "sekcja .gnu.versym istnieje bez .gnu.versym_d lub .gnu.versym_r\n" -#: src/elflint.c:4271 +#: src/elflint.c:4315 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" "phdr[%d]: nieznany typ notatki pliku core % pod offsetem %\n" -#: src/elflint.c:4275 +#: src/elflint.c:4319 #, c-format msgid "" "section [%2d] '%s': unknown core file note type % at offset %zu\n" @@ -3132,13 +3216,13 @@ msgstr "" "sekcja [%2d]: „%s”: nieznany typ notatki pliku core % pod offsetem " "%zu\n" -#: src/elflint.c:4298 +#: src/elflint.c:4342 #, c-format msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" "phdr[%d]: nieznany typ notatki pliku obiektu % pod offsetem %zu\n" -#: src/elflint.c:4302 +#: src/elflint.c:4346 #, c-format msgid "" "section [%2d] '%s': unknown object file note type % at offset %zu\n" @@ -3146,37 +3230,37 @@ msgstr "" "sekcja [%2d] „%s”: nieznany typ notatki pliku obiektu % pod offsetem " "%zu\n" -#: src/elflint.c:4319 +#: src/elflint.c:4363 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: brak określonych wpisów notatek dla typu pliku\n" -#: src/elflint.c:4338 +#: src/elflint.c:4382 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: nie można uzyskać zawartości sekcji notatki: %s\n" -#: src/elflint.c:4341 +#: src/elflint.c:4385 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: dodatkowe % bajtów po ostatniej notatce\n" -#: src/elflint.c:4362 +#: src/elflint.c:4406 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "sekcja [%2d] „%s”: brak określonych wpisów notatek dla typu pliku\n" -#: src/elflint.c:4369 +#: src/elflint.c:4413 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "sekcja [%2d] „%s”: nie można uzyskać zawartości sekcji notatek\n" -#: src/elflint.c:4372 +#: src/elflint.c:4416 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "sekcja [%2d] „%s”: dodatkowe % bajtów po ostatniej notatce\n" -#: src/elflint.c:4390 +#: src/elflint.c:4434 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" @@ -3184,135 +3268,135 @@ msgstr "" "tylko pliki wykonywalne, obiekty współdzielone i pliki core mogą mieć " "nagłówki programu\n" -#: src/elflint.c:4405 +#: src/elflint.c:4449 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "nie można uzyskać wpisu nagłówka programu %d: %s\n" -#: src/elflint.c:4414 +#: src/elflint.c:4458 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "wpis nagłówka programu %d: nieznany typ wpisu nagłówka programu %#\n" -#: src/elflint.c:4425 +#: src/elflint.c:4469 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "więcej niż jeden wpis INTERP w nagłówku programu\n" -#: src/elflint.c:4433 +#: src/elflint.c:4477 #, c-format msgid "more than one TLS entry in program header\n" msgstr "więcej niż jeden wpis TLS w nagłówku programu\n" -#: src/elflint.c:4440 +#: src/elflint.c:4484 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "statyczny plik wykonywalny nie może mieć sekcji dynamicznych\n" -#: src/elflint.c:4454 +#: src/elflint.c:4498 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "odniesienie sekcji dynamicznej w nagłówku programu ma błędny offset\n" -#: src/elflint.c:4457 +#: src/elflint.c:4501 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "różne rozmiary sekcji dynamicznej w nagłówku programu i sekcji\n" -#: src/elflint.c:4467 +#: src/elflint.c:4511 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "więcej niż jeden wpis GNU_RELRO w nagłówku programu\n" -#: src/elflint.c:4488 +#: src/elflint.c:4532 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "wczytywalny segment wskazywany przez GNU_RELRO nie jest zapisywalny\n" -#: src/elflint.c:4499 +#: src/elflint.c:4543 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "flagi wczytywalnego segmentu [%u] nie pasują do flag GNU_RELRO [%u]\n" -#: src/elflint.c:4506 +#: src/elflint.c:4550 #, c-format msgid "" "GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" msgstr "" "flagi GNU_RELRO [%u] nie są podzbiorem flag wczytywalnego segmentu [%u]\n" -#: src/elflint.c:4515 src/elflint.c:4538 +#: src/elflint.c:4559 src/elflint.c:4582 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "segment %s nie zawiera się we wczytywalnym segmencie\n" -#: src/elflint.c:4544 +#: src/elflint.c:4588 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "" "offsety nagłówka programu w nagłówku ELF i wpisie PHDR nie zgadzają się" -#: src/elflint.c:4569 +#: src/elflint.c:4613 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" "odniesienie tabeli wyszukiwania ramki wywołania w nagłówku programu ma " "błędny offset\n" -#: src/elflint.c:4572 +#: src/elflint.c:4616 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" "różne rozmiary tabel wyszukiwania ramki wywołania w nagłówku programu " "i sekcji\n" -#: src/elflint.c:4585 +#: src/elflint.c:4629 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "PT_GNU_EH_FRAME jest obecne, ale brak sekcji .eh_frame_hdr\n" -#: src/elflint.c:4593 +#: src/elflint.c:4637 #, c-format msgid "call frame search table must be allocated\n" msgstr "tabela wyszukiwania ramki wywołania musi być przydzielona\n" -#: src/elflint.c:4596 +#: src/elflint.c:4640 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "sekcja [%2zu] „%s”: musi być przydzielona\n" -#: src/elflint.c:4600 +#: src/elflint.c:4644 #, c-format msgid "call frame search table must not be writable\n" msgstr "tabela wyszukiwania ramki wywołania nie może być zapisywalna\n" -#: src/elflint.c:4603 +#: src/elflint.c:4647 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "sekcja [%2zu] „%s” nie może być zapisywalna\n" -#: src/elflint.c:4608 +#: src/elflint.c:4652 #, c-format msgid "call frame search table must not be executable\n" msgstr "tabela wyszukiwania ramki wywołania nie może być wykonywalna\n" -#: src/elflint.c:4611 +#: src/elflint.c:4655 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "sekcja [%2zu] „%s” nie może być wykonywalna\n" -#: src/elflint.c:4622 +#: src/elflint.c:4666 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "wpis nagłówka programu %d: rozmiar pliku większy niż rozmiar pamięci\n" -#: src/elflint.c:4629 +#: src/elflint.c:4673 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "wpis nagłówka programu %d: wyrównanie nie jest potęgą 2\n" -#: src/elflint.c:4632 +#: src/elflint.c:4676 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -3321,7 +3405,7 @@ msgstr "" "wpis nagłówka programu %d: offset w pliku i adres wirtualny nie są " "wielokrotnością wyrównania\n" -#: src/elflint.c:4645 +#: src/elflint.c:4689 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -3330,12 +3414,12 @@ msgstr "" "plik wykonywalny/DSO z sekcją .eh_frame_hdr nie ma wpisu nagłówka programu " "PT_GNU_EH_FRAME" -#: src/elflint.c:4679 +#: src/elflint.c:4723 #, c-format msgid "cannot read ELF header: %s\n" msgstr "nie można odczytać nagłówka ELF: %s\n" -#: src/elflint.c:4705 +#: src/elflint.c:4749 #, c-format msgid "text relocation flag set but not needed\n" msgstr "flaga relokacji tekstu jest ustawiona, ale niepotrzebna\n" @@ -3358,8 +3442,8 @@ msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "Odnajduje źródło relokacji tekstu w PLIKACH (domyślnie a.out)." #. Strings for arguments in help texts. -#: src/findtextrel.c:75 src/nm.c:107 src/objdump.c:70 src/size.c:81 -#: src/strings.c:87 src/strip.c:95 +#: src/findtextrel.c:75 src/nm.c:109 src/objdump.c:72 src/size.c:81 +#: src/strings.c:88 src/strip.c:99 msgid "[FILE...]" msgstr "[PLIK…]" @@ -3449,43 +3533,43 @@ msgstr "" "relokacja modyfikuje pamięć pod offsetem %llu w segmencie zabezpieczonym " "przed zapisem\n" -#: src/nm.c:65 src/strip.c:67 +#: src/nm.c:67 src/strip.c:70 msgid "Output selection:" msgstr "Wybór wyjścia:" -#: src/nm.c:66 +#: src/nm.c:68 msgid "Display debugger-only symbols" msgstr "Wyświetla symbole wyłącznie debugowania" -#: src/nm.c:67 +#: src/nm.c:69 msgid "Display only defined symbols" msgstr "Wyświetla tylko określone symbole" -#: src/nm.c:70 +#: src/nm.c:72 msgid "Display dynamic symbols instead of normal symbols" msgstr "Wyświetla symbole dynamiczne zamiast zwykłych" -#: src/nm.c:71 +#: src/nm.c:73 msgid "Display only external symbols" msgstr "Wyświetla tylko symbole zewnętrzne" -#: src/nm.c:72 +#: src/nm.c:74 msgid "Display only undefined symbols" msgstr "Wyświetla tylko nieokreślone symbole" -#: src/nm.c:74 +#: src/nm.c:76 msgid "Include index for symbols from archive members" msgstr "Dołącza indeks dla symboli z elementów archiwum" -#: src/nm.c:76 src/size.c:55 +#: src/nm.c:78 src/size.c:55 msgid "Output format:" msgstr "Format wyjścia:" -#: src/nm.c:78 +#: src/nm.c:80 msgid "Print name of the input file before every symbol" msgstr "Wyświetla nazwę pliku wejściowego przed każdym symbolem" -#: src/nm.c:81 +#: src/nm.c:83 msgid "" "Use the output format FORMAT. FORMAT can be `bsd', `sysv' or `posix'. The " "default is `sysv'" @@ -3493,73 +3577,73 @@ msgstr "" "Używa FORMATU wyjściowego. Może to być „bsd”, „sysv” lub „posix”. Domyślny " "jest format „sysv”" -#: src/nm.c:83 +#: src/nm.c:85 msgid "Same as --format=bsd" msgstr "To samo, co --format=bsd" -#: src/nm.c:84 +#: src/nm.c:86 msgid "Same as --format=posix" msgstr "To samo co, --format=posix" -#: src/nm.c:85 src/size.c:61 +#: src/nm.c:87 src/size.c:61 msgid "Use RADIX for printing symbol values" msgstr "Używa BAZY do wypisywania wartości symboli" -#: src/nm.c:86 +#: src/nm.c:88 msgid "Mark special symbols" msgstr "Oznacza specjalne symbole" -#: src/nm.c:88 +#: src/nm.c:90 msgid "Print size of defined symbols" msgstr "Wyświetla rozmiar określonych symboli" -#: src/nm.c:90 src/size.c:69 src/strip.c:72 src/unstrip.c:73 +#: src/nm.c:92 src/size.c:69 src/strip.c:75 src/unstrip.c:73 msgid "Output options:" msgstr "Opcje wyjścia:" -#: src/nm.c:91 +#: src/nm.c:93 msgid "Sort symbols numerically by address" msgstr "Porządkuje symbole numerycznie według adresu" -#: src/nm.c:93 +#: src/nm.c:95 msgid "Do not sort the symbols" msgstr "Bez porządkowania symboli" -#: src/nm.c:94 +#: src/nm.c:96 msgid "Reverse the sense of the sort" msgstr "Odwraca kierunek porządkowania" -#: src/nm.c:97 +#: src/nm.c:99 msgid "Decode low-level symbol names into source code names" msgstr "Dekoduje niskopoziomowe nazwy symboli na nazwy kodu źródłowego" #. Short description of program. -#: src/nm.c:104 +#: src/nm.c:106 msgid "List symbols from FILEs (a.out by default)." msgstr "Wyświetla listę symboli z PLIKU (domyślnie a.out)." -#: src/nm.c:115 src/objdump.c:78 +#: src/nm.c:117 src/objdump.c:80 msgid "Output formatting" msgstr "Formatowanie wyjścia" -#: src/nm.c:139 src/objdump.c:102 src/size.c:106 src/strip.c:127 +#: src/nm.c:141 src/objdump.c:104 src/size.c:106 src/strip.c:131 #, c-format msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: BŁĄD WEWNĘTRZNY %d (%s): %s" -#: src/nm.c:380 src/nm.c:392 src/size.c:289 src/size.c:298 src/size.c:309 -#: src/strip.c:2298 +#: src/nm.c:382 src/nm.c:394 src/size.c:289 src/size.c:298 src/size.c:309 +#: src/strip.c:2421 #, c-format msgid "while closing '%s'" msgstr "podczas zamykania „%s”" -#: src/nm.c:402 src/objdump.c:279 src/strip.c:377 +#: src/nm.c:404 src/objdump.c:281 src/strip.c:443 #, c-format msgid "%s: File format not recognized" msgstr "%s: nie rozpoznano formatu pliku" #. Note: 0 is no valid offset. -#: src/nm.c:442 +#: src/nm.c:444 msgid "" "\n" "Archive index:\n" @@ -3567,44 +3651,44 @@ msgstr "" "\n" "Indeks archiwum:\n" -#: src/nm.c:451 +#: src/nm.c:453 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "nieprawidłowy offset %zu dla symbolu %s" -#: src/nm.c:456 +#: src/nm.c:458 #, c-format msgid "%s in %s\n" msgstr "%s w %s\n" -#: src/nm.c:464 +#: src/nm.c:466 #, c-format msgid "cannot reset archive offset to beginning" msgstr "nie można przywrócić offsetu w archiwum na początek" -#: src/nm.c:489 src/objdump.c:327 +#: src/nm.c:491 src/objdump.c:329 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: nie rozpoznano formatu pliku" -#: src/nm.c:704 +#: src/nm.c:706 #, c-format msgid "cannot create search tree" msgstr "nie można utworzyć drzewa wyszukiwania" -#: src/nm.c:745 src/nm.c:1206 src/objdump.c:776 src/readelf.c:535 -#: src/readelf.c:1113 src/readelf.c:1313 src/readelf.c:1461 src/readelf.c:1662 -#: src/readelf.c:1868 src/readelf.c:2058 src/readelf.c:2236 src/readelf.c:2312 -#: src/readelf.c:2570 src/readelf.c:2646 src/readelf.c:2733 src/readelf.c:3313 -#: src/readelf.c:3363 src/readelf.c:3426 src/readelf.c:8337 src/readelf.c:9437 -#: src/readelf.c:9640 src/readelf.c:9708 src/size.c:397 src/size.c:466 -#: src/strip.c:506 +#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:606 +#: src/readelf.c:1196 src/readelf.c:1396 src/readelf.c:1544 src/readelf.c:1745 +#: src/readelf.c:1951 src/readelf.c:2141 src/readelf.c:2319 src/readelf.c:2395 +#: src/readelf.c:2653 src/readelf.c:2729 src/readelf.c:2816 src/readelf.c:3414 +#: src/readelf.c:3464 src/readelf.c:3527 src/readelf.c:11028 +#: src/readelf.c:12200 src/readelf.c:12403 src/readelf.c:12471 src/size.c:397 +#: src/size.c:466 src/strip.c:572 #, c-format msgid "cannot get section header string table index" msgstr "nie można uzyskać indeksu tabeli ciągów nagłówków sekcji" #. We always print this prolog. -#: src/nm.c:772 +#: src/nm.c:774 #, c-format msgid "" "\n" @@ -3618,7 +3702,7 @@ msgstr "" "\n" #. The header line. -#: src/nm.c:775 +#: src/nm.c:777 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -3627,79 +3711,79 @@ msgstr "" "%*s%-*s %-*s Klasa Typ %-*s %*s Sekcja\n" "\n" -#: src/nm.c:1217 +#: src/nm.c:1219 #, c-format msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "%s: rozmiar wpisu w sekcji %zd „%s” nie jest tym, czego oczekiwano" -#: src/nm.c:1222 +#: src/nm.c:1224 #, c-format msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "%s: rozmiar sekcji %zd „%s” nie jest wielokrotnością rozmiaru wpisu" -#: src/nm.c:1301 +#: src/nm.c:1303 #, c-format msgid "%s: entries (%zd) in section %zd `%s' is too large" msgstr "%s: wpisy (%zd) w sekcji %zd „%s” są za duże" #. XXX Add machine specific object file types. -#: src/nm.c:1527 +#: src/nm.c:1529 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: nieprawidłowe działanie" -#: src/nm.c:1584 +#: src/nm.c:1586 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: brak symboli" -#: src/objdump.c:51 +#: src/objdump.c:53 msgid "Mode selection:" msgstr "Wybór trybu:" -#: src/objdump.c:52 +#: src/objdump.c:54 msgid "Display relocation information." msgstr "Wyświetla informacje o relokacji." -#: src/objdump.c:54 +#: src/objdump.c:56 msgid "Display the full contents of all sections requested" msgstr "Wyświetla pełną zawartość żądanych sekcji" -#: src/objdump.c:56 +#: src/objdump.c:58 msgid "Display assembler code of executable sections" msgstr "Wyświetla kod asemblera sekcji wykonywalnych" -#: src/objdump.c:58 +#: src/objdump.c:60 msgid "Output content selection:" msgstr "Wybór zawartości wyjścia:" -#: src/objdump.c:60 +#: src/objdump.c:62 msgid "Only display information for section NAME." msgstr "Wyświetla tylko informacje o sekcji NAZWA." #. Short description of program. -#: src/objdump.c:66 +#: src/objdump.c:68 msgid "Show information from FILEs (a.out by default)." msgstr "Wyświetla informacje z PLIKÓW (domyślnie a.out)." -#: src/objdump.c:217 src/readelf.c:483 +#: src/objdump.c:219 src/readelf.c:551 msgid "No operation specified.\n" msgstr "Nie podano działania.\n" -#: src/objdump.c:257 src/objdump.c:269 +#: src/objdump.c:259 src/objdump.c:271 #, c-format msgid "while close `%s'" msgstr "podczas zamykania „%s”" -#: src/objdump.c:362 src/readelf.c:1963 src/readelf.c:2155 +#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238 msgid "INVALID SYMBOL" msgstr "NIEPRAWIDŁOWY SYMBOL" -#: src/objdump.c:377 src/readelf.c:1997 src/readelf.c:2191 +#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274 msgid "INVALID SECTION" msgstr "NIEPRAWIDŁOWA SEKCJA" -#: src/objdump.c:497 +#: src/objdump.c:499 #, c-format msgid "" "\n" @@ -3710,154 +3794,166 @@ msgstr "" "PISY RELOKACJI DLA [%s]:\n" "%-*s TYP WARTOŚĆ\n" -#: src/objdump.c:500 +#: src/objdump.c:502 msgid "OFFSET" msgstr "OFFSET" -#: src/objdump.c:565 +#: src/objdump.c:567 #, c-format msgid "Contents of section %s:\n" msgstr "Zawartość sekcji %s:\n" -#: src/objdump.c:686 +#: src/objdump.c:688 #, c-format msgid "cannot disassemble" msgstr "nie można deasemblować" #. Short description of program. -#: src/ranlib.c:63 +#: src/ranlib.c:64 msgid "Generate an index to speed access to archives." msgstr "Tworzenie indeksu w celu przyspieszenia dostępu do archiwów." #. Strings for arguments in help texts. -#: src/ranlib.c:66 +#: src/ranlib.c:67 msgid "ARCHIVE" msgstr "ARCHIWUM" -#: src/ranlib.c:102 +#: src/ranlib.c:103 #, c-format msgid "Archive name required" msgstr "Wymagana jest nazwa archiwum" -#: src/ranlib.c:166 +#: src/ranlib.c:167 #, c-format msgid "'%s' is no archive" msgstr "„%s” nie jest archiwum" -#: src/ranlib.c:201 +#: src/ranlib.c:202 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "błąd podczas zwalniania deskryptora pod-ELF: %s" -#: src/readelf.c:71 +#: src/readelf.c:95 msgid "ELF input selection:" msgstr "Wybór wyjścia ELF:" -#: src/readelf.c:73 +#: src/readelf.c:97 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" "Używa podanej SEKCJI (domyślnie .gnu_debugdata) jako (skompresowanych) " "danych wejściowych ELF" -#: src/readelf.c:75 +#: src/readelf.c:100 +msgid "" +"Used with -w to find the skeleton Compile Units in FILE associated with the " +"Split Compile units in a .dwo input file" +msgstr "" + +#: src/readelf.c:102 msgid "ELF output selection:" msgstr "Wybór wyjścia ELF:" -#: src/readelf.c:77 +#: src/readelf.c:104 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "Wszystkie te plus -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:105 msgid "Display the dynamic segment" msgstr "Wyświetla segment dynamiczny" -#: src/readelf.c:79 +#: src/readelf.c:106 msgid "Display the ELF file header" msgstr "Wyświetla nagłówek pliku ELF" -#: src/readelf.c:81 +#: src/readelf.c:108 msgid "Display histogram of bucket list lengths" msgstr "Wyświetla histogram długości list kubełków" -#: src/readelf.c:82 +#: src/readelf.c:109 msgid "Display the program headers" msgstr "Wyświetla nagłówki programu" -#: src/readelf.c:84 +#: src/readelf.c:111 msgid "Display relocations" msgstr "Wyświetla relokacje" -#: src/readelf.c:85 +#: src/readelf.c:112 +#, fuzzy +msgid "Display the section groups" +msgstr "Wyświetla nagłówki sekcji" + +#: src/readelf.c:113 msgid "Display the sections' headers" msgstr "Wyświetla nagłówki sekcji" -#: src/readelf.c:88 +#: src/readelf.c:116 msgid "Display the symbol table sections" msgstr "Wyświetla sekcje tabeli symboli" -#: src/readelf.c:89 +#: src/readelf.c:117 msgid "Display versioning information" msgstr "Wyświetla informacje o wersji" -#: src/readelf.c:90 +#: src/readelf.c:118 msgid "Display the ELF notes" msgstr "Wyświetla notatki ELF" -#: src/readelf.c:92 +#: src/readelf.c:120 msgid "Display architecture specific information, if any" msgstr "Wyświetla informacje dla konkretnej architektury, jeśli są" -#: src/readelf.c:94 +#: src/readelf.c:122 msgid "Display sections for exception handling" msgstr "Wyświetla sekcje do obsługi wyjątków" -#: src/readelf.c:96 +#: src/readelf.c:124 msgid "Additional output selection:" msgstr "Dodatkowy wybór wyjścia:" -#: src/readelf.c:98 +#: src/readelf.c:126 +#, fuzzy msgid "" -"Display DWARF section content. SECTION can be one of abbrev, aranges, " -"decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " -"pubnames, str, macinfo, macro or exception" +"Display DWARF section content. SECTION can be one of abbrev, addr, aranges, " +"decodedaranges, frame, gdb_index, info, info+, loc, line, decodedline, " +"ranges, pubnames, str, macinfo, macro or exception" msgstr "" "Wyświetla zawartość sekcji DWARF. SEKCJA może być jednym z abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro lub exception" -#: src/readelf.c:102 +#: src/readelf.c:130 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "Zrzuca niezinterpretowaną zawartość SEKCJI, według liczny lub nazwy" -#: src/readelf.c:104 +#: src/readelf.c:132 msgid "Print string contents of sections" msgstr "Wyświetla zawartość ciągów sekcji" -#: src/readelf.c:107 +#: src/readelf.c:135 msgid "Display the symbol index of an archive" msgstr "Wyświetla indeks symboli archiwum" -#: src/readelf.c:109 +#: src/readelf.c:137 msgid "Output control:" msgstr "Kontrola wyjścia:" -#: src/readelf.c:111 +#: src/readelf.c:139 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Bez odnajdywania nazw symboli dla adresów w danych DWARF" -#: src/readelf.c:113 +#: src/readelf.c:141 msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "" "Wyświetla tylko offsety zamiast rozwiązywania wartości na adresy w danych " "DWARF" -#: src/readelf.c:115 +#: src/readelf.c:143 msgid "Ignored for compatibility (lines always wide)" msgstr "Ignorowane dla zgodności (wiersze są zawsze szerokie)" -#: src/readelf.c:117 +#: src/readelf.c:145 msgid "" "Show compression information for compressed sections (when used with -S); " "decompress section before dumping data (when used with -p or -x)" @@ -3867,142 +3963,151 @@ msgstr "" "używane z opcją -p lub -x)" #. Short description of program. -#: src/readelf.c:122 +#: src/readelf.c:150 msgid "Print information from ELF file in human-readable form." msgstr "Wyświetla informacje z pliku ELF w postaci czytelnej dla człowieka." -#: src/readelf.c:451 +#. Look up once. +#: src/readelf.c:329 +msgid "yes" +msgstr "tak" + +#: src/readelf.c:330 +msgid "no" +msgstr "nie" + +#: src/readelf.c:519 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "Nieznana sekcja debugowania DWARF „%s”.\n" -#: src/readelf.c:519 src/readelf.c:630 +#: src/readelf.c:590 src/readelf.c:701 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "nie można utworzyć deskryptora ELF: %s" -#: src/readelf.c:526 src/readelf.c:842 src/strip.c:575 +#: src/readelf.c:597 src/readelf.c:925 src/strip.c:641 #, c-format msgid "cannot determine number of sections: %s" msgstr "nie można określić liczby sekcji: %s" -#: src/readelf.c:544 src/readelf.c:1135 src/readelf.c:1337 +#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420 #, c-format msgid "cannot get section: %s" msgstr "nie można uzyskać sekcji: %s" -#: src/readelf.c:553 src/readelf.c:1142 src/readelf.c:1345 src/readelf.c:9660 +#: src/readelf.c:624 src/readelf.c:1225 src/readelf.c:1428 src/readelf.c:12423 #: src/unstrip.c:375 src/unstrip.c:406 src/unstrip.c:455 src/unstrip.c:565 -#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1106 -#: src/unstrip.c:1298 src/unstrip.c:1359 src/unstrip.c:1532 src/unstrip.c:1647 -#: src/unstrip.c:1787 src/unstrip.c:1882 +#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1109 +#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650 +#: src/unstrip.c:1790 src/unstrip.c:1885 #, c-format msgid "cannot get section header: %s" msgstr "nie można uzyskać nagłówka sekcji: %s" -#: src/readelf.c:561 +#: src/readelf.c:632 #, c-format msgid "cannot get section name" msgstr "nie można uzyskać nazwy sekcji" -#: src/readelf.c:570 src/readelf.c:5521 src/readelf.c:7795 src/readelf.c:7897 -#: src/readelf.c:8074 +#: src/readelf.c:641 src/readelf.c:6517 src/readelf.c:10301 src/readelf.c:10403 +#: src/readelf.c:10580 #, c-format msgid "cannot get %s content: %s" msgstr "nie można uzyskać zwartości %s: %s" -#: src/readelf.c:586 +#: src/readelf.c:657 #, c-format msgid "cannot create temp file '%s'" msgstr "nie można utworzyć pliku tymczasowego „%s”" -#: src/readelf.c:595 +#: src/readelf.c:666 #, c-format msgid "cannot write section data" msgstr "nie można zapisać danych sekcji" -#: src/readelf.c:601 src/readelf.c:618 src/readelf.c:647 +#: src/readelf.c:672 src/readelf.c:689 src/readelf.c:718 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "błąd podczas zamykania deskryptora ELF: %s" -#: src/readelf.c:608 +#: src/readelf.c:679 #, c-format msgid "error while rewinding file descriptor" msgstr "błąd podczas przewijania deskryptora pliku" -#: src/readelf.c:642 +#: src/readelf.c:713 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "„%s” nie jest archiwum, nie można wyświetlić indeksu archiwum" -#: src/readelf.c:741 -#, c-format -msgid "No such section '%s' in '%s'" -msgstr "Brak sekcji „%s” w „%s”" - -#: src/readelf.c:768 +#: src/readelf.c:817 #, c-format msgid "cannot stat input file" msgstr "nie można wykonać stat na pliku wejściowym" -#: src/readelf.c:770 +#: src/readelf.c:819 #, c-format msgid "input file is empty" msgstr "plik wejściowy jest pusty" -#: src/readelf.c:772 +#: src/readelf.c:821 #, c-format msgid "failed reading '%s': %s" msgstr "odczytanie „%s” się nie powiodło: %s" -#: src/readelf.c:827 +#: src/readelf.c:850 +#, c-format +msgid "No such section '%s' in '%s'" +msgstr "Brak sekcji „%s” w „%s”" + +#: src/readelf.c:910 #, c-format msgid "cannot read ELF header: %s" msgstr "nie można odczytać nagłówka ELF: %s" -#: src/readelf.c:835 +#: src/readelf.c:918 #, c-format msgid "cannot create EBL handle" msgstr "nie można utworzyć uchwytu EBL" -#: src/readelf.c:848 +#: src/readelf.c:931 #, c-format msgid "cannot determine number of program headers: %s" msgstr "nie można określić liczby nagłówków programu: %s" -#: src/readelf.c:938 +#: src/readelf.c:1021 msgid "NONE (None)" msgstr "NONE (żaden)" -#: src/readelf.c:939 +#: src/readelf.c:1022 msgid "REL (Relocatable file)" msgstr "REL (plik relokowalny)" -#: src/readelf.c:940 +#: src/readelf.c:1023 msgid "EXEC (Executable file)" msgstr "EXEC (plik wykonywalny)" -#: src/readelf.c:941 +#: src/readelf.c:1024 msgid "DYN (Shared object file)" msgstr "DYN (plik obiektu współdzielonego)" -#: src/readelf.c:942 +#: src/readelf.c:1025 msgid "CORE (Core file)" msgstr "CORE (plik core)" -#: src/readelf.c:947 +#: src/readelf.c:1030 #, c-format msgid "OS Specific: (%x)\n" msgstr "Zależny od systemu: (%x)\n" #. && e_type <= ET_HIPROC always true -#: src/readelf.c:949 +#: src/readelf.c:1032 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Zależny od procesora: (%x)\n" -#: src/readelf.c:959 +#: src/readelf.c:1042 msgid "" "ELF Header:\n" " Magic: " @@ -4010,7 +4115,7 @@ msgstr "" "Nagłówek ELF:\n" " Magic: " -#: src/readelf.c:963 +#: src/readelf.c:1046 #, c-format msgid "" "\n" @@ -4019,118 +4124,118 @@ msgstr "" "\n" " Klasa: %s\n" -#: src/readelf.c:968 +#: src/readelf.c:1051 #, c-format msgid " Data: %s\n" msgstr " Dane: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1057 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Wersja Ident: %hhd %s\n" -#: src/readelf.c:976 src/readelf.c:993 +#: src/readelf.c:1059 src/readelf.c:1076 msgid "(current)" msgstr "(bieżąca)" -#: src/readelf.c:980 +#: src/readelf.c:1063 #, c-format msgid " OS/ABI: %s\n" msgstr " System operacyjny/ABI: %s\n" -#: src/readelf.c:983 +#: src/readelf.c:1066 #, c-format msgid " ABI Version: %hhd\n" msgstr " Wersja ABI: %hhd\n" -#: src/readelf.c:986 +#: src/readelf.c:1069 msgid " Type: " msgstr " Typ: " -#: src/readelf.c:989 +#: src/readelf.c:1072 #, c-format msgid " Machine: %s\n" msgstr " Komputer: %s\n" -#: src/readelf.c:991 +#: src/readelf.c:1074 #, c-format msgid " Version: %d %s\n" msgstr " Wersja: %d %s\n" -#: src/readelf.c:995 +#: src/readelf.c:1078 #, c-format msgid " Entry point address: %#\n" msgstr " Adres punktu wejściowego: %#\n" -#: src/readelf.c:998 +#: src/readelf.c:1081 #, c-format msgid " Start of program headers: % %s\n" msgstr " Początek nagłówków programu: % %s\n" -#: src/readelf.c:999 src/readelf.c:1002 +#: src/readelf.c:1082 src/readelf.c:1085 msgid "(bytes into file)" msgstr "(bajtów w pliku)" -#: src/readelf.c:1001 +#: src/readelf.c:1084 #, c-format msgid " Start of section headers: % %s\n" msgstr " Początek nagłówków sekcji: % %s\n" -#: src/readelf.c:1004 +#: src/readelf.c:1087 #, c-format msgid " Flags: %s\n" msgstr " Flagi: %s\n" -#: src/readelf.c:1007 +#: src/readelf.c:1090 #, c-format msgid " Size of this header: % %s\n" msgstr " Rozmiar tego nagłówka: % %s\n" -#: src/readelf.c:1008 src/readelf.c:1011 src/readelf.c:1028 +#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111 msgid "(bytes)" msgstr "(bajtów)" -#: src/readelf.c:1010 +#: src/readelf.c:1093 #, c-format msgid " Size of program header entries: % %s\n" msgstr " Rozmiar wpisów nagłówka programu: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1096 #, c-format msgid " Number of program headers entries: %" msgstr " Liczba wpisów nagłówków programu: %" -#: src/readelf.c:1020 +#: src/readelf.c:1103 #, c-format msgid " (% in [0].sh_info)" msgstr " (% w [0].sh_info)" -#: src/readelf.c:1023 src/readelf.c:1040 src/readelf.c:1054 +#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137 msgid " ([0] not available)" msgstr " ([0] niedostępny)" -#: src/readelf.c:1027 +#: src/readelf.c:1110 #, c-format msgid " Size of section header entries: % %s\n" msgstr " Rozmiar wpisów nagłówka sekcji: % %s\n" -#: src/readelf.c:1030 +#: src/readelf.c:1113 #, c-format msgid " Number of section headers entries: %" msgstr " Liczba wpisów nagłówków sekcji: %" -#: src/readelf.c:1037 +#: src/readelf.c:1120 #, c-format msgid " (% in [0].sh_size)" msgstr " (% w [0].sh_size)" #. We managed to get the zeroth section. -#: src/readelf.c:1050 +#: src/readelf.c:1133 #, c-format msgid " (% in [0].sh_link)" msgstr " (% w [0].sh_link)" -#: src/readelf.c:1058 +#: src/readelf.c:1141 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4139,7 +4244,7 @@ msgstr "" " Indeks tabeli ciągów nagłówków sekcji: XINDEX%s\n" "\n" -#: src/readelf.c:1062 +#: src/readelf.c:1145 #, c-format msgid "" " Section header string table index: %\n" @@ -4148,7 +4253,7 @@ msgstr "" " Indeks tabeli ciągów nagłówków sekcji: %\n" "\n" -#: src/readelf.c:1105 +#: src/readelf.c:1188 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4157,11 +4262,11 @@ msgstr "" "Jest %d nagłówków sekcji, rozpoczynających się od offsetu %#:\n" "\n" -#: src/readelf.c:1115 +#: src/readelf.c:1198 msgid "Section Headers:" msgstr "Nagłówki sekcji:" -#: src/readelf.c:1118 +#: src/readelf.c:1201 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4169,7 +4274,7 @@ msgstr "" "[Nr] Nazwa Typ Adres Offset Rozm. ES Flagi Lk " "Inf Al" -#: src/readelf.c:1120 +#: src/readelf.c:1203 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4177,36 +4282,36 @@ msgstr "" "[Nr] Nazwa Typ Adres Offset Rozmiar ES " "Flagi Lk Inf Al" -#: src/readelf.c:1125 +#: src/readelf.c:1208 msgid " [Compression Size Al]" msgstr " [Kompresja Rozmiar Al]" -#: src/readelf.c:1127 +#: src/readelf.c:1210 msgid " [Compression Size Al]" msgstr " [Kompresja Rozmiar Al]" -#: src/readelf.c:1203 +#: src/readelf.c:1286 #, c-format msgid "bad compression header for section %zd: %s" msgstr "błędny nagłówek kompresji dla sekcji %zd: %s" -#: src/readelf.c:1214 +#: src/readelf.c:1297 #, c-format msgid "bad gnu compressed size for section %zd: %s" msgstr "błędny rozmiar kompresji gnu dla sekcji %zd: %s" -#: src/readelf.c:1232 +#: src/readelf.c:1315 msgid "Program Headers:" msgstr "Nagłówki programu:" -#: src/readelf.c:1234 +#: src/readelf.c:1317 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Typ Offset AdresWirt AdresFiz RozmPlik RozmPam Flg " "Wyrównanie" -#: src/readelf.c:1237 +#: src/readelf.c:1320 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4214,12 +4319,12 @@ msgstr "" " Typ Offset AdresWirtualny AdresFizyczny RozmPlik " "RozmPam Flg Wyrównanie" -#: src/readelf.c:1294 +#: src/readelf.c:1377 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Wywołanie interpretera programu: %s]\n" -#: src/readelf.c:1315 +#: src/readelf.c:1398 msgid "" "\n" " Section to Segment mapping:\n" @@ -4229,12 +4334,12 @@ msgstr "" " Mapowanie sekcji do segmentów:\n" " Segment sekcji…" -#: src/readelf.c:1326 src/unstrip.c:1941 src/unstrip.c:1983 src/unstrip.c:1990 +#: src/readelf.c:1409 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993 #, c-format msgid "cannot get program header: %s" msgstr "nie można uzyskać nagłówka programu: %s" -#: src/readelf.c:1469 +#: src/readelf.c:1552 #, c-format msgid "" "\n" @@ -4252,7 +4357,7 @@ msgstr[2] "" "\n" "Grupa sekcji COMDAT [%2zu] „%s” z podpisem „%s” zawiera %zu wpisów:\n" -#: src/readelf.c:1474 +#: src/readelf.c:1557 #, c-format msgid "" "\n" @@ -4270,31 +4375,31 @@ msgstr[2] "" "\n" "Grupa sekcji [%2zu] „%s” z podpisem „%s” zawiera %zu wpisów:\n" -#: src/readelf.c:1482 +#: src/readelf.c:1565 msgid "" msgstr "" -#: src/readelf.c:1496 +#: src/readelf.c:1579 msgid "" msgstr "" -#: src/readelf.c:1519 src/readelf.c:2246 src/readelf.c:3329 src/readelf.c:9531 -#: src/readelf.c:9538 src/readelf.c:9582 src/readelf.c:9589 +#: src/readelf.c:1602 src/readelf.c:2329 src/readelf.c:3430 src/readelf.c:12294 +#: src/readelf.c:12301 src/readelf.c:12345 src/readelf.c:12352 msgid "Couldn't uncompress section" msgstr "Nie można dekompresować sekcji" -#: src/readelf.c:1524 src/readelf.c:2251 src/readelf.c:3334 +#: src/readelf.c:1607 src/readelf.c:2334 src/readelf.c:3435 #, c-format msgid "cannot get section [%zd] header: %s" msgstr "nie można uzyskać nagłówka sekcji [%zd]: %s" -#: src/readelf.c:1668 src/readelf.c:2318 src/readelf.c:2576 src/readelf.c:2652 -#: src/readelf.c:2956 src/readelf.c:3030 src/readelf.c:4732 +#: src/readelf.c:1751 src/readelf.c:2401 src/readelf.c:2659 src/readelf.c:2735 +#: src/readelf.c:3039 src/readelf.c:3113 src/readelf.c:5308 #, c-format msgid "invalid sh_link value in section %zu" msgstr "nieprawidłowa wartość sh_link w sekcji %zu" -#: src/readelf.c:1671 +#: src/readelf.c:1754 #, c-format msgid "" "\n" @@ -4320,36 +4425,36 @@ msgstr[2] "" " Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " "'%s'\n" -#: src/readelf.c:1681 +#: src/readelf.c:1764 msgid " Type Value\n" msgstr " Typ Wartość\n" -#: src/readelf.c:1705 +#: src/readelf.c:1788 #, c-format msgid "Shared library: [%s]\n" msgstr "Biblioteka współdzielona: [%s]\n" -#: src/readelf.c:1710 +#: src/readelf.c:1793 #, c-format msgid "Library soname: [%s]\n" msgstr "soname biblioteki: [%s]\n" -#: src/readelf.c:1715 +#: src/readelf.c:1798 #, c-format msgid "Library rpath: [%s]\n" msgstr "rpath biblioteki: [%s]\n" -#: src/readelf.c:1720 +#: src/readelf.c:1803 #, c-format msgid "Library runpath: [%s]\n" msgstr "runpath biblioteki: [%s]\n" -#: src/readelf.c:1740 +#: src/readelf.c:1823 #, c-format msgid "% (bytes)\n" msgstr "% (bajtów)\n" -#: src/readelf.c:1853 src/readelf.c:2043 +#: src/readelf.c:1936 src/readelf.c:2126 #, c-format msgid "" "\n" @@ -4358,7 +4463,7 @@ msgstr "" "\n" "Nieprawidłowa tabela symboli pod offsetem %#0\n" -#: src/readelf.c:1871 src/readelf.c:2061 +#: src/readelf.c:1954 src/readelf.c:2144 #, c-format msgid "" "\n" @@ -4387,7 +4492,7 @@ msgstr[2] "" #. The .rela.dyn section does not refer to a specific section but #. instead of section index zero. Do not try to print a section #. name. -#: src/readelf.c:1886 src/readelf.c:2076 +#: src/readelf.c:1969 src/readelf.c:2159 #, c-format msgid "" "\n" @@ -4405,30 +4510,30 @@ msgstr[2] "" "\n" "Sekcja relokacji [%2u] „%s” pod offsetem %#0 zawiera %d wpisów:\n" -#: src/readelf.c:1896 +#: src/readelf.c:1979 msgid " Offset Type Value Name\n" msgstr " Offset Typ Wartość Nazwa\n" -#: src/readelf.c:1898 +#: src/readelf.c:1981 msgid " Offset Type Value Name\n" msgstr " Offset Typ Wartość Nazwa\n" -#: src/readelf.c:1951 src/readelf.c:1962 src/readelf.c:1975 src/readelf.c:1996 -#: src/readelf.c:2008 src/readelf.c:2142 src/readelf.c:2154 src/readelf.c:2168 -#: src/readelf.c:2190 src/readelf.c:2203 +#: src/readelf.c:2034 src/readelf.c:2045 src/readelf.c:2058 src/readelf.c:2079 +#: src/readelf.c:2091 src/readelf.c:2225 src/readelf.c:2237 src/readelf.c:2251 +#: src/readelf.c:2273 src/readelf.c:2286 msgid "" msgstr "" -#: src/readelf.c:2086 +#: src/readelf.c:2169 msgid " Offset Type Value Addend Name\n" msgstr " Offset Typ Wartość Koniec Nazwa\n" -#: src/readelf.c:2088 +#: src/readelf.c:2171 msgid " Offset Type Value Addend Name\n" msgstr "" " Offset Typ Wartość Koniec Nazwa\n" -#: src/readelf.c:2326 +#: src/readelf.c:2409 #, c-format msgid "" "\n" @@ -4446,7 +4551,7 @@ msgstr[2] "" "\n" "Tabela symboli [%2u] „%s” zawiera %u wpisów:\n" -#: src/readelf.c:2331 +#: src/readelf.c:2414 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" @@ -4454,33 +4559,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:2339 +#: src/readelf.c:2422 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Numer: Wartość Rozm Typ Bind Widoczność Ndx Nazwa\n" -#: src/readelf.c:2341 +#: src/readelf.c:2424 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " Numer: Wartość Rozm Typ Bind Widoczność Ndx Nazwa\n" -#: src/readelf.c:2361 +#: src/readelf.c:2444 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2449 +#: src/readelf.c:2532 #, c-format msgid "bad dynamic symbol" msgstr "błędny symbol dynamiczny" -#: src/readelf.c:2531 +#: src/readelf.c:2614 msgid "none" msgstr "brak" -#: src/readelf.c:2548 +#: src/readelf.c:2631 msgid "| " msgstr "| " -#: src/readelf.c:2579 +#: src/readelf.c:2662 #, c-format msgid "" "\n" @@ -4506,17 +4611,17 @@ msgstr[2] "" " Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " "„%s”\n" -#: src/readelf.c:2600 +#: src/readelf.c:2683 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Wersja: %hu Plik: %s Licznik: %hu\n" -#: src/readelf.c:2613 +#: src/readelf.c:2696 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Nazwa: %s Flagi: %s Wersja: %hu\n" -#: src/readelf.c:2656 +#: src/readelf.c:2739 #, c-format msgid "" "\n" @@ -4542,19 +4647,19 @@ msgstr[2] "" " Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " "„%s”\n" -#: src/readelf.c:2684 +#: src/readelf.c:2767 #, 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:2699 +#: src/readelf.c:2782 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: Rodzic %d: %s\n" #. Print the header. -#: src/readelf.c:2960 +#: src/readelf.c:3043 #, c-format msgid "" "\n" @@ -4577,15 +4682,15 @@ msgstr[2] "" "Sekcja symboli wersji [%2u] „%s” zawiera %d wpisów:\n" " Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] „%s”" -#: src/readelf.c:2988 +#: src/readelf.c:3071 msgid " 0 *local* " msgstr " 0 *lokalny* " -#: src/readelf.c:2993 +#: src/readelf.c:3076 msgid " 1 *global* " msgstr " 1 *globalny* " -#: src/readelf.c:3035 +#: src/readelf.c:3118 #, c-format msgid "" "\n" @@ -4616,22 +4721,22 @@ msgstr[2] "" " Adres: %#0* Offset: %#08 Dowiązanie do sekcji: [%2u] " "„%s”\n" -#: src/readelf.c:3057 +#: src/readelf.c:3140 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Długość Liczba % całości Pokrycie\n" -#: src/readelf.c:3059 +#: src/readelf.c:3142 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:3066 +#: src/readelf.c:3149 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:3079 +#: src/readelf.c:3162 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4640,27 +4745,37 @@ msgstr "" " Średnia liczba testów: udane wyszukania: %f\n" "\t\t\t nieudane wyszukania: %f\n" -#: src/readelf.c:3097 src/readelf.c:3152 src/readelf.c:3209 +#: src/readelf.c:3180 src/readelf.c:3244 src/readelf.c:3310 #, c-format msgid "cannot get data for section %d: %s" msgstr "nie można uzyskać danych dla sekcji %d: %s" -#: src/readelf.c:3105 +#: src/readelf.c:3188 #, c-format msgid "invalid data in sysv.hash section %d" msgstr "nieprawidłowe dane w sekcji sysv.hash %d" -#: src/readelf.c:3160 +#: src/readelf.c:3217 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash section %d" +msgstr "nieprawidłowe dane w sekcji sysv.hash %d" + +#: src/readelf.c:3252 #, c-format msgid "invalid data in sysv.hash64 section %d" msgstr "nieprawidłowe dane w sekcji sysv.hash64 %d" -#: src/readelf.c:3218 +#: src/readelf.c:3283 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash64 section %d" +msgstr "nieprawidłowe dane w sekcji sysv.hash64 %d" + +#: src/readelf.c:3319 #, c-format msgid "invalid data in gnu.hash section %d" msgstr "nieprawidłowe dane w sekcji gnu.hash %d" -#: src/readelf.c:3285 +#: src/readelf.c:3386 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4670,7 +4785,7 @@ msgstr "" " Rozmiar maski bitowej: %zu bajtów %%% bitów ustawionych " "drugie przesunięcie skrótu: %u\n" -#: src/readelf.c:3374 +#: src/readelf.c:3475 #, c-format msgid "" "\n" @@ -4691,7 +4806,7 @@ msgstr[2] "" "Sekcja listy bibliotek [%2zu] „%s” pod offsetem %#0 zawiera %d " "wpisów:\n" -#: src/readelf.c:3388 +#: src/readelf.c:3489 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4699,7 +4814,7 @@ msgstr "" " Biblioteka Oznaczenie czasu Suma k. Wersja " "Flagi" -#: src/readelf.c:3438 +#: src/readelf.c:3539 #, c-format msgid "" "\n" @@ -4710,142 +4825,102 @@ msgstr "" "Sekcja atrybutów obiektu [%2zu] „%s” % bajtów pod offsetem " "%#0:\n" -#: src/readelf.c:3455 +#: src/readelf.c:3556 msgid " Owner Size\n" msgstr " Właściciel Rozmiar\n" -#: src/readelf.c:3484 +#: src/readelf.c:3585 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" #. Unknown subsection, print and skip. -#: src/readelf.c:3523 +#: src/readelf.c:3624 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" #. Tag_File -#: src/readelf.c:3528 +#: src/readelf.c:3629 #, c-format msgid " File: %11\n" msgstr " Plik: %11\n" -#: src/readelf.c:3577 +#: src/readelf.c:3678 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3580 +#: src/readelf.c:3681 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3583 +#: src/readelf.c:3684 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3593 +#: src/readelf.c:3694 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3596 +#: src/readelf.c:3697 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3641 -#, c-format -msgid "%s+%# <%s+%#>" -msgstr "%s+%# <%s+%#>" - -#: src/readelf.c:3644 -#, c-format -msgid "%s+%#0* <%s+%#>" -msgstr "%s+%#0* <%s+%#>" - -#: src/readelf.c:3649 -#, c-format -msgid "%# <%s+%#>" -msgstr "%# <%s+%#>" - -#: src/readelf.c:3652 -#, c-format -msgid "%#0* <%s+%#>" -msgstr "%#0* <%s+%#>" - -#: src/readelf.c:3658 -#, c-format -msgid "%s+%# <%s>" -msgstr "%s+%# <%s>" - -#: src/readelf.c:3661 -#, c-format -msgid "%s+%#0* <%s>" -msgstr "%s+%#0* <%s>" - -#: src/readelf.c:3665 -#, c-format -msgid "%# <%s>" -msgstr "%# <%s>" - -#: src/readelf.c:3668 -#, c-format -msgid "%#0* <%s>" -msgstr "%#0* <%s>" - -#: src/readelf.c:3673 -#, c-format -msgid "%s+%#" -msgstr "%s+%#" - -#: src/readelf.c:3676 -#, c-format -msgid "%s+%#0*" -msgstr "%s+%#0*" +#: src/readelf.c:3767 +#, fuzzy, c-format +msgid "sprintf failure" +msgstr "mprotect się nie powiodło" -#: src/readelf.c:4054 +#: src/readelf.c:4249 msgid "empty block" msgstr "pusty blok" -#: src/readelf.c:4057 +#: src/readelf.c:4252 #, c-format msgid "%zu byte block:" msgstr "%zu bajtowy blok:" -#: src/readelf.c:4454 -#, c-format -msgid "%*s[%4] %s \n" +#: src/readelf.c:4730 +#, fuzzy, c-format +msgid "%*s[%2] %s \n" msgstr "%*s[%4] %s \n" -#: src/readelf.c:4511 +#: src/readelf.c:4794 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# zostało użyte z różnymi rozmiarami adresu" -#: src/readelf.c:4518 +#: src/readelf.c:4801 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# zostało użyte z różnymi rozmiarami offsetu" -#: src/readelf.c:4525 +#: src/readelf.c:4808 #, c-format msgid "%s %# used with different base addresses" msgstr "%s %# zostało użyte z różnymi adresami podstawowymi" -#: src/readelf.c:4614 +#: src/readelf.c:4815 +#, fuzzy, c-format +msgid "%s %# used with different attribute %s and %s" +msgstr "%s %# zostało użyte z różnymi rozmiarami adresu" + +#: src/readelf.c:4912 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] \n" -#: src/readelf.c:4622 +#: src/readelf.c:4920 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr " [%6tx] … % bajtów…\n" -#: src/readelf.c:4648 +#: src/readelf.c:4998 #, c-format msgid "" "\n" @@ -4856,7 +4931,7 @@ msgstr "" "Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" " [ Kod]\n" -#: src/readelf.c:4656 +#: src/readelf.c:5006 #, c-format msgid "" "\n" @@ -4865,30 +4940,78 @@ msgstr "" "\n" "Sekcja skrótów pod offsetem %:\n" -#: src/readelf.c:4669 +#: src/readelf.c:5019 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** błąd podczas odczytywania skrótu: %s\n" -#: src/readelf.c:4685 +#: src/readelf.c:5035 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] offset: %, potomek: %s, znacznik: %s\n" -#: src/readelf.c:4688 -msgid "yes" -msgstr "tak" +#: src/readelf.c:5068 src/readelf.c:5377 src/readelf.c:5541 src/readelf.c:5926 +#: src/readelf.c:6527 src/readelf.c:8168 src/readelf.c:8838 src/readelf.c:9274 +#: src/readelf.c:9518 src/readelf.c:9683 src/readelf.c:10044 +#: src/readelf.c:10102 +#, c-format +msgid "" +"\n" +"DWARF section [%2zu] '%s' at offset %#:\n" +msgstr "" +"\n" +"Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" -#: src/readelf.c:4688 -msgid "no" -msgstr "nie" +#: src/readelf.c:5081 +#, fuzzy, c-format +msgid "cannot get .debug_addr section data: %s" +msgstr "nie można uzyskać danych sekcji: %s" + +#: src/readelf.c:5181 src/readelf.c:5205 src/readelf.c:5586 src/readelf.c:8883 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr "" +"\n" +" Długość: %6\n" + +#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " Wersja DWARF: %6\n" + +#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905 +#, fuzzy, c-format +msgid " Address size: %8\n" +msgstr " Offset adresu: %6\n" + +#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915 +#, fuzzy, c-format +msgid " Segment size: %8\n" +msgstr "" +" Rozmiar segmentu: %6\n" +"\n" + +#: src/readelf.c:5224 src/readelf.c:5603 src/readelf.c:8900 src/readelf.c:10234 +#, fuzzy, c-format +msgid "Unknown version" +msgstr "nieznana wersja" + +#: src/readelf.c:5234 src/readelf.c:5447 src/readelf.c:5613 src/readelf.c:8910 +#, c-format +msgid "unsupported address size" +msgstr "nieobsługiwany rozmiar adresu" + +#: src/readelf.c:5245 src/readelf.c:5456 src/readelf.c:5623 src/readelf.c:8920 +#, c-format +msgid "unsupported segment size" +msgstr "nieobsługiwany rozmiar segmentu" -#: src/readelf.c:4722 src/readelf.c:4795 +#: src/readelf.c:5298 src/readelf.c:5372 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "nie można uzyskać zawartości .debug_aranges: %s" -#: src/readelf.c:4737 +#: src/readelf.c:5313 #, c-format msgid "" "\n" @@ -4906,12 +5029,12 @@ msgstr[2] "" "\n" "Sekcja DWARF [%2zu] „%s” pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:4768 +#: src/readelf.c:5344 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4770 +#: src/readelf.c:5346 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" @@ -4919,17 +5042,7 @@ msgstr "" " [%*zu] początek: %0#*, długość: %5, offset CU DIE: " "%6\n" -#: src/readelf.c:4800 src/readelf.c:4954 src/readelf.c:5531 src/readelf.c:6485 -#: src/readelf.c:7017 src/readelf.c:7137 src/readelf.c:7301 src/readelf.c:7726 -#, c-format -msgid "" -"\n" -"DWARF section [%2zu] '%s' at offset %#:\n" -msgstr "" -"\n" -"Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" - -#: src/readelf.c:4813 src/readelf.c:6511 +#: src/readelf.c:5390 src/readelf.c:8195 #, c-format msgid "" "\n" @@ -4938,12 +5051,13 @@ msgstr "" "\n" "Tabela pod offsetem %zu:\n" -#: src/readelf.c:4817 src/readelf.c:5555 src/readelf.c:6522 +#: src/readelf.c:5394 src/readelf.c:5567 src/readelf.c:6551 src/readelf.c:8206 +#: src/readelf.c:8864 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "nieprawidłowe dane w sekcji [%zu] „%s”" -#: src/readelf.c:4833 +#: src/readelf.c:5410 #, c-format msgid "" "\n" @@ -4952,32 +5066,27 @@ msgstr "" "\n" " Długość: %6\n" -#: src/readelf.c:4845 +#: src/readelf.c:5422 #, c-format msgid " DWARF version: %6\n" msgstr " Wersja DWARF: %6\n" -#: src/readelf.c:4849 +#: src/readelf.c:5426 #, c-format msgid "unsupported aranges version" msgstr "nieobsługiwana wersja aranges" -#: src/readelf.c:4860 +#: src/readelf.c:5437 #, c-format msgid " CU offset: %6\n" msgstr " Offset CU: %6\n" -#: src/readelf.c:4866 +#: src/readelf.c:5443 #, c-format msgid " Address size: %6\n" msgstr " Offset adresu: %6\n" -#: src/readelf.c:4870 -#, c-format -msgid "unsupported address size" -msgstr "nieobsługiwany rozmiar adresu" - -#: src/readelf.c:4875 +#: src/readelf.c:5452 #, c-format msgid "" " Segment size: %6\n" @@ -4986,68 +5095,111 @@ msgstr "" " Rozmiar segmentu: %6\n" "\n" -#: src/readelf.c:4879 +#: src/readelf.c:5507 #, c-format -msgid "unsupported segment size" -msgstr "nieobsługiwany rozmiar segmentu" +msgid " %zu padding bytes\n" +msgstr " bajty wypełnienia: %zu\n" + +#: src/readelf.c:5550 +#, fuzzy, c-format +msgid "cannot get .debug_rnglists content: %s" +msgstr "nie można uzyskać zawartości .debug_ranges: %s" + +#: src/readelf.c:5573 src/readelf.c:8870 +#, fuzzy, c-format +msgid "" +"Table at Offset 0x%:\n" +"\n" +msgstr " Offset .debug_line: 0x%\n" + +#: src/readelf.c:5628 src/readelf.c:8925 +#, fuzzy, c-format +msgid " Offset entries: %8\n" +msgstr " Długość offsetu: %\n" -#: src/readelf.c:4919 +#: src/readelf.c:5644 src/readelf.c:8941 #, c-format -msgid " %s..%s (%)\n" -msgstr " %s..%s (%)\n" +msgid " Unknown CU base: " +msgstr "" -#: src/readelf.c:4922 +#: src/readelf.c:5646 src/readelf.c:8943 #, c-format -msgid " %s..%s\n" -msgstr " %s..%s\n" +msgid " CU [%6] base: " +msgstr "" -#: src/readelf.c:4931 +#: src/readelf.c:5652 src/readelf.c:8949 #, c-format -msgid " %zu padding bytes\n" +msgid " Not associated with a CU.\n" +msgstr "" + +#: src/readelf.c:5663 src/readelf.c:8960 +#, c-format +msgid "too many offset entries for unit length" +msgstr "" + +#: src/readelf.c:5667 src/readelf.c:8964 +#, fuzzy, c-format +msgid " Offsets starting at 0x%:\n" +msgstr " Offset: 0x%\n" + +#: src/readelf.c:5719 +#, fuzzy, c-format +msgid "invalid range list data" +msgstr "nieprawidłowe dane" + +#: src/readelf.c:5904 src/readelf.c:9252 +#, fuzzy, c-format +msgid "" +" %zu padding bytes\n" +"\n" msgstr " bajty wypełnienia: %zu\n" -#: src/readelf.c:4949 +#: src/readelf.c:5921 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "nie można uzyskać zawartości .debug_ranges: %s" -#: src/readelf.c:4979 src/readelf.c:7044 +#: src/readelf.c:5957 src/readelf.c:9307 #, c-format -msgid " [%6tx] \n" -msgstr " [%6tx] \n" +msgid "" +"\n" +" Unknown CU base: " +msgstr "" -#: src/readelf.c:5001 src/readelf.c:7066 +#: src/readelf.c:5959 src/readelf.c:9309 #, c-format -msgid " [%6tx] base address %s\n" -msgstr " [%6tx] adres podstawowy %s\n" +msgid "" +"\n" +" CU [%6] base: " +msgstr "" -#: src/readelf.c:5008 src/readelf.c:7073 +#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361 #, c-format -msgid " [%6tx] empty list\n" -msgstr " [%6tx] pusta lista\n" +msgid " [%6tx] \n" +msgstr " [%6tx] \n" -#. We have an address range entry. -#. First address range entry in a list. -#: src/readelf.c:5019 -#, c-format -msgid " [%6tx] %s..%s\n" -msgstr " [%6tx] %s…%s\n" +#: src/readelf.c:5989 src/readelf.c:9441 +#, fuzzy, c-format +msgid "" +" [%6tx] base address\n" +" " +msgstr " [%6tx] adres podstawowy %s\n" -#: src/readelf.c:5021 -#, c-format -msgid " %s..%s\n" -msgstr " %s…%s\n" +#: src/readelf.c:5997 src/readelf.c:9449 +#, fuzzy, c-format +msgid " [%6tx] empty list\n" +msgstr " [%6tx] pusta lista\n" -#: src/readelf.c:5257 +#: src/readelf.c:6252 msgid " \n" msgstr " \n" -#: src/readelf.c:5510 +#: src/readelf.c:6505 #, c-format msgid "cannot get ELF: %s" msgstr "nie można uzyskać ELF: %s" -#: src/readelf.c:5527 +#: src/readelf.c:6523 #, c-format msgid "" "\n" @@ -5056,7 +5208,7 @@ msgstr "" "\n" "Sekcja informacji o ramce wywołania [%2zu] „%s” pod offsetem %#:\n" -#: src/readelf.c:5577 +#: src/readelf.c:6573 #, c-format msgid "" "\n" @@ -5065,50 +5217,65 @@ msgstr "" "\n" " [%6tx] Zerowy koniec\n" -#: src/readelf.c:5670 src/readelf.c:5825 +#: src/readelf.c:6666 src/readelf.c:6820 #, c-format msgid "invalid augmentation length" msgstr "nieprawidłowa długość powiększenia" -#: src/readelf.c:5685 +#: src/readelf.c:6681 msgid "FDE address encoding: " msgstr "Kodowanie adresu FDE: " -#: src/readelf.c:5691 +#: src/readelf.c:6687 msgid "LSDA pointer encoding: " msgstr "Kodowanie wskaźnika LSDA: " -#: src/readelf.c:5802 +#: src/readelf.c:6797 #, c-format msgid " (offset: %#)" msgstr " (offset: %#)" -#: src/readelf.c:5809 +#: src/readelf.c:6804 #, c-format msgid " (end offset: %#)" msgstr " (kończący offset: %#)" -#: src/readelf.c:5846 +#: src/readelf.c:6841 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sWskaźnik LSDA: %#\n" -#: src/readelf.c:5901 -#, c-format -msgid "cannot get attribute code: %s" +#: src/readelf.c:6926 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute code: %s" msgstr "nie można uzyskać kodu atrybutu: %s" -#: src/readelf.c:5910 -#, c-format -msgid "cannot get attribute form: %s" +#: src/readelf.c:6936 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute form: %s" msgstr "nie można uzyskać formy atrybutu: %s" -#: src/readelf.c:5925 -#, c-format -msgid "cannot get attribute value: %s" +#: src/readelf.c:6958 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute '%s' (%s) value: %s" msgstr "nie można uzyskać wartości atrybutu: %s" -#: src/readelf.c:6224 +#: src/readelf.c:7291 +#, fuzzy, c-format +msgid "invalid file (%): %s" +msgstr "nieprawidłowy plik" + +#: src/readelf.c:7295 +#, fuzzy, c-format +msgid "no srcfiles for CU [%]" +msgstr " ustawienie pliku na %\n" + +#: src/readelf.c:7299 +#, fuzzy, c-format +msgid "couldn't get DWARF CU: %s" +msgstr "nie można uzyskać ELF: %s" + +#: src/readelf.c:7522 #, c-format msgid "" "\n" @@ -5119,20 +5286,25 @@ msgstr "" "Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" " [Offset]\n" -#: src/readelf.c:6256 -#, c-format +#: src/readelf.c:7572 +#, fuzzy, c-format +msgid "cannot get next unit: %s" +msgstr "nie można uzyskać następnego DIE: %s" + +#: src/readelf.c:7591 +#, fuzzy, c-format msgid "" " Type unit at offset %:\n" " Version: %, Abbreviation section offset: %, Address size: " "%, Offset size: %\n" -" Type signature: %#, Type offset: %#\n" +" Type signature: %#, Type offset: %# [%]\n" msgstr "" " Jednostka typu pod offsetem %:\n" " Wersja: %, offset sekcji skrótów: %, rozmiar adresu: " "%, rozmiar offsetu: %\n" " Podpis typu: %#, offset typu: %#\n" -#: src/readelf.c:6265 +#: src/readelf.c:7603 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5143,33 +5315,49 @@ msgstr "" " Wersja: %, offset sekcji skrótów: %, rozmiar adresu: " "%, rozmiar offsetu: %\n" -#: src/readelf.c:6290 +#: src/readelf.c:7613 src/readelf.c:7776 +#, c-format +msgid " Unit type: %s (%)" +msgstr "" + +#: src/readelf.c:7640 #, c-format -msgid "cannot get DIE at offset % in section '%s': %s" -msgstr "nie można uzyskać DIE pod offsetem % w sekcji „%s”: %s" +msgid "unknown version (%d) or unit type (%d)" +msgstr "" -#: src/readelf.c:6304 +#: src/readelf.c:7669 #, c-format msgid "cannot get DIE offset: %s" msgstr "nie można uzyskać offsetu DIE: %s" -#: src/readelf.c:6313 -#, c-format -msgid "cannot get tag of DIE at offset % in section '%s': %s" +#: src/readelf.c:7678 +#, fuzzy, c-format +msgid "cannot get tag of DIE at offset [%] in section '%s': %s" msgstr "" "nie można uzyskać znacznika DIE pod offsetem % w sekcji „%s”: %s" -#: src/readelf.c:6345 +#: src/readelf.c:7716 #, c-format msgid "cannot get next DIE: %s\n" msgstr "nie można uzyskać następnego DIE: %s\n" -#: src/readelf.c:6353 +#: src/readelf.c:7724 #, c-format msgid "cannot get next DIE: %s" msgstr "nie można uzyskać następnego DIE: %s" -#: src/readelf.c:6389 +#: src/readelf.c:7768 +#, fuzzy, c-format +msgid "" +" Split compilation unit at offset %:\n" +" Version: %, Abbreviation section offset: %, Address size: " +"%, Offset size: %\n" +msgstr "" +" Jednostka kompilacji pod offsetem %:\n" +" Wersja: %, offset sekcji skrótów: %, rozmiar adresu: " +"%, rozmiar offsetu: %\n" + +#: src/readelf.c:7819 #, c-format msgid "" "\n" @@ -5180,25 +5368,32 @@ msgstr "" "Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" "\n" -#: src/readelf.c:6498 +#: src/readelf.c:8151 +#, fuzzy, c-format +msgid "unknown form: %s" +msgstr "nieznany błąd" + +#: src/readelf.c:8182 #, c-format msgid "cannot get line data section data: %s" msgstr "nie można uzyskać danych sekcji danych wiersza: %s" #. Print what we got so far. -#: src/readelf.c:6568 -#, c-format -msgid "" -"\n" -" Length: %\n" -" DWARF version: %\n" -" Prologue length: %\n" -" Minimum instruction length: %\n" -" Maximum operations per instruction: %\n" -" Initial value if '%s': %\n" -" Line base: %\n" -" Line range: %\n" -" Opcode base: %\n" +#: src/readelf.c:8284 +#, fuzzy, c-format +msgid "" +"\n" +" Length: %\n" +" DWARF version: %\n" +" Prologue length: %\n" +" Address size: %zd\n" +" Segment selector size: %zd\n" +" Min instruction length: %\n" +" Max operations per instruction: %\n" +" Initial value if 'is_stmt': %\n" +" Line base: %\n" +" Line range: %\n" +" Opcode base: %\n" "\n" "Opcodes:\n" msgstr "" @@ -5215,12 +5410,27 @@ msgstr "" "\n" "Instrukcje:\n" -#: src/readelf.c:6589 +#: src/readelf.c:8306 +#, fuzzy, c-format +msgid "cannot handle .debug_line version: %u\n" +msgstr "nie można uzyskać wersji symbolu: %s" + +#: src/readelf.c:8314 +#, fuzzy, c-format +msgid "cannot handle address size: %u\n" +msgstr "nieobsługiwany rozmiar adresu" + +#: src/readelf.c:8322 +#, fuzzy, c-format +msgid "cannot handle segment selector size: %u\n" +msgstr "nie można uzyskać sekcji: %s" + +#: src/readelf.c:8332 #, 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:6604 +#: src/readelf.c:8347 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" @@ -5228,7 +5438,7 @@ msgstr[0] " [%*] %hhu parametr\n" msgstr[1] " [%*] %hhu parametry\n" msgstr[2] " [%*] %hhu parametrów\n" -#: src/readelf.c:6612 +#: src/readelf.c:8358 msgid "" "\n" "Directory table:" @@ -5236,17 +5446,29 @@ msgstr "" "\n" "Tabela katalogu:" -#: src/readelf.c:6628 +#: src/readelf.c:8364 src/readelf.c:8439 +#, fuzzy, c-format +msgid " [" +msgstr " PC: " + +#: src/readelf.c:8433 +#, fuzzy msgid "" "\n" -"File name table:\n" -" Entry Dir Time Size Name" +"File name table:" +msgstr "" +"\n" +" Tabela strony wywołania:" + +#: src/readelf.c:8494 +#, fuzzy +msgid " Entry Dir Time Size Name" msgstr "" "\n" "Tabela nazw plików:\n" " Wpis Kat Czas Rozmiar Nazwa" -#: src/readelf.c:6663 +#: src/readelf.c:8529 msgid "" "\n" "Line number statements:" @@ -5254,119 +5476,119 @@ msgstr "" "\n" "Instrukcje numerów wierszy:" -#: src/readelf.c:6714 +#: src/readelf.c:8552 #, c-format msgid "invalid maximum operations per instruction is zero" msgstr "nieprawidłowe maksimum operacji na instrukcję wynosi zero" -#: src/readelf.c:6750 -#, c-format -msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" +#: src/readelf.c:8586 +#, fuzzy, c-format +msgid " special opcode %u: address+%u = " +msgstr " instrukcja specjalna %u: adres+%u = %s, wiersz%+d = %zu\n" + +#: src/readelf.c:8590 +#, fuzzy, c-format +msgid ", op_index = %u, line%+d = %zu\n" msgstr "" " instrukcja specjalna %u: adres+%u = %s, op_index = %u, wiersz%+d = %zu\n" -#: src/readelf.c:6755 +#: src/readelf.c:8593 #, c-format -msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" -msgstr " instrukcja specjalna %u: adres+%u = %s, wiersz%+d = %zu\n" +msgid ", line%+d = %zu\n" +msgstr "" -#: src/readelf.c:6775 +#: src/readelf.c:8611 #, c-format msgid " extended opcode %u: " msgstr " instrukcja rozszerzona %u: " -#: src/readelf.c:6780 +#: src/readelf.c:8616 msgid " end of sequence" msgstr " koniec sekwencji" -#: src/readelf.c:6799 -#, c-format -msgid " set address to %s\n" +#: src/readelf.c:8634 +#, fuzzy, c-format +msgid " set address to " msgstr " ustawienie adresu na %s\n" -#: src/readelf.c:6826 +#: src/readelf.c:8662 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" " definicja nowego pliku: dir=%u, mtime=%, długość=%, nazwa=" "%s\n" -#: src/readelf.c:6839 +#: src/readelf.c:8675 #, c-format msgid " set discriminator to %u\n" msgstr " ustawienie dyskryminatora na %u\n" #. Unknown, ignore it. -#: src/readelf.c:6844 +#: src/readelf.c:8680 msgid " unknown opcode" msgstr " nieznana instrukcja" #. Takes no argument. -#: src/readelf.c:6856 +#: src/readelf.c:8692 msgid " copy" msgstr " kopiowanie" -#: src/readelf.c:6867 -#, 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:8701 +#, fuzzy, c-format +msgid " advance address by %u to " +msgstr " zwiększenie adresu o %u do %s\n" -#: src/readelf.c:6871 +#: src/readelf.c:8705 src/readelf.c:8761 #, c-format -msgid " advance address by %u to %s\n" -msgstr " zwiększenie adresu o %u do %s\n" +msgid ", op_index to %u" +msgstr "" -#: src/readelf.c:6882 +#: src/readelf.c:8715 #, c-format msgid " advance line by constant %d to %\n" msgstr " zwiększenie wiersza o stałą %d do %\n" -#: src/readelf.c:6890 +#: src/readelf.c:8723 #, c-format msgid " set file to %\n" msgstr " ustawienie pliku na %\n" -#: src/readelf.c:6900 +#: src/readelf.c:8733 #, c-format msgid " set column to %\n" msgstr " ustawienie kolumny na %\n" -#: src/readelf.c:6907 +#: src/readelf.c:8740 #, c-format msgid " set '%s' to %\n" msgstr " ustawienie „%s” na %\n" #. Takes no argument. -#: src/readelf.c:6913 +#: src/readelf.c:8746 msgid " set basic block flag" msgstr " ustawienie podstawowej flagi bloku" -#: src/readelf.c:6926 -#, 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:6930 -#, c-format -msgid " advance address by constant %u to %s\n" +#: src/readelf.c:8757 +#, fuzzy, c-format +msgid " advance address by constant %u to " msgstr " zwiększenie adresu o stałą %u do %s\n" -#: src/readelf.c:6948 -#, c-format -msgid " advance address by fixed value %u to %s\n" +#: src/readelf.c:8776 +#, fuzzy, c-format +msgid " advance address by fixed value %u to \n" msgstr " zwiększenie adresu o stałą wartość %u do %s\n" #. Takes no argument. -#: src/readelf.c:6957 +#: src/readelf.c:8786 msgid " set prologue end flag" msgstr " ustawienie flagi końca prologu" #. Takes no argument. -#: src/readelf.c:6962 +#: src/readelf.c:8791 msgid " set epilogue begin flag" msgstr " ustawienie flagi początku epilogu" -#: src/readelf.c:6971 +#: src/readelf.c:8800 #, c-format msgid " set isa to %u\n" msgstr " ustawienie isa na %u\n" @@ -5374,7 +5596,7 @@ msgstr " ustawienie isa na %u\n" #. 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. -#: src/readelf.c:6980 +#: src/readelf.c:8809 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" @@ -5382,102 +5604,96 @@ msgstr[0] " nieznana instrukcja z % parametrem:" msgstr[1] " nieznana instrukcja z % parametrami:" msgstr[2] " nieznana instrukcja z % parametrami:" -#: src/readelf.c:7012 -#, c-format -msgid "cannot get .debug_loc content: %s" +#: src/readelf.c:8847 +#, fuzzy, c-format +msgid "cannot get .debug_loclists content: %s" msgstr "nie można uzyskać zawartości .debug_log: %s" -#. First entry in a list. -#: src/readelf.c:7087 -#, c-format -msgid " [%6tx] %s..%s" -msgstr " [%6tx] %s…%s" +#: src/readelf.c:9016 +#, fuzzy, c-format +msgid "invalid loclists data" +msgstr "nieprawidłowe dane" -#: src/readelf.c:7089 +#: src/readelf.c:9269 #, c-format -msgid " %s..%s" -msgstr " %s…%s" +msgid "cannot get .debug_loc content: %s" +msgstr "nie można uzyskać zawartości .debug_log: %s" -#: src/readelf.c:7096 src/readelf.c:7984 +#: src/readelf.c:9476 src/readelf.c:10490 msgid " \n" msgstr " \n" -#: src/readelf.c:7148 src/readelf.c:7310 +#: src/readelf.c:9530 src/readelf.c:9693 #, c-format msgid "cannot get macro information section data: %s" msgstr "nie można uzyskać danych sekcji informacji o makrach: %s" -#: src/readelf.c:7228 +#: src/readelf.c:9610 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** niezakończony ciąg na końcu sekcji" -#: src/readelf.c:7251 +#: src/readelf.c:9633 #, c-format msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" msgstr "%*s*** brak parametru DW_MACINFO_start_file na końcu sekcji" -#: src/readelf.c:7351 +#: src/readelf.c:9734 #, c-format msgid " Offset: 0x%\n" msgstr " Offset: 0x%\n" -#: src/readelf.c:7363 +#: src/readelf.c:9746 #, c-format msgid " Version: %\n" msgstr " Wersja: %\n" -#: src/readelf.c:7369 src/readelf.c:8103 +#: src/readelf.c:9752 src/readelf.c:10609 #, c-format msgid " unknown version, cannot parse section\n" msgstr " nieznana wersja, nie można przetworzyć sekcji\n" -#: src/readelf.c:7376 +#: src/readelf.c:9759 #, c-format msgid " Flag: 0x%\n" msgstr " Flaga: 0x%\n" -#: src/readelf.c:7379 +#: src/readelf.c:9762 #, c-format msgid " Offset length: %\n" msgstr " Długość offsetu: %\n" -#: src/readelf.c:7387 +#: src/readelf.c:9770 #, c-format msgid " .debug_line offset: 0x%\n" msgstr " Offset .debug_line: 0x%\n" -#: src/readelf.c:7400 +#: src/readelf.c:9795 #, c-format msgid " extension opcode table, % items:\n" msgstr " tabela instrukcji rozszerzenia, % elementów:\n" -#: src/readelf.c:7407 +#: src/readelf.c:9802 #, c-format msgid " [%]" msgstr " [%]" -#: src/readelf.c:7419 +#: src/readelf.c:9814 #, c-format msgid " % arguments:" msgstr " Parametry %:" -#: src/readelf.c:7447 +#: src/readelf.c:9829 #, c-format msgid " no arguments." msgstr " brak parametrów." -#: src/readelf.c:7684 -#, c-format -msgid "vendor opcode not verified?" -msgstr "instrukcja producenta nie została sprawdzona?" - -#: src/readelf.c:7712 +#: src/readelf.c:10030 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr " [%5d] offset DIE: %6, offset CU DIE: %6, nazwa: %s\n" -#: src/readelf.c:7753 +#: src/readelf.c:10072 #, c-format msgid "" "\n" @@ -5488,12 +5704,41 @@ msgstr "" "Sekcja DWARF [%2zu] „%s” pod offsetem %#:\n" " %*s Ciąg\n" -#: src/readelf.c:7767 -#, c-format -msgid " *** error while reading strings: %s\n" +#: src/readelf.c:10087 +#, fuzzy, c-format +msgid " *** error, missing string terminator\n" msgstr " *** błąd podczas odczytywania ciągów: %s\n" -#: src/readelf.c:7787 +#: src/readelf.c:10115 +#, fuzzy, c-format +msgid "cannot get .debug_str_offsets section data: %s" +msgstr "nie można uzyskać danych sekcji: %s" + +#: src/readelf.c:10214 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr "" +"\n" +" Długość: %6\n" + +#: src/readelf.c:10216 +#, fuzzy, c-format +msgid " Offset size: %8\n" +msgstr " Długość offsetu: %\n" + +#: src/readelf.c:10230 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " Wersja DWARF: %6\n" + +#: src/readelf.c:10239 +#, fuzzy, c-format +msgid " Padding: %8\n" +msgstr "" +"\n" +" Długość: %6\n" + +#: src/readelf.c:10293 #, c-format msgid "" "\n" @@ -5502,7 +5747,7 @@ msgstr "" "\n" "Sekcja tabeli wyszukiwania ramki wywołania [%2zu] „.eh_frame_hdr”:\n" -#: src/readelf.c:7889 +#: src/readelf.c:10395 #, c-format msgid "" "\n" @@ -5511,22 +5756,22 @@ msgstr "" "\n" "Sekcja tabeli obsługiwania wyjątków [%2zu] „.gcc_except_table”:\n" -#: src/readelf.c:7912 +#: src/readelf.c:10418 #, c-format msgid " LPStart encoding: %#x " msgstr " Kodowanie LPStart: %#x " -#: src/readelf.c:7924 +#: src/readelf.c:10430 #, c-format msgid " TType encoding: %#x " msgstr " Kodowanie TType: %#x " -#: src/readelf.c:7939 +#: src/readelf.c:10445 #, c-format msgid " Call site encoding: %#x " msgstr " Kodowanie strony wywołania: %#x " -#: src/readelf.c:7952 +#: src/readelf.c:10458 msgid "" "\n" " Call site table:" @@ -5534,7 +5779,7 @@ msgstr "" "\n" " Tabela strony wywołania:" -#: src/readelf.c:7966 +#: src/readelf.c:10472 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5547,12 +5792,12 @@ msgstr "" " Lądowisko: %#\n" " Działanie: %u\n" -#: src/readelf.c:8039 +#: src/readelf.c:10545 #, c-format msgid "invalid TType encoding" msgstr "nieprawidłowe kodowanie TType" -#: src/readelf.c:8065 +#: src/readelf.c:10571 #, c-format msgid "" "\n" @@ -5561,37 +5806,37 @@ msgstr "" "\n" "Sekcja GDB [%2zu] „%s” pod offsetem %# zawiera % bajtów:\n" -#: src/readelf.c:8094 +#: src/readelf.c:10600 #, c-format msgid " Version: %\n" msgstr " Wersja: %\n" -#: src/readelf.c:8112 +#: src/readelf.c:10618 #, c-format msgid " CU offset: %#\n" msgstr " offset CU: %#\n" -#: src/readelf.c:8119 +#: src/readelf.c:10625 #, c-format msgid " TU offset: %#\n" msgstr " offset TU: %#\n" -#: src/readelf.c:8126 +#: src/readelf.c:10632 #, c-format msgid " address offset: %#\n" msgstr " offset adresu: %#\n" -#: src/readelf.c:8133 +#: src/readelf.c:10639 #, c-format msgid " symbol offset: %#\n" msgstr " offset symbolu: %#\n" -#: src/readelf.c:8140 +#: src/readelf.c:10646 #, c-format msgid " constant offset: %#\n" msgstr " offset stałej: %#\n" -#: src/readelf.c:8154 +#: src/readelf.c:10660 #, c-format msgid "" "\n" @@ -5600,7 +5845,7 @@ msgstr "" "\n" " Lista CU pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:8179 +#: src/readelf.c:10685 #, c-format msgid "" "\n" @@ -5609,7 +5854,7 @@ msgstr "" "\n" " Lista TU pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:8208 +#: src/readelf.c:10714 #, c-format msgid "" "\n" @@ -5618,7 +5863,7 @@ msgstr "" "\n" " Lista adresów pod offsetem %# zawiera %zu wpisów:\n" -#: src/readelf.c:8241 +#: src/readelf.c:10746 #, c-format msgid "" "\n" @@ -5627,17 +5872,18 @@ msgstr "" "\n" " Tabela symboli pod offsetem %# zawiera %zu gniazd:\n" -#: src/readelf.c:8328 +#: src/readelf.c:10884 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "nie można uzyskać deskryptora kontekstu debugowania: %s" -#: src/readelf.c:8484 src/readelf.c:9106 src/readelf.c:9217 src/readelf.c:9275 +#: src/readelf.c:11247 src/readelf.c:11869 src/readelf.c:11980 +#: src/readelf.c:12038 #, c-format msgid "cannot convert core note data: %s" msgstr "nie można konwertować danych notatki core: %s" -#: src/readelf.c:8847 +#: src/readelf.c:11610 #, c-format msgid "" "\n" @@ -5646,21 +5892,21 @@ msgstr "" "\n" "%*s… …" -#: src/readelf.c:9354 +#: src/readelf.c:12117 msgid " Owner Data size Type\n" msgstr " Właściciel Rozmiar danych Typ\n" -#: src/readelf.c:9372 +#: src/readelf.c:12135 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:9422 -#, c-format -msgid "cannot get content of note section: %s" +#: src/readelf.c:12185 +#, fuzzy, c-format +msgid "cannot get content of note: %s" msgstr "nie można uzyskać zawartości sekcji notatki: %s" -#: src/readelf.c:9449 +#: src/readelf.c:12212 #, c-format msgid "" "\n" @@ -5670,7 +5916,7 @@ msgstr "" "Segment notatki [%2zu] „%s” o długości % bajtów pod offsetem " "%#0:\n" -#: src/readelf.c:9472 +#: src/readelf.c:12235 #, c-format msgid "" "\n" @@ -5679,7 +5925,7 @@ msgstr "" "\n" "Segment notatki o długości % bajtów pod offsetem %#0:\n" -#: src/readelf.c:9518 +#: src/readelf.c:12281 #, c-format msgid "" "\n" @@ -5688,12 +5934,12 @@ msgstr "" "\n" "Sekcja [%zu] „%s” nie ma danych do zrzucenia.\n" -#: src/readelf.c:9545 src/readelf.c:9596 +#: src/readelf.c:12308 src/readelf.c:12359 #, 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:9550 +#: src/readelf.c:12313 #, c-format msgid "" "\n" @@ -5703,7 +5949,7 @@ msgstr "" "Segment zrzutu szesnastkowego [%zu] „%s”, % bajtów pod offsetem " "%#0:\n" -#: src/readelf.c:9555 +#: src/readelf.c:12318 #, c-format msgid "" "\n" @@ -5714,7 +5960,7 @@ msgstr "" "Zrzut szesnastkowy sekcji [%zu] „%s”, % bajtów (%zd " "nieskompresowanych) pod offsetem %#0:\n" -#: src/readelf.c:9569 +#: src/readelf.c:12332 #, c-format msgid "" "\n" @@ -5723,7 +5969,7 @@ msgstr "" "\n" "Sekcja [%zu] „%s” nie ma ciągów do zrzucenia.\n" -#: src/readelf.c:9601 +#: src/readelf.c:12364 #, c-format msgid "" "\n" @@ -5732,7 +5978,7 @@ msgstr "" "\n" "Sekcja ciągów [%zu] „%s” zawiera % bajtów pod offsetem %#0:\n" -#: src/readelf.c:9606 +#: src/readelf.c:12369 #, c-format msgid "" "\n" @@ -5743,7 +5989,7 @@ msgstr "" "Sekcja ciągów [%zu] „%s” zawiera % bajtów (%zd nieskompresowanych) " "pod offsetem %#0:\n" -#: src/readelf.c:9655 +#: src/readelf.c:12418 #, c-format msgid "" "\n" @@ -5752,7 +5998,7 @@ msgstr "" "\n" "sekcja [%lu] nie istnieje" -#: src/readelf.c:9684 +#: src/readelf.c:12447 #, c-format msgid "" "\n" @@ -5761,12 +6007,12 @@ msgstr "" "\n" "sekcja „%s” nie istnieje" -#: src/readelf.c:9741 +#: src/readelf.c:12504 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "nie można uzyskać indeksu symboli archiwum „%s”: %s" -#: src/readelf.c:9744 +#: src/readelf.c:12507 #, c-format msgid "" "\n" @@ -5775,7 +6021,7 @@ msgstr "" "\n" "Archiwum „%s” nie ma indeksu symboli\n" -#: src/readelf.c:9748 +#: src/readelf.c:12511 #, c-format msgid "" "\n" @@ -5784,12 +6030,12 @@ msgstr "" "\n" "Indeks archiwum „%s” ma %zu wpisów:\n" -#: src/readelf.c:9766 +#: src/readelf.c:12529 #, 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:9771 +#: src/readelf.c:12534 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Element archiwum „%s” zawiera:\n" @@ -5862,56 +6108,61 @@ msgstr " (ex %s)" msgid "(TOTALS)\n" msgstr "(CAŁKOWITE)\n" -#: src/stack.c:481 +#: src/stack.c:483 +#, c-format msgid "-p PID should be a positive process id." msgstr "-p PID powinien być dodatnim identyfikatorem procesu." -#: src/stack.c:487 +#: src/stack.c:489 #, c-format msgid "Cannot open core file '%s'" msgstr "Nie można otworzyć pliku core „%s”" -#: src/stack.c:547 +#: src/stack.c:549 +#, c-format msgid "-n MAXFRAMES should be 0 or higher." msgstr "-n MAKSYMALNA_LICZBA_RAMEK powinna wynosić 0 lub więcej." -#: src/stack.c:559 +#: src/stack.c:561 +#, c-format msgid "-e EXEC needs a core given by --core." msgstr "-e PLIK_WYKONYWALNY wymaga pliku core podanego za pomocą opcji --core." -#: src/stack.c:563 +#: src/stack.c:565 +#, c-format msgid "-1 needs a thread id given by -p." msgstr "-1 wymaga identyfikatora wątku podanego za pomocą opcji -p." -#: src/stack.c:567 +#: src/stack.c:569 +#, c-format msgid "One of -p PID or --core COREFILE should be given." msgstr "Tylko jedna z opcji -p PID lub --core PLIK_CORE powinna zostać podana." -#: src/stack.c:637 +#: src/stack.c:641 msgid "Show stack of process PID" msgstr "Wyświetla stos numeru PID procesu" -#: src/stack.c:639 +#: src/stack.c:643 msgid "Show stack found in COREFILE" msgstr "Wyświetla stos odnaleziony w PLIKU_CORE" -#: src/stack.c:640 +#: src/stack.c:644 msgid "(optional) EXECUTABLE that produced COREFILE" msgstr "(opcjonalnie) PLIK_WYKONYWALNY, który utworzył PLIK_CORE" -#: src/stack.c:644 +#: src/stack.c:648 msgid "Output selection options:" msgstr "Opcje wyboru wyjścia:" -#: src/stack.c:646 +#: src/stack.c:650 msgid "Additionally show frame activation" msgstr "Dodatkowo wyświetla aktywację ramki" -#: src/stack.c:648 +#: src/stack.c:652 msgid "Additionally try to lookup DWARF debuginfo name for frame address" msgstr "Dodatkowo próbuje wyszukać nazwy debuginfo DWARF dla adresu ramki" -#: src/stack.c:651 +#: src/stack.c:655 msgid "" "Additionally show inlined function frames using DWARF debuginfo if available " "(implies -d)" @@ -5919,15 +6170,15 @@ msgstr "" "Dodatkowo wyświetla wstawione ramki używając debuginfo DWARF, jeśli jest " "dostępne (zakłada opcję -d)" -#: src/stack.c:653 +#: src/stack.c:657 msgid "Additionally show module file information" msgstr "Dodatkowo wyświetla informacje o pliku modułu" -#: src/stack.c:655 +#: src/stack.c:659 msgid "Additionally show source file information" msgstr "Dodatkowo wyświetla informacje o pliku źródłowym" -#: src/stack.c:657 +#: src/stack.c:661 msgid "" "Show all additional information (activation, debugname, inlines, module and " "source)" @@ -5935,73 +6186,77 @@ msgstr "" "Wyświetla wszystkie dodatkowe informacje (aktywację, nazwę debugowania, " "wstawki, moduł i źródło)" -#: src/stack.c:659 +#: src/stack.c:663 msgid "Do not resolve address to function symbol name" msgstr "Nie rozwiązuje nazw symboli adresów do funkcji" -#: src/stack.c:661 +#: src/stack.c:665 msgid "Show raw function symbol names, do not try to demangle names" msgstr "" "Wyświetla surowe nazwy symboli funkcji, nie próbuje usuwać dekoracji z nazw" -#: src/stack.c:663 +#: src/stack.c:667 msgid "Show module build-id, load address and pc offset" msgstr "Wyświetla identyfikator kopii modułu, wczytuje adres i offset pc" -#: src/stack.c:665 +#: src/stack.c:669 msgid "Show the backtrace of only one thread" msgstr "Wyświetla wyjątek, jeśli jest tylko jeden wątek" -#: src/stack.c:667 +#: src/stack.c:671 msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" msgstr "" "Wyświetla najwyżej MAKSYMALNĄ_LICZBĘ_KLATEK na wątek (domyślnie 256, 0 " "oznacza brak ograniczenia)" -#: src/stack.c:669 +#: src/stack.c:673 msgid "Show module memory map with build-id, elf and debug files detected" msgstr "" "Wyświetla mapę pamięci modułu z identyfikatorem kopii, wykryte pliki elf " "i debug" -#: src/stack.c:677 -msgid "" -"Print a stack for each thread in a process or core file.\vProgram exits with " -"return code 0 if all frames were shown without any errors. If some frames " -"were shown, but there were some non-fatal errors, possibly causing an " -"incomplete backtrace, the program exits with return code 1. If no frames " -"could be shown, or a fatal error occured the program exits with return code " -"2. If the program was invoked with bad or missing arguments it will exit " -"with return code 64." -msgstr "" -"Wyświetla stos dla każdego wątku w procesie lub pliku core.\vProgram kończy " -"działanie z kodem zwrotnym 0, jeśli wszystkie ramki zostały wyświetlone bez " -"żadnych błędów. Jeśli niektóre ramki zostały wyświetlone, ale wystąpiły " -"niekrytyczne błędy, które mogą spowodować niepełny wyjątek, to program " -"kończy działanie z kodem zwrotnym 1. Jeśli żadne ramki nie mogły zostać " -"wyświetlone lub wystąpił krytyczny błąd, to program kończy działanie z kodem " -"zwrotnym 2. Jeśli program został wywołany za pomocą błędnych lub brakujących " -"parametrów, to zakończy on działanie z kodem zwrotnym 64." - -#: src/stack.c:750 +#: src/stack.c:681 +#, fuzzy +msgid "" +"Print a stack for each thread in a process or core file.\n" +"\n" +"Program exits with return code 0 if all frames were shown without any " +"errors. If some frames were shown, but there were some non-fatal errors, " +"possibly causing an incomplete backtrace, the program exits with return code " +"1. If no frames could be shown, or a fatal error occured the program exits " +"with return code 2. If the program was invoked with bad or missing " +"arguments it will exit with return code 64." +msgstr "" +"Wyświetla stos dla każdego wątku w procesie lub pliku core.\n" +"\n" +"Program kończy działanie z kodem zwrotnym 0, jeśli wszystkie ramki zostały " +"wyświetlone bez żadnych błędów. Jeśli niektóre ramki zostały wyświetlone, " +"ale wystąpiły niekrytyczne błędy, które mogą spowodować niepełny wyjątek, to " +"program kończy działanie z kodem zwrotnym 1. Jeśli żadne ramki nie mogły " +"zostać wyświetlone lub wystąpił krytyczny błąd, to program kończy działanie " +"z kodem zwrotnym 2. Jeśli program został wywołany za pomocą błędnych lub " +"brakujących parametrów, to zakończy on działanie z kodem zwrotnym 64." + +#: src/stack.c:756 +#, c-format msgid "Couldn't show any frames." msgstr "Nie można wyświetlić żadnych ramek." -#: src/strings.c:65 +#: src/strings.c:66 msgid "Output Selection:" msgstr "Wybór wyjścia:" -#: src/strings.c:66 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Przeszukuje cały plik, nie tylko wczytane sekcje" -#: src/strings.c:68 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" "Wyświetlane są tylko zakończone NUL sekwencje o MIN-LEN lub większej liczbie " "znaków" -#: src/strings.c:69 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6009,78 +6264,78 @@ msgstr "" "Wybór rozmiaru i kolejności znaków: s = 7 bitów, S = 8 bitów, {b,l} = 16 " "bitów, {B,L} = 32 bity" -#: src/strings.c:73 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Wyświetla nazwę pliku przed każdym ciągiem." -#: src/strings.c:75 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Wyświetla położenie ciągu z podstawą odpowiednio 8, 10 lub 16." -#: src/strings.c:76 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Alias dla --radix=o" #. Short description of program. -#: src/strings.c:83 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Wyświetla ciągi znaków drukowalnych w plikach." -#: src/strings.c:256 src/strings.c:291 +#: src/strings.c:257 src/strings.c:292 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "nieprawidłowa wartość „%s” dla parametru %s" -#: src/strings.c:302 +#: src/strings.c:303 #, c-format msgid "invalid minimum length of matched string size" msgstr "nieprawidłowa minimalna długość dopasowanego rozmiaru ciągu" -#: src/strings.c:585 +#: src/strings.c:586 #, c-format msgid "lseek failed" msgstr "lseek się nie powiodło" -#: src/strings.c:602 src/strings.c:666 +#: src/strings.c:603 src/strings.c:667 #, c-format msgid "re-mmap failed" msgstr "ponowne mmap się nie powiodło" -#: src/strings.c:639 +#: src/strings.c:640 #, c-format msgid "mprotect failed" msgstr "mprotect się nie powiodło" -#: src/strings.c:728 +#: src/strings.c:729 #, c-format msgid "Skipping section %zd '%s' data outside file" msgstr "Pomijanie sekcji %zd „%s” dane poza plikiem" -#: src/strip.c:68 +#: src/strip.c:71 msgid "Place stripped output into FILE" msgstr "Umieszcza okrojone wyjście w PLIKU" -#: src/strip.c:69 +#: src/strip.c:72 msgid "Extract the removed sections into FILE" msgstr "Wydobywa usunięte sekcje do PLIKU" -#: src/strip.c:70 +#: src/strip.c:73 msgid "Embed name FILE instead of -f argument" msgstr "Osadza nazwę PLIKU zamiast parametru -f" -#: src/strip.c:74 +#: src/strip.c:77 msgid "Remove all debugging symbols" msgstr "Usuwa wszystkie symbole debugowania" -#: src/strip.c:78 +#: src/strip.c:81 msgid "Remove section headers (not recommended)" msgstr "Usuwa nagłówki sekcji (niezalecane)" -#: src/strip.c:80 +#: src/strip.c:83 msgid "Copy modified/access timestamps to the output" msgstr "Kopiuje czasy modyfikacji/dostępu do wyjścia" -#: src/strip.c:82 +#: src/strip.c:85 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " @@ -6090,51 +6345,63 @@ msgstr "" "usunięte sekcje zostały umieszczone w pliku debugowania (ma znaczenie tylko " "dla plików ET_REL, działanie jest nieodwracalne, wymaga użycia opcji -f)" -#: src/strip.c:84 +#: src/strip.c:87 msgid "Remove .comment section" msgstr "Usuwa sekcję .comment" +#: src/strip.c:88 +msgid "" +"Remove the named section. SECTION is an extended wildcard pattern. May be " +"given more than once. Only non-allocated sections can be removed." +msgstr "" + +#: src/strip.c:89 +msgid "" +"Keep the named section. SECTION is an extended wildcard pattern. May be " +"given more than once." +msgstr "" + #. Short description of program. -#: src/strip.c:92 +#: src/strip.c:96 msgid "Discard symbols from object files." msgstr "Odrzuca symbole z plików obiektów." -#: src/strip.c:186 +#: src/strip.c:242 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "Użyto --reloc-debug-sections bez opcji -f" -#: src/strip.c:200 +#: src/strip.c:256 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "Tylko jeden plik wejściowy jest dozwolony z „-o” i „-f”" -#: src/strip.c:222 +#: src/strip.c:279 #, c-format msgid "-f option specified twice" msgstr "Opcję -f podano dwukrotnie" -#: src/strip.c:231 +#: src/strip.c:288 #, c-format msgid "-F option specified twice" msgstr "Opcję -F podano dwukrotnie" -#: src/strip.c:264 -#, c-format -msgid "-R option supports only .comment section" -msgstr "Opcja -R obsługuje tylko sekcję .comment" +#: src/strip.c:347 +#, fuzzy, c-format +msgid "cannot both keep and remove .comment section" +msgstr "Usuwa sekcję .comment" -#: src/strip.c:306 src/strip.c:330 +#: src/strip.c:372 src/strip.c:396 #, c-format msgid "cannot stat input file '%s'" msgstr "nie można wykonać stat na pliku wejściowym „%s”" -#: src/strip.c:320 +#: src/strip.c:386 #, c-format msgid "while opening '%s'" msgstr "podczas otwierania „%s”" -#: src/strip.c:358 +#: src/strip.c:424 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "%s: nie można używać -o lub -f podczas okrajania archiwum" @@ -6145,107 +6412,117 @@ msgstr "%s: nie można używać -o lub -f podczas okrajania archiwum" #. result = handle_ar (fd, elf, NULL, fname, #. preserve_dates ? tv : NULL); #. -#: src/strip.c:370 +#: src/strip.c:436 #, c-format msgid "%s: no support for stripping archive" msgstr "%s: brak obsługi okrajania archiwum" -#: src/strip.c:469 +#: src/strip.c:535 #, c-format msgid "cannot open EBL backend" msgstr "nie można otworzyć zaplecza EBL" -#: src/strip.c:514 +#: src/strip.c:580 #, c-format msgid "cannot get number of phdrs" msgstr "nie można uzyskać liczby phdr" -#: src/strip.c:530 src/strip.c:554 +#: src/strip.c:596 src/strip.c:620 #, c-format msgid "cannot create new file '%s': %s" msgstr "nie można utworzyć nowego pliku „%s”: %s" -#: src/strip.c:620 +#: src/strip.c:686 #, c-format msgid "illformed file '%s'" msgstr "plik „%s” ma błędny format" -#: src/strip.c:954 src/strip.c:1053 +#: src/strip.c:696 +#, fuzzy, c-format +msgid "Cannot remove allocated section '%s'" +msgstr "nie można przydzielić danych sekcji: %s" + +#: src/strip.c:705 +#, fuzzy, c-format +msgid "Cannot both keep and remove section '%s'" +msgstr "nie można dodać nowej sekcji: %s" + +#: src/strip.c:1061 src/strip.c:1160 #, c-format msgid "while generating output file: %s" msgstr "podczas tworzenia pliku wyjściowego: %s" -#: src/strip.c:1019 src/strip.c:2089 +#: src/strip.c:1126 src/strip.c:2208 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: błąd podczas tworzenia nagłówka ELF: %s" -#: src/strip.c:1036 +#: src/strip.c:1143 #, c-format msgid "while preparing output for '%s'" msgstr "podczas przygotowywania wyjścia dla „%s”" -#: src/strip.c:1094 src/strip.c:1157 +#: src/strip.c:1205 src/strip.c:1268 #, c-format msgid "while create section header section: %s" msgstr "podczas tworzenia sekcji nagłówka sekcji: %s" -#: src/strip.c:1103 +#: src/strip.c:1214 #, c-format msgid "cannot allocate section data: %s" msgstr "nie można przydzielić danych sekcji: %s" -#: src/strip.c:1169 +#: src/strip.c:1280 #, c-format msgid "while create section header string table: %s" msgstr "podczas tworzenia tabeli ciągów nagłówka sekcji: %s" -#: src/strip.c:1176 +#: src/strip.c:1287 #, c-format msgid "no memory to create section header string table" msgstr "brak pamięci do utworzenia tabeli ciągów nagłówka sekcji" -#: src/strip.c:1383 +#: src/strip.c:1497 #, c-format msgid "Cannot remove symbol [%zd] from allocated symbol table [%zd]" msgstr "Nie można usunąć symbolu [%zd] z przydzielonej tabeli symboli [%zd]" -#: src/strip.c:1875 +#: src/strip.c:1994 #, c-format msgid "bad relocation" msgstr "błędna relokacja" -#: src/strip.c:2000 src/strip.c:2113 +#: src/strip.c:2119 src/strip.c:2232 #, c-format msgid "while writing '%s': %s" msgstr "podczas zapisywania „%s”: %s" -#: src/strip.c:2011 +#: src/strip.c:2130 #, c-format msgid "while creating '%s'" msgstr "podczas tworzenia „%s”" -#: src/strip.c:2034 +#: src/strip.c:2153 #, c-format msgid "while computing checksum for debug information" msgstr "podczas obliczania sumy kontrolnej dla informacji debugowania" -#: src/strip.c:2098 +#: src/strip.c:2217 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: błąd podczas odczytywania pliku: %s" -#: src/strip.c:2138 src/strip.c:2158 +#: src/strip.c:2257 src/strip.c:2277 #, c-format msgid "while writing '%s'" msgstr "podczas zapisywania „%s”" -#: src/strip.c:2195 src/strip.c:2202 +#: src/strip.c:2314 src/strip.c:2321 #, c-format msgid "error while finishing '%s': %s" msgstr "błąd podczas kończenia „%s”: %s" -#: src/strip.c:2219 src/strip.c:2291 +#: src/strip.c:2338 src/strip.c:2414 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "nie można ustawić czasu dostępu i modyfikacji „%s”" @@ -6333,12 +6610,12 @@ 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:249 src/unstrip.c:1930 src/unstrip.c:1973 +#: src/unstrip.c:249 src/unstrip.c:1933 src/unstrip.c:1976 #, c-format msgid "cannot get number of program headers: %s" msgstr "nie można uzyskać liczby nagłówków programu: %s" -#: src/unstrip.c:254 src/unstrip.c:1934 +#: src/unstrip.c:254 src/unstrip.c:1937 #, c-format msgid "cannot create program headers: %s" msgstr "nie można utworzyć nagłówków programu: %s" @@ -6353,12 +6630,12 @@ msgstr "nie można skopiować nagłówka programu: %s" msgid "cannot copy section header: %s" msgstr "nie można skopiować nagłówka sekcji: %s" -#: src/unstrip.c:273 src/unstrip.c:1565 +#: src/unstrip.c:273 src/unstrip.c:1568 #, c-format msgid "cannot get section data: %s" msgstr "nie można uzyskać danych sekcji: %s" -#: src/unstrip.c:275 src/unstrip.c:1567 +#: src/unstrip.c:275 src/unstrip.c:1570 #, c-format msgid "cannot copy section data: %s" msgstr "nie można skopiować danych sekcji: %s" @@ -6368,13 +6645,13 @@ msgstr "nie można skopiować danych sekcji: %s" msgid "cannot create directory '%s'" msgstr "nie można utworzyć katalogu „%s”" -#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1599 +#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1602 #, c-format msgid "cannot get symbol table entry: %s" msgstr "nie można uzyskać wpisu tabeli symboli: %s" #: src/unstrip.c:387 src/unstrip.c:608 src/unstrip.c:629 src/unstrip.c:641 -#: src/unstrip.c:1620 src/unstrip.c:1796 src/unstrip.c:1820 +#: src/unstrip.c:1623 src/unstrip.c:1799 src/unstrip.c:1823 #, c-format msgid "cannot update symbol table: %s" msgstr "nie można zaktualizować tabeli symboli: %s" @@ -6404,106 +6681,106 @@ msgstr "nieoczekiwany typ sekcji w [%zu] z sh_link do tabeli symboli" msgid "invalid string offset in symbol [%zu]" msgstr "nieprawidłowy offset ciągu w symbolu [%zu]" -#: src/unstrip.c:955 src/unstrip.c:1302 +#: src/unstrip.c:955 src/unstrip.c:1305 #, c-format msgid "cannot read section [%zu] name: %s" msgstr "nie można odczytać nazwy sekcji [%zu]: %s" -#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1050 +#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1053 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "nie można odczytać sekcji „.gnu.prelink_undo”: %s" -#: src/unstrip.c:1036 -#, c-format -msgid "invalid contents in '%s' section" -msgstr "nieprawidłowa zawartość w sekcji „%s”" - -#: src/unstrip.c:1042 +#: src/unstrip.c:1033 #, c-format msgid "overflow with shnum = %zu in '%s' section" msgstr "przepełnienie z shnum = %zu w sekcji „%s”" -#: src/unstrip.c:1096 src/unstrip.c:1424 +#: src/unstrip.c:1044 +#, c-format +msgid "invalid contents in '%s' section" +msgstr "nieprawidłowa zawartość w sekcji „%s”" + +#: src/unstrip.c:1099 src/unstrip.c:1427 #, c-format msgid "cannot find matching section for [%zu] '%s'" msgstr "nie można odnaleźć pasującej sekcji dla [%zu] „%s”" -#: src/unstrip.c:1221 src/unstrip.c:1236 src/unstrip.c:1503 src/unstrip.c:1755 +#: src/unstrip.c:1224 src/unstrip.c:1239 src/unstrip.c:1506 src/unstrip.c:1758 #, 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:1245 +#: src/unstrip.c:1248 #, 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:1273 src/unstrip.c:1277 +#: src/unstrip.c:1276 src/unstrip.c:1280 #, 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:1281 src/unstrip.c:1285 src/unstrip.c:1518 +#: src/unstrip.c:1284 src/unstrip.c:1288 src/unstrip.c:1521 #, c-format msgid "cannot get section count: %s" msgstr "nie można uzyskać licznika sekcji: %s" -#: src/unstrip.c:1288 +#: src/unstrip.c:1291 #, 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:1347 src/unstrip.c:1439 +#: src/unstrip.c:1350 src/unstrip.c:1442 #, 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:1497 +#: src/unstrip.c:1500 #, c-format msgid "cannot add new section: %s" msgstr "nie można dodać nowej sekcji: %s" -#: src/unstrip.c:1607 +#: src/unstrip.c:1610 #, c-format msgid "symbol [%zu] has invalid section index" msgstr "symbol [%zu] ma nieprawidłowy indeks sekcji" -#: src/unstrip.c:1891 +#: src/unstrip.c:1894 #, c-format msgid "cannot read section data: %s" msgstr "nie można odczytać danych sekcji: %s" -#: src/unstrip.c:1912 +#: src/unstrip.c:1915 #, c-format msgid "cannot get ELF header: %s" msgstr "nie można uzyskać nagłówka ELF: %s" -#: src/unstrip.c:1920 +#: src/unstrip.c:1923 #, c-format msgid "cannot update ELF header: %s" msgstr "nie można zaktualizować nagłówka ELF: %s" -#: src/unstrip.c:1944 +#: src/unstrip.c:1947 #, c-format msgid "cannot update program header: %s" msgstr "nie można zaktualizować nagłówka programu: %s" -#: src/unstrip.c:1949 src/unstrip.c:2031 +#: src/unstrip.c:1952 src/unstrip.c:2034 #, c-format msgid "cannot write output file: %s" msgstr "nie można zapisać pliku wyjściowego: %s" -#: src/unstrip.c:2000 +#: src/unstrip.c:2003 #, 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:2003 +#: src/unstrip.c:2006 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6511,77 +6788,77 @@ msgstr "" "Dane DWARF w „%s” nie zostały dostosowane do przesunięcia wczesnego " "konsolidowania; proszę rozważyć polecenie prelink -u" -#: src/unstrip.c:2022 src/unstrip.c:2073 src/unstrip.c:2085 src/unstrip.c:2171 +#: src/unstrip.c:2025 src/unstrip.c:2076 src/unstrip.c:2088 src/unstrip.c:2174 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "nie można utworzyć deskryptora ELF: %s" -#: src/unstrip.c:2064 +#: src/unstrip.c:2067 msgid "WARNING: " msgstr "OSTRZEŻENIE: " -#: src/unstrip.c:2066 +#: src/unstrip.c:2069 msgid ", use --force" msgstr ", należy użyć opcji --force" -#: src/unstrip.c:2089 +#: src/unstrip.c:2092 msgid "ELF header identification (e_ident) different" msgstr "Różna identyfikacja nagłówka ELF (e_ident)" -#: src/unstrip.c:2092 +#: src/unstrip.c:2095 msgid "ELF header type (e_type) different" msgstr "Różne typy nagłówka ELF (e_type)" -#: src/unstrip.c:2095 +#: src/unstrip.c:2098 msgid "ELF header machine type (e_machine) different" msgstr "Różne typy maszyny nagłówka ELF (e_machine)" -#: src/unstrip.c:2098 +#: src/unstrip.c:2101 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "okrojony nagłówek programu (e_phnum) jest mniejszy niż nieokrojony" -#: src/unstrip.c:2128 +#: src/unstrip.c:2131 #, 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:2132 +#: src/unstrip.c:2135 #, 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:2147 +#: src/unstrip.c:2150 #, 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:2151 +#: src/unstrip.c:2154 #, 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:2164 +#: src/unstrip.c:2167 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "moduł „%s” pliku „%s” nie został okrojony" -#: src/unstrip.c:2195 +#: src/unstrip.c:2198 #, 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:2328 +#: src/unstrip.c:2331 #, c-format msgid "no matching modules found" msgstr "nie odnaleziono pasujących modułów" -#: src/unstrip.c:2337 +#: src/unstrip.c:2340 #, c-format msgid "matched more than one module" msgstr "pasuje więcej niż jeden moduł" -#: src/unstrip.c:2381 +#: src/unstrip.c:2384 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6589,10 +6866,12 @@ msgstr "" "OKROJONY-PLIK PLIK-DEBUGOWANIA\n" "[MODUŁ…]" -#: src/unstrip.c:2382 +#: src/unstrip.c:2385 +#, fuzzy 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" +"Combine stripped files with separate symbols and debug information.\n" +"\n" +"The first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" "With -f these match the file name of the main (stripped) file (slashes are " @@ -6615,9 +6894,10 @@ msgid "" "file. DEBUGFILE is the separate debuginfo file name, or - if no debuginfo " "was found, or . if FILE contains the debug information." msgstr "" -"Łączy okrojone pliki z oddzielnymi symbolami i informacjami debugowania." -"\vPierwsza forma umieszcza wynik w PLIKU-DEBUGOWANIA, jeśli nie podano opcji " -"-o.\n" +"Łączy okrojone pliki z oddzielnymi symbolami i informacjami debugowania.\n" +"\n" +"Pierwsza forma umieszcza wynik w PLIKU-DEBUGOWANIA, jeśli nie podano opcji -" +"o.\n" "\n" "Parametr MODUŁ podaje wzorce nazw plików dopasowujące moduły do procesów.\n" "Za pomocą opcji -f dopasowuje nazwę głównego (okrojonego) pliku (ukośniki " @@ -6642,7 +6922,7 @@ msgstr "" "jest nazwą oddzielnego pliku debuginfo lub „-”, jeśli nie odnaleziono " "debuginfo lub „.”, jeśli PLIK zawiera informacje debugowania." -#: tests/backtrace.c:430 +#: tests/backtrace.c:442 msgid "Run executable" msgstr "Uruchamia plik wykonywalny" @@ -6653,3 +6933,66 @@ msgstr "Dodatkowo wyświetla nazwy funkcji" #: tests/dwflmodtest.c:214 msgid "Show instances of inlined functions" msgstr "Wyświetla wystąpienia wstawionych funkcji" + +#~ msgid "%s+%# <%s+%#>" +#~ msgstr "%s+%# <%s+%#>" + +#~ msgid "%s+%#0* <%s+%#>" +#~ msgstr "%s+%#0* <%s+%#>" + +#~ msgid "%# <%s+%#>" +#~ msgstr "%# <%s+%#>" + +#~ msgid "%#0* <%s+%#>" +#~ msgstr "%#0* <%s+%#>" + +#~ msgid "%s+%# <%s>" +#~ msgstr "%s+%# <%s>" + +#~ msgid "%s+%#0* <%s>" +#~ msgstr "%s+%#0* <%s>" + +#~ msgid "%# <%s>" +#~ msgstr "%# <%s>" + +#~ msgid "%#0* <%s>" +#~ msgstr "%#0* <%s>" + +#~ msgid "%s+%#" +#~ msgstr "%s+%#" + +#~ msgid "%s+%#0*" +#~ msgstr "%s+%#0*" + +#~ msgid " %s..%s (%)\n" +#~ msgstr " %s..%s (%)\n" + +#~ msgid " %s..%s\n" +#~ msgstr " %s..%s\n" + +#~ 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" + +#~ 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" + +#~ msgid " [%6tx] %s..%s\n" +#~ msgstr " [%6tx] %s…%s\n" + +#~ msgid " %s..%s\n" +#~ msgstr " %s…%s\n" + +#~ msgid "cannot get DIE at offset % in section '%s': %s" +#~ msgstr "nie można uzyskać DIE pod offsetem % w sekcji „%s”: %s" + +#~ msgid " [%6tx] %s..%s" +#~ msgstr " [%6tx] %s…%s" + +#~ msgid " %s..%s" +#~ msgstr " %s…%s" + +#~ msgid "vendor opcode not verified?" +#~ msgstr "instrukcja producenta nie została sprawdzona?" + +#~ msgid "-R option supports only .comment section" +#~ msgstr "Opcja -R obsługuje tylko sekcję .comment" diff --git a/po/ru.po b/po/ru.po index 1040653b..99505d64 100644 --- a/po/ru.po +++ b/po/ru.po @@ -5639,7 +5639,7 @@ msgstr "" #: src/unstrip.c:2248 msgid "" -"Combine stripped files with separate symbols and debug information.\vThe " +"Combine stripped files with separate symbols and debug information.\n\nThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" diff --git a/po/uk.po b/po/uk.po index 420672ba..a8dcb20f 100644 --- a/po/uk.po +++ b/po/uk.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: https://sourceware.org/bugzilla/\n" -"POT-Creation-Date: 2016-12-27 15:20+0100\n" +"POT-Creation-Date: 2018-06-29 20:47+0200\n" "PO-Revision-Date: 2015-09-26 16:41+0300\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" @@ -41,23 +41,35 @@ msgstr "" " - «never», «no», «none»\n" " - «auto», «tty», «if-tty»\n" -#: lib/color.c:190 src/objdump.c:725 +#: lib/color.c:190 src/objdump.c:727 #, c-format msgid "cannot allocate memory" msgstr "не вдалося розподілити пам’ять" -#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3294 -#: src/readelf.c:3685 src/readelf.c:8433 src/unstrip.c:2224 src/unstrip.c:2429 +#: lib/printversion.c:40 +#, fuzzy, c-format +msgid "" +"Copyright (C) %s The elfutils developers <%s>.\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" +msgstr "" +"© Red Hat, Inc., %s\n" +"Це програмне забезпечення є вільним, умови копіювання викладено у його " +"початкових кодах. Умовами ліцензування програми НЕ передбачено жодних " +"гарантій, зокрема гарантій працездатності або придатності для певної мети.\n" + +#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3395 +#: src/readelf.c:11196 src/unstrip.c:2227 src/unstrip.c:2433 #, c-format msgid "memory exhausted" msgstr "пам’ять вичерпано" -#: libasm/asm_error.c:65 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:53 +#: libasm/asm_error.c:65 libdw/dwarf_error.c:57 libdwfl/libdwflP.h:50 #: libelf/elf_error.c:60 msgid "no error" msgstr "без помилок" -#: libasm/asm_error.c:66 libdw/dwarf_error.c:68 libdwfl/libdwflP.h:55 +#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:52 #: libelf/elf_error.c:91 msgid "out of memory" msgstr "нестача пам'яті" @@ -94,176 +106,217 @@ msgstr "помилка під час спроби виведення даних" msgid "no backend support available" msgstr "підтримки серверів не передбачено" -#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:54 +#: libasm/asm_error.c:83 libdw/dwarf_error.c:58 libdwfl/libdwflP.h:51 #: libelf/elf_error.c:63 msgid "unknown error" msgstr "невідома помилка" -#: libdw/dwarf_error.c:60 +#: libdw/dwarf_error.c:59 msgid "invalid access" msgstr "некоректний доступ" -#: libdw/dwarf_error.c:61 +#: libdw/dwarf_error.c:60 msgid "no regular file" msgstr "не є звичайним файлом" -#: libdw/dwarf_error.c:62 +#: libdw/dwarf_error.c:61 msgid "I/O error" msgstr "помилка вводу/виводу" -#: libdw/dwarf_error.c:63 +#: libdw/dwarf_error.c:62 msgid "invalid ELF file" msgstr "некоректний файл ELF" -#: libdw/dwarf_error.c:64 +#: libdw/dwarf_error.c:63 msgid "no DWARF information" msgstr "немає відомостей DWARF" -#: libdw/dwarf_error.c:65 +#: libdw/dwarf_error.c:64 msgid "cannot decompress DWARF" msgstr "не вдалося розпакувати DWARF" -#: libdw/dwarf_error.c:66 +#: libdw/dwarf_error.c:65 msgid "no ELF file" msgstr "немає файла ELF" -#: libdw/dwarf_error.c:67 +#: libdw/dwarf_error.c:66 msgid "cannot get ELF header" msgstr "не вдалося отримати заголовок ELF" -#: libdw/dwarf_error.c:69 +#: libdw/dwarf_error.c:68 msgid "not implemented" msgstr "не реалізовано" -#: libdw/dwarf_error.c:70 libelf/elf_error.c:107 libelf/elf_error.c:155 +#: libdw/dwarf_error.c:69 libelf/elf_error.c:111 libelf/elf_error.c:159 msgid "invalid command" msgstr "некоректна команда" -#: libdw/dwarf_error.c:71 +#: libdw/dwarf_error.c:70 msgid "invalid version" msgstr "некоректна версія" -#: libdw/dwarf_error.c:72 +#: libdw/dwarf_error.c:71 msgid "invalid file" msgstr "некоректний файл" -#: libdw/dwarf_error.c:73 +#: libdw/dwarf_error.c:72 msgid "no entries found" msgstr "запис не знайдено" -#: libdw/dwarf_error.c:74 +#: libdw/dwarf_error.c:73 msgid "invalid DWARF" msgstr "некоректний запис DWARF" -#: libdw/dwarf_error.c:75 +#: libdw/dwarf_error.c:74 msgid "no string data" msgstr "немає рядкових даних" +#: libdw/dwarf_error.c:75 +#, fuzzy +msgid ".debug_str section missing" +msgstr "немає розділу .debug_ranges" + #: libdw/dwarf_error.c:76 +#, fuzzy +msgid ".debug_line_str section missing" +msgstr "немає розділу .debug_line" + +#: libdw/dwarf_error.c:77 +#, fuzzy +msgid ".debug_str_offsets section missing" +msgstr "немає розділу .debug_ranges" + +#: libdw/dwarf_error.c:78 msgid "no address value" msgstr "немає значення адреси" -#: libdw/dwarf_error.c:77 +#: libdw/dwarf_error.c:79 msgid "no constant value" msgstr "немає значення сталої" -#: libdw/dwarf_error.c:78 +#: libdw/dwarf_error.c:80 msgid "no reference value" msgstr "немає значення для порівняння" -#: libdw/dwarf_error.c:79 +#: libdw/dwarf_error.c:81 msgid "invalid reference value" msgstr "некоректне значення для порівняння" -#: libdw/dwarf_error.c:80 +#: libdw/dwarf_error.c:82 msgid ".debug_line section missing" msgstr "немає розділу .debug_line" -#: libdw/dwarf_error.c:81 +#: libdw/dwarf_error.c:83 msgid "invalid .debug_line section" msgstr "некоректний розділ .debug_line" -#: libdw/dwarf_error.c:82 +#: libdw/dwarf_error.c:84 msgid "debug information too big" msgstr "занадто великі відомості для діагностики" -#: libdw/dwarf_error.c:83 +#: libdw/dwarf_error.c:85 msgid "invalid DWARF version" msgstr "некоректна версія DWARF" -#: libdw/dwarf_error.c:84 +#: libdw/dwarf_error.c:86 msgid "invalid directory index" msgstr "некоректний покажчик каталогу" -#: libdw/dwarf_error.c:85 libdwfl/libdwflP.h:74 +#: libdw/dwarf_error.c:87 libdwfl/libdwflP.h:71 msgid "address out of range" msgstr "некоректна адреса" -#: libdw/dwarf_error.c:86 -msgid "no location list value" +#: libdw/dwarf_error.c:88 +#, fuzzy +msgid ".debug_loc section missing" +msgstr "немає розділу .debug_line" + +#: libdw/dwarf_error.c:89 +#, fuzzy +msgid ".debug_loclists section missing" +msgstr "немає розділу .debug_line" + +#: libdw/dwarf_error.c:90 +#, fuzzy +msgid "not a location list value" msgstr "немає значення списку адрес" -#: libdw/dwarf_error.c:87 +#: libdw/dwarf_error.c:91 msgid "no block data" msgstr "немає блокових даних" -#: libdw/dwarf_error.c:88 +#: libdw/dwarf_error.c:92 msgid "invalid line index" msgstr "некоректний номер рядка" -#: libdw/dwarf_error.c:89 +#: libdw/dwarf_error.c:93 msgid "invalid address range index" msgstr "некоректний індекс діапазону адрес" -#: libdw/dwarf_error.c:90 libdwfl/libdwflP.h:75 +#: libdw/dwarf_error.c:94 libdwfl/libdwflP.h:72 msgid "no matching address range" msgstr "не виявлено відповідного діапазону адрес" -#: libdw/dwarf_error.c:91 +#: libdw/dwarf_error.c:95 msgid "no flag value" msgstr "немає значення прапорця" -#: libdw/dwarf_error.c:92 libelf/elf_error.c:232 +#: libdw/dwarf_error.c:96 libelf/elf_error.c:236 msgid "invalid offset" msgstr "некоректне значення зміщення" -#: libdw/dwarf_error.c:93 +#: libdw/dwarf_error.c:97 msgid ".debug_ranges section missing" msgstr "немає розділу .debug_ranges" -#: libdw/dwarf_error.c:94 +#: libdw/dwarf_error.c:98 +#, fuzzy +msgid ".debug_rnglists section missing" +msgstr "немає розділу .debug_ranges" + +#: libdw/dwarf_error.c:99 msgid "invalid CFI section" msgstr "некоректний розділ CFI" -#: libdw/dwarf_error.c:95 +#: libdw/dwarf_error.c:100 msgid "no alternative debug link found" msgstr "альтернативного діагностичного посилання не знайдено" -#: libdw/dwarf_error.c:96 +#: libdw/dwarf_error.c:101 msgid "invalid opcode" msgstr "некоректний код операції" -#: libdw/dwarf_error.c:97 +#: libdw/dwarf_error.c:102 msgid "not a CU (unit) DIE" msgstr "не є DIE CU (модуля)" -#: libdwfl/argp-std.c:46 src/stack.c:635 src/unstrip.c:2371 +#: libdw/dwarf_error.c:103 +#, fuzzy +msgid "unknown language code" +msgstr " невідомий код операції" + +#: libdw/dwarf_error.c:104 +#, fuzzy +msgid ".debug_addr section missing" +msgstr "немає розділу .debug_ranges" + +#: libdwfl/argp-std.c:50 src/stack.c:639 src/unstrip.c:2374 msgid "Input selection options:" msgstr "Вибір параметрів виведення даних:" -#: libdwfl/argp-std.c:47 +#: libdwfl/argp-std.c:51 msgid "Find addresses in FILE" msgstr "Знайти адреси у ФАЙЛІ" -#: libdwfl/argp-std.c:49 +#: libdwfl/argp-std.c:53 msgid "Find addresses from signatures found in COREFILE" msgstr "Знайти адреси за сигнатурами з файла COREFILE" -#: libdwfl/argp-std.c:51 +#: libdwfl/argp-std.c:55 msgid "Find addresses in files mapped into process PID" msgstr "Знайти адреси у файлах, відображених на процес з PID" -#: libdwfl/argp-std.c:53 +#: libdwfl/argp-std.c:57 msgid "" "Find addresses in files mapped as read from FILE in Linux /proc/PID/maps " "format" @@ -271,199 +324,199 @@ msgstr "" "Знайти адреси у файлах, відображених як read за ФАЙЛОМ у форматі /proc/PID/" "maps Linux" -#: libdwfl/argp-std.c:55 +#: libdwfl/argp-std.c:59 msgid "Find addresses in the running kernel" msgstr "Знайти адреси у запущеному ядрі" -#: libdwfl/argp-std.c:57 +#: libdwfl/argp-std.c:61 msgid "Kernel with all modules" msgstr "Ядро з усіма модулями" -#: libdwfl/argp-std.c:59 src/stack.c:642 +#: libdwfl/argp-std.c:63 src/stack.c:646 msgid "Search path for separate debuginfo files" msgstr "Шукати у вказаному каталозі окремі файли debuginfo" -#: libdwfl/argp-std.c:157 +#: libdwfl/argp-std.c:164 msgid "only one of -e, -p, -k, -K, or --core allowed" msgstr "" "можна використовувати лише один за параметрів: -e, -p, -k, -K або --core" -#: libdwfl/argp-std.c:230 +#: libdwfl/argp-std.c:237 msgid "cannot load kernel symbols" msgstr "не вдалося завантажити символи ядра" #. Non-fatal to have no modules since we do have the kernel. -#: libdwfl/argp-std.c:234 +#: libdwfl/argp-std.c:241 msgid "cannot find kernel modules" msgstr "не вдалося виявити модулі ядра" -#: libdwfl/argp-std.c:251 +#: libdwfl/argp-std.c:258 msgid "cannot find kernel or modules" msgstr "не вдалося виявити ядро або модулі" -#: libdwfl/argp-std.c:290 +#: libdwfl/argp-std.c:297 #, c-format msgid "cannot read ELF core file: %s" msgstr "не вдалося прочитати файл core ELF: %s" -#: libdwfl/argp-std.c:313 +#: libdwfl/argp-std.c:320 #, fuzzy msgid "Not enough memory" msgstr "нестача пам'яті" -#: libdwfl/argp-std.c:323 +#: libdwfl/argp-std.c:330 msgid "No modules recognized in core file" msgstr "Не вдалося виявити модулі у файлі core" -#: libdwfl/libdwflP.h:56 +#: libdwfl/libdwflP.h:53 msgid "See errno" msgstr "Див. errno" -#: libdwfl/libdwflP.h:57 +#: libdwfl/libdwflP.h:54 msgid "See elf_errno" msgstr "Див. elf_errno" -#: libdwfl/libdwflP.h:58 +#: libdwfl/libdwflP.h:55 msgid "See dwarf_errno" msgstr "Див. dwarf_errno" -#: libdwfl/libdwflP.h:59 +#: libdwfl/libdwflP.h:56 msgid "See ebl_errno (XXX missing)" msgstr "Див. ebl_errno (не виявлено XXX)" -#: libdwfl/libdwflP.h:60 +#: libdwfl/libdwflP.h:57 msgid "gzip decompression failed" msgstr "Помилка під час спроби видобування з gzip" -#: libdwfl/libdwflP.h:61 +#: libdwfl/libdwflP.h:58 msgid "bzip2 decompression failed" msgstr "Помилка під час спроби видобування з bzip2" -#: libdwfl/libdwflP.h:62 +#: libdwfl/libdwflP.h:59 msgid "LZMA decompression failed" msgstr "Помилка під час спроби видобування з LZMA" -#: libdwfl/libdwflP.h:63 +#: libdwfl/libdwflP.h:60 msgid "no support library found for machine" msgstr "у системі не виявлено бібліотеки підтримки" -#: libdwfl/libdwflP.h:64 +#: libdwfl/libdwflP.h:61 msgid "Callbacks missing for ET_REL file" msgstr "Немає зворотних викликів для файла ET_REL" -#: libdwfl/libdwflP.h:65 +#: libdwfl/libdwflP.h:62 msgid "Unsupported relocation type" msgstr "Непідтримуваний тип пересування" -#: libdwfl/libdwflP.h:66 +#: libdwfl/libdwflP.h:63 msgid "r_offset is bogus" msgstr "r_offset є фіктивним" -#: libdwfl/libdwflP.h:67 libelf/elf_error.c:111 libelf/elf_error.c:171 +#: libdwfl/libdwflP.h:64 libelf/elf_error.c:115 libelf/elf_error.c:175 msgid "offset out of range" msgstr "перевищення можливого зміщення" -#: libdwfl/libdwflP.h:68 +#: libdwfl/libdwflP.h:65 msgid "relocation refers to undefined symbol" msgstr "пересування посилається на невизначений символ." -#: libdwfl/libdwflP.h:69 +#: libdwfl/libdwflP.h:66 msgid "Callback returned failure" msgstr "Зворотним викликом повернуто помилку" -#: libdwfl/libdwflP.h:70 +#: libdwfl/libdwflP.h:67 msgid "No DWARF information found" msgstr "Не виявлено відомостей DWARF" -#: libdwfl/libdwflP.h:71 +#: libdwfl/libdwflP.h:68 msgid "No symbol table found" msgstr "Не виявлено таблиці символів" -#: libdwfl/libdwflP.h:72 +#: libdwfl/libdwflP.h:69 msgid "No ELF program headers" msgstr "Немає заголовків програми ELF" -#: libdwfl/libdwflP.h:73 +#: libdwfl/libdwflP.h:70 msgid "address range overlaps an existing module" msgstr "діапазон адрес перекриває існуючий модуль" -#: libdwfl/libdwflP.h:76 +#: libdwfl/libdwflP.h:73 msgid "image truncated" msgstr "образ обрізано" -#: libdwfl/libdwflP.h:77 +#: libdwfl/libdwflP.h:74 msgid "ELF file opened" msgstr "Відкритий файл ELF" -#: libdwfl/libdwflP.h:78 +#: libdwfl/libdwflP.h:75 msgid "not a valid ELF file" msgstr "не є коректним файлом ELF" -#: libdwfl/libdwflP.h:79 +#: libdwfl/libdwflP.h:76 msgid "cannot handle DWARF type description" msgstr "не вдалося обробити опис типу DWARF" -#: libdwfl/libdwflP.h:80 +#: libdwfl/libdwflP.h:77 msgid "ELF file does not match build ID" msgstr "Файл ELF не відповідає ідентифікатору збирання" -#: libdwfl/libdwflP.h:81 +#: libdwfl/libdwflP.h:78 msgid "corrupt .gnu.prelink_undo section data" msgstr "дані розділу «.gnu.prelink_undo» пошкоджено" -#: libdwfl/libdwflP.h:82 +#: libdwfl/libdwflP.h:79 msgid "Internal error due to ebl" msgstr "Внутрішня помилка через ebl" -#: libdwfl/libdwflP.h:83 +#: libdwfl/libdwflP.h:80 msgid "Missing data in core file" msgstr "У файлі ядра не вистачає даних" -#: libdwfl/libdwflP.h:84 +#: libdwfl/libdwflP.h:81 msgid "Invalid register" msgstr "Некоректний регістр" -#: libdwfl/libdwflP.h:85 +#: libdwfl/libdwflP.h:82 msgid "Error reading process memory" msgstr "Помилка під час спроби читання пам’яті процесу" -#: libdwfl/libdwflP.h:86 +#: libdwfl/libdwflP.h:83 msgid "Couldn't find architecture of any ELF" msgstr "Не вдалося знайти хоч якусь архітектуру ELF" -#: libdwfl/libdwflP.h:87 +#: libdwfl/libdwflP.h:84 msgid "Error parsing /proc filesystem" msgstr "Помилка під час спроби обробки файлової системи /proc" -#: libdwfl/libdwflP.h:88 +#: libdwfl/libdwflP.h:85 msgid "Invalid DWARF" msgstr "Некоректний запис DWARF" -#: libdwfl/libdwflP.h:89 +#: libdwfl/libdwflP.h:86 msgid "Unsupported DWARF" msgstr "Непідтримуваний запис DWARF" -#: libdwfl/libdwflP.h:90 +#: libdwfl/libdwflP.h:87 msgid "Unable to find more threads" msgstr "Не вдалося знайти додаткові потоки" -#: libdwfl/libdwflP.h:91 +#: libdwfl/libdwflP.h:88 msgid "Dwfl already has attached state" msgstr "Dwfl уже перебуває у стані долучення до процесу" -#: libdwfl/libdwflP.h:92 +#: libdwfl/libdwflP.h:89 msgid "Dwfl has no attached state" msgstr "Dwfl не перебуває у стані долучення до процесу" -#: libdwfl/libdwflP.h:93 +#: libdwfl/libdwflP.h:90 msgid "Unwinding not supported for this architecture" msgstr "Для цієї архітектури розгортання не передбачено" -#: libdwfl/libdwflP.h:94 +#: libdwfl/libdwflP.h:91 msgid "Invalid argument" msgstr "Некоректний аргумент" -#: libdwfl/libdwflP.h:95 +#: libdwfl/libdwflP.h:92 msgid "Not an ET_CORE ELF file" msgstr "Не є файлом ET_CORE ELF" @@ -471,14 +524,14 @@ msgstr "Не є файлом ET_CORE ELF" msgid "No backend" msgstr "Немає сервера" -#: libebl/eblcorenotetypename.c:99 libebl/eblobjnotetypename.c:76 +#: libebl/eblcorenotetypename.c:100 libebl/eblobjnotetypename.c:76 #: libebl/eblobjnotetypename.c:83 libebl/eblobjnotetypename.c:102 #: libebl/eblosabiname.c:73 libebl/eblsectionname.c:83 #: libebl/eblsectiontypename.c:115 libebl/eblsegmenttypename.c:79 msgid "" msgstr "<невідомо>" -#: libebl/ebldynamictagname.c:101 +#: libebl/ebldynamictagname.c:103 #, c-format msgid ": %#" msgstr "<невідомо>: %#" @@ -568,7 +621,7 @@ msgstr "некоректна розмірність вхідного парам msgid "invalid size of destination operand" msgstr "некоректна розмірність вихідного параметра" -#: libelf/elf_error.c:87 src/readelf.c:5112 +#: libelf/elf_error.c:87 src/readelf.c:6107 #, c-format msgid "invalid encoding" msgstr "некоректне кодування" @@ -578,197 +631,202 @@ msgid "invalid file descriptor" msgstr "некоректний дескриптор файла" #: libelf/elf_error.c:99 +#, fuzzy +msgid "invalid ELF file data" +msgstr "некоректний файл ELF" + +#: libelf/elf_error.c:103 msgid "invalid operation" msgstr "недійсна дія" -#: libelf/elf_error.c:103 +#: libelf/elf_error.c:107 msgid "ELF version not set" msgstr "версію ELF не вказано" -#: libelf/elf_error.c:115 +#: libelf/elf_error.c:119 msgid "invalid fmag field in archive header" msgstr "некоректне поле fmag у заголовку архіву" -#: libelf/elf_error.c:119 +#: libelf/elf_error.c:123 msgid "invalid archive file" msgstr "некоректний файл архіву" -#: libelf/elf_error.c:123 +#: libelf/elf_error.c:127 msgid "descriptor is not for an archive" msgstr "дескриптор не належить архіву" -#: libelf/elf_error.c:127 +#: libelf/elf_error.c:131 msgid "no index available" msgstr "такого номера немає" -#: libelf/elf_error.c:131 +#: libelf/elf_error.c:135 msgid "cannot read data from file" msgstr "не вдалося прочитати дані з файла" -#: libelf/elf_error.c:135 +#: libelf/elf_error.c:139 msgid "cannot write data to file" msgstr "не вдалося записати дані до файла" -#: libelf/elf_error.c:139 +#: libelf/elf_error.c:143 msgid "invalid binary class" msgstr "некоректний бінарний клас" -#: libelf/elf_error.c:143 +#: libelf/elf_error.c:147 msgid "invalid section index" msgstr "некоректний номер розділу" -#: libelf/elf_error.c:147 +#: libelf/elf_error.c:151 msgid "invalid operand" msgstr "некоректний параметр" -#: libelf/elf_error.c:151 +#: libelf/elf_error.c:155 msgid "invalid section" msgstr "некоректний розділ" -#: libelf/elf_error.c:159 +#: libelf/elf_error.c:163 msgid "executable header not created first" msgstr "заголовок виконуваного файла не було створено першим" -#: libelf/elf_error.c:163 +#: libelf/elf_error.c:167 msgid "file descriptor disabled" msgstr "дескриптор файла вимкнено" -#: libelf/elf_error.c:167 +#: libelf/elf_error.c:171 msgid "archive/member file descriptor mismatch" msgstr "невідповідність дескрипторів файлів архіву/елемента" -#: libelf/elf_error.c:175 +#: libelf/elf_error.c:179 msgid "cannot manipulate null section" msgstr "не можна оперувати нульовим розділом" -#: libelf/elf_error.c:179 +#: libelf/elf_error.c:183 msgid "data/scn mismatch" msgstr "невідповідність полів data/scn" -#: libelf/elf_error.c:183 +#: libelf/elf_error.c:187 msgid "invalid section header" msgstr "некоректний заголовок розділу" -#: libelf/elf_error.c:187 src/readelf.c:7359 src/readelf.c:7807 -#: src/readelf.c:7908 src/readelf.c:8089 +#: libelf/elf_error.c:191 src/readelf.c:9742 src/readelf.c:10313 +#: src/readelf.c:10414 src/readelf.c:10595 #, c-format msgid "invalid data" msgstr "некоректні дані" -#: libelf/elf_error.c:191 +#: libelf/elf_error.c:195 msgid "unknown data encoding" msgstr "невідоме кодування даних" -#: libelf/elf_error.c:195 +#: libelf/elf_error.c:199 msgid "section `sh_size' too small for data" msgstr "розділ «sh_size» є замалим для даних" -#: libelf/elf_error.c:199 +#: libelf/elf_error.c:203 msgid "invalid section alignment" msgstr "некоректне вирівнювання розділу" -#: libelf/elf_error.c:203 +#: libelf/elf_error.c:207 msgid "invalid section entry size" msgstr "некоректна розмірність запису розділу" -#: libelf/elf_error.c:207 +#: libelf/elf_error.c:211 msgid "update() for write on read-only file" msgstr "update() для запису придатного лише для читання файла" -#: libelf/elf_error.c:211 +#: libelf/elf_error.c:215 msgid "no such file" msgstr "такого файла не виявлено" -#: libelf/elf_error.c:215 +#: libelf/elf_error.c:219 msgid "only relocatable files can contain section groups" msgstr "містити групи розділів можуть лише придатні до пересування файли" -#: libelf/elf_error.c:220 +#: libelf/elf_error.c:224 msgid "" "program header only allowed in executables, shared objects, and core files" msgstr "" "заголовок програми можна використовувати лише у виконуваних файлах, об’єктах " "спільного використання та файлах ядра" -#: libelf/elf_error.c:227 +#: libelf/elf_error.c:231 msgid "file has no program header" msgstr "у файлі немає заголовка програми" -#: libelf/elf_error.c:237 +#: libelf/elf_error.c:241 #, fuzzy msgid "invalid section type" msgstr "некоректний розділ" -#: libelf/elf_error.c:242 +#: libelf/elf_error.c:246 #, fuzzy msgid "invalid section flags" msgstr "некоректний розділ" -#: libelf/elf_error.c:247 +#: libelf/elf_error.c:251 #, fuzzy msgid "section does not contain compressed data" msgstr "розділ хешу [%2zu] «%s» містить недостатньо даних\n" -#: libelf/elf_error.c:252 +#: libelf/elf_error.c:256 msgid "section contains compressed data" msgstr "" -#: libelf/elf_error.c:257 +#: libelf/elf_error.c:261 #, fuzzy msgid "unknown compression type" msgstr "невизначений тип" -#: libelf/elf_error.c:262 +#: libelf/elf_error.c:266 #, fuzzy msgid "cannot compress data" msgstr "не вдалося розпакувати DWARF" -#: libelf/elf_error.c:267 +#: libelf/elf_error.c:271 #, fuzzy msgid "cannot decompress data" msgstr "не вдалося розпакувати DWARF" -#: src/addr2line.c:57 +#: src/addr2line.c:58 msgid "Input format options:" msgstr "Параметри форматування вхідних даних:" -#: src/addr2line.c:59 +#: src/addr2line.c:60 msgid "Treat addresses as offsets relative to NAME section." msgstr "Вважати адреси зміщеннями відносно розділу НАЗВА." -#: src/addr2line.c:61 +#: src/addr2line.c:62 msgid "Output format options:" msgstr "Параметри форматування результатів:" -#: src/addr2line.c:62 +#: src/addr2line.c:63 msgid "Print address before each entry" msgstr "Виводити адресу перед кожним записом" -#: src/addr2line.c:63 +#: src/addr2line.c:64 msgid "Show only base names of source files" msgstr "Показувати лише базові назви файлів коду програми" -#: src/addr2line.c:65 +#: src/addr2line.c:66 msgid "Show absolute file names using compilation directory" msgstr "Показувати абсолютні назви файлів з використанням каталогу збирання" -#: src/addr2line.c:66 +#: src/addr2line.c:67 msgid "Also show function names" msgstr "Показувати також назви функцій" -#: src/addr2line.c:67 +#: src/addr2line.c:68 msgid "Also show symbol or section names" msgstr "Показувати також назви символів та розділів" -#: src/addr2line.c:68 +#: src/addr2line.c:69 msgid "Also show symbol and the section names" msgstr "Показувати також назви символів та розділів" -#: src/addr2line.c:69 +#: src/addr2line.c:70 msgid "Also show line table flags" msgstr "Показувати також прапорці рядків таблиці" -#: src/addr2line.c:71 +#: src/addr2line.c:72 msgid "" "Show all source locations that caused inline expansion of subroutines at the " "address." @@ -776,302 +834,327 @@ msgstr "" "Показати усі місця у початковому коді, у яких було виявлено вбудоване " "розгортання підпрограм за вказаною адресою." -#: src/addr2line.c:74 +#: src/addr2line.c:75 msgid "Show demangled symbols (ARG is always ignored)" msgstr "Виводити розшифровані символи (АРГ завжди ігнорується)" -#: src/addr2line.c:76 +#: src/addr2line.c:77 msgid "Print all information on one line, and indent inlines" msgstr "Вивести усі дані у один рядок і додати відступи до перенесених рядків" -#: src/addr2line.c:78 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:99 -#: src/strings.c:78 +#: src/addr2line.c:79 src/elfcmp.c:71 src/findtextrel.c:66 src/nm.c:101 +#: src/strings.c:79 msgid "Miscellaneous:" msgstr "Інше:" #. Short description of program. -#: src/addr2line.c:86 +#: src/addr2line.c:87 msgid "" "Locate source files and line information for ADDRs (in a.out by default)." msgstr "Шукати АДРЕСИ у файлах кодів та даних про рядки (типово, у a.out)." #. Strings for arguments in help texts. -#: src/addr2line.c:90 +#: src/addr2line.c:91 msgid "[ADDR...]" msgstr "[АДРЕСА...]" -#: src/addr2line.c:518 +#: src/addr2line.c:520 #, c-format msgid "Section syntax requires exactly one module" msgstr "Синтаксис розділів вимагає точного одного модуля" -#: src/addr2line.c:541 +#: src/addr2line.c:543 #, c-format msgid "offset %# lies outside section '%s'" msgstr "зміщення %# розташовано поза межами розділу «%s»" -#: src/addr2line.c:631 +#: src/addr2line.c:633 #, c-format msgid "cannot find symbol '%s'" msgstr "не вдалося знайти символ «%s»" -#: src/addr2line.c:636 +#: src/addr2line.c:638 #, c-format msgid "offset %# lies outside contents of '%s'" msgstr "зміщення %# розташовано поза межами вмісту «%s»" -#: src/ar.c:67 +#: src/ar.c:68 msgid "Commands:" msgstr "Команди:" -#: src/ar.c:68 +#: src/ar.c:69 msgid "Delete files from archive." msgstr "Вилучити файли з архіву." -#: src/ar.c:69 +#: src/ar.c:70 msgid "Move files in archive." msgstr "Пересунути файли до архіву." -#: src/ar.c:70 +#: src/ar.c:71 msgid "Print files in archive." msgstr "Надрукувати список файлів у архіві." -#: src/ar.c:71 +#: src/ar.c:72 msgid "Quick append files to archive." msgstr "Швидко додати файли до архіву." -#: src/ar.c:73 +#: src/ar.c:74 msgid "Replace existing or insert new file into archive." msgstr "Замінити поточний або вставити новий файл до архіву." -#: src/ar.c:74 +#: src/ar.c:75 msgid "Display content of archive." msgstr "Показати вміст архіву." -#: src/ar.c:75 +#: src/ar.c:76 msgid "Extract files from archive." msgstr "Видобути файли з архіву." -#: src/ar.c:77 +#: src/ar.c:78 msgid "Command Modifiers:" msgstr "Модифікатори команд:" -#: src/ar.c:78 +#: src/ar.c:79 msgid "Preserve original dates." msgstr "Зберігати початкові часові мітки." -#: src/ar.c:79 +#: src/ar.c:80 msgid "Use instance [COUNT] of name." msgstr "Використовувати екземпляр [НОМЕР] назви." -#: src/ar.c:81 +#: src/ar.c:82 msgid "Do not replace existing files with extracted files." msgstr "Не замінювати поточні файли видобутими." -#: src/ar.c:82 +#: src/ar.c:83 msgid "Allow filename to be truncated if necessary." msgstr "Уможливити, за потреби, обрізання назв файлів." -#: src/ar.c:84 +#: src/ar.c:85 msgid "Provide verbose output." msgstr "Докладний вивід даних." -#: src/ar.c:85 +#: src/ar.c:86 msgid "Force regeneration of symbol table." msgstr "Примусове повторне створення таблиці символів." -#: src/ar.c:86 +#: src/ar.c:87 msgid "Insert file after [MEMBER]." msgstr "Вставити файл після [ЕЛЕМЕНТ]." -#: src/ar.c:87 +#: src/ar.c:88 msgid "Insert file before [MEMBER]." msgstr "Вставити файл перед [ЕЛЕМЕНТ]." -#: src/ar.c:88 +#: src/ar.c:89 msgid "Same as -b." msgstr "Те саме, що і -b." -#: src/ar.c:89 +#: src/ar.c:90 msgid "Suppress message when library has to be created." msgstr "Придушити повідомлення, якщо має бути створено бібліотеку." -#: src/ar.c:91 +#: src/ar.c:92 msgid "Use full path for file matching." msgstr "Використовувати для порівняння повний шлях до файла." -#: src/ar.c:92 +#: src/ar.c:93 msgid "Update only older files in archive." msgstr "Оновлювати у архіві лише старіші файли." #. Short description of program. -#: src/ar.c:98 +#: src/ar.c:99 msgid "Create, modify, and extract from archives." msgstr "Створення, зміна архівів і видобування даних з архівів." #. Strings for arguments in help texts. -#: src/ar.c:101 +#: src/ar.c:102 msgid "[MEMBER] [COUNT] ARCHIVE [FILE...]" msgstr "[ЕЛЕМЕНТ] [НОМЕР] АРХІВ [ФАЙЛ...]" -#: src/ar.c:180 +#: src/ar.c:181 #, c-format msgid "'a', 'b', and 'i' are only allowed with the 'm' and 'r' options" msgstr "" "модифікатори «a», «b» і «i» можна використовувати лише разом з параметрами " "«m» і «r»" -#: src/ar.c:185 +#: src/ar.c:186 #, c-format msgid "MEMBER parameter required for 'a', 'b', and 'i' modifiers" msgstr "" "Для модифікаторів «a», «b» та «i» слід використовувати параметр ЕЛЕМЕНТ" -#: src/ar.c:201 +#: src/ar.c:202 #, c-format msgid "'N' is only meaningful with the 'x' and 'd' options" msgstr "«N» має значення лише разом з параметрами «x» і «d»" -#: src/ar.c:206 +#: src/ar.c:207 #, c-format msgid "COUNT parameter required" msgstr "потрібен параметр НОМЕР" -#: src/ar.c:218 +#: src/ar.c:219 #, c-format msgid "invalid COUNT parameter %s" msgstr "некоректний параметр НОМЕР %s" -#: src/ar.c:225 +#: src/ar.c:226 #, c-format msgid "'%c' is only meaningful with the 'x' option" msgstr "«%c» має сенс лише у разі використання параметра «x»" -#: src/ar.c:231 +#: src/ar.c:232 #, c-format msgid "archive name required" msgstr "слід вказати назву архіву" -#: src/ar.c:244 +#: src/ar.c:245 #, c-format msgid "command option required" msgstr "має бути вказано параметр команди" -#: src/ar.c:295 +#: src/ar.c:296 #, c-format msgid "More than one operation specified" msgstr "Вказано більше за одну дію" -#: src/ar.c:389 +#: src/ar.c:390 #, c-format msgid "cannot open archive '%s'" msgstr "не вдалося відкрити архів «%s»" -#: src/ar.c:399 +#: src/ar.c:400 #, c-format msgid "cannot open archive '%s': %s" msgstr "не вдалося відкрити архів «%s»: %s" -#: src/ar.c:403 +#: src/ar.c:404 #, c-format msgid "%s: not an archive file" msgstr "%s: не є файлом архіву" -#: src/ar.c:407 +#: src/ar.c:408 #, c-format msgid "cannot stat archive '%s'" msgstr "не вдалося отримати дані архіву «%s» за допомогою stat" -#: src/ar.c:419 +#: src/ar.c:420 #, c-format msgid "no entry %s in archive\n" msgstr "у архіві немає запису %s\n" -#: src/ar.c:472 src/ar.c:917 src/ar.c:1117 +#: src/ar.c:473 src/ar.c:918 src/ar.c:1122 #, c-format msgid "cannot create hash table" msgstr "не вдалося створити таблицю хешів" -#: src/ar.c:479 src/ar.c:924 src/ar.c:1126 +#: src/ar.c:480 src/ar.c:925 src/ar.c:1131 #, c-format msgid "cannot insert into hash table" msgstr "не вдалося вставити запис до таблиці хешів" -#: src/ar.c:487 src/ranlib.c:148 +#: src/ar.c:488 src/ranlib.c:149 #, c-format msgid "cannot stat '%s'" msgstr "не вдалося отримати дані з «%s» за допомогою stat" -#: src/ar.c:583 +#: src/ar.c:584 #, c-format msgid "cannot read content of %s: %s" msgstr "не вдалося прочитати вміст з %s: %s" -#: src/ar.c:626 +#: src/ar.c:627 #, c-format msgid "cannot open %.*s" msgstr "не вдалося відкрити %.*s" -#: src/ar.c:648 +#: src/ar.c:649 #, c-format msgid "failed to write %s" msgstr "не вдалося записати %s" -#: src/ar.c:660 +#: src/ar.c:661 #, c-format msgid "cannot change mode of %s" msgstr "не вдалося змінити права доступу до %s" -#: src/ar.c:676 +#: src/ar.c:677 #, c-format msgid "cannot change modification time of %s" msgstr "не вдалося змінити часову мітку зміни %s" -#: src/ar.c:722 +#: src/ar.c:723 #, c-format msgid "cannot rename temporary file to %.*s" msgstr "не вдалося перейменувати файл тимчасових даних на %.*s" -#: src/ar.c:758 src/ar.c:1009 src/ar.c:1408 src/ranlib.c:222 +#: src/ar.c:759 src/ar.c:1010 src/ar.c:1411 src/ranlib.c:223 #, c-format msgid "cannot create new file" msgstr "не вдалося створити файл" -#: src/ar.c:1208 +#: src/ar.c:1213 #, c-format msgid "position member %s not found" msgstr "не виявлено елемента позиції %s" -#: src/ar.c:1218 +#: src/ar.c:1223 #, c-format msgid "%s: no entry %s in archive!\n" msgstr "%s: у архіві немає запису %s!\n" -#: src/ar.c:1247 src/objdump.c:240 +#: src/ar.c:1252 src/objdump.c:242 #, c-format msgid "cannot open %s" msgstr "не вдалося відкрити %s" -#: src/ar.c:1252 +#: src/ar.c:1257 #, c-format msgid "cannot stat %s" msgstr "не вдалося отримати дані %s за допомогою stat" -#: src/ar.c:1258 +#: src/ar.c:1263 #, c-format msgid "%s is no regular file" msgstr "%s не є звичайним файлом" -#: src/ar.c:1271 +#: src/ar.c:1276 #, c-format msgid "cannot get ELF descriptor for %s: %s\n" msgstr "не вдалося отримати дескриптор ELF для %s: %s\n" -#: src/ar.c:1291 +#: src/ar.c:1296 #, c-format msgid "cannot read %s: %s" msgstr "не вдалося прочитати %s: %s" +#: src/ar.c:1471 +#, fuzzy, c-format +msgid "cannot represent ar_date" +msgstr "не вдалося розпакувати DWARF" + +#: src/ar.c:1477 +#, fuzzy, c-format +msgid "cannot represent ar_uid" +msgstr "не вдалося розпакувати DWARF" + +#: src/ar.c:1483 +#, fuzzy, c-format +msgid "cannot represent ar_gid" +msgstr "не вдалося розпакувати DWARF" + +#: src/ar.c:1489 +#, fuzzy, c-format +msgid "cannot represent ar_mode" +msgstr "не вдалося отримати назву розділу" + +#: src/ar.c:1495 +#, fuzzy, c-format +msgid "cannot represent ar_size" +msgstr "не вдалося відкрити %s" + #: src/arlib-argp.c:32 msgid "Use zero for uid, gid, and date in archive members." msgstr "" @@ -1206,120 +1289,120 @@ msgstr "%s %s diff: таблиця символів [%zu]" msgid "%s %s differ: symbol table [%zu,%zu]" msgstr "%s %s diff: таблиця символів [%zu,%zu]" -#: src/elfcmp.c:427 src/elfcmp.c:496 +#: src/elfcmp.c:428 src/elfcmp.c:498 #, c-format msgid "%s %s differ: section [%zu] '%s' number of notes" msgstr "%s %s diff: розділ [%zu] кількість нотаток «%s»" -#: src/elfcmp.c:435 +#: src/elfcmp.c:436 #, c-format msgid "cannot read note section [%zu] '%s' in '%s': %s" msgstr "не вдалося прочитати розділ нотаток [%zu] «%s» у «%s»: %s" -#: src/elfcmp.c:445 +#: src/elfcmp.c:447 #, c-format msgid "%s %s differ: section [%zu] '%s' note name" msgstr "%s %s diff: розділ [%zu] назва нотатки «%s»" -#: src/elfcmp.c:453 +#: src/elfcmp.c:455 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' type" msgstr "%s %s diff: розділ [%zu] нотатка «%s» тип «%s»" -#: src/elfcmp.c:468 +#: src/elfcmp.c:470 #, c-format msgid "%s %s differ: build ID length" msgstr "%s %s diff: довжина ідентифікатора збирання" -#: src/elfcmp.c:476 +#: src/elfcmp.c:478 #, c-format msgid "%s %s differ: build ID content" msgstr "%s %s diff: вміст ідентифікатора збирання" -#: src/elfcmp.c:485 +#: src/elfcmp.c:487 #, c-format msgid "%s %s differ: section [%zu] '%s' note '%s' content" msgstr "%s %s diff: розділ [%zu] нотатка «%s» вміст «%s»" -#: src/elfcmp.c:526 +#: src/elfcmp.c:528 #, c-format msgid "%s %s differ: section [%zu] '%s' content" msgstr "%s %s diff: розділ [%zu] «%s», вміст" -#: src/elfcmp.c:530 +#: src/elfcmp.c:532 #, c-format msgid "%s %s differ: section [%zu,%zu] '%s' content" msgstr "%s %s diff: розділ [%zu,%zu] «%s», вміст" -#: src/elfcmp.c:545 +#: src/elfcmp.c:547 #, c-format msgid "%s %s differ: unequal amount of important sections" msgstr "%s %s diff: невідповідність об’ємів важливих розділів" -#: src/elfcmp.c:578 src/elfcmp.c:583 +#: src/elfcmp.c:580 src/elfcmp.c:585 #, c-format msgid "cannot load data of '%s': %s" msgstr "не вдалося завантажити дані «%s»: %s" -#: src/elfcmp.c:602 src/elfcmp.c:608 +#: src/elfcmp.c:604 src/elfcmp.c:610 #, c-format msgid "cannot get program header entry %d of '%s': %s" msgstr "не вдалося отримати запис заголовка програми %d «%s»: %s" -#: src/elfcmp.c:614 +#: src/elfcmp.c:616 #, c-format msgid "%s %s differ: program header %d" msgstr "%s %s diff: заголовок програми %d" -#: src/elfcmp.c:638 +#: src/elfcmp.c:640 #, c-format msgid "%s %s differ: gap" msgstr "%s %s diff: проміжок" -#: src/elfcmp.c:689 +#: src/elfcmp.c:691 #, c-format msgid "Invalid value '%s' for --gaps parameter." msgstr "Некоректне значення «%s» параметра --gaps." -#: src/elfcmp.c:717 src/findtextrel.c:206 src/nm.c:363 src/ranlib.c:141 -#: src/size.c:273 src/strings.c:185 src/strip.c:452 src/strip.c:489 -#: src/unstrip.c:2020 src/unstrip.c:2049 +#: src/elfcmp.c:719 src/findtextrel.c:206 src/nm.c:365 src/ranlib.c:142 +#: src/size.c:273 src/strings.c:186 src/strip.c:518 src/strip.c:555 +#: src/unstrip.c:2023 src/unstrip.c:2052 #, c-format msgid "cannot open '%s'" msgstr "не вдалося відкрити «%s»" -#: src/elfcmp.c:721 src/findtextrel.c:213 src/ranlib.c:158 +#: src/elfcmp.c:723 src/findtextrel.c:213 src/ranlib.c:159 #, c-format msgid "cannot create ELF descriptor for '%s': %s" msgstr "не вдалося створити дескриптор ELF для «%s»: %s" -#: src/elfcmp.c:726 +#: src/elfcmp.c:728 #, c-format msgid "cannot create EBL descriptor for '%s'" msgstr "не вдалося створити дескриптор EBL для «%s»" -#: src/elfcmp.c:744 src/findtextrel.c:394 +#: src/elfcmp.c:746 src/findtextrel.c:394 #, c-format msgid "cannot get section header of section %zu: %s" msgstr "не вдалося отримати заголовок розділу %zu: %s" -#: src/elfcmp.c:754 +#: src/elfcmp.c:756 #, c-format msgid "cannot get content of section %zu: %s" msgstr "не вдалося отримати вміст розділу %zu: %s" -#: src/elfcmp.c:764 src/elfcmp.c:778 +#: src/elfcmp.c:766 src/elfcmp.c:780 #, c-format msgid "cannot get relocation: %s" msgstr "не вдалося отримати пересування: %s" -#: src/elfcompress.c:115 src/strip.c:240 src/unstrip.c:121 +#: src/elfcompress.c:115 src/strip.c:297 src/unstrip.c:121 #, c-format msgid "-o option specified twice" msgstr "параметр -o вказано двічі" #: src/elfcompress.c:122 -#, fuzzy +#, fuzzy, c-format msgid "-t option specified twice" msgstr "параметр -f вказано двічі" @@ -1330,12 +1413,12 @@ msgstr "невизначений тип" #. We need at least one input file. #: src/elfcompress.c:143 src/elfcompress.c:1305 -#, fuzzy +#, fuzzy, c-format msgid "No input file given" msgstr "вхідний файл є порожнім" #: src/elfcompress.c:149 src/elfcompress.c:1310 -#, fuzzy +#, fuzzy, c-format msgid "Only one input file allowed together with '-o'" msgstr "" "Разом з «-o» або «-f» можна використовувати лише один файл вхідних даних" @@ -1366,7 +1449,7 @@ msgstr "" msgid "Force compression of section even if it would become larger" msgstr "" -#: src/elfcompress.c:1282 src/strip.c:87 +#: src/elfcompress.c:1282 src/strip.c:91 msgid "Relax a few rules to handle slightly broken ELF files" msgstr "" "Знехтувати декількома правилами для обробки трохи пошкоджених файлів ELF" @@ -1378,7 +1461,7 @@ msgstr "" "розділ [%2zu] «%s»: адреса розділів локальних даних потоків не є нульовою\n" #. Strings for arguments in help texts. -#: src/elfcompress.c:1294 src/elflint.c:77 src/readelf.c:126 +#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154 msgid "FILE..." msgstr "ФАЙЛ..." @@ -1386,19 +1469,19 @@ msgstr "ФАЙЛ..." msgid "Compress or decompress sections in an ELF file." msgstr "" -#: src/elflint.c:63 +#: src/elflint.c:64 msgid "Be extremely strict, flag level 2 features." msgstr "Висока строгість, увімкнути можливості рівня 2." -#: src/elflint.c:64 +#: src/elflint.c:65 msgid "Do not print anything if successful" msgstr "Не виводити ніяких даних у разі успіху" -#: src/elflint.c:65 +#: src/elflint.c:66 msgid "Binary is a separate debuginfo file" msgstr "Бінарний файл є окремим файлом debuginfo" -#: src/elflint.c:67 +#: src/elflint.c:68 msgid "" "Binary has been created with GNU ld and is therefore known to be broken in " "certain ways" @@ -1407,163 +1490,173 @@ msgstr "" "певної міри неправильним" #. Short description of program. -#: src/elflint.c:73 +#: src/elflint.c:74 msgid "Pedantic checking of ELF files compliance with gABI/psABI spec." msgstr "" "Педантична перевірка файлів ELF на сумісність зі специфікаціями gABI/psABI." -#: src/elflint.c:154 src/readelf.c:301 +#: src/elflint.c:155 src/readelf.c:347 #, c-format msgid "cannot open input file" msgstr "не вдалося відкрити вхідний файл." -#: src/elflint.c:161 +#: src/elflint.c:162 #, c-format msgid "cannot generate Elf descriptor: %s\n" msgstr "не вдалося створити дескриптор Elf: %s\n" -#: src/elflint.c:180 +#: src/elflint.c:181 #, c-format msgid "error while closing Elf descriptor: %s\n" msgstr "помилка під час спроби закриття дескриптора Elf: %s\n" -#: src/elflint.c:184 +#: src/elflint.c:185 msgid "No errors" msgstr "Без помилок" -#: src/elflint.c:219 src/readelf.c:478 +#: src/elflint.c:220 src/readelf.c:546 msgid "Missing file name.\n" msgstr "Не вказано назви файла.\n" -#: src/elflint.c:284 +#: src/elflint.c:285 #, c-format msgid " error while freeing sub-ELF descriptor: %s\n" msgstr " помилка під час спроби вивільнення дескриптора суб-ELF: %s\n" #. We cannot do anything. -#: src/elflint.c:292 +#: src/elflint.c:293 #, c-format msgid "Not an ELF file - it has the wrong magic bytes at the start\n" msgstr "Не є файлом ELF. Виявлено помилкові магічні байти на початку файла\n" -#: src/elflint.c:357 +#: src/elflint.c:358 #, c-format msgid "e_ident[%d] == %d is no known class\n" msgstr "e_ident[%d] == %d не є відомим класом\n" -#: src/elflint.c:362 +#: src/elflint.c:363 #, c-format msgid "e_ident[%d] == %d is no known data encoding\n" msgstr "e_ident[%d] == %d не є відомим кодуванням даних\n" -#: src/elflint.c:366 +#: src/elflint.c:367 #, c-format msgid "unknown ELF header version number e_ident[%d] == %d\n" msgstr "невідомий номер версії заголовка ELF e_ident[%d] == %d\n" -#: src/elflint.c:374 +#: src/elflint.c:375 #, c-format msgid "unsupported OS ABI e_ident[%d] == '%s'\n" msgstr "непідтримуване ABI ОС e_ident[%d] == «%s»\n" -#: src/elflint.c:380 -#, c-format -msgid "unsupport ABI version e_ident[%d] == %d\n" +#: src/elflint.c:381 +#, fuzzy, c-format +msgid "unsupported ABI version e_ident[%d] == %d\n" msgstr "непідтримувана версія ABI e_ident[%d] == %d\n" -#: src/elflint.c:385 +#: src/elflint.c:386 #, c-format msgid "e_ident[%zu] is not zero\n" msgstr "e_ident[%zu] не дорівнює нулеві\n" -#: src/elflint.c:390 +#: src/elflint.c:391 #, c-format msgid "unknown object file type %d\n" msgstr "невідомий тип об’єктних файлів %d\n" -#: src/elflint.c:397 +#: src/elflint.c:398 #, c-format msgid "unknown machine type %d\n" msgstr "невідомий тип архітектури %d\n" -#: src/elflint.c:401 +#: src/elflint.c:402 #, c-format msgid "unknown object file version\n" msgstr "невідома версія об’єктних файлів\n" -#: src/elflint.c:407 +#: src/elflint.c:408 #, c-format msgid "invalid program header offset\n" msgstr "некоректне зміщення заголовка програми\n" -#: src/elflint.c:409 +#: src/elflint.c:410 #, c-format msgid "executables and DSOs cannot have zero program header offset\n" msgstr "" "виконувані файли і DSO не можуть містити заголовка програми з нульовим " "зміщенням\n" -#: src/elflint.c:413 +#: src/elflint.c:414 #, c-format msgid "invalid number of program header entries\n" msgstr "некоректна кількість записів заголовків програми\n" -#: src/elflint.c:421 +#: src/elflint.c:422 #, c-format msgid "invalid section header table offset\n" msgstr "некоректне зміщення таблиці заголовків розділів\n" -#: src/elflint.c:424 +#: src/elflint.c:425 #, c-format msgid "section header table must be present\n" msgstr "має бути вказано таблицю заголовків розділів\n" -#: src/elflint.c:438 +#: src/elflint.c:439 #, c-format msgid "invalid number of section header table entries\n" msgstr "некоректна кількість записів таблиці заголовків розділів\n" -#: src/elflint.c:455 +#: src/elflint.c:456 #, c-format msgid "invalid section header index\n" msgstr "некоректний індекс заголовка розділу\n" -#: src/elflint.c:469 +#: src/elflint.c:474 +#, c-format +msgid "Can only check %u headers, shnum was %u\n" +msgstr "" + +#: src/elflint.c:488 #, c-format msgid "invalid number of program header table entries\n" msgstr "некоректна кількість записів таблиці заголовків програми\n" -#: src/elflint.c:478 +#: src/elflint.c:505 +#, c-format +msgid "Can only check %u headers, phnum was %u\n" +msgstr "" + +#: src/elflint.c:510 #, c-format msgid "invalid machine flags: %s\n" msgstr "некоректні прапорці архітектури: %s\n" -#: src/elflint.c:485 src/elflint.c:502 +#: src/elflint.c:517 src/elflint.c:534 #, c-format msgid "invalid ELF header size: %hd\n" msgstr "некоректний розмір заголовка ELF: %hd\n" -#: src/elflint.c:488 src/elflint.c:505 +#: src/elflint.c:520 src/elflint.c:537 #, c-format msgid "invalid program header size: %hd\n" msgstr "некоректний розмір заголовка програми: %hd\n" -#: src/elflint.c:491 src/elflint.c:508 +#: src/elflint.c:523 src/elflint.c:540 #, c-format msgid "invalid program header position or size\n" msgstr "некоректне розташування або розмір заголовка програми\n" -#: src/elflint.c:494 src/elflint.c:511 +#: src/elflint.c:526 src/elflint.c:543 #, c-format msgid "invalid section header size: %hd\n" msgstr "некоректний розмір заголовка розділу: %hd\n" -#: src/elflint.c:497 src/elflint.c:514 +#: src/elflint.c:529 src/elflint.c:546 #, c-format msgid "invalid section header position or size\n" msgstr "некоректне розташування або розмір заголовка розділу\n" -#: src/elflint.c:559 +#: src/elflint.c:591 #, c-format msgid "" "section [%2d] '%s': section with SHF_GROUP flag set not part of a section " @@ -1572,7 +1665,7 @@ msgstr "" "розділ [%2d] «%s»: розділ з встановленим прапорцем SHF_GROUP не є частиною " "групи розділів\n" -#: src/elflint.c:563 +#: src/elflint.c:595 #, c-format msgid "" "section [%2d] '%s': section group [%2zu] '%s' does not precede group member\n" @@ -1580,14 +1673,14 @@ msgstr "" "розділ [%2d] «%s»: групу розділів [%2zu] «%s» мало бути визначено до розділу-" "елемента цієї групи\n" -#: src/elflint.c:579 src/elflint.c:1463 src/elflint.c:1514 src/elflint.c:1620 -#: src/elflint.c:1956 src/elflint.c:2272 src/elflint.c:2886 src/elflint.c:3049 -#: src/elflint.c:3197 src/elflint.c:3387 src/elflint.c:4355 +#: src/elflint.c:611 src/elflint.c:1495 src/elflint.c:1546 src/elflint.c:1652 +#: src/elflint.c:1988 src/elflint.c:2311 src/elflint.c:2930 src/elflint.c:3093 +#: src/elflint.c:3241 src/elflint.c:3431 src/elflint.c:4399 #, c-format msgid "section [%2d] '%s': cannot get section data\n" msgstr "розділ [%2d] «%s»: не вдалося отримати дані розділу\n" -#: src/elflint.c:592 src/elflint.c:1627 +#: src/elflint.c:624 src/elflint.c:1659 #, c-format msgid "" "section [%2d] '%s': referenced as string table for section [%2d] '%s' but " @@ -1596,7 +1689,7 @@ msgstr "" "розділ [%2d] «%s»: надано посилання на таблицю рядків розділу [%2d] «%s», " "але типом даних не є SHT_STRTAB\n" -#: src/elflint.c:615 +#: src/elflint.c:647 #, c-format msgid "" "section [%2d] '%s': symbol table cannot have more than one extended index " @@ -1605,38 +1698,38 @@ msgstr "" "розділ [%2d] «%s»: у таблиці символів не може бути більше одного розширеного " "розділу покажчика\n" -#: src/elflint.c:627 +#: src/elflint.c:659 #, c-format msgid "section [%2u] '%s': entry size is does not match ElfXX_Sym\n" msgstr "розділ [%2u] «%s»: розмірність запису не відповідає ElfXX_Sym\n" -#: src/elflint.c:636 +#: src/elflint.c:668 #, c-format msgid "section [%2d] '%s': cannot get symbol %d: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати символ %d: %s\n" -#: src/elflint.c:641 src/elflint.c:644 src/elflint.c:647 src/elflint.c:650 -#: src/elflint.c:653 src/elflint.c:656 +#: src/elflint.c:673 src/elflint.c:676 src/elflint.c:679 src/elflint.c:682 +#: src/elflint.c:685 src/elflint.c:688 #, c-format msgid "section [%2d] '%s': '%s' in zeroth entry not zero\n" msgstr "розділ [%2d] «%s»: «%s» у нульовому записі не є нулем\n" -#: src/elflint.c:659 +#: src/elflint.c:691 #, c-format msgid "section [%2d] '%s': XINDEX for zeroth entry not zero\n" msgstr "розділ [%2d] «%s»: XINDEX для нульового запису не є нулем\n" -#: src/elflint.c:669 +#: src/elflint.c:701 #, c-format msgid "section [%2d] '%s': cannot get symbol %zu: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати символ %zu: %s\n" -#: src/elflint.c:678 +#: src/elflint.c:710 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid name value\n" msgstr "розділ [%2d] «%s»: символ %zu: некоректне значення назви\n" -#: src/elflint.c:693 +#: src/elflint.c:725 #, c-format msgid "" "section [%2d] '%s': symbol %zu: too large section index but no extended " @@ -1645,7 +1738,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: занадто великий покажчик розділу за умови, що " "не визначено розділу розширеного покажчика розділів\n" -#: src/elflint.c:699 +#: src/elflint.c:731 #, c-format msgid "" "section [%2d] '%s': symbol %zu: XINDEX used for index which would fit in " @@ -1655,29 +1748,29 @@ msgstr "" "відповідає st_shndx (%)\n" #. || sym->st_shndx > SHN_HIRESERVE always false -#: src/elflint.c:711 +#: src/elflint.c:743 #, c-format msgid "section [%2d] '%s': symbol %zu: invalid section index\n" msgstr "розділ [%2d] «%s»: символ %zu: некоректний індекс розділу\n" -#: src/elflint.c:719 +#: src/elflint.c:751 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown type\n" msgstr "розділ [%2d] «%s»: символ %zu: невідомий тип\n" -#: src/elflint.c:725 +#: src/elflint.c:757 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown symbol binding\n" msgstr "розділ [%2d] «%s»: символ %zu: невідома прив’язка символу\n" -#: src/elflint.c:730 +#: src/elflint.c:762 #, c-format msgid "section [%2d] '%s': symbol %zu: unique symbol not of object type\n" msgstr "" "розділ [%2d] «%s»: символ %zu: унікальний символ, що не належить до типу " "об’єктів\n" -#: src/elflint.c:738 +#: src/elflint.c:770 #, c-format msgid "" "section [%2d] '%s': symbol %zu: COMMON only allowed in relocatable files\n" @@ -1685,14 +1778,14 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: COMMON можна використовувати лише у файлах, " "придатних до пересування\n" -#: src/elflint.c:742 +#: src/elflint.c:774 #, c-format msgid "section [%2d] '%s': symbol %zu: local COMMON symbols are nonsense\n" msgstr "" "розділ [%2d] «%s»: символ %zu: використання локальних символів COMMON " "позбавлене сенсу\n" -#: src/elflint.c:746 +#: src/elflint.c:778 #, c-format msgid "" "section [%2d] '%s': symbol %zu: function in COMMON section is nonsense\n" @@ -1700,13 +1793,13 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: використання функції у розділі COMMON " "позбавлене сенсу\n" -#: src/elflint.c:797 +#: src/elflint.c:829 #, c-format msgid "section [%2d] '%s': symbol %zu: st_value out of bounds\n" msgstr "" "розділ [%2d] «%s»: символ %zu: значення st_value поза можливим діапазоном\n" -#: src/elflint.c:803 src/elflint.c:828 src/elflint.c:877 +#: src/elflint.c:835 src/elflint.c:860 src/elflint.c:909 #, c-format msgid "" "section [%2d] '%s': symbol %zu does not fit completely in referenced section " @@ -1715,7 +1808,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu не повністю відповідає розділу, на який " "посилається, [%2d] «%s»\n" -#: src/elflint.c:812 +#: src/elflint.c:844 #, c-format msgid "" "section [%2d] '%s': symbol %zu: referenced section [%2d] '%s' does not have " @@ -1724,7 +1817,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: для розділу посилання [%2d] «%s» не " "встановлено прапорець SHF_TLS\n" -#: src/elflint.c:822 src/elflint.c:870 +#: src/elflint.c:854 src/elflint.c:902 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value out of bounds of referenced section " @@ -1733,14 +1826,14 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: значення st_value поза межами розділу " "посилання, [%2d] «%s»\n" -#: src/elflint.c:849 +#: src/elflint.c:881 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but no TLS program header entry\n" msgstr "" "розділ [%2d] «%s»: символ %zu: символ TLS без запису заголовка програми TLS\n" -#: src/elflint.c:855 +#: src/elflint.c:887 #, c-format msgid "" "section [%2d] '%s': symbol %zu: TLS symbol but couldn't get TLS program " @@ -1749,7 +1842,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: маємо символ TLS, але не вдалося отримати " "запис заголовка програми TLS\n" -#: src/elflint.c:863 +#: src/elflint.c:895 #, c-format msgid "" "section [%2d] '%s': symbol %zu: st_value short of referenced section [%2d] " @@ -1758,7 +1851,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: значення st_value перед розділом посилання, " "[%2d] «%s»\n" -#: src/elflint.c:890 +#: src/elflint.c:922 #, c-format msgid "" "section [%2d] '%s': symbol %zu: local symbol outside range described in " @@ -1767,7 +1860,7 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: у sh_info описано локальний символ поза " "діапазоном\n" -#: src/elflint.c:897 +#: src/elflint.c:929 #, c-format msgid "" "section [%2d] '%s': symbol %zu: non-local symbol outside range described in " @@ -1776,12 +1869,12 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: у sh_info описано нелокальний символ поза " "діапазоном\n" -#: src/elflint.c:904 +#: src/elflint.c:936 #, c-format msgid "section [%2d] '%s': symbol %zu: non-local section symbol\n" msgstr "розділ [%2d] «%s»: символ %zu: нелокальний символ розділу\n" -#: src/elflint.c:954 +#: src/elflint.c:986 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to bad section " @@ -1790,7 +1883,7 @@ msgstr "" "розділ [%2d] «%s»: символ _GLOBAL_OFFSET_TABLE_ посилається на помилковий " "розділ, [%2d]\n" -#: src/elflint.c:961 +#: src/elflint.c:993 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol refers to section [%2d] " @@ -1802,7 +1895,7 @@ msgstr "" #. This test is more strict than the psABIs which #. usually allow the symbol to be in the middle of #. the .got section, allowing negative offsets. -#: src/elflint.c:977 +#: src/elflint.c:1009 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol value %# does not " @@ -1811,7 +1904,7 @@ msgstr "" "розділ [%2d] «%s»: значення символу _GLOBAL_OFFSET_TABLE_ %# не " "відповідає адресі розділу %s %#\n" -#: src/elflint.c:984 +#: src/elflint.c:1016 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol size % does not " @@ -1820,7 +1913,7 @@ msgstr "" "розділ [%2d] «%s»: розмір символу _GLOBAL_OFFSET_TABLE_ % не " "відповідає розміру розділу %s %\n" -#: src/elflint.c:992 +#: src/elflint.c:1024 #, c-format msgid "" "section [%2d] '%s': _GLOBAL_OFFSET_TABLE_ symbol present, but no .got " @@ -1829,7 +1922,7 @@ msgstr "" "розділ [%2d] «%s»: виявлено символ _GLOBAL_OFFSET_TABLE_, але не виявлено " "розділу .got\n" -#: src/elflint.c:1008 +#: src/elflint.c:1040 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC_ symbol value %# does not match dynamic " @@ -1838,7 +1931,7 @@ msgstr "" "розділ [%2d] «%s»: значення символу _DYNAMIC_ %# не відповідає " "адресі динамічного сегмента %#\n" -#: src/elflint.c:1015 +#: src/elflint.c:1047 #, c-format msgid "" "section [%2d] '%s': _DYNAMIC symbol size % does not match dynamic " @@ -1847,7 +1940,7 @@ msgstr "" "розділ [%2d] «%s»: розмір символу _DYNAMIC % не відповідає розміру " "динамічного сегмента %\n" -#: src/elflint.c:1028 +#: src/elflint.c:1060 #, c-format msgid "" "section [%2d] '%s': symbol %zu: symbol in dynamic symbol table with non-" @@ -1856,29 +1949,29 @@ msgstr "" "розділ [%2d] «%s»: символ %zu: символ у динамічній таблиці символів з " "нетиповою видимістю\n" -#: src/elflint.c:1032 +#: src/elflint.c:1064 #, c-format msgid "section [%2d] '%s': symbol %zu: unknown bit set in st_other\n" msgstr "розділ [%2d] «%s»: символ %zu: невідомий набір бітів у st_other\n" -#: src/elflint.c:1070 +#: src/elflint.c:1102 #, c-format msgid "section [%2d] '%s': cannot get section data.\n" msgstr "розділ [%2d] «%s»: не вдалося отримати дані розділу.\n" -#: src/elflint.c:1086 +#: src/elflint.c:1118 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT used for this RELA section\n" msgstr "розділ [%2d] «%s»: для цього розділу RELA використано DT_RELCOUNT\n" -#: src/elflint.c:1097 src/elflint.c:1150 +#: src/elflint.c:1129 src/elflint.c:1182 #, c-format msgid "section [%2d] '%s': DT_RELCOUNT value %d too high for this section\n" msgstr "" "розділ [%2d] «%s»: значення DT_RELCOUNT %d є занадто високим для цього " "розділу\n" -#: src/elflint.c:1122 src/elflint.c:1175 +#: src/elflint.c:1154 src/elflint.c:1207 #, c-format msgid "" "section [%2d] '%s': relative relocations after index %d as specified by " @@ -1887,7 +1980,7 @@ msgstr "" "розділ [%2d] «%s»: відносні пересування після позиції %d, вказаної за " "допомогою DT_RELCOUNT\n" -#: src/elflint.c:1128 src/elflint.c:1181 +#: src/elflint.c:1160 src/elflint.c:1213 #, c-format msgid "" "section [%2d] '%s': non-relative relocation at index %zu; DT_RELCOUNT " @@ -1896,52 +1989,52 @@ msgstr "" "розділ [%2d] «%s»: безвідносне пересування на позиції %zu; DT_RELCOUNT " "визначено %d відносних пересування\n" -#: src/elflint.c:1140 +#: src/elflint.c:1172 #, c-format msgid "section [%2d] '%s': DT_RELACOUNT used for this REL section\n" msgstr "розділ [%2d] «%s»: для цього розділу REL використано DT_RELACOUNT\n" -#: src/elflint.c:1223 +#: src/elflint.c:1255 #, c-format msgid "section [%2d] '%s': invalid destination section index\n" msgstr "розділ [%2d] «%s»: некоректний індекс розділу призначення\n" -#: src/elflint.c:1235 +#: src/elflint.c:1267 #, c-format msgid "section [%2d] '%s': invalid destination section type\n" msgstr "розділ [%2d] «%s»: некоректний тип розділу призначення\n" -#: src/elflint.c:1243 +#: src/elflint.c:1275 #, c-format msgid "section [%2d] '%s': sh_info should be zero\n" msgstr "розділ [%2d] «%s»: sh_info має бути нульовим\n" -#: src/elflint.c:1251 +#: src/elflint.c:1283 #, fuzzy, c-format msgid "" "section [%2d] '%s': no relocations for merge-able string sections possible\n" msgstr "" "розділ [%2d] «%s»: пересування у придатних до об’єднання розділах неможливе\n" -#: src/elflint.c:1259 +#: src/elflint.c:1291 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Rela\n" msgstr "" "розділ [%2d] «%s»: розмірність запису розділу не відповідає ElfXX_Rela\n" -#: src/elflint.c:1319 +#: src/elflint.c:1351 #, c-format msgid "text relocation flag set but there is no read-only segment\n" msgstr "" "встановлено прапорець пересування тексту, але сегмент придатний лише до " "читання\n" -#: src/elflint.c:1346 +#: src/elflint.c:1378 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid type\n" msgstr "розділ [%2d] «%s»: пересування %zu: некоректний тип\n" -#: src/elflint.c:1354 +#: src/elflint.c:1386 #, c-format msgid "" "section [%2d] '%s': relocation %zu: relocation type invalid for the file " @@ -1950,12 +2043,12 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: некоректний тип пересування для типу " "файла\n" -#: src/elflint.c:1362 +#: src/elflint.c:1394 #, c-format msgid "section [%2d] '%s': relocation %zu: invalid symbol index\n" msgstr "розділ [%2d] «%s»: пересування %zu: некоректний індекс символу\n" -#: src/elflint.c:1380 +#: src/elflint.c:1412 #, c-format msgid "" "section [%2d] '%s': relocation %zu: only symbol '_GLOBAL_OFFSET_TABLE_' can " @@ -1964,12 +2057,12 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: з %s можна використовувати лише символ " "«_GLOBAL_OFFSET_TABLE_»\n" -#: src/elflint.c:1397 +#: src/elflint.c:1429 #, c-format msgid "section [%2d] '%s': relocation %zu: offset out of bounds\n" msgstr "розділ [%2d] «%s»: пересування %zu: зміщення за межі діапазону\n" -#: src/elflint.c:1412 +#: src/elflint.c:1444 #, c-format msgid "" "section [%2d] '%s': relocation %zu: copy relocation against symbol of type " @@ -1978,7 +2071,7 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: пересування копіювання для символу типу " "%s\n" -#: src/elflint.c:1433 +#: src/elflint.c:1465 #, c-format msgid "" "section [%2d] '%s': relocation %zu: read-only section modified but text " @@ -1987,22 +2080,22 @@ msgstr "" "розділ [%2d] «%s»: пересування %zu: змінено придатний лише для читання " "розділ, але не встановлено прапорець пересування тексту\n" -#: src/elflint.c:1448 +#: src/elflint.c:1480 #, c-format msgid "section [%2d] '%s': relocations are against loaded and unloaded data\n" msgstr "розділ [%2d] «%s»: пересування завантажених і незавантажених даних\n" -#: src/elflint.c:1488 src/elflint.c:1539 +#: src/elflint.c:1520 src/elflint.c:1571 #, c-format msgid "section [%2d] '%s': cannot get relocation %zu: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати зміщення %zu: %s\n" -#: src/elflint.c:1615 +#: src/elflint.c:1647 #, c-format msgid "more than one dynamic section present\n" msgstr "вказано більше одного динамічного розділу\n" -#: src/elflint.c:1633 +#: src/elflint.c:1665 #, c-format msgid "" "section [%2d]: referenced as string table for section [%2d] '%s' but section " @@ -2011,46 +2104,46 @@ msgstr "" "розділ [%2d]: надано посилання на таблицю рядків розділу [%2d] «%s», але " "значення посилання на розділ є некоректним\n" -#: src/elflint.c:1641 +#: src/elflint.c:1673 #, c-format msgid "section [%2d] '%s': section entry size does not match ElfXX_Dyn\n" msgstr "" "розділ [%2d] «%s»: розмірність запису розділу не відповідає ElfXX_Dyn\n" -#: src/elflint.c:1646 src/elflint.c:1935 +#: src/elflint.c:1678 src/elflint.c:1967 #, c-format msgid "section [%2d] '%s': sh_info not zero\n" msgstr "розділ [%2d] «%s»: sh_info не є нульовим\n" -#: src/elflint.c:1656 +#: src/elflint.c:1688 #, c-format msgid "section [%2d] '%s': cannot get dynamic section entry %zu: %s\n" msgstr "" "розділ [%2d] «%s»: не вдалося отримати запис динамічного розділу %zu: %s\n" -#: src/elflint.c:1664 +#: src/elflint.c:1696 #, c-format msgid "section [%2d] '%s': non-DT_NULL entries follow DT_NULL entry\n" msgstr "" "розділ [%2d] «%s»: за записом DT_NULL вказано записи, що не належать до " "DT_NULL\n" -#: src/elflint.c:1671 +#: src/elflint.c:1703 #, c-format msgid "section [%2d] '%s': entry %zu: unknown tag\n" msgstr "розділ [%2d] «%s»: запис %zu: невідома мітка\n" -#: src/elflint.c:1682 +#: src/elflint.c:1714 #, c-format msgid "section [%2d] '%s': entry %zu: more than one entry with tag %s\n" msgstr "розділ [%2d] «%s»: запис %zu: декілька записів з міткою %s\n" -#: src/elflint.c:1692 +#: src/elflint.c:1724 #, c-format msgid "section [%2d] '%s': entry %zu: level 2 tag %s used\n" msgstr "розділ [%2d] «%s»: запис %zu: використано мітку рівня 2 %s\n" -#: src/elflint.c:1710 +#: src/elflint.c:1742 #, c-format msgid "" "section [%2d] '%s': entry %zu: DT_PLTREL value must be DT_REL or DT_RELA\n" @@ -2058,7 +2151,7 @@ msgstr "" "розділ [%2d] «%s»: запис %zu: значенням DT_PLTREL має бути DT_REL або " "DT_RELA\n" -#: src/elflint.c:1723 +#: src/elflint.c:1755 #, c-format msgid "" "section [%2d] '%s': entry %zu: pointer does not match address of section " @@ -2067,7 +2160,7 @@ msgstr "" "розділ [%2d] «%s»: розділ %zu: вказівник не відповідає адресі розділу [%2d] " "«%s», на яку посилається sh_link\n" -#: src/elflint.c:1766 +#: src/elflint.c:1798 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must point into loaded segment\n" @@ -2075,7 +2168,7 @@ msgstr "" "розділ [%2d] «%s»: запис %zu: значення %s має вказувати на завантажений " "сегмент\n" -#: src/elflint.c:1781 +#: src/elflint.c:1813 #, c-format msgid "" "section [%2d] '%s': entry %zu: %s value must be valid offset in section " @@ -2084,48 +2177,48 @@ msgstr "" "розділ [%2d] «%s»: запис %zu: значенням %s має бути коректне зміщення у " "розділі [%2d] «%s»\n" -#: src/elflint.c:1801 src/elflint.c:1829 +#: src/elflint.c:1833 src/elflint.c:1861 #, c-format msgid "section [%2d] '%s': contains %s entry but not %s\n" msgstr "розділ [%2d] «%s»: містить запис %s, але не %s\n" -#: src/elflint.c:1813 +#: src/elflint.c:1845 #, c-format msgid "section [%2d] '%s': mandatory tag %s not present\n" msgstr "розділ [%2d] «%s»: немає обов’язкової мітки %s\n" -#: src/elflint.c:1822 +#: src/elflint.c:1854 #, c-format msgid "section [%2d] '%s': no hash section present\n" msgstr "розділ [%2d] «%s»: не виявлено розділу хешів\n" -#: src/elflint.c:1837 src/elflint.c:1844 +#: src/elflint.c:1869 src/elflint.c:1876 #, c-format msgid "section [%2d] '%s': not all of %s, %s, and %s are present\n" msgstr "розділ [%2d] «%s»: вказано не всі зі значень %s, %s і %s\n" -#: src/elflint.c:1854 src/elflint.c:1858 +#: src/elflint.c:1886 src/elflint.c:1890 #, c-format msgid "section [%2d] '%s': %s tag missing in DSO marked during prelinking\n" msgstr "" "розділ [%2d] «%s»: у DSO, позначеному на кроці попереднього компонування, " "немає мітки %s\n" -#: src/elflint.c:1864 +#: src/elflint.c:1896 #, c-format msgid "section [%2d] '%s': non-DSO file marked as dependency during prelink\n" msgstr "" "розділ [%2d] «%s»: під час попереднього компонування як залежність позначено " "файл, який не є файлом DSO\n" -#: src/elflint.c:1875 src/elflint.c:1879 src/elflint.c:1883 src/elflint.c:1887 +#: src/elflint.c:1907 src/elflint.c:1911 src/elflint.c:1915 src/elflint.c:1919 #, c-format msgid "section [%2d] '%s': %s tag missing in prelinked executable\n" msgstr "" "розділ [%2d] «%s»: у попередньо скомпонованому виконуваному файлі не " "міститься мітки %s\n" -#: src/elflint.c:1899 +#: src/elflint.c:1931 #, c-format msgid "" "section [%2d] '%s': only relocatable files can have extended section index\n" @@ -2133,7 +2226,7 @@ msgstr "" "розділ [%2d] «%s»: розширений розділ покажчика можуть мати лише файли, " "придатні до пересування\n" -#: src/elflint.c:1909 +#: src/elflint.c:1941 #, c-format msgid "" "section [%2d] '%s': extended section index section not for symbol table\n" @@ -2141,29 +2234,29 @@ msgstr "" "розділ [%2d] «%s»: розділ розширеного покажчика розділів не призначено для " "таблиць символів\n" -#: src/elflint.c:1913 +#: src/elflint.c:1945 #, c-format msgid "section [%2d] '%s': sh_link extended section index [%2d] is invalid\n" msgstr "" "розділ [%2d] «%s»: індекс розширеного розділу sh_link [%2d] є некоректним\n" -#: src/elflint.c:1918 +#: src/elflint.c:1950 #, c-format msgid "cannot get data for symbol section\n" msgstr "не вдалося отримати дані для розділу символів\n" -#: src/elflint.c:1921 +#: src/elflint.c:1953 #, c-format msgid "section [%2d] '%s': entry size does not match Elf32_Word\n" msgstr "розділ [%2d] «%s»: розмірність запису не відповідає Elf32_Word\n" -#: src/elflint.c:1930 +#: src/elflint.c:1962 #, c-format msgid "section [%2d] '%s': extended index table too small for symbol table\n" msgstr "" "розділ [%2d] «%s»: розширена таблиця покажчика замала для таблиці символів\n" -#: src/elflint.c:1945 +#: src/elflint.c:1977 #, c-format msgid "" "section [%2d] '%s': extended section index in section [%2zu] '%s' refers to " @@ -2172,24 +2265,24 @@ msgstr "" "розділ [%2d] «%s»: розширений покажчик розділів у розділі [%2zu] «%s» " "посилається на ту саму таблицю розділів\n" -#: src/elflint.c:1962 +#: src/elflint.c:1995 #, c-format msgid "symbol 0 should have zero extended section index\n" msgstr "символу 0 має відповідати нульовий індекс розширеного розділу\n" -#: src/elflint.c:1974 +#: src/elflint.c:2007 #, c-format msgid "cannot get data for symbol %zu\n" msgstr "не вдалося отримати дані для символу %zu\n" -#: src/elflint.c:1979 +#: src/elflint.c:2012 #, c-format msgid "extended section index is % but symbol index is not XINDEX\n" msgstr "" "індекс розширеного розділу дорівнює %, але індекс символу не є " "XINDEX\n" -#: src/elflint.c:1995 src/elflint.c:2046 +#: src/elflint.c:2029 src/elflint.c:2083 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n" @@ -2197,43 +2290,43 @@ msgstr "" "розділ [%2d] «%s»: розділ таблиці хешів занадто малий (розмір %ld, мало бути " "— %ld)\n" -#: src/elflint.c:2007 src/elflint.c:2058 +#: src/elflint.c:2043 src/elflint.c:2097 #, c-format msgid "section [%2d] '%s': chain array too large\n" msgstr "розділ [%2d] «%s»: масив ланцюжка занадто великий\n" -#: src/elflint.c:2021 src/elflint.c:2072 +#: src/elflint.c:2057 src/elflint.c:2111 #, c-format msgid "section [%2d] '%s': hash bucket reference %zu out of bounds\n" msgstr "" "розділ [%2d] «%s»: посилання на хеш блоку %zu лежить поза межами діапазону\n" -#: src/elflint.c:2031 +#: src/elflint.c:2067 #, c-format msgid "section [%2d] '%s': hash chain reference %zu out of bounds\n" msgstr "" "розділ [%2d] «%s»: посилання ланцюжка хешів %zu лежить поза межами " "діапазону\n" -#: src/elflint.c:2082 +#: src/elflint.c:2121 #, c-format msgid "section [%2d] '%s': hash chain reference % out of bounds\n" msgstr "" "розділ [%2d] «%s»: посилання ланцюжка хешів % лежить поза межами " "діапазону\n" -#: src/elflint.c:2095 +#: src/elflint.c:2134 #, c-format msgid "section [%2d] '%s': not enough data\n" msgstr "розділ [%2d] «%s»: недостатньо даних\n" -#: src/elflint.c:2107 +#: src/elflint.c:2146 #, c-format msgid "section [%2d] '%s': bitmask size zero or not power of 2: %u\n" msgstr "" "розділ [%2d] «%s»: розмір бітової маски є нульовим або не є степенем 2: %u\n" -#: src/elflint.c:2123 +#: src/elflint.c:2162 #, c-format msgid "" "section [%2d] '%s': hash table section is too small (is %ld, expected at " @@ -2242,12 +2335,12 @@ msgstr "" "розділ [%2d] «%s»: розділ таблиці хешів є надто малим (маємо %ld, мало бути " "принаймні %ld)\n" -#: src/elflint.c:2132 +#: src/elflint.c:2171 #, c-format msgid "section [%2d] '%s': 2nd hash function shift too big: %u\n" msgstr "розділ [%2d] «%s»: зсув 2-ої функції хешування занадто великий: %u\n" -#: src/elflint.c:2166 +#: src/elflint.c:2205 #, c-format msgid "" "section [%2d] '%s': hash chain for bucket %zu lower than symbol index bias\n" @@ -2255,7 +2348,7 @@ msgstr "" "розділ [%2d] '%s': ланцюжок хешів для блоку %zu розташовано нижче за позицію " "відхилення індексу символу\n" -#: src/elflint.c:2187 +#: src/elflint.c:2226 #, c-format msgid "" "section [%2d] '%s': symbol %u referenced in chain for bucket %zu is " @@ -2264,7 +2357,7 @@ msgstr "" "розділ [%2d] «%s»: символ %u, на який посилається ланцюжок у блоці %zu не " "визначено\n" -#: src/elflint.c:2200 +#: src/elflint.c:2239 #, c-format msgid "" "section [%2d] '%s': hash value for symbol %u in chain for bucket %zu wrong\n" @@ -2272,7 +2365,7 @@ msgstr "" "розділ [%2d] «%s»: значення хешу для символу %u у ланцюжку для блоку %zu є " "помилковим\n" -#: src/elflint.c:2209 +#: src/elflint.c:2248 #, c-format msgid "" "section [%2d] '%s': mask index for symbol %u in chain for bucket %zu wrong\n" @@ -2280,14 +2373,14 @@ msgstr "" "розділ [%2d] «%s»: індекс маски для символу %u у ланцюжку для блоку %zu є " "помилковим\n" -#: src/elflint.c:2239 +#: src/elflint.c:2278 #, c-format msgid "section [%2d] '%s': hash chain for bucket %zu out of bounds\n" msgstr "" "розділ [%2d] «%s»: ланцюжок хешів для блоку %zu лежить поза межами " "діапазону\n" -#: src/elflint.c:2244 +#: src/elflint.c:2283 #, c-format msgid "" "section [%2d] '%s': symbol reference in chain for bucket %zu out of bounds\n" @@ -2295,43 +2388,43 @@ msgstr "" "розділ [%2d] «%s»: посилання на символ у ланцюжку для блоку %zu лежить поза " "межами діапазону\n" -#: src/elflint.c:2250 +#: src/elflint.c:2289 #, c-format msgid "section [%2d] '%s': bitmask does not match names in the hash table\n" msgstr "розділ [%2d] «%s»: бітова маска не відповідає назвам у таблиці хешів\n" -#: src/elflint.c:2263 +#: src/elflint.c:2302 #, c-format msgid "section [%2d] '%s': relocatable files cannot have hash tables\n" msgstr "" "розділ [%2d] «%s»: придатні до пересування файли не можуть містити таблиць " "хешів\n" -#: src/elflint.c:2281 +#: src/elflint.c:2320 #, c-format msgid "section [%2d] '%s': hash table not for dynamic symbol table\n" msgstr "" "розділ [%2d] «%s»: таблицю хешів не призначено для зберігання таблиці " "динамічних символів\n" -#: src/elflint.c:2285 +#: src/elflint.c:2324 #, c-format msgid "section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n" msgstr "" "розділ [%2d] «%s»: некоректний індекс розділу таблиці символів sh_link " "[%2d]\n" -#: src/elflint.c:2293 +#: src/elflint.c:2334 #, c-format msgid "section [%2d] '%s': hash table entry size incorrect\n" msgstr "розділ [%2d] «%s»: розмірність запису таблиці хешів є некоректною\n" -#: src/elflint.c:2298 +#: src/elflint.c:2339 #, c-format msgid "section [%2d] '%s': not marked to be allocated\n" msgstr "розділ [%2d] «%s»: не позначено для пересування\n" -#: src/elflint.c:2303 +#: src/elflint.c:2344 #, c-format msgid "" "section [%2d] '%s': hash table has not even room for initial administrative " @@ -2340,27 +2433,27 @@ msgstr "" "розділ [%2d] «%s»: у таблиці хешів виявлено незвичайне розташування " "початкових адміністративних записів\n" -#: src/elflint.c:2352 +#: src/elflint.c:2393 #, c-format msgid "sh_link in hash sections [%2zu] '%s' and [%2zu] '%s' not identical\n" msgstr "sh_link у розділах хешів [%2zu] «%s» і [%2zu] «%s» не збігаються\n" -#: src/elflint.c:2376 src/elflint.c:2441 src/elflint.c:2476 +#: src/elflint.c:2417 src/elflint.c:2482 src/elflint.c:2517 #, c-format msgid "hash section [%2zu] '%s' does not contain enough data\n" msgstr "розділ хешу [%2zu] «%s» містить недостатньо даних\n" -#: src/elflint.c:2397 +#: src/elflint.c:2438 #, c-format msgid "hash section [%2zu] '%s' has zero bit mask words\n" msgstr "розділ хешу [%2zu] «%s» містить нульові слова бітової маски\n" -#: src/elflint.c:2408 src/elflint.c:2452 src/elflint.c:2489 +#: src/elflint.c:2449 src/elflint.c:2493 src/elflint.c:2530 #, c-format msgid "hash section [%2zu] '%s' uses too much data\n" msgstr "розділ хешу [%2zu] «%s» використовує надто багато даних\n" -#: src/elflint.c:2423 +#: src/elflint.c:2464 #, c-format msgid "" "hash section [%2zu] '%s' invalid symbol index % (max_nsyms: " @@ -2369,17 +2462,17 @@ msgstr "" "розділ хешу [%2zu] «%s» некоректний індекс символу % (макс. к-ть " "символів: %, кількість записів: %\n" -#: src/elflint.c:2510 +#: src/elflint.c:2551 #, c-format msgid "hash section [%2zu] '%s' invalid sh_entsize\n" msgstr "розділ хешу [%2zu] «%s» некоректне значення sh_entsize\n" -#: src/elflint.c:2520 src/elflint.c:2524 +#: src/elflint.c:2561 src/elflint.c:2565 #, c-format msgid "section [%2zu] '%s': reference to symbol index 0\n" msgstr "розділ [%2zu] «%s»: посилання на індекс символів 0\n" -#: src/elflint.c:2531 +#: src/elflint.c:2572 #, c-format msgid "" "symbol %d referenced in new hash table in [%2zu] '%s' but not in old hash " @@ -2388,7 +2481,7 @@ msgstr "" "виявлено посилання на символ %d у новій таблиці хешів у [%2zu] «%s», але " "його немає у старій таблиці хешів у [%2zu] «%s»\n" -#: src/elflint.c:2543 +#: src/elflint.c:2584 #, c-format msgid "" "symbol %d referenced in old hash table in [%2zu] '%s' but not in new hash " @@ -2397,12 +2490,12 @@ msgstr "" "виявлено посилання на символ %d у старій таблиці хешів у [%2zu] «%s», але " "його немає у новій таблиці хешів у [%2zu] «%s»\n" -#: src/elflint.c:2559 +#: src/elflint.c:2600 #, c-format msgid "section [%2d] '%s': nonzero sh_%s for NULL section\n" msgstr "розділ [%2d] «%s»: ненульове значення sh_%s для розділу NULL\n" -#: src/elflint.c:2579 +#: src/elflint.c:2620 #, c-format msgid "" "section [%2d] '%s': section groups only allowed in relocatable object files\n" @@ -2410,95 +2503,95 @@ msgstr "" "розділ [%2d] «%s»: групи розділів передбачено лише для придатних до " "пересування об’єктних файлах\n" -#: src/elflint.c:2590 +#: src/elflint.c:2631 #, c-format msgid "section [%2d] '%s': cannot get symbol table: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати таблицю символів: %s\n" -#: src/elflint.c:2595 +#: src/elflint.c:2636 #, c-format msgid "section [%2d] '%s': section reference in sh_link is no symbol table\n" msgstr "" "розділ [%2d] «%s»: посилання на розділ у sh_link не має таблиці символів\n" -#: src/elflint.c:2601 +#: src/elflint.c:2642 #, c-format msgid "section [%2d] '%s': invalid symbol index in sh_info\n" msgstr "розділ [%2d] «%s»: некоректний індекс символу у sh_info\n" -#: src/elflint.c:2606 +#: src/elflint.c:2647 #, c-format msgid "section [%2d] '%s': sh_flags not zero\n" msgstr "розділ [%2d] «%s»: sh_flags не є нульовим\n" -#: src/elflint.c:2613 +#: src/elflint.c:2654 #, c-format msgid "section [%2d] '%s': cannot get symbol for signature\n" msgstr "розділ [%2d] «%s»: не вдалося отримати символ для підпису\n" -#: src/elflint.c:2617 +#: src/elflint.c:2658 #, c-format msgid "section [%2d] '%s': cannot get symbol name for signature\n" msgstr "розділ [%2d] «%s»: не вдалося отримати назву символу для підпису\n" -#: src/elflint.c:2622 +#: src/elflint.c:2663 #, c-format msgid "section [%2d] '%s': signature symbol cannot be empty string\n" msgstr "розділ [%2d] «%s»: символ підпису не може бути порожнім рядком\n" -#: src/elflint.c:2628 +#: src/elflint.c:2669 #, c-format msgid "section [%2d] '%s': sh_flags not set correctly\n" msgstr "розділ [%2d] «%s»: для sh_flags встановлено помилкове значення\n" -#: src/elflint.c:2634 +#: src/elflint.c:2675 #, c-format msgid "section [%2d] '%s': cannot get data: %s\n" msgstr "розділ [%2d] «%s»: не вдалося отримати дані: %s\n" -#: src/elflint.c:2643 +#: src/elflint.c:2684 #, c-format msgid "section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n" msgstr "розділ [%2d] «%s»: розмір розділу не є кратним до sizeof(Elf32_Word)\n" -#: src/elflint.c:2648 +#: src/elflint.c:2690 #, c-format msgid "section [%2d] '%s': section group without flags word\n" msgstr "розділ [%2d] «%s»: група розділів без значення типу word прапорців\n" -#: src/elflint.c:2654 +#: src/elflint.c:2698 #, c-format msgid "section [%2d] '%s': section group without member\n" msgstr "розділ [%2d] «%s»: група розділів без елементів\n" -#: src/elflint.c:2658 +#: src/elflint.c:2702 #, c-format msgid "section [%2d] '%s': section group with only one member\n" msgstr "розділ [%2d] «%s»: група розділів, що містить лише один елемент\n" -#: src/elflint.c:2669 +#: src/elflint.c:2713 #, c-format msgid "section [%2d] '%s': unknown section group flags\n" msgstr "розділ [%2d] «%s»: невідомі прапорці групи розділів\n" -#: src/elflint.c:2681 +#: src/elflint.c:2725 #, c-format msgid "section [%2d] '%s': section index %zu out of range\n" msgstr "розділ [%2d] «%s»: індекс розділу %zu поза межами діапазону\n" -#: src/elflint.c:2690 +#: src/elflint.c:2734 #, c-format msgid "section [%2d] '%s': cannot get section header for element %zu: %s\n" msgstr "" "розділ [%2d] «%s»: не вдалося отримати заголовок розділу для елемента %zu: " "%s\n" -#: src/elflint.c:2697 +#: src/elflint.c:2741 #, c-format msgid "section [%2d] '%s': section group contains another group [%2d] '%s'\n" msgstr "розділ [%2d] «%s»: група розділів містить іншу групу [%2d] «%s»\n" -#: src/elflint.c:2703 +#: src/elflint.c:2747 #, c-format msgid "" "section [%2d] '%s': element %zu references section [%2d] '%s' without " @@ -2507,12 +2600,12 @@ msgstr "" "розділ [%2d] «%s»: елемент %zu посилається на розділ [%2d] «%s» без " "встановленого прапорця SHF_GROUP\n" -#: src/elflint.c:2710 +#: src/elflint.c:2754 #, c-format msgid "section [%2d] '%s' is contained in more than one section group\n" msgstr "розділ [%2d] «%s» міститься у більше ніж одній групі розділів\n" -#: src/elflint.c:2900 +#: src/elflint.c:2944 #, c-format msgid "" "section [%2d] '%s' refers in sh_link to section [%2d] '%s' which is no " @@ -2521,7 +2614,7 @@ msgstr "" "розділ [%2d] «%s» посилається у sh_link на розділ [%2d] «%s», який не має " "динамічної таблиці символів\n" -#: src/elflint.c:2912 +#: src/elflint.c:2956 #, c-format msgid "" "section [%2d] '%s' has different number of entries than symbol table [%2d] " @@ -2530,28 +2623,28 @@ msgstr "" "кількість записів у розділі [%2d] «%s» відрізняється від кількості у таблиці " "символів [%2d] «%s»\n" -#: src/elflint.c:2928 +#: src/elflint.c:2972 #, c-format msgid "section [%2d] '%s': symbol %d: cannot read version data\n" msgstr "розділ [%2d] «%s»: символ %d: не вдалося прочитати дані щодо версії\n" -#: src/elflint.c:2944 +#: src/elflint.c:2988 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with global scope\n" msgstr "" "розділ [%2d] «%s»: символ %d: локальний символ у загальному контексті\n" -#: src/elflint.c:2952 +#: src/elflint.c:2996 #, c-format msgid "section [%2d] '%s': symbol %d: local symbol with version\n" msgstr "розділ [%2d] «%s»: символ %d: локальний символ з версією\n" -#: src/elflint.c:2966 +#: src/elflint.c:3010 #, c-format msgid "section [%2d] '%s': symbol %d: invalid version index %d\n" msgstr "розділ [%2d] «%s»: символ %d: некоректний індекс версії %d\n" -#: src/elflint.c:2971 +#: src/elflint.c:3015 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for defined version\n" @@ -2559,7 +2652,7 @@ msgstr "" "розділ [%2d] «%s»: символ %d: індекси версії %d призначено до визначеної " "версії\n" -#: src/elflint.c:2981 +#: src/elflint.c:3025 #, c-format msgid "" "section [%2d] '%s': symbol %d: version index %d is for requested version\n" @@ -2567,45 +2660,45 @@ msgstr "" "розділ [%2d] «%s»: символ %d: індекс версії %d призначено для версії, на яку " "надійшов запит\n" -#: src/elflint.c:3034 +#: src/elflint.c:3078 #, c-format msgid "more than one version reference section present\n" msgstr "виявлено більше за один розділ посилань на версії\n" -#: src/elflint.c:3042 src/elflint.c:3189 +#: src/elflint.c:3086 src/elflint.c:3233 #, c-format msgid "section [%2d] '%s': sh_link does not link to string table\n" msgstr "розділ [%2d] «%s»: sh_link не посилається на таблицю рядків\n" -#: src/elflint.c:3067 src/elflint.c:3243 +#: src/elflint.c:3111 src/elflint.c:3287 #, c-format msgid "section [%2d] '%s': entry %d has wrong version %d\n" msgstr "розділ [%2d] «%s»: запис %d має помилкову версію %d\n" -#: src/elflint.c:3074 src/elflint.c:3250 +#: src/elflint.c:3118 src/elflint.c:3294 #, c-format msgid "section [%2d] '%s': entry %d has wrong offset of auxiliary data\n" msgstr "" "розділ [%2d] «%s»: запис %d містить помилкове зміщення у допоміжних даних\n" -#: src/elflint.c:3084 +#: src/elflint.c:3128 #, c-format msgid "section [%2d] '%s': entry %d has invalid file reference\n" msgstr "розділ [%2d] «%s»: запис %d містить некоректне посилання на файл\n" -#: src/elflint.c:3092 +#: src/elflint.c:3136 #, c-format msgid "section [%2d] '%s': entry %d references unknown dependency\n" msgstr "розділ [%2d] «%s»: запис %d посилається на невідому залежність\n" -#: src/elflint.c:3104 +#: src/elflint.c:3148 #, c-format msgid "section [%2d] '%s': auxiliary entry %d of entry %d has unknown flag\n" msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d позначено невідомим " "прапорцем\n" -#: src/elflint.c:3112 +#: src/elflint.c:3156 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has invalid name " @@ -2614,7 +2707,7 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d містить некоректне " "посилання на назву\n" -#: src/elflint.c:3121 +#: src/elflint.c:3165 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong hash value: " @@ -2623,7 +2716,7 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d має помилкове значення " "хешу: %#x, мало бути %#x\n" -#: src/elflint.c:3130 +#: src/elflint.c:3174 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has duplicate version " @@ -2632,7 +2725,7 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d містить дублікати назви " "версії «%s»\n" -#: src/elflint.c:3141 +#: src/elflint.c:3185 #, c-format msgid "" "section [%2d] '%s': auxiliary entry %d of entry %d has wrong next field\n" @@ -2640,13 +2733,13 @@ msgstr "" "розділ [%2d] «%s»: допоміжний запис %d запису %d має помилкове наступне " "поле\n" -#: src/elflint.c:3158 src/elflint.c:3334 +#: src/elflint.c:3202 src/elflint.c:3378 #, c-format msgid "section [%2d] '%s': entry %d has invalid offset to next entry\n" msgstr "" "розділ [%2d] «%s»: запис %d має некоректне зміщення щодо наступного запису\n" -#: src/elflint.c:3166 src/elflint.c:3342 +#: src/elflint.c:3210 src/elflint.c:3386 #, c-format msgid "" "section [%2d] '%s': entry %d has zero offset to next entry, but sh_info says " @@ -2655,44 +2748,44 @@ msgstr "" "розділ [%2d] «%s»: запис %d має нульове зміщення щодо наступного запису, але " "за sh_info можна зрозуміти, що записів більше\n" -#: src/elflint.c:3181 +#: src/elflint.c:3225 #, c-format msgid "more than one version definition section present\n" msgstr "виявлено більше за один розділ визначення версій\n" -#: src/elflint.c:3228 +#: src/elflint.c:3272 #, c-format msgid "section [%2d] '%s': more than one BASE definition\n" msgstr "розділ [%2d] «%s»: повторне визначення BASE\n" -#: src/elflint.c:3232 +#: src/elflint.c:3276 #, c-format msgid "section [%2d] '%s': BASE definition must have index VER_NDX_GLOBAL\n" msgstr "" "розділ [%2d] «%s»: визначення BASE повинно мати індекс VER_NDX_GLOBAL\n" -#: src/elflint.c:3238 +#: src/elflint.c:3282 #, c-format msgid "section [%2d] '%s': entry %d has unknown flag\n" msgstr "розділ [%2d] «%s»: невідомий прапорець запису %d\n" -#: src/elflint.c:3265 +#: src/elflint.c:3309 #, c-format msgid "section [%2d] '%s': entry %d has invalid name reference\n" msgstr "розділ [%2d] «%s»: запис %d містить некоректне посилання на назву\n" -#: src/elflint.c:3272 +#: src/elflint.c:3316 #, c-format msgid "section [%2d] '%s': entry %d has wrong hash value: %#x, expected %#x\n" msgstr "" "розділ [%2d] «%s»: запис %d має помилкове значення хешу: %#x, мало бути %#x\n" -#: src/elflint.c:3280 +#: src/elflint.c:3324 #, c-format msgid "section [%2d] '%s': entry %d has duplicate version name '%s'\n" msgstr "розділ [%2d] «%s»: запис %d містить дублікати назви версії «%s»\n" -#: src/elflint.c:3300 +#: src/elflint.c:3344 #, c-format msgid "" "section [%2d] '%s': entry %d has invalid name reference in auxiliary data\n" @@ -2700,53 +2793,53 @@ msgstr "" "розділ [%2d] «%s»: запис %d містить некоректне посилання на назву у " "допоміжних даних\n" -#: src/elflint.c:3317 +#: src/elflint.c:3361 #, c-format msgid "section [%2d] '%s': entry %d has wrong next field in auxiliary data\n" msgstr "" "розділ [%2d] «%s»: у допоміжних даних запису %d міститься помилкове поле " "наступного запису\n" -#: src/elflint.c:3350 +#: src/elflint.c:3394 #, c-format msgid "section [%2d] '%s': no BASE definition\n" msgstr "розділ [%2d] «%s»: немає визначення BASE\n" -#: src/elflint.c:3366 +#: src/elflint.c:3410 #, c-format msgid "section [%2d] '%s': unknown parent version '%s'\n" msgstr "розділ [%2d] «%s»: невідома основна версія «%s»\n" -#: src/elflint.c:3379 +#: src/elflint.c:3423 #, c-format msgid "section [%2d] '%s': empty object attributes section\n" msgstr "розділ [%2d] «%s»: порожній розділ атрибутів об’єкта\n" -#: src/elflint.c:3400 +#: src/elflint.c:3444 #, c-format msgid "section [%2d] '%s': unrecognized attribute format\n" msgstr "розділ [%2d] «%s»: не вдалося визначити формат атрибутів\n" -#: src/elflint.c:3416 +#: src/elflint.c:3460 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute section\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: поле нульового розміру у розділі атрибутів\n" -#: src/elflint.c:3425 +#: src/elflint.c:3469 #, c-format msgid "section [%2d] '%s': offset %zu: invalid length in attribute section\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: некоректна довжина у розділі атрибутів\n" -#: src/elflint.c:3437 +#: src/elflint.c:3481 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated vendor name string\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: незавершений рядок назви постачальника\n" -#: src/elflint.c:3454 +#: src/elflint.c:3498 #, c-format msgid "" "section [%2d] '%s': offset %zu: endless ULEB128 in attribute subsection tag\n" @@ -2754,12 +2847,12 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: незавершене поле ULEB128 у тезі підрозділу " "атрибутів\n" -#: src/elflint.c:3463 +#: src/elflint.c:3507 #, c-format msgid "section [%2d] '%s': offset %zu: truncated attribute section\n" msgstr "розділ [%2d] «%s»: зміщення %zu: обрізаний розділ атрибутів\n" -#: src/elflint.c:3472 +#: src/elflint.c:3516 #, c-format msgid "" "section [%2d] '%s': offset %zu: zero length field in attribute subsection\n" @@ -2767,7 +2860,7 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: поле нульового розміру у підрозділі " "атрибутів\n" -#: src/elflint.c:3487 +#: src/elflint.c:3531 #, c-format msgid "" "section [%2d] '%s': offset %zu: invalid length in attribute subsection\n" @@ -2775,7 +2868,7 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: некоректна довжина у підрозділі атрибутів\n" #. Tag_File -#: src/elflint.c:3498 +#: src/elflint.c:3542 #, c-format msgid "" "section [%2d] '%s': offset %zu: attribute subsection has unexpected tag %u\n" @@ -2783,35 +2876,35 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: підрозділ атрибутів містить неочікуваний " "теґ %u\n" -#: src/elflint.c:3516 +#: src/elflint.c:3560 #, c-format msgid "section [%2d] '%s': offset %zu: endless ULEB128 in attribute tag\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: незавершене поле ULEB128 у тезі атрибуту\n" -#: src/elflint.c:3527 +#: src/elflint.c:3571 #, c-format msgid "section [%2d] '%s': offset %zu: unterminated string in attribute\n" msgstr "розділ [%2d] «%s»: зміщення %zu: незавершений рядок у атрибуті\n" -#: src/elflint.c:3540 +#: src/elflint.c:3584 #, c-format msgid "section [%2d] '%s': offset %zu: unrecognized attribute tag %u\n" msgstr "розділ [%2d] «%s»: зміщення %zu: незавершений теґ атрибуту %u\n" -#: src/elflint.c:3544 +#: src/elflint.c:3588 #, c-format msgid "" "section [%2d] '%s': offset %zu: unrecognized %s attribute value %\n" msgstr "" "розділ [%2d] «%s»: зміщення %zu: невідоме значення %s атрибуту %\n" -#: src/elflint.c:3554 +#: src/elflint.c:3598 #, c-format msgid "section [%2d] '%s': offset %zu: vendor '%s' unknown\n" msgstr "розділ [%2d] «%s»: зміщення %zu: невідомий постачальник «%s»\n" -#: src/elflint.c:3560 +#: src/elflint.c:3604 #, c-format msgid "" "section [%2d] '%s': offset %zu: extra bytes after last attribute section\n" @@ -2819,47 +2912,47 @@ msgstr "" "розділ [%2d] «%s»: зміщення %zu: зайві байти після останнього розділу " "атрибутів\n" -#: src/elflint.c:3649 +#: src/elflint.c:3693 #, c-format msgid "cannot get section header of zeroth section\n" msgstr "не вдалося отримати заголовок нульового розділу\n" -#: src/elflint.c:3653 +#: src/elflint.c:3697 #, c-format msgid "zeroth section has nonzero name\n" msgstr "нульовий розділ має ненульову назву\n" -#: src/elflint.c:3655 +#: src/elflint.c:3699 #, c-format msgid "zeroth section has nonzero type\n" msgstr "нульовий розділ має ненульовий тип\n" -#: src/elflint.c:3657 +#: src/elflint.c:3701 #, c-format msgid "zeroth section has nonzero flags\n" msgstr "нульовий розділ має ненульові прапорці\n" -#: src/elflint.c:3659 +#: src/elflint.c:3703 #, c-format msgid "zeroth section has nonzero address\n" msgstr "нульовий розділ має ненульову адресу\n" -#: src/elflint.c:3661 +#: src/elflint.c:3705 #, c-format msgid "zeroth section has nonzero offset\n" msgstr "нульовий розділ має ненульове зміщення\n" -#: src/elflint.c:3663 +#: src/elflint.c:3707 #, c-format msgid "zeroth section has nonzero align value\n" msgstr "нульовий розділ має ненульове значення вирівнювання\n" -#: src/elflint.c:3665 +#: src/elflint.c:3709 #, c-format msgid "zeroth section has nonzero entry size value\n" msgstr "нульовий розділ має ненульове значення розміру запису\n" -#: src/elflint.c:3668 +#: src/elflint.c:3712 #, c-format msgid "" "zeroth section has nonzero size value while ELF header has nonzero shnum " @@ -2868,7 +2961,7 @@ msgstr "" "нульовий розділ має ненульове значення розміру, хоча заголовок ELF ман " "ненульове значення shnum\n" -#: src/elflint.c:3672 +#: src/elflint.c:3716 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2877,7 +2970,7 @@ msgstr "" "нульовий розділ має ненульове значення компонування, хоча у заголовку ELF " "немає сигналу переповнення у shstrndx\n" -#: src/elflint.c:3676 +#: src/elflint.c:3720 #, c-format msgid "" "zeroth section has nonzero link value while ELF header does not signal " @@ -2886,28 +2979,28 @@ msgstr "" "нульовий розділ має ненульове значення компонування, хоча у заголовку ELF " "немає сигналу переповнення у phnum\n" -#: src/elflint.c:3694 +#: src/elflint.c:3738 #, c-format msgid "cannot get section header for section [%2zu] '%s': %s\n" msgstr "не вдалося отримати заголовок розділу [%2zu] «%s»: %s\n" -#: src/elflint.c:3703 +#: src/elflint.c:3747 #, c-format msgid "section [%2zu]: invalid name\n" msgstr "розділ [%2zu]: некоректна назва\n" -#: src/elflint.c:3730 +#: src/elflint.c:3774 #, c-format msgid "section [%2d] '%s' has wrong type: expected %s, is %s\n" msgstr "" "розділ [%2d] «%s» належить до помилкового типу: мав бути %s, маємо %s\n" -#: src/elflint.c:3748 +#: src/elflint.c:3792 #, c-format msgid "section [%2zu] '%s' has wrong flags: expected %s, is %s\n" msgstr "розділ [%2zu] «%s» має помилкові прапорці: мало бути %s, маємо %s\n" -#: src/elflint.c:3766 +#: src/elflint.c:3810 #, c-format msgid "" "section [%2zu] '%s' has wrong flags: expected %s and possibly %s, is %s\n" @@ -2915,12 +3008,12 @@ msgstr "" "розділ [%2zu] «%s» має помилкові прапорці: мало бути %s, можливо, %s, але " "маємо %s\n" -#: src/elflint.c:3784 +#: src/elflint.c:3828 #, c-format msgid "section [%2zu] '%s' present in object file\n" msgstr "у об’єктному файлі виявлено розділ [%2zu] «%s»\n" -#: src/elflint.c:3790 src/elflint.c:3822 +#: src/elflint.c:3834 src/elflint.c:3866 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag set but there is no loadable segment\n" @@ -2928,7 +3021,7 @@ msgstr "" "у розділ [%2zu] «%s» встановлено прапорець SHF_ALLOC, але немає придатного " "до завантаження сегмента\n" -#: src/elflint.c:3795 src/elflint.c:3827 +#: src/elflint.c:3839 src/elflint.c:3871 #, c-format msgid "" "section [%2zu] '%s' has SHF_ALLOC flag not set but there are loadable " @@ -2937,7 +3030,7 @@ msgstr "" "у розділі [%2zu] «%s» не встановлено прапорець SHF_ALLOC, але є придатні до " "завантаження сегменти\n" -#: src/elflint.c:3803 +#: src/elflint.c:3847 #, c-format msgid "" "section [%2zu] '%s' is extension section index table in non-object file\n" @@ -2945,22 +3038,22 @@ msgstr "" "розділ [%2zu] «%s» є таблицею-покажчиком розділу розширень у файлі, який не " "є об’єктним\n" -#: src/elflint.c:3846 +#: src/elflint.c:3890 #, c-format msgid "section [%2zu] '%s': size not multiple of entry size\n" msgstr "розділ [%2zu] «%s»: розмір не є кратним до розміру запису\n" -#: src/elflint.c:3851 +#: src/elflint.c:3895 #, c-format msgid "cannot get section header\n" msgstr "не вдалося отримати заголовок розділу\n" -#: src/elflint.c:3861 +#: src/elflint.c:3905 #, c-format msgid "section [%2zu] '%s' has unsupported type %d\n" msgstr "розділ [%2zu] «%s» належить до непідтримуваного типу %d\n" -#: src/elflint.c:3876 +#: src/elflint.c:3920 #, c-format msgid "" "section [%2zu] '%s' contains invalid processor-specific flag(s) %#\n" @@ -2968,74 +3061,74 @@ msgstr "" "розділ [%2zu] «%s» містить некоректні специфічні для процесора прапорці " "%#\n" -#: src/elflint.c:3883 +#: src/elflint.c:3927 #, c-format msgid "section [%2zu] '%s' contains unknown flag(s) %#\n" msgstr "розділ [%2zu] «%s» містить невідомі прапорці %#\n" -#: src/elflint.c:3891 +#: src/elflint.c:3935 #, c-format msgid "section [%2zu] '%s': thread-local data sections address not zero\n" msgstr "" "розділ [%2zu] «%s»: адреса розділів локальних даних потоків не є нульовою\n" -#: src/elflint.c:3901 +#: src/elflint.c:3945 #, fuzzy, c-format msgid "section [%2zu] '%s': allocated section cannot be compressed\n" msgstr "" "розділ [%2zu] «%s»: адреса розділів локальних даних потоків не є нульовою\n" -#: src/elflint.c:3906 +#: src/elflint.c:3950 #, fuzzy, c-format msgid "section [%2zu] '%s': nobits section cannot be compressed\n" msgstr "розділ [%2d] «%s»: не виявлено розділу хешів\n" -#: src/elflint.c:3912 +#: src/elflint.c:3956 #, fuzzy, c-format msgid "" "section [%2zu] '%s': compressed section with no compression header: %s\n" msgstr "розділ [%2d] «%s»: група розділів, що містить лише один елемент\n" -#: src/elflint.c:3918 +#: src/elflint.c:3962 #, c-format msgid "section [%2zu] '%s': invalid section reference in link value\n" msgstr "" "розділ [%2zu] «%s»: некоректне посилання на розділ у значенні компонування\n" -#: src/elflint.c:3923 +#: src/elflint.c:3967 #, c-format msgid "section [%2zu] '%s': invalid section reference in info value\n" msgstr "" "розділ [%2zu] «%s»: некоректне посилання на розділ у значенні відомостей\n" -#: src/elflint.c:3930 +#: src/elflint.c:3974 #, c-format msgid "section [%2zu] '%s': strings flag set without merge flag\n" msgstr "розділ [%2zu] «%s»: встановлено прапорець strings без прапорця merge\n" -#: src/elflint.c:3935 +#: src/elflint.c:3979 #, c-format msgid "section [%2zu] '%s': merge flag set but entry size is zero\n" msgstr "" "розділ [%2zu] «%s»: встановлено прапорець merge, але розмір запису є " "нульовим\n" -#: src/elflint.c:3954 +#: src/elflint.c:3998 #, c-format msgid "section [%2zu] '%s' has unexpected type %d for an executable section\n" msgstr "розділ [%2zu] «%s» має неочікуваний тип %d для виконуваного розділу\n" -#: src/elflint.c:3963 +#: src/elflint.c:4007 #, fuzzy, c-format msgid "section [%2zu] '%s' must be of type NOBITS in debuginfo files\n" msgstr "розділ [%2zu] «%s» не повинен бути придатним до запису\n" -#: src/elflint.c:3970 +#: src/elflint.c:4014 #, c-format msgid "section [%2zu] '%s' is both executable and writable\n" msgstr "розділ [%2zu] «%s» є одночасно виконуваним і придатним до запису\n" -#: src/elflint.c:4001 +#: src/elflint.c:4045 #, c-format msgid "" "section [%2zu] '%s' not fully contained in segment of program header entry " @@ -3044,7 +3137,7 @@ msgstr "" "розділ [%2zu] «%s» не повністю міститься у сегменті запису заголовка " "програми %d\n" -#: src/elflint.c:4011 +#: src/elflint.c:4055 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -3053,7 +3146,7 @@ msgstr "" "розділ [%2zu] «%s» належить до типу NOBITS, але його читання виконується з " "файла у сегментів запису заголовка програми %d\n" -#: src/elflint.c:4037 +#: src/elflint.c:4081 #, c-format msgid "" "section [%2zu] '%s' has type NOBITS but is read from the file in segment of " @@ -3062,7 +3155,7 @@ msgstr "" "розділ [%2zu] «%s» належить до типу NOBITS, але його читання виконується з " "файла у сегментів запису заголовка програми %d, а вміст файла є ненульовим\n" -#: src/elflint.c:4048 +#: src/elflint.c:4092 #, c-format msgid "" "section [%2zu] '%s' has not type NOBITS but is not read from the file in " @@ -3071,19 +3164,19 @@ msgstr "" "розділ [%2zu] «%s» не належить до типу NOBITS, але його читання не " "виконується з файла у сегментів запису заголовка програми %d\n" -#: src/elflint.c:4059 +#: src/elflint.c:4103 #, c-format msgid "section [%2zu] '%s' is executable in nonexecutable segment %d\n" msgstr "розділ [%2zu] «%s» є виконуваним у невиконуваному сегменті %d\n" -#: src/elflint.c:4069 +#: src/elflint.c:4113 #, c-format msgid "section [%2zu] '%s' is writable in unwritable segment %d\n" msgstr "" "розділ [%2zu] «%s» є придатним до запису у непридатному до запису сегменті " "%d\n" -#: src/elflint.c:4079 +#: src/elflint.c:4123 #, c-format msgid "" "section [%2zu] '%s': alloc flag set but section not in any loaded segment\n" @@ -3091,7 +3184,7 @@ msgstr "" "розділ [%2zu] «%s»: встановлено прапорець alloc, але розділ не перебуває у " "жодному завантаженому сегменті\n" -#: src/elflint.c:4085 +#: src/elflint.c:4129 #, c-format msgid "" "section [%2zu] '%s': ELF header says this is the section header string table " @@ -3100,7 +3193,7 @@ msgstr "" "розділ [%2zu] «%s»: заголовок ELF повідомляє про те, що це таблиця рядків " "заголовка розділу, але ця таблиця не належить до типу SHT_TYPE\n" -#: src/elflint.c:4093 +#: src/elflint.c:4137 #, c-format msgid "" "section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n" @@ -3108,17 +3201,17 @@ msgstr "" "розділ [%2zu] «%s»: придатні до пересування файли не можуть містити " "динамічних таблиць символів\n" -#: src/elflint.c:4144 +#: src/elflint.c:4188 #, c-format msgid "more than one version symbol table present\n" msgstr "виявлено більше за одну таблицю символів версій\n" -#: src/elflint.c:4167 +#: src/elflint.c:4211 #, c-format msgid "INTERP program header entry but no .interp section\n" msgstr "існує запис заголовка програми INTERP, але не розділ .interp\n" -#: src/elflint.c:4178 +#: src/elflint.c:4222 #, c-format msgid "" "loadable segment [%u] is executable but contains no executable sections\n" @@ -3126,14 +3219,14 @@ msgstr "" "придатний до завантаження сегмент [%u] є виконуваним, але не містить " "виконуваних розділів\n" -#: src/elflint.c:4184 +#: src/elflint.c:4228 #, c-format msgid "loadable segment [%u] is writable but contains no writable sections\n" msgstr "" "придатний до завантаження розділ [%u] є придатним до запису, але не містить " "придатних до запису розділів\n" -#: src/elflint.c:4195 +#: src/elflint.c:4239 #, c-format msgid "" "no .gnu.versym section present but .gnu.versym_d or .gnu.versym_r section " @@ -3142,24 +3235,24 @@ msgstr "" "немає розділу .gnu.versym, хоча існує розділ .gnu.versym_d або .gnu." "versym_r\n" -#: src/elflint.c:4208 +#: src/elflint.c:4252 #, c-format msgid "duplicate version index %d\n" msgstr "дублікат індексу версії %d\n" -#: src/elflint.c:4222 +#: src/elflint.c:4266 #, c-format msgid ".gnu.versym section present without .gnu.versym_d or .gnu.versym_r\n" msgstr "" "існує розділ .gnu.versym, але немає розділу .gnu.versym_d або .gnu.versym_r\n" -#: src/elflint.c:4271 +#: src/elflint.c:4315 #, c-format msgid "phdr[%d]: unknown core file note type % at offset %\n" msgstr "" "phdr[%d]: невідомий тип нотатки файла core % за зміщенням %\n" -#: src/elflint.c:4275 +#: src/elflint.c:4319 #, c-format msgid "" "section [%2d] '%s': unknown core file note type % at offset %zu\n" @@ -3167,13 +3260,13 @@ msgstr "" "розділ [%2d] «%s»: невідомий тип нотатки файла core % за зміщенням " "%zu\n" -#: src/elflint.c:4298 +#: src/elflint.c:4342 #, c-format msgid "phdr[%d]: unknown object file note type % at offset %zu\n" msgstr "" "phdr[%d]: невідомий тип нотатки об’єктного файла % за зміщенням %zu\n" -#: src/elflint.c:4302 +#: src/elflint.c:4346 #, c-format msgid "" "section [%2d] '%s': unknown object file note type % at offset %zu\n" @@ -3181,39 +3274,39 @@ msgstr "" "розділ [%2d] «%s»: невідомий тип нотатки об’єктного файла % за " "зміщенням %zu\n" -#: src/elflint.c:4319 +#: src/elflint.c:4363 #, c-format msgid "phdr[%d]: no note entries defined for the type of file\n" msgstr "phdr[%d]: для цього типу файлів не визначено записів нотаток\n" -#: src/elflint.c:4338 +#: src/elflint.c:4382 #, c-format msgid "phdr[%d]: cannot get content of note section: %s\n" msgstr "phdr[%d]: не вдалося отримати вміст розділу нотаток: %s\n" -#: src/elflint.c:4341 +#: src/elflint.c:4385 #, c-format msgid "phdr[%d]: extra % bytes after last note\n" msgstr "phdr[%d]: зайві % байтів після останнього запису нотатки\n" -#: src/elflint.c:4362 +#: src/elflint.c:4406 #, c-format msgid "section [%2d] '%s': no note entries defined for the type of file\n" msgstr "" "розділ [%2d] «%s»: для цього типу файлів не визначено записів нотаток\n" -#: src/elflint.c:4369 +#: src/elflint.c:4413 #, c-format msgid "section [%2d] '%s': cannot get content of note section\n" msgstr "розділ [%2d] «%s»: не вдалося отримати вміст розділу нотаток\n" -#: src/elflint.c:4372 +#: src/elflint.c:4416 #, c-format msgid "section [%2d] '%s': extra % bytes after last note\n" msgstr "" "розділ [%2d] «%s»: додаткові % байтів після останньої нотатки\n" -#: src/elflint.c:4390 +#: src/elflint.c:4434 #, c-format msgid "" "only executables, shared objects, and core files can have program headers\n" @@ -3221,141 +3314,141 @@ msgstr "" "заголовки програм можуть бути лише у виконуваних файлів, об’єктних файлів " "спільного використання або файлів core\n" -#: src/elflint.c:4405 +#: src/elflint.c:4449 #, c-format msgid "cannot get program header entry %d: %s\n" msgstr "не вдалося отримати запис заголовка програми %d: %s\n" -#: src/elflint.c:4414 +#: src/elflint.c:4458 #, c-format msgid "program header entry %d: unknown program header entry type %#\n" msgstr "" "запис заголовка програми %d: невідомий тип запису заголовка програми " "%#\n" -#: src/elflint.c:4425 +#: src/elflint.c:4469 #, c-format msgid "more than one INTERP entry in program header\n" msgstr "більше за один запис INTERP у заголовку програми\n" -#: src/elflint.c:4433 +#: src/elflint.c:4477 #, c-format msgid "more than one TLS entry in program header\n" msgstr "більше за один запис TLS у заголовку програми\n" -#: src/elflint.c:4440 +#: src/elflint.c:4484 #, c-format msgid "static executable cannot have dynamic sections\n" msgstr "у статичному виконуваному файлі не може бути динамічних розділів\n" -#: src/elflint.c:4454 +#: src/elflint.c:4498 #, c-format msgid "dynamic section reference in program header has wrong offset\n" msgstr "" "посилання на динамічний розділ у заголовку програми має помилкове зміщення\n" -#: src/elflint.c:4457 +#: src/elflint.c:4501 #, c-format msgid "dynamic section size mismatch in program and section header\n" msgstr "" "розміри динамічного розділу у заголовку програми та у заголовку розділу не " "збігаються\n" -#: src/elflint.c:4467 +#: src/elflint.c:4511 #, c-format msgid "more than one GNU_RELRO entry in program header\n" msgstr "більше за один запис GNU_RELRO у заголовку програми\n" -#: src/elflint.c:4488 +#: src/elflint.c:4532 #, c-format msgid "loadable segment GNU_RELRO applies to is not writable\n" msgstr "" "придатний до завантаження сегмент, до якого звертається GNU_RELRO, " "непридатний до запису\n" -#: src/elflint.c:4499 +#: src/elflint.c:4543 #, c-format msgid "loadable segment [%u] flags do not match GNU_RELRO [%u] flags\n" msgstr "" "прапорці придатного до завантаження сегмента [%u] не відповідають прапорцям " "GNU_RELRO [%u]\n" -#: src/elflint.c:4506 +#: src/elflint.c:4550 #, c-format msgid "" "GNU_RELRO [%u] flags are not a subset of the loadable segment [%u] flags\n" msgstr "" -#: src/elflint.c:4515 src/elflint.c:4538 +#: src/elflint.c:4559 src/elflint.c:4582 #, c-format msgid "%s segment not contained in a loaded segment\n" msgstr "сегмент %s не міститься у завантаженому сегменті\n" -#: src/elflint.c:4544 +#: src/elflint.c:4588 #, c-format msgid "program header offset in ELF header and PHDR entry do not match" msgstr "зміщення заголовка програми у заголовку ELF і запис PHDR не збігаються" -#: src/elflint.c:4569 +#: src/elflint.c:4613 #, c-format msgid "call frame search table reference in program header has wrong offset\n" msgstr "" "посилання на таблицю вікон викликів у заголовку програми має помилкове " "зміщення\n" -#: src/elflint.c:4572 +#: src/elflint.c:4616 #, c-format msgid "call frame search table size mismatch in program and section header\n" msgstr "" "розміри таблиці пошуку вікон виклику у заголовку програми та у заголовку " "розділу не збігаються\n" -#: src/elflint.c:4585 +#: src/elflint.c:4629 #, c-format msgid "PT_GNU_EH_FRAME present but no .eh_frame_hdr section\n" msgstr "існує PT_GNU_EH_FRAME, хоча немає розділу .eh_frame_hdr\n" -#: src/elflint.c:4593 +#: src/elflint.c:4637 #, c-format msgid "call frame search table must be allocated\n" msgstr "таблицю пошуку вікон викликів має бути розміщено у пам’яті\n" -#: src/elflint.c:4596 +#: src/elflint.c:4640 #, c-format msgid "section [%2zu] '%s' must be allocated\n" msgstr "розділ [%2zu] «%s» має бути розміщено у пам’яті\n" -#: src/elflint.c:4600 +#: src/elflint.c:4644 #, c-format msgid "call frame search table must not be writable\n" msgstr "таблиця пошуку вікон викликів не повинна бути придатною до запису\n" -#: src/elflint.c:4603 +#: src/elflint.c:4647 #, c-format msgid "section [%2zu] '%s' must not be writable\n" msgstr "розділ [%2zu] «%s» не повинен бути придатним до запису\n" -#: src/elflint.c:4608 +#: src/elflint.c:4652 #, c-format msgid "call frame search table must not be executable\n" msgstr "таблиця пошуку вікон викликів не повинна бути придатною до виконання\n" -#: src/elflint.c:4611 +#: src/elflint.c:4655 #, c-format msgid "section [%2zu] '%s' must not be executable\n" msgstr "розділ [%2zu] «%s» не повинен бути придатним до виконання\n" -#: src/elflint.c:4622 +#: src/elflint.c:4666 #, c-format msgid "program header entry %d: file size greater than memory size\n" msgstr "запис заголовка програми %d: розмір файла перевищує об’єм пам’яті\n" -#: src/elflint.c:4629 +#: src/elflint.c:4673 #, c-format msgid "program header entry %d: alignment not a power of 2\n" msgstr "запис заголовка програми %d: значення вирівнювання не є степенем 2\n" -#: src/elflint.c:4632 +#: src/elflint.c:4676 #, c-format msgid "" "program header entry %d: file offset and virtual address not module of " @@ -3364,7 +3457,7 @@ msgstr "" "запис заголовка програми %d: зміщення у файлі і віртуальна адреса не " "співвідносяться з вирівнюванням\n" -#: src/elflint.c:4645 +#: src/elflint.c:4689 #, c-format msgid "" "executable/DSO with .eh_frame_hdr section does not have a PT_GNU_EH_FRAME " @@ -3373,12 +3466,12 @@ msgstr "" "виконуваний модуль/DSO з розділом .eh_frame_hdr не містить запису заголовка " "програми PT_GNU_EH_FRAME" -#: src/elflint.c:4679 +#: src/elflint.c:4723 #, c-format msgid "cannot read ELF header: %s\n" msgstr "не вдалося прочитати заголовок ELF: %s\n" -#: src/elflint.c:4705 +#: src/elflint.c:4749 #, c-format msgid "text relocation flag set but not needed\n" msgstr "" @@ -3402,8 +3495,8 @@ msgid "Locate source of text relocations in FILEs (a.out by default)." msgstr "Шукає джерело пересуваного тексту у ФАЙЛАХ (типово, a.out)." #. Strings for arguments in help texts. -#: src/findtextrel.c:75 src/nm.c:107 src/objdump.c:70 src/size.c:81 -#: src/strings.c:87 src/strip.c:95 +#: src/findtextrel.c:75 src/nm.c:109 src/objdump.c:72 src/size.c:81 +#: src/strings.c:88 src/strip.c:99 msgid "[FILE...]" msgstr "[ФАЙЛ...]" @@ -3496,43 +3589,43 @@ msgstr "" "пересування призводить до зміни запису пам’яті за зміщенням %llu у " "захищеному від запису сегменті\n" -#: src/nm.c:65 src/strip.c:67 +#: src/nm.c:67 src/strip.c:70 msgid "Output selection:" msgstr "Вибір виводу:" -#: src/nm.c:66 +#: src/nm.c:68 msgid "Display debugger-only symbols" msgstr "Показувати лише діагностичні символи" -#: src/nm.c:67 +#: src/nm.c:69 msgid "Display only defined symbols" msgstr "Показувати лише визначені символи" -#: src/nm.c:70 +#: src/nm.c:72 msgid "Display dynamic symbols instead of normal symbols" msgstr "Показувати динамічні символи замість звичайних символів" -#: src/nm.c:71 +#: src/nm.c:73 msgid "Display only external symbols" msgstr "Показувати лише зовнішні символи" -#: src/nm.c:72 +#: src/nm.c:74 msgid "Display only undefined symbols" msgstr "Показувати лише невизначені символи" -#: src/nm.c:74 +#: src/nm.c:76 msgid "Include index for symbols from archive members" msgstr "Включити покажчик для символів з елементів архіву" -#: src/nm.c:76 src/size.c:55 +#: src/nm.c:78 src/size.c:55 msgid "Output format:" msgstr "Формат виводу:" -#: src/nm.c:78 +#: src/nm.c:80 msgid "Print name of the input file before every symbol" msgstr "Виводити перед кожним символом назву вхідного файла" -#: src/nm.c:81 +#: src/nm.c:83 msgid "" "Use the output format FORMAT. FORMAT can be `bsd', `sysv' or `posix'. The " "default is `sysv'" @@ -3540,73 +3633,73 @@ msgstr "" "Використовувати формат виводу ФОРМАТ. ФОРМАТом може бути «bsd», «sysv» або " "«posix». Типовим форматом є «sysv»" -#: src/nm.c:83 +#: src/nm.c:85 msgid "Same as --format=bsd" msgstr "Те саме, що і --format=bsd" -#: src/nm.c:84 +#: src/nm.c:86 msgid "Same as --format=posix" msgstr "Те саме, що і --format=posix" -#: src/nm.c:85 src/size.c:61 +#: src/nm.c:87 src/size.c:61 msgid "Use RADIX for printing symbol values" msgstr "Використовувати ОСНОВУ числення для виводу символьних значень" -#: src/nm.c:86 +#: src/nm.c:88 msgid "Mark special symbols" msgstr "Позначати спеціальні символи" -#: src/nm.c:88 +#: src/nm.c:90 msgid "Print size of defined symbols" msgstr "Вивести розмір визначених символів" -#: src/nm.c:90 src/size.c:69 src/strip.c:72 src/unstrip.c:73 +#: src/nm.c:92 src/size.c:69 src/strip.c:75 src/unstrip.c:73 msgid "Output options:" msgstr "Параметри виводу:" -#: src/nm.c:91 +#: src/nm.c:93 msgid "Sort symbols numerically by address" msgstr "Числове впорядкування символів за адресою" -#: src/nm.c:93 +#: src/nm.c:95 msgid "Do not sort the symbols" msgstr "Не впорядковувати символи" -#: src/nm.c:94 +#: src/nm.c:96 msgid "Reverse the sense of the sort" msgstr "Змінити порядок на протилежний" -#: src/nm.c:97 +#: src/nm.c:99 msgid "Decode low-level symbol names into source code names" msgstr "Визначати за низькорівневими назвами символів назви у початковому коді" #. Short description of program. -#: src/nm.c:104 +#: src/nm.c:106 msgid "List symbols from FILEs (a.out by default)." msgstr "Показати список символів з ФАЙЛів (типово з a.out)." -#: src/nm.c:115 src/objdump.c:78 +#: src/nm.c:117 src/objdump.c:80 msgid "Output formatting" msgstr "Форматування виводу" -#: src/nm.c:139 src/objdump.c:102 src/size.c:106 src/strip.c:127 +#: src/nm.c:141 src/objdump.c:104 src/size.c:106 src/strip.c:131 #, c-format msgid "%s: INTERNAL ERROR %d (%s): %s" msgstr "%s: ВНУТРІШНЯ ПОМИЛКА %d (%s): %s" -#: src/nm.c:380 src/nm.c:392 src/size.c:289 src/size.c:298 src/size.c:309 -#: src/strip.c:2298 +#: src/nm.c:382 src/nm.c:394 src/size.c:289 src/size.c:298 src/size.c:309 +#: src/strip.c:2421 #, c-format msgid "while closing '%s'" msgstr "під час закриття «%s»" -#: src/nm.c:402 src/objdump.c:279 src/strip.c:377 +#: src/nm.c:404 src/objdump.c:281 src/strip.c:443 #, c-format msgid "%s: File format not recognized" msgstr "%s: не вдалося розпізнати формат файла" #. Note: 0 is no valid offset. -#: src/nm.c:442 +#: src/nm.c:444 msgid "" "\n" "Archive index:\n" @@ -3614,44 +3707,44 @@ msgstr "" "\n" "Покажчик архіву:\n" -#: src/nm.c:451 +#: src/nm.c:453 #, c-format msgid "invalid offset %zu for symbol %s" msgstr "некоректне зміщення %zu для символу %s" -#: src/nm.c:456 +#: src/nm.c:458 #, c-format msgid "%s in %s\n" msgstr "%s у %s\n" -#: src/nm.c:464 +#: src/nm.c:466 #, c-format msgid "cannot reset archive offset to beginning" msgstr "не вдалося відновити зміщення початку архіву" -#: src/nm.c:489 src/objdump.c:327 +#: src/nm.c:491 src/objdump.c:329 #, c-format msgid "%s%s%s: file format not recognized" msgstr "%s%s%s: не вдалося розпізнати формат файла" -#: src/nm.c:704 +#: src/nm.c:706 #, c-format msgid "cannot create search tree" msgstr "не вдалося створити дерево пошуку" -#: src/nm.c:745 src/nm.c:1206 src/objdump.c:776 src/readelf.c:535 -#: src/readelf.c:1113 src/readelf.c:1313 src/readelf.c:1461 src/readelf.c:1662 -#: src/readelf.c:1868 src/readelf.c:2058 src/readelf.c:2236 src/readelf.c:2312 -#: src/readelf.c:2570 src/readelf.c:2646 src/readelf.c:2733 src/readelf.c:3313 -#: src/readelf.c:3363 src/readelf.c:3426 src/readelf.c:8337 src/readelf.c:9437 -#: src/readelf.c:9640 src/readelf.c:9708 src/size.c:397 src/size.c:466 -#: src/strip.c:506 +#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:606 +#: src/readelf.c:1196 src/readelf.c:1396 src/readelf.c:1544 src/readelf.c:1745 +#: src/readelf.c:1951 src/readelf.c:2141 src/readelf.c:2319 src/readelf.c:2395 +#: src/readelf.c:2653 src/readelf.c:2729 src/readelf.c:2816 src/readelf.c:3414 +#: src/readelf.c:3464 src/readelf.c:3527 src/readelf.c:11028 +#: src/readelf.c:12200 src/readelf.c:12403 src/readelf.c:12471 src/size.c:397 +#: src/size.c:466 src/strip.c:572 #, c-format msgid "cannot get section header string table index" msgstr "не вдалося визначити індекс заголовка розділу у таблиці рядків" #. We always print this prolog. -#: src/nm.c:772 +#: src/nm.c:774 #, c-format msgid "" "\n" @@ -3665,7 +3758,7 @@ msgstr "" "\n" #. The header line. -#: src/nm.c:775 +#: src/nm.c:777 #, c-format msgid "" "%*s%-*s %-*s Class Type %-*s %*s Section\n" @@ -3674,79 +3767,79 @@ msgstr "" "%*s%-*s %-*s Клас Тип %-*s %*s Розділ\n" "\n" -#: src/nm.c:1217 +#: src/nm.c:1219 #, c-format msgid "%s: entry size in section %zd `%s' is not what we expect" msgstr "%s: розмір запису у розділі %zd «%s» не є очікуваним" -#: src/nm.c:1222 +#: src/nm.c:1224 #, c-format msgid "%s: size of section %zd `%s' is not multiple of entry size" msgstr "%s: розмір розділу %zd «%s» не є кратним до розміру запису" -#: src/nm.c:1301 +#: src/nm.c:1303 #, fuzzy, c-format msgid "%s: entries (%zd) in section %zd `%s' is too large" msgstr "%s: розмір запису у розділі %zd «%s» не є очікуваним" #. XXX Add machine specific object file types. -#: src/nm.c:1527 +#: src/nm.c:1529 #, c-format msgid "%s%s%s%s: Invalid operation" msgstr "%s%s%s%s: некоректна дія" -#: src/nm.c:1584 +#: src/nm.c:1586 #, c-format msgid "%s%s%s: no symbols" msgstr "%s%s%s: немає символів" -#: src/objdump.c:51 +#: src/objdump.c:53 msgid "Mode selection:" msgstr "Вибір режиму:" -#: src/objdump.c:52 +#: src/objdump.c:54 msgid "Display relocation information." msgstr "Показати інформацію про пересування." -#: src/objdump.c:54 +#: src/objdump.c:56 msgid "Display the full contents of all sections requested" msgstr "Показати весь вміст всіх вказаних розділів" -#: src/objdump.c:56 +#: src/objdump.c:58 msgid "Display assembler code of executable sections" msgstr "Показати код асемблера виконуваних розділів" -#: src/objdump.c:58 +#: src/objdump.c:60 msgid "Output content selection:" msgstr "Вибір виведених даних:" -#: src/objdump.c:60 +#: src/objdump.c:62 msgid "Only display information for section NAME." msgstr "Показати інформацію лише з розділу НАЗВА." #. Short description of program. -#: src/objdump.c:66 +#: src/objdump.c:68 msgid "Show information from FILEs (a.out by default)." msgstr "Показати інформацію з ФАЙЛів (типово a.out)." -#: src/objdump.c:217 src/readelf.c:483 +#: src/objdump.c:219 src/readelf.c:551 msgid "No operation specified.\n" msgstr "Не вказано дії.\n" -#: src/objdump.c:257 src/objdump.c:269 +#: src/objdump.c:259 src/objdump.c:271 #, c-format msgid "while close `%s'" msgstr "під час закриття «%s»" -#: src/objdump.c:362 src/readelf.c:1963 src/readelf.c:2155 +#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238 msgid "INVALID SYMBOL" msgstr "НЕКОРЕКТНИЙ СИМВОЛ" -#: src/objdump.c:377 src/readelf.c:1997 src/readelf.c:2191 +#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274 msgid "INVALID SECTION" msgstr "НЕКОРЕКТНИЙ РОЗДІЛ" -#: src/objdump.c:497 +#: src/objdump.c:499 #, c-format msgid "" "\n" @@ -3757,297 +3850,318 @@ msgstr "" "ЗАПИСИ ПЕРЕМІЩЕННЯ ДЛЯ [%s]:\n" "%-*s ТИП ЗНАЧЕННЯ\n" -#: src/objdump.c:500 +#: src/objdump.c:502 msgid "OFFSET" msgstr "ЗМІЩЕННЯ" -#: src/objdump.c:565 +#: src/objdump.c:567 #, c-format msgid "Contents of section %s:\n" msgstr "Вміст розділу %s:\n" -#: src/objdump.c:686 +#: src/objdump.c:688 #, c-format msgid "cannot disassemble" msgstr "не вдалося дизасемблювати" #. Short description of program. -#: src/ranlib.c:63 +#: src/ranlib.c:64 msgid "Generate an index to speed access to archives." msgstr "Створювати покажчик для пришвидшення доступу до архівів." #. Strings for arguments in help texts. -#: src/ranlib.c:66 +#: src/ranlib.c:67 msgid "ARCHIVE" msgstr "АРХІВ" -#: src/ranlib.c:102 +#: src/ranlib.c:103 #, c-format msgid "Archive name required" msgstr "Слід вказати назву архіву" -#: src/ranlib.c:166 +#: src/ranlib.c:167 #, c-format msgid "'%s' is no archive" msgstr "«%s» не є архівом" -#: src/ranlib.c:201 +#: src/ranlib.c:202 #, c-format msgid "error while freeing sub-ELF descriptor: %s" msgstr "помилка під час спроби вивільнення дескриптора під-ELF: %s" -#: src/readelf.c:71 +#: src/readelf.c:95 msgid "ELF input selection:" msgstr "Вибір вихідних даних ELF:" -#: src/readelf.c:73 +#: src/readelf.c:97 msgid "" "Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data" msgstr "" "Використовувати вказаний за іменем РОЗДІЛ (типово .gnu_debugdata) як " "(стиснені) вхідні дані ELF" -#: src/readelf.c:75 +#: src/readelf.c:100 +msgid "" +"Used with -w to find the skeleton Compile Units in FILE associated with the " +"Split Compile units in a .dwo input file" +msgstr "" + +#: src/readelf.c:102 msgid "ELF output selection:" msgstr "Вибір виводу ELF:" -#: src/readelf.c:77 +#: src/readelf.c:104 msgid "All these plus -p .strtab -p .dynstr -p .comment" msgstr "Все це плюс -p .strtab -p .dynstr -p .comment" -#: src/readelf.c:78 +#: src/readelf.c:105 msgid "Display the dynamic segment" msgstr "Показувати динамічний сегмент" -#: src/readelf.c:79 +#: src/readelf.c:106 msgid "Display the ELF file header" msgstr "Показувати заголовок файла ELF" -#: src/readelf.c:81 +#: src/readelf.c:108 msgid "Display histogram of bucket list lengths" msgstr "Показати гістограму довжин списку блоків" -#: src/readelf.c:82 +#: src/readelf.c:109 msgid "Display the program headers" msgstr "Показувати заголовки програми" -#: src/readelf.c:84 +#: src/readelf.c:111 msgid "Display relocations" msgstr "Показувати пересування" -#: src/readelf.c:85 +#: src/readelf.c:112 +#, fuzzy +msgid "Display the section groups" +msgstr "Показувати заголовки розділів" + +#: src/readelf.c:113 msgid "Display the sections' headers" msgstr "Показувати заголовки розділів" -#: src/readelf.c:88 +#: src/readelf.c:116 #, fuzzy msgid "Display the symbol table sections" msgstr "Показувати таблицю символів" -#: src/readelf.c:89 +#: src/readelf.c:117 msgid "Display versioning information" msgstr "Показувати відомості щодо версії" -#: src/readelf.c:90 +#: src/readelf.c:118 msgid "Display the ELF notes" msgstr "Показувати нотатки ELF" -#: src/readelf.c:92 +#: src/readelf.c:120 msgid "Display architecture specific information, if any" msgstr "Показувати специфічні для архітектури дані, якщо такі буде виявлено" -#: src/readelf.c:94 +#: src/readelf.c:122 msgid "Display sections for exception handling" msgstr "Показувати розділи для обробки виключень" -#: src/readelf.c:96 +#: src/readelf.c:124 msgid "Additional output selection:" msgstr "Додатковий вибір виводу:" -#: src/readelf.c:98 +#: src/readelf.c:126 +#, fuzzy msgid "" -"Display DWARF section content. SECTION can be one of abbrev, aranges, " -"decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " -"pubnames, str, macinfo, macro or exception" +"Display DWARF section content. SECTION can be one of abbrev, addr, aranges, " +"decodedaranges, frame, gdb_index, info, info+, loc, line, decodedline, " +"ranges, pubnames, str, macinfo, macro or exception" msgstr "" "Показати вміст розділу DWARF. Значенням РОЗДІЛ може бути abbrev, aranges, " "decodedaranges, frame, gdb_index, info, loc, line, decodedline, ranges, " "pubnames, str, macinfo, macro або exception" -#: src/readelf.c:102 +#: src/readelf.c:130 msgid "Dump the uninterpreted contents of SECTION, by number or name" msgstr "" "Створити дамп даних РОЗДІЛ, які не вдалося інтерпретувати, за номером або " "назвами" -#: src/readelf.c:104 +#: src/readelf.c:132 msgid "Print string contents of sections" msgstr "Виводити вміст рядків розділів" -#: src/readelf.c:107 +#: src/readelf.c:135 msgid "Display the symbol index of an archive" msgstr "Показувати покажчик символів архіву" -#: src/readelf.c:109 +#: src/readelf.c:137 msgid "Output control:" msgstr "Керування виводом:" -#: src/readelf.c:111 +#: src/readelf.c:139 msgid "Do not find symbol names for addresses in DWARF data" msgstr "Не шукати назви символів для адрес у даних DWARF" -#: src/readelf.c:113 +#: src/readelf.c:141 msgid "" "Display just offsets instead of resolving values to addresses in DWARF data" msgstr "Показати лише зміщення, а не визначені значення адреси у даних DWARF" -#: src/readelf.c:115 +#: src/readelf.c:143 msgid "Ignored for compatibility (lines always wide)" msgstr "Ігнорується з міркувань сумісності (рядки завжди широкі)" -#: src/readelf.c:117 +#: src/readelf.c:145 msgid "" "Show compression information for compressed sections (when used with -S); " "decompress section before dumping data (when used with -p or -x)" msgstr "" #. Short description of program. -#: src/readelf.c:122 +#: src/readelf.c:150 msgid "Print information from ELF file in human-readable form." msgstr "Виводити відомості з файла ELF у придатному для читання форматі." -#: src/readelf.c:451 +#. Look up once. +#: src/readelf.c:329 +msgid "yes" +msgstr "так" + +#: src/readelf.c:330 +msgid "no" +msgstr "ні" + +#: src/readelf.c:519 #, c-format msgid "Unknown DWARF debug section `%s'.\n" msgstr "Невідомий діагностичний розділ DWARF «%s».\n" -#: src/readelf.c:519 src/readelf.c:630 +#: src/readelf.c:590 src/readelf.c:701 #, c-format msgid "cannot generate Elf descriptor: %s" msgstr "не вдалося створити дескриптор Elf: %s" -#: src/readelf.c:526 src/readelf.c:842 src/strip.c:575 +#: src/readelf.c:597 src/readelf.c:925 src/strip.c:641 #, c-format msgid "cannot determine number of sections: %s" msgstr "не вдалося визначити кількість розділів: %s" -#: src/readelf.c:544 src/readelf.c:1135 src/readelf.c:1337 +#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420 #, c-format msgid "cannot get section: %s" msgstr "не вдалося отримати розділ: %s" -#: src/readelf.c:553 src/readelf.c:1142 src/readelf.c:1345 src/readelf.c:9660 +#: src/readelf.c:624 src/readelf.c:1225 src/readelf.c:1428 src/readelf.c:12423 #: src/unstrip.c:375 src/unstrip.c:406 src/unstrip.c:455 src/unstrip.c:565 -#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1106 -#: src/unstrip.c:1298 src/unstrip.c:1359 src/unstrip.c:1532 src/unstrip.c:1647 -#: src/unstrip.c:1787 src/unstrip.c:1882 +#: src/unstrip.c:582 src/unstrip.c:619 src/unstrip.c:817 src/unstrip.c:1109 +#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650 +#: src/unstrip.c:1790 src/unstrip.c:1885 #, c-format msgid "cannot get section header: %s" msgstr "не вдалося отримати заголовок розділу: %s" -#: src/readelf.c:561 +#: src/readelf.c:632 #, c-format msgid "cannot get section name" msgstr "не вдалося отримати назву розділу" -#: src/readelf.c:570 src/readelf.c:5521 src/readelf.c:7795 src/readelf.c:7897 -#: src/readelf.c:8074 +#: src/readelf.c:641 src/readelf.c:6517 src/readelf.c:10301 src/readelf.c:10403 +#: src/readelf.c:10580 #, c-format msgid "cannot get %s content: %s" msgstr "не вдалося отримати дані %s: %s" -#: src/readelf.c:586 +#: src/readelf.c:657 #, c-format msgid "cannot create temp file '%s'" msgstr "не вдалося створити файл тимчасових даних «%s»" -#: src/readelf.c:595 +#: src/readelf.c:666 #, c-format msgid "cannot write section data" msgstr "не вдалося записати дані розділу" -#: src/readelf.c:601 src/readelf.c:618 src/readelf.c:647 +#: src/readelf.c:672 src/readelf.c:689 src/readelf.c:718 #, c-format msgid "error while closing Elf descriptor: %s" msgstr "помилка під час спроби закриття дескриптора Elf: %s" -#: src/readelf.c:608 +#: src/readelf.c:679 #, c-format msgid "error while rewinding file descriptor" msgstr "помилка під час повернення до початкового значення дескриптора файла" -#: src/readelf.c:642 +#: src/readelf.c:713 #, c-format msgid "'%s' is not an archive, cannot print archive index" msgstr "«%s» не є архівом, виведення покажчика архіву неможливе" -#: src/readelf.c:741 -#, c-format -msgid "No such section '%s' in '%s'" -msgstr "У «%2$s» немає розділу «%1$s»" - -#: src/readelf.c:768 +#: src/readelf.c:817 #, c-format msgid "cannot stat input file" msgstr "не вдалося отримати дані з вхідного файла за допомогою stat" -#: src/readelf.c:770 +#: src/readelf.c:819 #, c-format msgid "input file is empty" msgstr "вхідний файл є порожнім" -#: src/readelf.c:772 +#: src/readelf.c:821 #, c-format msgid "failed reading '%s': %s" msgstr "не вдалося прочитати «%s»: %s" -#: src/readelf.c:827 +#: src/readelf.c:850 +#, c-format +msgid "No such section '%s' in '%s'" +msgstr "У «%2$s» немає розділу «%1$s»" + +#: src/readelf.c:910 #, c-format msgid "cannot read ELF header: %s" msgstr "не вдалося прочитати заголовок ELF: %s" -#: src/readelf.c:835 +#: src/readelf.c:918 #, c-format msgid "cannot create EBL handle" msgstr "не вдалося створити дескриптор EBL" -#: src/readelf.c:848 +#: src/readelf.c:931 #, c-format msgid "cannot determine number of program headers: %s" msgstr "не вдалося визначити кількість заголовків програми: %s" -#: src/readelf.c:938 +#: src/readelf.c:1021 msgid "NONE (None)" msgstr "NONE (Немає)" -#: src/readelf.c:939 +#: src/readelf.c:1022 msgid "REL (Relocatable file)" msgstr "REL (Придатний до пересування файл)" -#: src/readelf.c:940 +#: src/readelf.c:1023 msgid "EXEC (Executable file)" msgstr "EXEC (Виконуваний файл)" -#: src/readelf.c:941 +#: src/readelf.c:1024 msgid "DYN (Shared object file)" msgstr "DYN (Файл об’єктів спільного використання)" -#: src/readelf.c:942 +#: src/readelf.c:1025 msgid "CORE (Core file)" msgstr "CORE (Файл ядра)" -#: src/readelf.c:947 +#: src/readelf.c:1030 #, c-format msgid "OS Specific: (%x)\n" msgstr "ОС-специфічне: (%x)\n" #. && e_type <= ET_HIPROC always true -#: src/readelf.c:949 +#: src/readelf.c:1032 #, c-format msgid "Processor Specific: (%x)\n" msgstr "Специфічне для процесора: (%x)\n" -#: src/readelf.c:959 +#: src/readelf.c:1042 msgid "" "ELF Header:\n" " Magic: " @@ -4055,7 +4169,7 @@ msgstr "" "Заголовок ELF:\n" " Magic: " -#: src/readelf.c:963 +#: src/readelf.c:1046 #, c-format msgid "" "\n" @@ -4064,118 +4178,118 @@ msgstr "" "\n" " Клас: %s\n" -#: src/readelf.c:968 +#: src/readelf.c:1051 #, c-format msgid " Data: %s\n" msgstr " Дані: %s\n" -#: src/readelf.c:974 +#: src/readelf.c:1057 #, c-format msgid " Ident Version: %hhd %s\n" msgstr " Версія Ident: %hhd %s\n" -#: src/readelf.c:976 src/readelf.c:993 +#: src/readelf.c:1059 src/readelf.c:1076 msgid "(current)" msgstr "(поточний)" -#: src/readelf.c:980 +#: src/readelf.c:1063 #, c-format msgid " OS/ABI: %s\n" msgstr " ОС/ABI: %s\n" -#: src/readelf.c:983 +#: src/readelf.c:1066 #, c-format msgid " ABI Version: %hhd\n" msgstr " Версія ABI: %hhd\n" -#: src/readelf.c:986 +#: src/readelf.c:1069 msgid " Type: " msgstr " Тип: " -#: src/readelf.c:989 +#: src/readelf.c:1072 #, c-format msgid " Machine: %s\n" msgstr " Архітектура: %s\n" -#: src/readelf.c:991 +#: src/readelf.c:1074 #, c-format msgid " Version: %d %s\n" msgstr " Версія: %d %s\n" -#: src/readelf.c:995 +#: src/readelf.c:1078 #, c-format msgid " Entry point address: %#\n" msgstr " Адреса вхідної точки: %#\n" -#: src/readelf.c:998 +#: src/readelf.c:1081 #, c-format msgid " Start of program headers: % %s\n" msgstr " Початок заголовків програм: % %s\n" -#: src/readelf.c:999 src/readelf.c:1002 +#: src/readelf.c:1082 src/readelf.c:1085 msgid "(bytes into file)" msgstr "(байтів у файл)" -#: src/readelf.c:1001 +#: src/readelf.c:1084 #, c-format msgid " Start of section headers: % %s\n" msgstr " Початок заголовків розділів: % %s\n" -#: src/readelf.c:1004 +#: src/readelf.c:1087 #, c-format msgid " Flags: %s\n" msgstr " Прапорці: %s\n" -#: src/readelf.c:1007 +#: src/readelf.c:1090 #, c-format msgid " Size of this header: % %s\n" msgstr " Розмір цього заголовка: % %s\n" -#: src/readelf.c:1008 src/readelf.c:1011 src/readelf.c:1028 +#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111 msgid "(bytes)" msgstr "(байтів)" -#: src/readelf.c:1010 +#: src/readelf.c:1093 #, c-format msgid " Size of program header entries: % %s\n" msgstr " Розмір записів заголовка програми: % %s\n" -#: src/readelf.c:1013 +#: src/readelf.c:1096 #, c-format msgid " Number of program headers entries: %" msgstr " Кількість записів заголовків програми: %" -#: src/readelf.c:1020 +#: src/readelf.c:1103 #, c-format msgid " (% in [0].sh_info)" msgstr " (% у [0].sh_info)" -#: src/readelf.c:1023 src/readelf.c:1040 src/readelf.c:1054 +#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137 msgid " ([0] not available)" msgstr " ([0] недоступний)" -#: src/readelf.c:1027 +#: src/readelf.c:1110 #, c-format msgid " Size of section header entries: % %s\n" msgstr " Розмір записів заголовків розділів: % %s\n" -#: src/readelf.c:1030 +#: src/readelf.c:1113 #, c-format msgid " Number of section headers entries: %" msgstr " Кількість записів заголовків розділів: %" -#: src/readelf.c:1037 +#: src/readelf.c:1120 #, c-format msgid " (% in [0].sh_size)" msgstr " (% у [0].sh_size)" #. We managed to get the zeroth section. -#: src/readelf.c:1050 +#: src/readelf.c:1133 #, c-format msgid " (% in [0].sh_link)" msgstr " (% у [0].sh_link)" -#: src/readelf.c:1058 +#: src/readelf.c:1141 #, c-format msgid "" " Section header string table index: XINDEX%s\n" @@ -4184,7 +4298,7 @@ msgstr "" " Індекс заголовка розділу у таблиці рядків: XINDEX%s\n" "\n" -#: src/readelf.c:1062 +#: src/readelf.c:1145 #, c-format msgid "" " Section header string table index: %\n" @@ -4193,7 +4307,7 @@ msgstr "" " Індекс заголовка розділу у таблиці рядків: %\n" "\n" -#: src/readelf.c:1105 +#: src/readelf.c:1188 #, c-format msgid "" "There are %d section headers, starting at offset %#:\n" @@ -4202,11 +4316,11 @@ msgstr "" "Виявлено %d заголовків розділів, зміщення початку — %#:\n" "\n" -#: src/readelf.c:1115 +#: src/readelf.c:1198 msgid "Section Headers:" msgstr "Заголовки розділів:" -#: src/readelf.c:1118 +#: src/readelf.c:1201 msgid "" "[Nr] Name Type Addr Off Size ES Flags Lk " "Inf Al" @@ -4214,7 +4328,7 @@ msgstr "" "[№ ] Назва Тип Адр Змі Розмір ES Прап Lk " "Інф Al" -#: src/readelf.c:1120 +#: src/readelf.c:1203 msgid "" "[Nr] Name Type Addr Off Size ES " "Flags Lk Inf Al" @@ -4222,35 +4336,35 @@ msgstr "" "[№ ] Назва Тип Адр Змі Розмір ES " "Прап Lk Інф Al" -#: src/readelf.c:1125 +#: src/readelf.c:1208 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1127 +#: src/readelf.c:1210 msgid " [Compression Size Al]" msgstr "" -#: src/readelf.c:1203 +#: src/readelf.c:1286 #, fuzzy, c-format msgid "bad compression header for section %zd: %s" msgstr "не вдалося отримати заголовок розділу %zu: %s" -#: src/readelf.c:1214 +#: src/readelf.c:1297 #, fuzzy, c-format msgid "bad gnu compressed size for section %zd: %s" msgstr "не вдалося отримати дані для розділу %d: %s" -#: src/readelf.c:1232 +#: src/readelf.c:1315 msgid "Program Headers:" msgstr "Заголовки програми:" -#: src/readelf.c:1234 +#: src/readelf.c:1317 msgid "" " Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align" msgstr "" " Тип Зміщен ВіртАдр ФізАдр РозмФайл РозмПам Пра Вирів" -#: src/readelf.c:1237 +#: src/readelf.c:1320 msgid "" " Type Offset VirtAddr PhysAddr FileSiz " "MemSiz Flg Align" @@ -4258,12 +4372,12 @@ msgstr "" " Тип Зміщен ВіртАдр ФізАдр " "РозмФайлРозмПам Пра Вирів" -#: src/readelf.c:1294 +#: src/readelf.c:1377 #, c-format msgid "\t[Requesting program interpreter: %s]\n" msgstr "\t[Запит щодо інтерпретатора програми: %s]\n" -#: src/readelf.c:1315 +#: src/readelf.c:1398 msgid "" "\n" " Section to Segment mapping:\n" @@ -4273,12 +4387,12 @@ msgstr "" " Відображення розділів на сегмент:\n" " Розділи сегмента..." -#: src/readelf.c:1326 src/unstrip.c:1941 src/unstrip.c:1983 src/unstrip.c:1990 +#: src/readelf.c:1409 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993 #, c-format msgid "cannot get program header: %s" msgstr "не вдалося отримати заголовок програми: %s" -#: src/readelf.c:1469 +#: src/readelf.c:1552 #, c-format msgid "" "\n" @@ -4296,7 +4410,7 @@ msgstr[2] "" "\n" "Група розділів COMDAT [%2zu] «%s» з підписом «%s» містить %zu записів:\n" -#: src/readelf.c:1474 +#: src/readelf.c:1557 #, c-format msgid "" "\n" @@ -4314,31 +4428,31 @@ msgstr[2] "" "\n" "Група розділів [%2zu] «%s» з підписом «%s» містить %zu записів:\n" -#: src/readelf.c:1482 +#: src/readelf.c:1565 msgid "" msgstr "<НЕКОРЕКТНИЙ СИМВОЛ>" -#: src/readelf.c:1496 +#: src/readelf.c:1579 msgid "" msgstr "<НЕКОРЕКТНИЙ РОЗДІЛ>" -#: src/readelf.c:1519 src/readelf.c:2246 src/readelf.c:3329 src/readelf.c:9531 -#: src/readelf.c:9538 src/readelf.c:9582 src/readelf.c:9589 +#: src/readelf.c:1602 src/readelf.c:2329 src/readelf.c:3430 src/readelf.c:12294 +#: src/readelf.c:12301 src/readelf.c:12345 src/readelf.c:12352 msgid "Couldn't uncompress section" msgstr "" -#: src/readelf.c:1524 src/readelf.c:2251 src/readelf.c:3334 +#: src/readelf.c:1607 src/readelf.c:2334 src/readelf.c:3435 #, fuzzy, c-format msgid "cannot get section [%zd] header: %s" msgstr "не вдалося отримати заголовок розділу: %s" -#: src/readelf.c:1668 src/readelf.c:2318 src/readelf.c:2576 src/readelf.c:2652 -#: src/readelf.c:2956 src/readelf.c:3030 src/readelf.c:4732 +#: src/readelf.c:1751 src/readelf.c:2401 src/readelf.c:2659 src/readelf.c:2735 +#: src/readelf.c:3039 src/readelf.c:3113 src/readelf.c:5308 #, c-format msgid "invalid sh_link value in section %zu" msgstr "некоректне значення sh_link у розділі %zu" -#: src/readelf.c:1671 +#: src/readelf.c:1754 #, c-format msgid "" "\n" @@ -4361,36 +4475,36 @@ msgstr[2] "" "Динамічний сегмент містить %lu записів:\n" " Адр: %#0* Зміщення: %#08 Пос. на розділ: [%2u] '%s'\n" -#: src/readelf.c:1681 +#: src/readelf.c:1764 msgid " Type Value\n" msgstr " Тип Значення\n" -#: src/readelf.c:1705 +#: src/readelf.c:1788 #, c-format msgid "Shared library: [%s]\n" msgstr "Спільна бібліотека: [%s]\n" -#: src/readelf.c:1710 +#: src/readelf.c:1793 #, c-format msgid "Library soname: [%s]\n" msgstr "Назва so бібліотеки: [%s]\n" -#: src/readelf.c:1715 +#: src/readelf.c:1798 #, c-format msgid "Library rpath: [%s]\n" msgstr "Rpath бібліотеки: [%s]\n" -#: src/readelf.c:1720 +#: src/readelf.c:1803 #, c-format msgid "Library runpath: [%s]\n" msgstr "Runpath бібліотеки: [%s]\n" -#: src/readelf.c:1740 +#: src/readelf.c:1823 #, c-format msgid "% (bytes)\n" msgstr "% (байт)\n" -#: src/readelf.c:1853 src/readelf.c:2043 +#: src/readelf.c:1936 src/readelf.c:2126 #, c-format msgid "" "\n" @@ -4399,7 +4513,7 @@ msgstr "" "\n" "Некоректна таблиця символів за зміщенням %#0\n" -#: src/readelf.c:1871 src/readelf.c:2061 +#: src/readelf.c:1954 src/readelf.c:2144 #, c-format msgid "" "\n" @@ -4428,7 +4542,7 @@ msgstr[2] "" #. The .rela.dyn section does not refer to a specific section but #. instead of section index zero. Do not try to print a section #. name. -#: src/readelf.c:1886 src/readelf.c:2076 +#: src/readelf.c:1969 src/readelf.c:2159 #, c-format msgid "" "\n" @@ -4446,30 +4560,30 @@ msgstr[2] "" "\n" "Розділ пересування [%2u] «%s» за зміщенням %#0 містить %d записів:\n" -#: src/readelf.c:1896 +#: src/readelf.c:1979 msgid " Offset Type Value Name\n" msgstr " Зміщення Тип Значення Назва\n" -#: src/readelf.c:1898 +#: src/readelf.c:1981 msgid " Offset Type Value Name\n" msgstr " Зміщення Тип Значення Назва\n" -#: src/readelf.c:1951 src/readelf.c:1962 src/readelf.c:1975 src/readelf.c:1996 -#: src/readelf.c:2008 src/readelf.c:2142 src/readelf.c:2154 src/readelf.c:2168 -#: src/readelf.c:2190 src/readelf.c:2203 +#: src/readelf.c:2034 src/readelf.c:2045 src/readelf.c:2058 src/readelf.c:2079 +#: src/readelf.c:2091 src/readelf.c:2225 src/readelf.c:2237 src/readelf.c:2251 +#: src/readelf.c:2273 src/readelf.c:2286 msgid "" msgstr "<НЕКОРЕКТНЕ ПЕРЕМІЩЕННЯ>" -#: src/readelf.c:2086 +#: src/readelf.c:2169 msgid " Offset Type Value Addend Name\n" msgstr " Зміщення Тип Значення Назва додатка\n" -#: src/readelf.c:2088 +#: src/readelf.c:2171 msgid " Offset Type Value Addend Name\n" msgstr "" " Зміщення Тип Значення Назва додатка\n" -#: src/readelf.c:2326 +#: src/readelf.c:2409 #, c-format msgid "" "\n" @@ -4487,7 +4601,7 @@ msgstr[2] "" "\n" "Таблиця символів [%2u] «%s» містить %u записів:\n" -#: src/readelf.c:2331 +#: src/readelf.c:2414 #, c-format msgid " %lu local symbol String table: [%2u] '%s'\n" msgid_plural " %lu local symbols String table: [%2u] '%s'\n" @@ -4495,33 +4609,33 @@ msgstr[0] " %lu лок. символ Таблиця символів: [%2u] « msgstr[1] " %lu лок. символи Таблиця символів: [%2u] «%s»\n" msgstr[2] " %lu лок. символів Таблиця символів: [%2u] «%s»\n" -#: src/readelf.c:2339 +#: src/readelf.c:2422 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " №№ Знач. Роз. Тип Зв’яз Вид. Інд Назва\n" -#: src/readelf.c:2341 +#: src/readelf.c:2424 msgid " Num: Value Size Type Bind Vis Ndx Name\n" msgstr " №№ Знач. Роз. Тип Зв’яз Вид. Інд Назва\n" -#: src/readelf.c:2361 +#: src/readelf.c:2444 #, c-format msgid "%5u: %0* %6 %-7s %-6s %-9s %6s %s" msgstr "%5u: %0* %6 %-7s %-6s %-9s %6s %s" -#: src/readelf.c:2449 +#: src/readelf.c:2532 #, c-format msgid "bad dynamic symbol" msgstr "помилковий динамічний символ" -#: src/readelf.c:2531 +#: src/readelf.c:2614 msgid "none" msgstr "немає" -#: src/readelf.c:2548 +#: src/readelf.c:2631 msgid "| " msgstr "| <невідомо>" -#: src/readelf.c:2579 +#: src/readelf.c:2662 #, c-format msgid "" "\n" @@ -4544,17 +4658,17 @@ msgstr[2] "" "Розділ потреби у версіях [%2u] «%s», що містить %d записів:\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2600 +#: src/readelf.c:2683 #, c-format msgid " %#06x: Version: %hu File: %s Cnt: %hu\n" msgstr " %#06x: Версія: %hu Файл: %s Кть: %hu\n" -#: src/readelf.c:2613 +#: src/readelf.c:2696 #, c-format msgid " %#06x: Name: %s Flags: %s Version: %hu\n" msgstr " %#06x: Назва: %s Прап: %s Версія: %hu\n" -#: src/readelf.c:2656 +#: src/readelf.c:2739 #, c-format msgid "" "\n" @@ -4577,18 +4691,18 @@ msgstr[2] "" "Розділ визначення версії [%2u] «%s», що містить %d записів:\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:2684 +#: src/readelf.c:2767 #, 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:2699 +#: src/readelf.c:2782 #, c-format msgid " %#06x: Parent %d: %s\n" msgstr " %#06x: батьківський %d: %s\n" #. Print the header. -#: src/readelf.c:2960 +#: src/readelf.c:3043 #, c-format msgid "" "\n" @@ -4611,15 +4725,15 @@ msgstr[2] "" "Розділ символів версій [%2u] «%s», що містить %d записів:\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»" -#: src/readelf.c:2988 +#: src/readelf.c:3071 msgid " 0 *local* " msgstr " 0 *локальний* " -#: src/readelf.c:2993 +#: src/readelf.c:3076 msgid " 1 *global* " msgstr " 1 *загальний* " -#: src/readelf.c:3035 +#: src/readelf.c:3118 #, c-format msgid "" "\n" @@ -4647,22 +4761,22 @@ msgstr[2] "" "блоками):\n" " Адр.: %#0* Зміщ.: %#08 Посилання на розділ: [%2u] «%s»\n" -#: src/readelf.c:3057 +#: src/readelf.c:3140 #, no-c-format msgid " Length Number % of total Coverage\n" msgstr " Довжина Номер % від загал. Покриття\n" -#: src/readelf.c:3059 +#: src/readelf.c:3142 #, c-format msgid " 0 %6 %5.1f%%\n" msgstr " 0 %6 %5.1f%%\n" -#: src/readelf.c:3066 +#: src/readelf.c:3149 #, c-format msgid "%7d %6 %5.1f%% %5.1f%%\n" msgstr "%7d %6 %5.1f%% %5.1f%%\n" -#: src/readelf.c:3079 +#: src/readelf.c:3162 #, c-format msgid "" " Average number of tests: successful lookup: %f\n" @@ -4671,27 +4785,37 @@ msgstr "" " Середня кількість тестів: успішний пошук: %f\n" "\t\t\t неуспішний пошук: %f\n" -#: src/readelf.c:3097 src/readelf.c:3152 src/readelf.c:3209 +#: src/readelf.c:3180 src/readelf.c:3244 src/readelf.c:3310 #, c-format msgid "cannot get data for section %d: %s" msgstr "не вдалося отримати дані для розділу %d: %s" -#: src/readelf.c:3105 +#: src/readelf.c:3188 #, c-format msgid "invalid data in sysv.hash section %d" msgstr "некоректні дані у розділі sysv.hash %d" -#: src/readelf.c:3160 +#: src/readelf.c:3217 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash section %d" +msgstr "некоректні дані у розділі sysv.hash %d" + +#: src/readelf.c:3252 #, c-format msgid "invalid data in sysv.hash64 section %d" msgstr "некоректні дані у розділі sysv.hash64 %d" -#: src/readelf.c:3218 +#: src/readelf.c:3283 +#, fuzzy, c-format +msgid "invalid chain in sysv.hash64 section %d" +msgstr "некоректні дані у розділі sysv.hash64 %d" + +#: src/readelf.c:3319 #, c-format msgid "invalid data in gnu.hash section %d" msgstr "некоректні дані у розділі gnu.hash %d" -#: src/readelf.c:3285 +#: src/readelf.c:3386 #, c-format msgid "" " Symbol Bias: %u\n" @@ -4701,7 +4825,7 @@ msgstr "" " Розмір бітової маски: %zu байтів %%% встановлених бітів зсув " "2-го хешу: %u\n" -#: src/readelf.c:3374 +#: src/readelf.c:3475 #, c-format msgid "" "\n" @@ -4722,7 +4846,7 @@ msgstr[2] "" "Розділ списку бібліотек [%2zu] «%s» за зміщенням %#0 містить %d " "записів:\n" -#: src/readelf.c:3388 +#: src/readelf.c:3489 msgid "" " Library Time Stamp Checksum Version " "Flags" @@ -4730,7 +4854,7 @@ msgstr "" " Бібліотека Часовий штамп Версія суми " "Прапорці" -#: src/readelf.c:3438 +#: src/readelf.c:3539 #, c-format msgid "" "\n" @@ -4741,142 +4865,102 @@ msgstr "" "Розділ атрибутів об’єктів [%2zu] «%s» з % байтів за зміщенням " "%#0:\n" -#: src/readelf.c:3455 +#: src/readelf.c:3556 msgid " Owner Size\n" msgstr " Власник Розмір\n" -#: src/readelf.c:3484 +#: src/readelf.c:3585 #, c-format msgid " %-13s %4\n" msgstr " %-13s %4\n" #. Unknown subsection, print and skip. -#: src/readelf.c:3523 +#: src/readelf.c:3624 #, c-format msgid " %-4u %12\n" msgstr " %-4u %12\n" #. Tag_File -#: src/readelf.c:3528 +#: src/readelf.c:3629 #, c-format msgid " File: %11\n" msgstr " Файл: %11\n" -#: src/readelf.c:3577 +#: src/readelf.c:3678 #, c-format msgid " %s: %, %s\n" msgstr " %s: %, %s\n" -#: src/readelf.c:3580 +#: src/readelf.c:3681 #, c-format msgid " %s: %\n" msgstr " %s: %\n" -#: src/readelf.c:3583 +#: src/readelf.c:3684 #, c-format msgid " %s: %s\n" msgstr " %s: %s\n" -#: src/readelf.c:3593 +#: src/readelf.c:3694 #, c-format msgid " %u: %\n" msgstr " %u: %\n" -#: src/readelf.c:3596 +#: src/readelf.c:3697 #, c-format msgid " %u: %s\n" msgstr " %u: %s\n" -#: src/readelf.c:3641 -#, c-format -msgid "%s+%# <%s+%#>" -msgstr "%s+%# <%s+%#>" - -#: src/readelf.c:3644 -#, c-format -msgid "%s+%#0* <%s+%#>" -msgstr "%s+%#0* <%s+%#>" - -#: src/readelf.c:3649 -#, c-format -msgid "%# <%s+%#>" -msgstr "%# <%s+%#>" - -#: src/readelf.c:3652 -#, c-format -msgid "%#0* <%s+%#>" -msgstr "%#0* <%s+%#>" - -#: src/readelf.c:3658 -#, c-format -msgid "%s+%# <%s>" -msgstr "%s+%# <%s>" - -#: src/readelf.c:3661 -#, c-format -msgid "%s+%#0* <%s>" -msgstr "%s+%#0* <%s>" - -#: src/readelf.c:3665 -#, c-format -msgid "%# <%s>" -msgstr "%# <%s>" - -#: src/readelf.c:3668 -#, c-format -msgid "%#0* <%s>" -msgstr "%#0* <%s>" - -#: src/readelf.c:3673 -#, c-format -msgid "%s+%#" -msgstr "%s+%#" - -#: src/readelf.c:3676 -#, c-format -msgid "%s+%#0*" -msgstr "%s+%#0*" +#: src/readelf.c:3767 +#, fuzzy, c-format +msgid "sprintf failure" +msgstr "помилка mprotect" -#: src/readelf.c:4054 +#: src/readelf.c:4249 msgid "empty block" msgstr "порожній блок" -#: src/readelf.c:4057 +#: src/readelf.c:4252 #, c-format msgid "%zu byte block:" msgstr "%zu-байтовий блок:" -#: src/readelf.c:4454 -#, c-format -msgid "%*s[%4] %s \n" +#: src/readelf.c:4730 +#, fuzzy, c-format +msgid "%*s[%2] %s \n" msgstr "%*s[%4] %s <ОБРІЗАНО>\n" -#: src/readelf.c:4511 +#: src/readelf.c:4794 #, c-format msgid "%s %# used with different address sizes" msgstr "%s %# використано з різними розмірами адрес" -#: src/readelf.c:4518 +#: src/readelf.c:4801 #, c-format msgid "%s %# used with different offset sizes" msgstr "%s %# використано з різними розмірами зміщень" -#: src/readelf.c:4525 +#: src/readelf.c:4808 #, c-format msgid "%s %# used with different base addresses" msgstr "%s %# використано з різними базовими адресами" -#: src/readelf.c:4614 +#: src/readelf.c:4815 +#, fuzzy, c-format +msgid "%s %# used with different attribute %s and %s" +msgstr "%s %# використано з різними розмірами адрес" + +#: src/readelf.c:4912 #, c-format msgid " [%6tx] \n" msgstr " [%6tx] <НЕВИКОРИСТОВУВАНІ ДАНІ У РЕШТІ РОЗДІЛУ>\n" -#: src/readelf.c:4622 +#: src/readelf.c:4920 #, c-format msgid " [%6tx] ... % bytes ...\n" msgstr " [%6tx] <НЕВИКОРИСТОВУВАНІ ДАНІ> ... % байтів ...\n" -#: src/readelf.c:4648 +#: src/readelf.c:4998 #, c-format msgid "" "\n" @@ -4887,7 +4971,7 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" " [ Код]\n" -#: src/readelf.c:4656 +#: src/readelf.c:5006 #, c-format msgid "" "\n" @@ -4896,30 +4980,78 @@ msgstr "" "\n" "Розділ скорочень за зміщенням %:\n" -#: src/readelf.c:4669 +#: src/readelf.c:5019 #, c-format msgid " *** error while reading abbreviation: %s\n" msgstr " *** помилка під час читання скорочення: %s\n" -#: src/readelf.c:4685 +#: src/readelf.c:5035 #, c-format msgid " [%5u] offset: %, children: %s, tag: %s\n" msgstr " [%5u] зміщення: %, дочірній: %s, мітка: %s\n" -#: src/readelf.c:4688 -msgid "yes" -msgstr "так" +#: src/readelf.c:5068 src/readelf.c:5377 src/readelf.c:5541 src/readelf.c:5926 +#: src/readelf.c:6527 src/readelf.c:8168 src/readelf.c:8838 src/readelf.c:9274 +#: src/readelf.c:9518 src/readelf.c:9683 src/readelf.c:10044 +#: src/readelf.c:10102 +#, c-format +msgid "" +"\n" +"DWARF section [%2zu] '%s' at offset %#:\n" +msgstr "" +"\n" +"Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" -#: src/readelf.c:4688 -msgid "no" -msgstr "ні" +#: src/readelf.c:5081 +#, fuzzy, c-format +msgid "cannot get .debug_addr section data: %s" +msgstr "не вдалося отримати дані розділу: %s" -#: src/readelf.c:4722 src/readelf.c:4795 +#: src/readelf.c:5181 src/readelf.c:5205 src/readelf.c:5586 src/readelf.c:8883 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr "" +"\n" +" Довжина: %6\n" + +#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " версія DWARF: %6\n" + +#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905 +#, fuzzy, c-format +msgid " Address size: %8\n" +msgstr " Розмір адреси: %6\n" + +#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915 +#, fuzzy, c-format +msgid " Segment size: %8\n" +msgstr "" +" Розмір сегмента: %6\n" +"\n" + +#: src/readelf.c:5224 src/readelf.c:5603 src/readelf.c:8900 src/readelf.c:10234 +#, fuzzy, c-format +msgid "Unknown version" +msgstr "невідома версія" + +#: src/readelf.c:5234 src/readelf.c:5447 src/readelf.c:5613 src/readelf.c:8910 +#, c-format +msgid "unsupported address size" +msgstr "непідтримуваний розмір адреси" + +#: src/readelf.c:5245 src/readelf.c:5456 src/readelf.c:5623 src/readelf.c:8920 +#, c-format +msgid "unsupported segment size" +msgstr "непідтримуваний розмір сегмента" + +#: src/readelf.c:5298 src/readelf.c:5372 #, c-format msgid "cannot get .debug_aranges content: %s" msgstr "не вдалося отримати дані get .debug_aranges: %s" -#: src/readelf.c:4737 +#: src/readelf.c:5313 #, c-format msgid "" "\n" @@ -4937,12 +5069,12 @@ msgstr[2] "" "\n" "Розділ DWARF [%2zu] «%s» за зміщенням %# містить %zu записів:\n" -#: src/readelf.c:4768 +#: src/readelf.c:5344 #, c-format msgid " [%*zu] ???\n" msgstr " [%*zu] ???\n" -#: src/readelf.c:4770 +#: src/readelf.c:5346 #, c-format msgid "" " [%*zu] start: %0#*, length: %5, CU DIE offset: %6\n" @@ -4950,17 +5082,7 @@ msgstr "" " [%*zu] початок: %0#*, довжина: %5, зміщення CU DIE: " "%6\n" -#: src/readelf.c:4800 src/readelf.c:4954 src/readelf.c:5531 src/readelf.c:6485 -#: src/readelf.c:7017 src/readelf.c:7137 src/readelf.c:7301 src/readelf.c:7726 -#, c-format -msgid "" -"\n" -"DWARF section [%2zu] '%s' at offset %#:\n" -msgstr "" -"\n" -"Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" - -#: src/readelf.c:4813 src/readelf.c:6511 +#: src/readelf.c:5390 src/readelf.c:8195 #, c-format msgid "" "\n" @@ -4969,12 +5091,13 @@ msgstr "" "\n" "Таблиця за зміщенням %zu:\n" -#: src/readelf.c:4817 src/readelf.c:5555 src/readelf.c:6522 +#: src/readelf.c:5394 src/readelf.c:5567 src/readelf.c:6551 src/readelf.c:8206 +#: src/readelf.c:8864 #, c-format msgid "invalid data in section [%zu] '%s'" msgstr "некоректні дані у розділі [%zu] «%s»" -#: src/readelf.c:4833 +#: src/readelf.c:5410 #, c-format msgid "" "\n" @@ -4983,102 +5106,140 @@ msgstr "" "\n" " Довжина: %6\n" -#: src/readelf.c:4845 +#: src/readelf.c:5422 #, c-format msgid " DWARF version: %6\n" msgstr " версія DWARF: %6\n" -#: src/readelf.c:4849 +#: src/readelf.c:5426 #, c-format msgid "unsupported aranges version" msgstr "непідтримувана версія aranges" -#: src/readelf.c:4860 +#: src/readelf.c:5437 #, c-format msgid " CU offset: %6\n" msgstr " зміщення CU: %6\n" -#: src/readelf.c:4866 +#: src/readelf.c:5443 +#, c-format +msgid " Address size: %6\n" +msgstr " Розмір адреси: %6\n" + +#: src/readelf.c:5452 +#, c-format +msgid "" +" Segment size: %6\n" +"\n" +msgstr "" +" Розмір сегмента: %6\n" +"\n" + +#: src/readelf.c:5507 +#, c-format +msgid " %zu padding bytes\n" +msgstr " %zu байтів доповнення\n" + +#: src/readelf.c:5550 +#, fuzzy, c-format +msgid "cannot get .debug_rnglists content: %s" +msgstr "не вдалося отримати дані .debug_ranges: %s" + +#: src/readelf.c:5573 src/readelf.c:8870 +#, fuzzy, c-format +msgid "" +"Table at Offset 0x%:\n" +"\n" +msgstr " зміщення .debug_line: 0x%\n" + +#: src/readelf.c:5628 src/readelf.c:8925 +#, fuzzy, c-format +msgid " Offset entries: %8\n" +msgstr " Довжина зміщення: %\n" + +#: src/readelf.c:5644 src/readelf.c:8941 #, c-format -msgid " Address size: %6\n" -msgstr " Розмір адреси: %6\n" +msgid " Unknown CU base: " +msgstr "" -#: src/readelf.c:4870 +#: src/readelf.c:5646 src/readelf.c:8943 #, c-format -msgid "unsupported address size" -msgstr "непідтримуваний розмір адреси" +msgid " CU [%6] base: " +msgstr "" -#: src/readelf.c:4875 +#: src/readelf.c:5652 src/readelf.c:8949 #, c-format -msgid "" -" Segment size: %6\n" -"\n" +msgid " Not associated with a CU.\n" msgstr "" -" Розмір сегмента: %6\n" -"\n" -#: src/readelf.c:4879 +#: src/readelf.c:5663 src/readelf.c:8960 #, c-format -msgid "unsupported segment size" -msgstr "непідтримуваний розмір сегмента" +msgid "too many offset entries for unit length" +msgstr "" -#: src/readelf.c:4919 -#, c-format -msgid " %s..%s (%)\n" -msgstr " %s..%s (%)\n" +#: src/readelf.c:5667 src/readelf.c:8964 +#, fuzzy, c-format +msgid " Offsets starting at 0x%:\n" +msgstr " Зміщення: 0x%\n" -#: src/readelf.c:4922 -#, c-format -msgid " %s..%s\n" -msgstr " %s..%s\n" +#: src/readelf.c:5719 +#, fuzzy, c-format +msgid "invalid range list data" +msgstr "некоректні дані" -#: src/readelf.c:4931 -#, c-format -msgid " %zu padding bytes\n" +#: src/readelf.c:5904 src/readelf.c:9252 +#, fuzzy, c-format +msgid "" +" %zu padding bytes\n" +"\n" msgstr " %zu байтів доповнення\n" -#: src/readelf.c:4949 +#: src/readelf.c:5921 #, c-format msgid "cannot get .debug_ranges content: %s" msgstr "не вдалося отримати дані .debug_ranges: %s" -#: src/readelf.c:4979 src/readelf.c:7044 +#: src/readelf.c:5957 src/readelf.c:9307 #, c-format -msgid " [%6tx] \n" -msgstr " [%6tx] <НЕКОРЕКТНІ ДАНІ>\n" +msgid "" +"\n" +" Unknown CU base: " +msgstr "" -#: src/readelf.c:5001 src/readelf.c:7066 +#: src/readelf.c:5959 src/readelf.c:9309 #, c-format -msgid " [%6tx] base address %s\n" -msgstr " [%6tx] базова адреса %s\n" +msgid "" +"\n" +" CU [%6] base: " +msgstr "" -#: src/readelf.c:5008 src/readelf.c:7073 +#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361 #, c-format -msgid " [%6tx] empty list\n" -msgstr " [%6tx] порожній список\n" +msgid " [%6tx] \n" +msgstr " [%6tx] <НЕКОРЕКТНІ ДАНІ>\n" -#. We have an address range entry. -#. First address range entry in a list. -#: src/readelf.c:5019 -#, c-format -msgid " [%6tx] %s..%s\n" -msgstr " [%6tx] %s..%s\n" +#: src/readelf.c:5989 src/readelf.c:9441 +#, fuzzy, c-format +msgid "" +" [%6tx] base address\n" +" " +msgstr " [%6tx] базова адреса %s\n" -#: src/readelf.c:5021 -#, c-format -msgid " %s..%s\n" -msgstr " %s..%s\n" +#: src/readelf.c:5997 src/readelf.c:9449 +#, fuzzy, c-format +msgid " [%6tx] empty list\n" +msgstr " [%6tx] порожній список\n" -#: src/readelf.c:5257 +#: src/readelf.c:6252 msgid " \n" msgstr " <НЕКОРЕКТНІ ДАНІ>\n" -#: src/readelf.c:5510 +#: src/readelf.c:6505 #, c-format msgid "cannot get ELF: %s" msgstr "не вдалося отримати ELF: %s" -#: src/readelf.c:5527 +#: src/readelf.c:6523 #, c-format msgid "" "\n" @@ -5087,7 +5248,7 @@ msgstr "" "\n" "Розділ відомостей щодо вікна викликів [%2zu] «%s» за зміщенням %#:\n" -#: src/readelf.c:5577 +#: src/readelf.c:6573 #, c-format msgid "" "\n" @@ -5096,50 +5257,65 @@ msgstr "" "\n" " [%6tx] нульовий переривач\n" -#: src/readelf.c:5670 src/readelf.c:5825 +#: src/readelf.c:6666 src/readelf.c:6820 #, c-format msgid "invalid augmentation length" msgstr "некоректна довжина збільшення" -#: src/readelf.c:5685 +#: src/readelf.c:6681 msgid "FDE address encoding: " msgstr "Кодування адреси FDE: " -#: src/readelf.c:5691 +#: src/readelf.c:6687 msgid "LSDA pointer encoding: " msgstr "Кодування вказівника LSDA: " -#: src/readelf.c:5802 +#: src/readelf.c:6797 #, c-format msgid " (offset: %#)" msgstr " (зміщення: %#)" -#: src/readelf.c:5809 +#: src/readelf.c:6804 #, c-format msgid " (end offset: %#)" msgstr " (зміщення від кінця: %#)" -#: src/readelf.c:5846 +#: src/readelf.c:6841 #, c-format msgid " %-26sLSDA pointer: %#\n" msgstr " %-26sвказівник LSDA: %#\n" -#: src/readelf.c:5901 -#, c-format -msgid "cannot get attribute code: %s" +#: src/readelf.c:6926 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute code: %s" msgstr "не вдалося отримати код атрибута: %s" -#: src/readelf.c:5910 -#, c-format -msgid "cannot get attribute form: %s" +#: src/readelf.c:6936 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute form: %s" msgstr "не вдалося отримати форму атрибута: %s" -#: src/readelf.c:5925 -#, c-format -msgid "cannot get attribute value: %s" +#: src/readelf.c:6958 +#, fuzzy, c-format +msgid "DIE [%] cannot get attribute '%s' (%s) value: %s" msgstr "не вдалося отримати значення атрибута: %s" -#: src/readelf.c:6224 +#: src/readelf.c:7291 +#, fuzzy, c-format +msgid "invalid file (%): %s" +msgstr "некоректний файл" + +#: src/readelf.c:7295 +#, fuzzy, c-format +msgid "no srcfiles for CU [%]" +msgstr " встановити файл у %\n" + +#: src/readelf.c:7299 +#, fuzzy, c-format +msgid "couldn't get DWARF CU: %s" +msgstr "не вдалося отримати ELF: %s" + +#: src/readelf.c:7522 #, c-format msgid "" "\n" @@ -5150,20 +5326,25 @@ msgstr "" "Розділ DWARF [%2zu] «%s» за зміщенням %#:\n" " [Зміщення]\n" -#: src/readelf.c:6256 -#, c-format +#: src/readelf.c:7572 +#, fuzzy, c-format +msgid "cannot get next unit: %s" +msgstr "не вдалося визначити наступний DIE: %s" + +#: src/readelf.c:7591 +#, fuzzy, c-format msgid "" " Type unit at offset %:\n" " Version: %, Abbreviation section offset: %, Address size: " "%, Offset size: %\n" -" Type signature: %#, Type offset: %#\n" +" Type signature: %#, Type offset: %# [%]\n" msgstr "" " Модуль типів за зміщенням %:\n" " Версія: %, Зміщення розділу скорочень: %, Адреса: %, " "Зміщення: %\n" " Підпис типу: %#, Зміщення типу: %#\n" -#: src/readelf.c:6265 +#: src/readelf.c:7603 #, c-format msgid "" " Compilation unit at offset %:\n" @@ -5174,33 +5355,49 @@ msgstr "" " Версія: %, Зміщення розділу скорочень: %, Адреса: %, " "Зміщення: %\n" -#: src/readelf.c:6290 +#: src/readelf.c:7613 src/readelf.c:7776 #, c-format -msgid "cannot get DIE at offset % in section '%s': %s" -msgstr "не вдалося отримати DIE за зміщенням % у розділі «%s»: %s" +msgid " Unit type: %s (%)" +msgstr "" + +#: src/readelf.c:7640 +#, c-format +msgid "unknown version (%d) or unit type (%d)" +msgstr "" -#: src/readelf.c:6304 +#: src/readelf.c:7669 #, c-format msgid "cannot get DIE offset: %s" msgstr "не вдалося отримати зміщення DIE: %s" -#: src/readelf.c:6313 -#, c-format -msgid "cannot get tag of DIE at offset % in section '%s': %s" +#: src/readelf.c:7678 +#, fuzzy, c-format +msgid "cannot get tag of DIE at offset [%] in section '%s': %s" msgstr "" "не вдалося отримати мітку DIE за зміщенням % у розділі «%s»: %s" -#: src/readelf.c:6345 +#: src/readelf.c:7716 #, c-format msgid "cannot get next DIE: %s\n" msgstr "не вдалося визначити наступний DIE: %s\n" -#: src/readelf.c:6353 +#: src/readelf.c:7724 #, c-format msgid "cannot get next DIE: %s" msgstr "не вдалося визначити наступний DIE: %s" -#: src/readelf.c:6389 +#: src/readelf.c:7768 +#, fuzzy, c-format +msgid "" +" Split compilation unit at offset %:\n" +" Version: %, Abbreviation section offset: %, Address size: " +"%, Offset size: %\n" +msgstr "" +" Модуль компіляції за зміщенням %:\n" +" Версія: %, Зміщення розділу скорочень: %, Адреса: %, " +"Зміщення: %\n" + +#: src/readelf.c:7819 #, c-format msgid "" "\n" @@ -5211,25 +5408,32 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" "\n" -#: src/readelf.c:6498 +#: src/readelf.c:8151 +#, fuzzy, c-format +msgid "unknown form: %s" +msgstr "невідома форма %#" + +#: src/readelf.c:8182 #, c-format msgid "cannot get line data section data: %s" msgstr "не вдалося отримати дані розділу лінійних даних: %s" #. Print what we got so far. -#: src/readelf.c:6568 -#, c-format +#: src/readelf.c:8284 +#, fuzzy, c-format msgid "" "\n" -" Length: %\n" -" DWARF version: %\n" -" Prologue length: %\n" -" Minimum instruction length: %\n" -" Maximum operations per instruction: %\n" -" Initial value if '%s': %\n" -" Line base: %\n" -" Line range: %\n" -" Opcode base: %\n" +" Length: %\n" +" DWARF version: %\n" +" Prologue length: %\n" +" Address size: %zd\n" +" Segment selector size: %zd\n" +" Min instruction length: %\n" +" Max operations per instruction: %\n" +" Initial value if 'is_stmt': %\n" +" Line base: %\n" +" Line range: %\n" +" Opcode base: %\n" "\n" "Opcodes:\n" msgstr "" @@ -5246,12 +5450,27 @@ msgstr "" "\n" "Коди операцій:\n" -#: src/readelf.c:6589 +#: src/readelf.c:8306 +#, fuzzy, c-format +msgid "cannot handle .debug_line version: %u\n" +msgstr "не вдалося отримати версію символу: %s" + +#: src/readelf.c:8314 +#, fuzzy, c-format +msgid "cannot handle address size: %u\n" +msgstr "непідтримуваний розмір адреси" + +#: src/readelf.c:8322 +#, fuzzy, c-format +msgid "cannot handle segment selector size: %u\n" +msgstr "не вдалося отримати розділ: %s" + +#: src/readelf.c:8332 #, c-format msgid "invalid data at offset %tu in section [%zu] '%s'" msgstr "некоректні дані зі зміщенням %tu у розділі [%zu] «%s»" -#: src/readelf.c:6604 +#: src/readelf.c:8347 #, c-format msgid " [%*] %hhu argument\n" msgid_plural " [%*] %hhu arguments\n" @@ -5259,7 +5478,7 @@ msgstr[0] " [%*] %hhu аргумент\n" msgstr[1] " [%*] %hhu аргументи\n" msgstr[2] " [%*] %hhu аргументів\n" -#: src/readelf.c:6612 +#: src/readelf.c:8358 msgid "" "\n" "Directory table:" @@ -5267,17 +5486,29 @@ msgstr "" "\n" "Таблиця каталогу:" -#: src/readelf.c:6628 +#: src/readelf.c:8364 src/readelf.c:8439 +#, fuzzy, c-format +msgid " [" +msgstr " PC: " + +#: src/readelf.c:8433 +#, fuzzy msgid "" "\n" -"File name table:\n" -" Entry Dir Time Size Name" +"File name table:" +msgstr "" +"\n" +" Таблиця місця виклику:" + +#: src/readelf.c:8494 +#, fuzzy +msgid " Entry Dir Time Size Name" msgstr "" "\n" "Таблиця назв файлів:\n" " Запис Кат Час Розмір Назва" -#: src/readelf.c:6663 +#: src/readelf.c:8529 msgid "" "\n" "Line number statements:" @@ -5285,120 +5516,120 @@ msgstr "" "\n" "Оператори номерів рядків:" -#: src/readelf.c:6714 +#: src/readelf.c:8552 #, c-format msgid "invalid maximum operations per instruction is zero" msgstr "некоректну кількість операцій на інструкцію прирівняно до нуля" -#: src/readelf.c:6750 -#, c-format -msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n" +#: src/readelf.c:8586 +#, fuzzy, c-format +msgid " special opcode %u: address+%u = " +msgstr " спеціальний код операції %u: адреса+%u = %s, рядок%+d = %zu\n" + +#: src/readelf.c:8590 +#, fuzzy, c-format +msgid ", op_index = %u, line%+d = %zu\n" msgstr "" " спеціальний код операції %u: адреса+%u = %s, індекс_оп = %u, рядок%+d = " "%zu\n" -#: src/readelf.c:6755 +#: src/readelf.c:8593 #, c-format -msgid " special opcode %u: address+%u = %s, line%+d = %zu\n" -msgstr " спеціальний код операції %u: адреса+%u = %s, рядок%+d = %zu\n" +msgid ", line%+d = %zu\n" +msgstr "" -#: src/readelf.c:6775 +#: src/readelf.c:8611 #, c-format msgid " extended opcode %u: " msgstr " розширений код операції %u: " -#: src/readelf.c:6780 +#: src/readelf.c:8616 msgid " end of sequence" msgstr " кінець послідовності" -#: src/readelf.c:6799 -#, c-format -msgid " set address to %s\n" +#: src/readelf.c:8634 +#, fuzzy, c-format +msgid " set address to " msgstr " встановити адресу у значення %s\n" -#: src/readelf.c:6826 +#: src/readelf.c:8662 #, c-format msgid " define new file: dir=%u, mtime=%, length=%, name=%s\n" msgstr "" " визначення нового файла: dir=%u, mtime=%, довжина=%, назва=" "%s\n" -#: src/readelf.c:6839 +#: src/readelf.c:8675 #, c-format msgid " set discriminator to %u\n" msgstr " встановити розрізнення для %u\n" #. Unknown, ignore it. -#: src/readelf.c:6844 +#: src/readelf.c:8680 msgid " unknown opcode" msgstr " невідомий код операції" #. Takes no argument. -#: src/readelf.c:6856 +#: src/readelf.c:8692 msgid " copy" msgstr " копія" -#: src/readelf.c:6867 -#, c-format -msgid " advance address by %u to %s, op_index to %u\n" -msgstr " збільшення адреси на %u до %s, індекс_оп до %u\n" +#: src/readelf.c:8701 +#, fuzzy, c-format +msgid " advance address by %u to " +msgstr " збільшення адреси на %u до %s\n" -#: src/readelf.c:6871 +#: src/readelf.c:8705 src/readelf.c:8761 #, c-format -msgid " advance address by %u to %s\n" -msgstr " збільшення адреси на %u до %s\n" +msgid ", op_index to %u" +msgstr "" -#: src/readelf.c:6882 +#: src/readelf.c:8715 #, c-format msgid " advance line by constant %d to %\n" msgstr " просувати рядок на сталу %d до %\n" -#: src/readelf.c:6890 +#: src/readelf.c:8723 #, c-format msgid " set file to %\n" msgstr " встановити файл у %\n" -#: src/readelf.c:6900 +#: src/readelf.c:8733 #, c-format msgid " set column to %\n" msgstr " встановити значення стовпчика %\n" -#: src/readelf.c:6907 +#: src/readelf.c:8740 #, c-format msgid " set '%s' to %\n" msgstr " встановити «%s» у %\n" #. Takes no argument. -#: src/readelf.c:6913 +#: src/readelf.c:8746 msgid " set basic block flag" msgstr " встановити прапорець базового блоку" -#: src/readelf.c:6926 -#, c-format -msgid " advance address by constant %u to %s, op_index to %u\n" -msgstr " збільшити адресу на сталу величину %u до %s, індекс_оп до %u\n" - -#: src/readelf.c:6930 -#, c-format -msgid " advance address by constant %u to %s\n" +#: src/readelf.c:8757 +#, fuzzy, c-format +msgid " advance address by constant %u to " msgstr " збільшити адресу на сталу величину %u до %s\n" -#: src/readelf.c:6948 -#, c-format -msgid " advance address by fixed value %u to %s\n" +#: src/readelf.c:8776 +#, fuzzy, c-format +msgid " advance address by fixed value %u to \n" msgstr " збільшити адресу на фіксовану величину %u до %s\n" #. Takes no argument. -#: src/readelf.c:6957 +#: src/readelf.c:8786 msgid " set prologue end flag" msgstr " встановити прапорець кінця вступу" #. Takes no argument. -#: src/readelf.c:6962 +#: src/readelf.c:8791 msgid " set epilogue begin flag" msgstr " встановити прапорець початку епілогу" -#: src/readelf.c:6971 +#: src/readelf.c:8800 #, c-format msgid " set isa to %u\n" msgstr " встановити isa у %u\n" @@ -5406,7 +5637,7 @@ msgstr " встановити isa у %u\n" #. 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. -#: src/readelf.c:6980 +#: src/readelf.c:8809 #, c-format msgid " unknown opcode with % parameter:" msgid_plural " unknown opcode with % parameters:" @@ -5414,103 +5645,97 @@ msgstr[0] " невідомий код операції з % параме msgstr[1] " невідомий код операції з % параметрами:" msgstr[2] " невідомий код операції з % параметрами:" -#: src/readelf.c:7012 -#, c-format -msgid "cannot get .debug_loc content: %s" +#: src/readelf.c:8847 +#, fuzzy, c-format +msgid "cannot get .debug_loclists content: %s" msgstr "не вдалося отримати вміст .debug_loc: %s" -#. First entry in a list. -#: src/readelf.c:7087 -#, c-format -msgid " [%6tx] %s..%s" -msgstr " [%6tx] %s..%s" +#: src/readelf.c:9016 +#, fuzzy, c-format +msgid "invalid loclists data" +msgstr "некоректні дані" -#: src/readelf.c:7089 +#: src/readelf.c:9269 #, c-format -msgid " %s..%s" -msgstr " %s..%s" +msgid "cannot get .debug_loc content: %s" +msgstr "не вдалося отримати вміст .debug_loc: %s" -#: src/readelf.c:7096 src/readelf.c:7984 +#: src/readelf.c:9476 src/readelf.c:10490 msgid " \n" msgstr " <НЕКОРЕКТНІ ДАНІ>\n" -#: src/readelf.c:7148 src/readelf.c:7310 +#: src/readelf.c:9530 src/readelf.c:9693 #, c-format msgid "cannot get macro information section data: %s" msgstr "не вдалося отримати дані розділу відомостей щодо макросів: %s" -#: src/readelf.c:7228 +#: src/readelf.c:9610 #, c-format msgid "%*s*** non-terminated string at end of section" msgstr "%*s*** незавершений рядок наприкінці розділу" -#: src/readelf.c:7251 +#: src/readelf.c:9633 #, c-format msgid "%*s*** missing DW_MACINFO_start_file argument at end of section" msgstr "%*s*** пропущено аргумент DW_MACINFO_start_file наприкінці розділу" -#: src/readelf.c:7351 +#: src/readelf.c:9734 #, c-format msgid " Offset: 0x%\n" msgstr " Зміщення: 0x%\n" -#: src/readelf.c:7363 +#: src/readelf.c:9746 #, c-format msgid " Version: %\n" msgstr " Версія: %\n" -#: src/readelf.c:7369 src/readelf.c:8103 +#: src/readelf.c:9752 src/readelf.c:10609 #, c-format msgid " unknown version, cannot parse section\n" msgstr " невідома версія, не вдалося обробити розділ\n" -#: src/readelf.c:7376 +#: src/readelf.c:9759 #, c-format msgid " Flag: 0x%\n" msgstr " Прапорець: 0x%\n" -#: src/readelf.c:7379 +#: src/readelf.c:9762 #, c-format msgid " Offset length: %\n" msgstr " Довжина зміщення: %\n" -#: src/readelf.c:7387 +#: src/readelf.c:9770 #, c-format msgid " .debug_line offset: 0x%\n" msgstr " зміщення .debug_line: 0x%\n" -#: src/readelf.c:7400 +#: src/readelf.c:9795 #, c-format msgid " extension opcode table, % items:\n" msgstr " таблиця кодів операцій розширень, записів — %:\n" -#: src/readelf.c:7407 +#: src/readelf.c:9802 #, c-format msgid " [%]" msgstr " [%]" -#: src/readelf.c:7419 +#: src/readelf.c:9814 #, c-format msgid " % arguments:" msgstr " % аргументів:" -#: src/readelf.c:7447 +#: src/readelf.c:9829 #, c-format msgid " no arguments." msgstr " немає аргументів." -#: src/readelf.c:7684 -#, c-format -msgid "vendor opcode not verified?" -msgstr "код операції постачальника не перевірено?" - -#: src/readelf.c:7712 +#: src/readelf.c:10030 #, c-format msgid " [%5d] DIE offset: %6, CU DIE offset: %6, name: %s\n" msgstr "" " [%5d] зміщення DIE: %6, зміщення CU DIE: %6, назва: %s\n" -#: src/readelf.c:7753 +#: src/readelf.c:10072 #, c-format msgid "" "\n" @@ -5521,12 +5746,41 @@ msgstr "" "Розділ DWARF [%2zu] «%s» зі зміщенням %#:\n" " %*s Рядок\n" -#: src/readelf.c:7767 -#, c-format -msgid " *** error while reading strings: %s\n" +#: src/readelf.c:10087 +#, fuzzy, c-format +msgid " *** error, missing string terminator\n" msgstr " *** помилка під час читання рядків: %s\n" -#: src/readelf.c:7787 +#: src/readelf.c:10115 +#, fuzzy, c-format +msgid "cannot get .debug_str_offsets section data: %s" +msgstr "не вдалося отримати дані розділу: %s" + +#: src/readelf.c:10214 +#, fuzzy, c-format +msgid " Length: %8\n" +msgstr "" +"\n" +" Довжина: %6\n" + +#: src/readelf.c:10216 +#, fuzzy, c-format +msgid " Offset size: %8\n" +msgstr " Довжина зміщення: %\n" + +#: src/readelf.c:10230 +#, fuzzy, c-format +msgid " DWARF version: %8\n" +msgstr " версія DWARF: %6\n" + +#: src/readelf.c:10239 +#, fuzzy, c-format +msgid " Padding: %8\n" +msgstr "" +"\n" +" Довжина: %6\n" + +#: src/readelf.c:10293 #, c-format msgid "" "\n" @@ -5535,7 +5789,7 @@ msgstr "" "\n" "Розділ таблиці пошуку вікон виклику [%2zu] '.eh_frame_hdr':\n" -#: src/readelf.c:7889 +#: src/readelf.c:10395 #, c-format msgid "" "\n" @@ -5544,22 +5798,22 @@ msgstr "" "\n" "Розділ таблиці обробки виключень [%2zu] '.gcc_except_table':\n" -#: src/readelf.c:7912 +#: src/readelf.c:10418 #, c-format msgid " LPStart encoding: %#x " msgstr " Кодування LPStart: %#x " -#: src/readelf.c:7924 +#: src/readelf.c:10430 #, c-format msgid " TType encoding: %#x " msgstr " Кодування TType: %#x " -#: src/readelf.c:7939 +#: src/readelf.c:10445 #, c-format msgid " Call site encoding: %#x " msgstr " Кодування місця виклику:%#x " -#: src/readelf.c:7952 +#: src/readelf.c:10458 msgid "" "\n" " Call site table:" @@ -5567,7 +5821,7 @@ msgstr "" "\n" " Таблиця місця виклику:" -#: src/readelf.c:7966 +#: src/readelf.c:10472 #, c-format msgid "" " [%4u] Call site start: %#\n" @@ -5580,12 +5834,12 @@ msgstr "" " Місце застосування: %#\n" " Дія: %u\n" -#: src/readelf.c:8039 +#: src/readelf.c:10545 #, c-format msgid "invalid TType encoding" msgstr "некоректне кодування TType" -#: src/readelf.c:8065 +#: src/readelf.c:10571 #, c-format msgid "" "\n" @@ -5594,37 +5848,37 @@ msgstr "" "\n" "Розділ GDB [%2zu] «%s» за зміщенням %# містить % байтів:\n" -#: src/readelf.c:8094 +#: src/readelf.c:10600 #, c-format msgid " Version: %\n" msgstr " Версія: %\n" -#: src/readelf.c:8112 +#: src/readelf.c:10618 #, c-format msgid " CU offset: %#\n" msgstr " зміщення CU: %#\n" -#: src/readelf.c:8119 +#: src/readelf.c:10625 #, c-format msgid " TU offset: %#\n" msgstr " зміщення TU: %#\n" -#: src/readelf.c:8126 +#: src/readelf.c:10632 #, c-format msgid " address offset: %#\n" msgstr " зміщення адреси: %#\n" -#: src/readelf.c:8133 +#: src/readelf.c:10639 #, c-format msgid " symbol offset: %#\n" msgstr " зміщення символу: %#\n" -#: src/readelf.c:8140 +#: src/readelf.c:10646 #, c-format msgid " constant offset: %#\n" msgstr " стале зміщення: %#\n" -#: src/readelf.c:8154 +#: src/readelf.c:10660 #, c-format msgid "" "\n" @@ -5633,7 +5887,7 @@ msgstr "" "\n" " Список CU зі зміщенням %# містить %zu записів:\n" -#: src/readelf.c:8179 +#: src/readelf.c:10685 #, c-format msgid "" "\n" @@ -5642,7 +5896,7 @@ msgstr "" "\n" " Список TU зі зміщенням %# містить %zu записів:\n" -#: src/readelf.c:8208 +#: src/readelf.c:10714 #, c-format msgid "" "\n" @@ -5651,7 +5905,7 @@ msgstr "" "\n" " Список адрес зі зміщенням %# містить %zu записів:\n" -#: src/readelf.c:8241 +#: src/readelf.c:10746 #, c-format msgid "" "\n" @@ -5660,17 +5914,18 @@ msgstr "" "\n" " Таблиця символів за зміщенням %# містить %zu позицій:\n" -#: src/readelf.c:8328 +#: src/readelf.c:10884 #, c-format msgid "cannot get debug context descriptor: %s" msgstr "не вдалося отримати дескриптор контексту зневаджування: %s" -#: src/readelf.c:8484 src/readelf.c:9106 src/readelf.c:9217 src/readelf.c:9275 +#: src/readelf.c:11247 src/readelf.c:11869 src/readelf.c:11980 +#: src/readelf.c:12038 #, c-format msgid "cannot convert core note data: %s" msgstr "не вдалося перетворити дані запису ядра: %s" -#: src/readelf.c:8847 +#: src/readelf.c:11610 #, c-format msgid "" "\n" @@ -5679,21 +5934,21 @@ msgstr "" "\n" "%*s... <повторюється %u разів> ..." -#: src/readelf.c:9354 +#: src/readelf.c:12117 msgid " Owner Data size Type\n" msgstr " Власник Розм. даних Тип\n" -#: src/readelf.c:9372 +#: src/readelf.c:12135 #, c-format msgid " %-13.*s %9 %s\n" msgstr " %-13.*s %9 %s\n" -#: src/readelf.c:9422 -#, c-format -msgid "cannot get content of note section: %s" +#: src/readelf.c:12185 +#, fuzzy, c-format +msgid "cannot get content of note: %s" msgstr "не вдалося отримати вміст розділу записів: %s" -#: src/readelf.c:9449 +#: src/readelf.c:12212 #, c-format msgid "" "\n" @@ -5703,7 +5958,7 @@ msgstr "" "Розділ записів (note) [%2zu] «%s» з % байтів за зміщенням " "%#0:\n" -#: src/readelf.c:9472 +#: src/readelf.c:12235 #, c-format msgid "" "\n" @@ -5712,7 +5967,7 @@ msgstr "" "\n" "Сегмент записів з % байтів за зміщенням %#0:\n" -#: src/readelf.c:9518 +#: src/readelf.c:12281 #, c-format msgid "" "\n" @@ -5721,12 +5976,12 @@ msgstr "" "\n" "У розділі [%zu] «%s» не міститься даних для створення дампу.\n" -#: src/readelf.c:9545 src/readelf.c:9596 +#: src/readelf.c:12308 src/readelf.c:12359 #, c-format msgid "cannot get data for section [%zu] '%s': %s" msgstr "не вдалося отримати дані для розділу [%zu] «%s»: %s" -#: src/readelf.c:9550 +#: src/readelf.c:12313 #, c-format msgid "" "\n" @@ -5735,7 +5990,7 @@ msgstr "" "\n" "Шіст. дамп розділу [%zu] «%s», % байтів за зміщенням %#0:\n" -#: src/readelf.c:9555 +#: src/readelf.c:12318 #, fuzzy, c-format msgid "" "\n" @@ -5745,7 +6000,7 @@ msgstr "" "\n" "Шіст. дамп розділу [%zu] «%s», % байтів за зміщенням %#0:\n" -#: src/readelf.c:9569 +#: src/readelf.c:12332 #, c-format msgid "" "\n" @@ -5754,7 +6009,7 @@ msgstr "" "\n" "У розділі [%zu] «%s» не міститься рядків для створення дампу.\n" -#: src/readelf.c:9601 +#: src/readelf.c:12364 #, c-format msgid "" "\n" @@ -5763,7 +6018,7 @@ msgstr "" "\n" "Розділ рядків [%zu] «%s» містить % байтів за зміщенням %#0:\n" -#: src/readelf.c:9606 +#: src/readelf.c:12369 #, fuzzy, c-format msgid "" "\n" @@ -5773,7 +6028,7 @@ msgstr "" "\n" "Розділ рядків [%zu] «%s» містить % байтів за зміщенням %#0:\n" -#: src/readelf.c:9655 +#: src/readelf.c:12418 #, c-format msgid "" "\n" @@ -5782,7 +6037,7 @@ msgstr "" "\n" "розділу [%lu] не існує" -#: src/readelf.c:9684 +#: src/readelf.c:12447 #, c-format msgid "" "\n" @@ -5791,12 +6046,12 @@ msgstr "" "\n" "розділу «%s» не існує" -#: src/readelf.c:9741 +#: src/readelf.c:12504 #, c-format msgid "cannot get symbol index of archive '%s': %s" msgstr "не вдалося отримати покажчик символів архіву «%s»: %s" -#: src/readelf.c:9744 +#: src/readelf.c:12507 #, c-format msgid "" "\n" @@ -5805,7 +6060,7 @@ msgstr "" "\n" "У архіві «%s» немає покажчика символів\n" -#: src/readelf.c:9748 +#: src/readelf.c:12511 #, c-format msgid "" "\n" @@ -5814,12 +6069,12 @@ msgstr "" "\n" "Покажчик архіву «%s» містить %zu записів:\n" -#: src/readelf.c:9766 +#: src/readelf.c:12529 #, c-format msgid "cannot extract member at offset %zu in '%s': %s" msgstr "не вдалося видобути елемент за зміщенням %zu у «%s»: %s" -#: src/readelf.c:9771 +#: src/readelf.c:12534 #, c-format msgid "Archive member '%s' contains:\n" msgstr "Елемент архіву «%s» містить:\n" @@ -5895,58 +6150,63 @@ msgstr " (прикл. %s)" msgid "(TOTALS)\n" msgstr "(ЗАГАЛОМ)\n" -#: src/stack.c:481 +#: src/stack.c:483 +#, c-format msgid "-p PID should be a positive process id." msgstr "PID у -p PID має бути додатним значенням ідентифікатора процесу." -#: src/stack.c:487 +#: src/stack.c:489 #, c-format msgid "Cannot open core file '%s'" msgstr "Не вдалося відкрити файл дампу ядра «%s»" -#: src/stack.c:547 +#: src/stack.c:549 +#, c-format msgid "-n MAXFRAMES should be 0 or higher." msgstr "MAXFRAMES у -n має бути значенням рівним 0 або більшим." -#: src/stack.c:559 +#: src/stack.c:561 +#, c-format msgid "-e EXEC needs a core given by --core." msgstr "Для -e EXEC слід вказати ядро за допомогою --core." -#: src/stack.c:563 +#: src/stack.c:565 +#, c-format msgid "-1 needs a thread id given by -p." msgstr "-1 слід передати ідентифікатор потоку виконання, заданого -p." -#: src/stack.c:567 +#: src/stack.c:569 +#, c-format msgid "One of -p PID or --core COREFILE should be given." msgstr "Слід вказати -p PID або --core COREFILE." -#: src/stack.c:637 +#: src/stack.c:641 msgid "Show stack of process PID" msgstr "Вивести стек PID процесу" -#: src/stack.c:639 +#: src/stack.c:643 msgid "Show stack found in COREFILE" msgstr "Вивести стек, знайдений у COREFILE" -#: src/stack.c:640 +#: src/stack.c:644 msgid "(optional) EXECUTABLE that produced COREFILE" msgstr "(необов’язковий) EXECUTABLE, яким створено COREFILE" -#: src/stack.c:644 +#: src/stack.c:648 msgid "Output selection options:" msgstr "Параметри вибору виведених даних:" -#: src/stack.c:646 +#: src/stack.c:650 msgid "Additionally show frame activation" msgstr "Додатково вивести активацію вікна" -#: src/stack.c:648 +#: src/stack.c:652 msgid "Additionally try to lookup DWARF debuginfo name for frame address" msgstr "" "Додатково спробувати визначити назву файла даних діагностики DWARF для " "адреси вікна" -#: src/stack.c:651 +#: src/stack.c:655 msgid "" "Additionally show inlined function frames using DWARF debuginfo if available " "(implies -d)" @@ -5954,15 +6214,15 @@ msgstr "" "Додатково вивести вікна вбудованих функцій за допомогою даних діагностики " "DWARF, якщо такі є (використовується і -d)" -#: src/stack.c:653 +#: src/stack.c:657 msgid "Additionally show module file information" msgstr "Додатково вивести дані щодо файла модуля" -#: src/stack.c:655 +#: src/stack.c:659 msgid "Additionally show source file information" msgstr "Додатково вивести дані щодо файла початкового коду" -#: src/stack.c:657 +#: src/stack.c:661 msgid "" "Show all additional information (activation, debugname, inlines, module and " "source)" @@ -5970,73 +6230,77 @@ msgstr "" "Вивести усі додаткові дані (активацію, назву у системі діагностики, " "вбудовані функції, модуль і початковий файл)" -#: src/stack.c:659 +#: src/stack.c:663 msgid "Do not resolve address to function symbol name" msgstr "Не розгортати адресу до назви символу функції" -#: src/stack.c:661 +#: src/stack.c:665 msgid "Show raw function symbol names, do not try to demangle names" msgstr "" "Вивести назви символів функцій без обробки, не намагатися розшифрувати назви" -#: src/stack.c:663 +#: src/stack.c:667 msgid "Show module build-id, load address and pc offset" msgstr "Виводити ідентифікатор збирання, адресу завантаження та зсув модуля" -#: src/stack.c:665 +#: src/stack.c:669 msgid "Show the backtrace of only one thread" msgstr "Виводити зворотне трасування лише одного потоку" -#: src/stack.c:667 +#: src/stack.c:671 msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)" msgstr "" "Виводити не більше MAXFRAMES на потік виконання (типове значення 256, 0 — не " "обмежувати)" -#: src/stack.c:669 +#: src/stack.c:673 msgid "Show module memory map with build-id, elf and debug files detected" msgstr "" "Вивести карту пам’яті модуля із виявленими ідентифікатором збирання, elf та " "файлами діагностичних даних" -#: src/stack.c:677 -msgid "" -"Print a stack for each thread in a process or core file.\vProgram exits with " -"return code 0 if all frames were shown without any errors. If some frames " -"were shown, but there were some non-fatal errors, possibly causing an " -"incomplete backtrace, the program exits with return code 1. If no frames " -"could be shown, or a fatal error occured the program exits with return code " -"2. If the program was invoked with bad or missing arguments it will exit " -"with return code 64." -msgstr "" -"Вивести стек для кожного потоку у процесі або файлі дампу ядра.\vПрограма " -"завершує роботу з кодом виходу 0, якщо усі вікна було виведено без помилок. " -"Якщо деякі вікна було показано, але сталися некритичні помилки, ймовірно " -"спричинені неповними даними зворотного трасування, програма завершує роботу " -"з кодом повернення 1. Якщо не вдалося вивести жодного вікна або сталася " -"критична помилка, програма виходить з кодом повернення 2. Якщо програму було " -"викликано з помилковими або пропущеними аргументами, програма завершить " -"роботу з кодом виходу 64." - -#: src/stack.c:750 +#: src/stack.c:681 +#, fuzzy +msgid "" +"Print a stack for each thread in a process or core file.\n" +"\n" +"Program exits with return code 0 if all frames were shown without any " +"errors. If some frames were shown, but there were some non-fatal errors, " +"possibly causing an incomplete backtrace, the program exits with return code " +"1. If no frames could be shown, or a fatal error occured the program exits " +"with return code 2. If the program was invoked with bad or missing " +"arguments it will exit with return code 64." +msgstr "" +"Вивести стек для кожного потоку у процесі або файлі дампу ядра.\n" +"\n" +"Програма завершує роботу з кодом виходу 0, якщо усі вікна було виведено без " +"помилок. Якщо деякі вікна було показано, але сталися некритичні помилки, " +"ймовірно спричинені неповними даними зворотного трасування, програма " +"завершує роботу з кодом повернення 1. Якщо не вдалося вивести жодного вікна " +"або сталася критична помилка, програма виходить з кодом повернення 2. Якщо " +"програму було викликано з помилковими або пропущеними аргументами, програма " +"завершить роботу з кодом виходу 64." + +#: src/stack.c:756 +#, c-format msgid "Couldn't show any frames." msgstr "Не вдалося вивести жодного вікна." -#: src/strings.c:65 +#: src/strings.c:66 msgid "Output Selection:" msgstr "Вибір виводу:" -#: src/strings.c:66 +#: src/strings.c:67 msgid "Scan entire file, not only loaded sections" msgstr "Шукати у всьому файлі, а не лише у завантажених розділах" -#: src/strings.c:68 +#: src/strings.c:69 msgid "Only NUL-terminated sequences of MIN-LEN characters or more are printed" msgstr "" "Буде виведено лише послідовності з не менше, ніж MIN-LEN символів, що " "завершуються на NUL" -#: src/strings.c:69 +#: src/strings.c:70 msgid "" "Select character size and endianess: s = 7-bit, S = 8-bit, {b,l} = 16-bit, " "{B,L} = 32-bit" @@ -6044,78 +6308,78 @@ msgstr "" "Визначення розмірності та порядку бітів символів: s = 7-бітові, S = 8-" "бітові, {b,l} = 16-бітові, {B,L} = 32-бітові" -#: src/strings.c:73 +#: src/strings.c:74 msgid "Print name of the file before each string." msgstr "Виводити назву файла перед кожним рядком." -#: src/strings.c:75 +#: src/strings.c:76 msgid "Print location of the string in base 8, 10, or 16 respectively." msgstr "Виводити адресу рядка за основами 8, 10 та 16, відповідно." -#: src/strings.c:76 +#: src/strings.c:77 msgid "Alias for --radix=o" msgstr "Замінник --radix=o" #. Short description of program. -#: src/strings.c:83 +#: src/strings.c:84 msgid "Print the strings of printable characters in files." msgstr "Вивести рядки файлів з символів, придатних для друку." -#: src/strings.c:256 src/strings.c:291 +#: src/strings.c:257 src/strings.c:292 #, c-format msgid "invalid value '%s' for %s parameter" msgstr "некоректне значення «%s» параметра %s" -#: src/strings.c:302 +#: src/strings.c:303 #, c-format msgid "invalid minimum length of matched string size" msgstr "некоректна мінімальна довжина розмірності рядка для порівняння" -#: src/strings.c:585 +#: src/strings.c:586 #, fuzzy, c-format msgid "lseek failed" msgstr "помилка lseek64" -#: src/strings.c:602 src/strings.c:666 +#: src/strings.c:603 src/strings.c:667 #, c-format msgid "re-mmap failed" msgstr "помилка повторного використання mmap" -#: src/strings.c:639 +#: src/strings.c:640 #, c-format msgid "mprotect failed" msgstr "помилка mprotect" -#: src/strings.c:728 +#: src/strings.c:729 #, c-format msgid "Skipping section %zd '%s' data outside file" msgstr "Пропускаємо дані %zd «%s» поза файлом" -#: src/strip.c:68 +#: src/strip.c:71 msgid "Place stripped output into FILE" msgstr "Вивести дані після вилучення до ФАЙЛа" -#: src/strip.c:69 +#: src/strip.c:72 msgid "Extract the removed sections into FILE" msgstr "Видобути вилучені розділи до ФАЙЛа" -#: src/strip.c:70 +#: src/strip.c:73 msgid "Embed name FILE instead of -f argument" msgstr "Вбудувати назву ФАЙЛа замість аргументу -f" -#: src/strip.c:74 +#: src/strip.c:77 msgid "Remove all debugging symbols" msgstr "Вилучити всі символи зневаджування" -#: src/strip.c:78 +#: src/strip.c:81 msgid "Remove section headers (not recommended)" msgstr "Вилучити заголовки розділів (не рекомендовано)" -#: src/strip.c:80 +#: src/strip.c:83 msgid "Copy modified/access timestamps to the output" msgstr "Скопіювати часові позначки зміни/доступу до виведених даних" -#: src/strip.c:82 +#: src/strip.c:85 msgid "" "Resolve all trivial relocations between debug sections if the removed " "sections are placed in a debug file (only relevant for ET_REL files, " @@ -6125,52 +6389,64 @@ msgstr "" "вилучені розділи було розташовано у діагностичному файлі (стосується лише " "файлів ET_REL, скасувати дію неможливо, потребує параметра -f)" -#: src/strip.c:84 +#: src/strip.c:87 msgid "Remove .comment section" msgstr "Вилучити розділ .comment" +#: src/strip.c:88 +msgid "" +"Remove the named section. SECTION is an extended wildcard pattern. May be " +"given more than once. Only non-allocated sections can be removed." +msgstr "" + +#: src/strip.c:89 +msgid "" +"Keep the named section. SECTION is an extended wildcard pattern. May be " +"given more than once." +msgstr "" + #. Short description of program. -#: src/strip.c:92 +#: src/strip.c:96 msgid "Discard symbols from object files." msgstr "Відкинути символи з об’єктних файлів" -#: src/strip.c:186 +#: src/strip.c:242 #, c-format msgid "--reloc-debug-sections used without -f" msgstr "--reloc-debug-sections використано без -f" -#: src/strip.c:200 +#: src/strip.c:256 #, c-format msgid "Only one input file allowed together with '-o' and '-f'" msgstr "" "Разом з «-o» або «-f» можна використовувати лише один файл вхідних даних" -#: src/strip.c:222 +#: src/strip.c:279 #, c-format msgid "-f option specified twice" msgstr "параметр -f вказано двічі" -#: src/strip.c:231 +#: src/strip.c:288 #, c-format msgid "-F option specified twice" msgstr "параметр -F вказано двічі" -#: src/strip.c:264 -#, c-format -msgid "-R option supports only .comment section" -msgstr "Для параметра -R передбачено підтримку лише розділу .comment" +#: src/strip.c:347 +#, fuzzy, c-format +msgid "cannot both keep and remove .comment section" +msgstr "Вилучити розділ .comment" -#: src/strip.c:306 src/strip.c:330 +#: src/strip.c:372 src/strip.c:396 #, c-format msgid "cannot stat input file '%s'" msgstr "не вдалося отримати дані з вхідного файла «%s» за допомогою stat" -#: src/strip.c:320 +#: src/strip.c:386 #, c-format msgid "while opening '%s'" msgstr "під час спроби відкриття «%s»" -#: src/strip.c:358 +#: src/strip.c:424 #, c-format msgid "%s: cannot use -o or -f when stripping archive" msgstr "" @@ -6183,107 +6459,117 @@ msgstr "" #. result = handle_ar (fd, elf, NULL, fname, #. preserve_dates ? tv : NULL); #. -#: src/strip.c:370 +#: src/strip.c:436 #, c-format msgid "%s: no support for stripping archive" msgstr "%s: підтримки вилучення додаткового вмісту з архіву не передбачено" -#: src/strip.c:469 +#: src/strip.c:535 #, c-format msgid "cannot open EBL backend" msgstr "не вдалося відкрити канал сервера EBL" -#: src/strip.c:514 +#: src/strip.c:580 #, c-format msgid "cannot get number of phdrs" msgstr "не вдалося отримати кількість phdr" -#: src/strip.c:530 src/strip.c:554 +#: src/strip.c:596 src/strip.c:620 #, c-format msgid "cannot create new file '%s': %s" msgstr "не вдалося створити файл «%s»: %s" -#: src/strip.c:620 +#: src/strip.c:686 #, c-format msgid "illformed file '%s'" msgstr "помилкове форматування файла «%s»" -#: src/strip.c:954 src/strip.c:1053 +#: src/strip.c:696 +#, fuzzy, c-format +msgid "Cannot remove allocated section '%s'" +msgstr "не вдалося розмістити PLT-розділ: %s" + +#: src/strip.c:705 +#, fuzzy, c-format +msgid "Cannot both keep and remove section '%s'" +msgstr "не вдалося додати новий розділ: %s" + +#: src/strip.c:1061 src/strip.c:1160 #, c-format msgid "while generating output file: %s" msgstr "під час спроби створення файла з виведеними даними: %s" -#: src/strip.c:1019 src/strip.c:2089 +#: src/strip.c:1126 src/strip.c:2208 #, c-format msgid "%s: error while creating ELF header: %s" msgstr "%s: помилка під час створення заголовка ELF: %s" -#: src/strip.c:1036 +#: src/strip.c:1143 #, c-format msgid "while preparing output for '%s'" msgstr "під час приготування виведених даних для «%s»" -#: src/strip.c:1094 src/strip.c:1157 +#: src/strip.c:1205 src/strip.c:1268 #, c-format msgid "while create section header section: %s" msgstr "під час створення розділу заголовка розділу: %s" -#: src/strip.c:1103 +#: src/strip.c:1214 #, c-format msgid "cannot allocate section data: %s" msgstr "не вдалося розмістити дані розділу: %s" -#: src/strip.c:1169 +#: src/strip.c:1280 #, c-format msgid "while create section header string table: %s" msgstr "під час створення таблиці рядків заголовка розділу: %s" -#: src/strip.c:1176 +#: src/strip.c:1287 #, fuzzy, c-format msgid "no memory to create section header string table" msgstr "під час створення таблиці рядків заголовка розділу: %s" -#: src/strip.c:1383 +#: src/strip.c:1497 #, c-format msgid "Cannot remove symbol [%zd] from allocated symbol table [%zd]" msgstr "" -#: src/strip.c:1875 +#: src/strip.c:1994 #, c-format msgid "bad relocation" msgstr "помилкове пересування" -#: src/strip.c:2000 src/strip.c:2113 +#: src/strip.c:2119 src/strip.c:2232 #, c-format msgid "while writing '%s': %s" msgstr "під час запису «%s»: %s" -#: src/strip.c:2011 +#: src/strip.c:2130 #, c-format msgid "while creating '%s'" msgstr "під час спроби створення «%s»" -#: src/strip.c:2034 +#: src/strip.c:2153 #, c-format msgid "while computing checksum for debug information" msgstr "під час обчислення контрольної суми для діагностичних даних" -#: src/strip.c:2098 +#: src/strip.c:2217 #, c-format msgid "%s: error while reading the file: %s" msgstr "%s: помилка під час читання файла: %s" -#: src/strip.c:2138 src/strip.c:2158 +#: src/strip.c:2257 src/strip.c:2277 #, c-format msgid "while writing '%s'" msgstr "під час спроби запису «%s»" -#: src/strip.c:2195 src/strip.c:2202 +#: src/strip.c:2314 src/strip.c:2321 #, c-format msgid "error while finishing '%s': %s" msgstr "помилка під час завершення «%s»: %s" -#: src/strip.c:2219 src/strip.c:2291 +#: src/strip.c:2338 src/strip.c:2414 #, c-format msgid "cannot set access and modification date of '%s'" msgstr "не вдалося встановити права доступу та дату зміни «%s»" @@ -6376,12 +6662,12 @@ msgstr "не вдалося створити заголовок ELF: %s" msgid "cannot copy ELF header: %s" msgstr "не вдалося скопіювати заголовок ELF: %s" -#: src/unstrip.c:249 src/unstrip.c:1930 src/unstrip.c:1973 +#: src/unstrip.c:249 src/unstrip.c:1933 src/unstrip.c:1976 #, c-format msgid "cannot get number of program headers: %s" msgstr "не вдалося отримати кількість заголовків програми: %s" -#: src/unstrip.c:254 src/unstrip.c:1934 +#: src/unstrip.c:254 src/unstrip.c:1937 #, c-format msgid "cannot create program headers: %s" msgstr "не вдалося створити заголовки програми: %s" @@ -6396,12 +6682,12 @@ msgstr "не вдалося скопіювати заголовок програ msgid "cannot copy section header: %s" msgstr "не вдалося скопіювати заголовок розділу: %s" -#: src/unstrip.c:273 src/unstrip.c:1565 +#: src/unstrip.c:273 src/unstrip.c:1568 #, c-format msgid "cannot get section data: %s" msgstr "не вдалося отримати дані розділу: %s" -#: src/unstrip.c:275 src/unstrip.c:1567 +#: src/unstrip.c:275 src/unstrip.c:1570 #, c-format msgid "cannot copy section data: %s" msgstr "не вдалося скопіювати дані розділу: %s" @@ -6411,13 +6697,13 @@ msgstr "не вдалося скопіювати дані розділу: %s" msgid "cannot create directory '%s'" msgstr "не вдалося створити каталог «%s»" -#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1599 +#: src/unstrip.c:371 src/unstrip.c:791 src/unstrip.c:1602 #, c-format msgid "cannot get symbol table entry: %s" msgstr "не вдалося отримати запис таблиці символів: %s" #: src/unstrip.c:387 src/unstrip.c:608 src/unstrip.c:629 src/unstrip.c:641 -#: src/unstrip.c:1620 src/unstrip.c:1796 src/unstrip.c:1820 +#: src/unstrip.c:1623 src/unstrip.c:1799 src/unstrip.c:1823 #, c-format msgid "cannot update symbol table: %s" msgstr "не вдалося оновити таблицю символів: %s" @@ -6447,107 +6733,107 @@ msgstr "неочікуваний тип розділу у [%zu] з посила msgid "invalid string offset in symbol [%zu]" msgstr "некоректне зміщення рядка у символі [%zu]" -#: src/unstrip.c:955 src/unstrip.c:1302 +#: src/unstrip.c:955 src/unstrip.c:1305 #, c-format msgid "cannot read section [%zu] name: %s" msgstr "не вдалося прочитати назву розділу [%zu]: %s" -#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1050 +#: src/unstrip.c:996 src/unstrip.c:1015 src/unstrip.c:1053 #, c-format msgid "cannot read '.gnu.prelink_undo' section: %s" msgstr "не вдалося прочитати розділ «.gnu.prelink_undo»: %s" -#: src/unstrip.c:1036 -#, c-format -msgid "invalid contents in '%s' section" -msgstr "некоректний вміст розділу «%s»" - -#: src/unstrip.c:1042 +#: src/unstrip.c:1033 #, c-format msgid "overflow with shnum = %zu in '%s' section" msgstr "" -#: src/unstrip.c:1096 src/unstrip.c:1424 +#: src/unstrip.c:1044 +#, c-format +msgid "invalid contents in '%s' section" +msgstr "некоректний вміст розділу «%s»" + +#: src/unstrip.c:1099 src/unstrip.c:1427 #, c-format msgid "cannot find matching section for [%zu] '%s'" msgstr "не вдалося знайти відповідний розділ для [%zu] «%s»" -#: src/unstrip.c:1221 src/unstrip.c:1236 src/unstrip.c:1503 src/unstrip.c:1755 +#: src/unstrip.c:1224 src/unstrip.c:1239 src/unstrip.c:1506 src/unstrip.c:1758 #, c-format msgid "cannot add section name to string table: %s" msgstr "не вдалося додати назву розділу до таблиці рядків: %s" -#: src/unstrip.c:1245 +#: src/unstrip.c:1248 #, c-format msgid "cannot update section header string table data: %s" msgstr "не вдалося оновити дані заголовка розділу у таблиці рядків: %s" -#: src/unstrip.c:1273 src/unstrip.c:1277 +#: src/unstrip.c:1276 src/unstrip.c:1280 #, c-format msgid "cannot get section header string table section index: %s" msgstr "" "не вдалося визначити індекс розділу заголовка розділу у таблиці рядків: %s" -#: src/unstrip.c:1281 src/unstrip.c:1285 src/unstrip.c:1518 +#: src/unstrip.c:1284 src/unstrip.c:1288 src/unstrip.c:1521 #, c-format msgid "cannot get section count: %s" msgstr "не вдалося отримати кількість розділів: %s" -#: src/unstrip.c:1288 +#: src/unstrip.c:1291 #, c-format msgid "more sections in stripped file than debug file -- arguments reversed?" msgstr "" "у очищеному файлі більше розділів ніж у файлі з даними для зневаджування — " "помилковий порядок параметрів?" -#: src/unstrip.c:1347 src/unstrip.c:1439 +#: src/unstrip.c:1350 src/unstrip.c:1442 #, c-format msgid "cannot read section header string table: %s" msgstr "не вдалося прочитати таблицю рядків заголовка розділу: %s" -#: src/unstrip.c:1497 +#: src/unstrip.c:1500 #, c-format msgid "cannot add new section: %s" msgstr "не вдалося додати новий розділ: %s" -#: src/unstrip.c:1607 +#: src/unstrip.c:1610 #, c-format msgid "symbol [%zu] has invalid section index" msgstr "символ [%zu] має некоректний індекс розділу" -#: src/unstrip.c:1891 +#: src/unstrip.c:1894 #, c-format msgid "cannot read section data: %s" msgstr "не вдалося прочитати дані розділу: %s" -#: src/unstrip.c:1912 +#: src/unstrip.c:1915 #, c-format msgid "cannot get ELF header: %s" msgstr "не вдалося отримати заголовок ELF: %s" -#: src/unstrip.c:1920 +#: src/unstrip.c:1923 #, c-format msgid "cannot update ELF header: %s" msgstr "не вдалося оновити заголовок ELF: %s" -#: src/unstrip.c:1944 +#: src/unstrip.c:1947 #, c-format msgid "cannot update program header: %s" msgstr "не вдалося оновити заголовок програми: %s" -#: src/unstrip.c:1949 src/unstrip.c:2031 +#: src/unstrip.c:1952 src/unstrip.c:2034 #, c-format msgid "cannot write output file: %s" msgstr "не вдалося записати файл виведених даних: %s" -#: src/unstrip.c:2000 +#: src/unstrip.c:2003 #, c-format msgid "DWARF data not adjusted for prelinking bias; consider prelink -u" msgstr "" "Дані DWARF не скориговано відповідно до відхилення перед компонуванням; " "спробуйте виправити це командою prelink -u" -#: src/unstrip.c:2003 +#: src/unstrip.c:2006 #, c-format msgid "" "DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u" @@ -6555,76 +6841,76 @@ msgstr "" "Дані DWARF у «%s» не скориговано відповідно до відхилення перед " "компонуванням; спробуйте виправити це командою prelink -u" -#: src/unstrip.c:2022 src/unstrip.c:2073 src/unstrip.c:2085 src/unstrip.c:2171 +#: src/unstrip.c:2025 src/unstrip.c:2076 src/unstrip.c:2088 src/unstrip.c:2174 #, c-format msgid "cannot create ELF descriptor: %s" msgstr "не вдалося створити дескриптор ELF: %s" -#: src/unstrip.c:2064 +#: src/unstrip.c:2067 msgid "WARNING: " msgstr "УВАГА: " -#: src/unstrip.c:2066 +#: src/unstrip.c:2069 msgid ", use --force" msgstr ", скористайтеся --force" -#: src/unstrip.c:2089 +#: src/unstrip.c:2092 msgid "ELF header identification (e_ident) different" msgstr "Різні ідентифікатори заголовків ELF (e_ident)" -#: src/unstrip.c:2092 +#: src/unstrip.c:2095 msgid "ELF header type (e_type) different" msgstr "Різні типи заголовків ELF (e_type)" -#: src/unstrip.c:2095 +#: src/unstrip.c:2098 msgid "ELF header machine type (e_machine) different" msgstr "Різні типи архітектур заголовків ELF (e_machine)" -#: src/unstrip.c:2098 +#: src/unstrip.c:2101 msgid "stripped program header (e_phnum) smaller than unstripped" msgstr "очищений заголовок програми (e_phnum) є меншим за неочищений" -#: src/unstrip.c:2128 +#: src/unstrip.c:2131 #, c-format msgid "cannot find stripped file for module '%s': %s" msgstr "не вдалося знайти очищений файл для модуля «%s»: %s" -#: src/unstrip.c:2132 +#: src/unstrip.c:2135 #, c-format msgid "cannot open stripped file '%s' for module '%s': %s" msgstr "не вдалося відкрити очищений файл «%s» для модуля «%s»: %s" -#: src/unstrip.c:2147 +#: src/unstrip.c:2150 #, c-format msgid "cannot find debug file for module '%s': %s" msgstr "не вдалося знайти файл діагностичних даних для модуля «%s»: %s" -#: src/unstrip.c:2151 +#: src/unstrip.c:2154 #, c-format msgid "cannot open debug file '%s' for module '%s': %s" msgstr "не вдалося відкрити файл діагностичних даних «%s» для модуля «%s»: %s" -#: src/unstrip.c:2164 +#: src/unstrip.c:2167 #, c-format msgid "module '%s' file '%s' is not stripped" msgstr "у модулі «%s» файл «%s» не очищено strip" -#: src/unstrip.c:2195 +#: src/unstrip.c:2198 #, c-format msgid "cannot cache section addresses for module '%s': %s" msgstr "не вдалося кешувати адреси розділів для модуля «%s»: %s" -#: src/unstrip.c:2328 +#: src/unstrip.c:2331 #, c-format msgid "no matching modules found" msgstr "відповідних модулів не виявлено" -#: src/unstrip.c:2337 +#: src/unstrip.c:2340 #, c-format msgid "matched more than one module" msgstr "встановлено відповідність декількох модулів" -#: src/unstrip.c:2381 +#: src/unstrip.c:2384 msgid "" "STRIPPED-FILE DEBUG-FILE\n" "[MODULE...]" @@ -6632,10 +6918,12 @@ msgstr "" "ОЧИЩЕНИЙ-ФАЙЛ ФАЙЛ-DEBUG\n" "[МОДУЛЬ...]" -#: src/unstrip.c:2382 +#: src/unstrip.c:2385 +#, fuzzy 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" +"Combine stripped files with separate symbols and debug information.\n" +"\n" +"The first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" "With -f these match the file name of the main (stripped) file (slashes are " @@ -6659,8 +6947,10 @@ msgid "" "was found, or . if FILE contains the debug information." msgstr "" "Комбінувати очищені файли з окремими даними щодо символів та діагностичними " -"даними.\vЗа використання першої форми команди, результати буде виведено до " -"ФАЙЛА-DEBUG, якщо не файл виведених даних не вказано параметром -o.\n" +"даними.\n" +"\n" +"За використання першої форми команди, результати буде виведено до ФАЙЛА-" +"DEBUG, якщо не файл виведених даних не вказано параметром -o.\n" "\n" "За допомогою аргументів МОДУЛЬ можна вказати шаблони назв файлів модулів, " "які слід обробити.\n" @@ -6688,7 +6978,7 @@ msgstr "" "окремого файла діагностичних даних або «-», якщо файла діагностичних даних " "не вдалося знайти, і «.», якщо ФАЙЛ сам містить діагностичні дані." -#: tests/backtrace.c:430 +#: tests/backtrace.c:442 msgid "Run executable" msgstr "Запустити виконуваний файл" @@ -6700,25 +6990,72 @@ msgstr "Додатково вивести назви функцій" msgid "Show instances of inlined functions" msgstr "Вивести екземпляри вбудованих функцій" -#~ msgid "" -#~ "Copyright (C) %s Red Hat, Inc.\n" -#~ "This is free software; see the source for copying conditions. There is " -#~ "NO\n" -#~ "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR " -#~ "PURPOSE.\n" -#~ msgstr "" -#~ "© Red Hat, Inc., %s\n" -#~ "Це програмне забезпечення є вільним, умови копіювання викладено у його " -#~ "початкових кодах. Умовами ліцензування програми НЕ передбачено жодних " -#~ "гарантій, зокрема гарантій працездатності або придатності для певної " -#~ "мети.\n" +#~ msgid "%s+%# <%s+%#>" +#~ msgstr "%s+%# <%s+%#>" + +#~ msgid "%s+%#0* <%s+%#>" +#~ msgstr "%s+%#0* <%s+%#>" + +#~ msgid "%# <%s+%#>" +#~ msgstr "%# <%s+%#>" + +#~ msgid "%#0* <%s+%#>" +#~ msgstr "%#0* <%s+%#>" + +#~ msgid "%s+%# <%s>" +#~ msgstr "%s+%# <%s>" + +#~ msgid "%s+%#0* <%s>" +#~ msgstr "%s+%#0* <%s>" + +#~ msgid "%# <%s>" +#~ msgstr "%# <%s>" + +#~ msgid "%#0* <%s>" +#~ msgstr "%#0* <%s>" + +#~ msgid "%s+%#" +#~ msgstr "%s+%#" + +#~ msgid "%s+%#0*" +#~ msgstr "%s+%#0*" + +#~ msgid " %s..%s (%)\n" +#~ msgstr " %s..%s (%)\n" + +#~ msgid " %s..%s\n" +#~ msgstr " %s..%s\n" + +#~ msgid " advance address by %u to %s, op_index to %u\n" +#~ msgstr " збільшення адреси на %u до %s, індекс_оп до %u\n" + +#~ msgid " advance address by constant %u to %s, op_index to %u\n" +#~ msgstr " збільшити адресу на сталу величину %u до %s, індекс_оп до %u\n" + +#~ msgid " [%6tx] %s..%s\n" +#~ msgstr " [%6tx] %s..%s\n" + +#~ msgid " %s..%s\n" +#~ msgstr " %s..%s\n" + +#~ msgid "cannot get DIE at offset % in section '%s': %s" +#~ msgstr "не вдалося отримати DIE за зміщенням % у розділі «%s»: %s" + +#~ msgid " [%6tx] %s..%s" +#~ msgstr " [%6tx] %s..%s" + +#~ msgid " %s..%s" +#~ msgstr " %s..%s" + +#~ msgid "vendor opcode not verified?" +#~ msgstr "код операції постачальника не перевірено?" + +#~ msgid "-R option supports only .comment section" +#~ msgstr "Для параметра -R передбачено підтримку лише розділу .comment" #~ msgid "Written by %s.\n" #~ msgstr "Автор — %s.\n" -#~ msgid "cannot allocate PLT section: %s" -#~ msgstr "не вдалося розмістити PLT-розділ: %s" - #~ msgid "cannot allocate PLTREL section: %s" #~ msgstr "не вдалося розмістити розділ PLTREL: %s" @@ -7224,9 +7561,6 @@ msgstr "Вивести екземпляри вбудованих функцій" #~ msgid "unknown user attribute %hx" #~ msgstr "невідомий атрибут користувача %hx" -#~ msgid "unknown form %#" -#~ msgstr "невідома форма %#" - #~ msgid "" #~ "\n" #~ "\n" diff --git a/po/zh_CN.po b/po/zh_CN.po index 47515ae5..0c6ec564 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -5640,7 +5640,7 @@ msgstr "" #: src/unstrip.c:2248 msgid "" -"Combine stripped files with separate symbols and debug information.\vThe " +"Combine stripped files with separate symbols and debug information.\n\nThe " "first form puts the result in DEBUG-FILE if -o was not given.\n" "\n" "MODULE arguments give file name patterns matching modules to process.\n" diff --git a/src/ChangeLog b/src/ChangeLog index 0601198c..29d36446 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,688 @@ +2018-07-30 Mark Wielaard + + * strip.c (handle_elf): Track allocated/unallocated sections seen. Set + section offset of unallocated sections after handling all allocated + sections. + +2018-08-18 Mark Wielaard + + * readelf.c (print_debug_aranges_section): Make sure there is enough + data to read the header segment size. + +2018-08-18 Mark Wielaard + + * elflint.c (check_sysv_hash): Calculate needed size using unsigned + long long int to prevent overflow. + (check_sysv_hash64): Calculate maxwords used separately before + comparison to prevent overflow. + +2018-07-24 Mark Wielaard + + * unstrip.c (compare_unalloc_sections): Also compare sh_size. + +2018-07-21 Mark Wielaard + + * unstrip.c (adjust_all_relocs): Skip SHT_GROUP sections. + +2018-07-21 Mark Wielaard + + * elfcompress.c (get_sections): New function. + (process_file): Check whether section needs to change. Don't rewrite + file if no section data needs changing. + (main): Update 'force' help text. + +2018-07-21 Mark Wielaard + + * elfcompress.c (process_file): Swap fchmod and fchown calls. + +2018-07-04 Mark Wielaard + + * readelf.c (print_debug_addr_section): Rename index var to uidx. + (attr_callback): Rename index var to word. + (print_debug_str_offsets_section): Rename index var to uidx. + +2018-07-04 Ross Burton + + * addr2line.c: Remove error.h include. + * ar.c: Likewise. + * arlib.c: Likewise and add system.h include. + * arlib2.c: Likewise. + * elfcmp.c: Likewise. + * elfcompress.c: Likewise. + * elflint.c: Likewise. + * findtextrel.c: Likewise. + * nm.c: Likewise. + * objdump.c: Likewise. + * ranlib.c: Likewise. + * readelf.c: Likewise. + * stack.c: Likewise. + * strings.c: Likewise. + * strip.c: Likewise. + * unstrip.c: Likewise. + +2018-06-25 Mark Wielaard + + * readelf.c (print_decoded_line_section): Use dwarf_next_lines + instead of dwarf_nextcu. + (print_debug_line_section): Don't explicitly lookup CU. + +2018-06-15 Mark Wielaard + + * readelf.c (attr_callback): Only print block as expressions if it + isn't DW_FORM_data16. + +2018-06-12 Mark Wielaard + + * readelf.c (print_form_data): Check we have 4, not 2, bytes + available for DW_FORM_block4. + +2018-06-12 Mark Wielaard + + * readelf.c (print_form_data): Don't increase strreadp after use. + Do increase readp for DW_FORM_strx[1234]. + +2018-06-16 Mark Wielaard + + * readelf.c (print_debug_loc_section): Make sure next_off doesn't + overflow d_buf. + +2018-06-13 Mark Wielaard + + * readelf.c (die_type_sign_bytes): New function. + (attr_callback): Recognized DW_FORM_implicit_cost as signed. Use + die_type_sign_bytes to lookup the signedness and size of const + values. + +2018-06-11 Mark Wielaard + + * readelf.c (print_form_data): Don't reuse readp and readendp when + reading str_offsets section. + +2018-06-10 Mark Wielaard + + * readelf.c (print_form_data): Don't cast value to ptrdiff_t, cast + ptrdiff_t to size_t. + +2018-06-08 Mark Wielaard + + * readelf.c (print_debug_rnglists_section): Calculate max_entries + instead of needed bytes to prevent overflowing. Always print + max_entries (but not more). + (print_debug_loclists_section): Likewise. + +2018-06-08 Mark Wielaard + + * readelf.c (print_debug_line_section): Stop printing directories + and files when we are at the end of the unit data. + +2018-06-07 Mark Wielaard + + * readelf.c (format_result): Removed. + (format_result_size): Removed. + (format_dwarf_addr): Renamed to... + (print_dwarf_addr): ...this. Simply call printf, don't setup buffer, + don't call sprintf. + (print_ops): Use print_dwarf_addr instead of format_dwarf_addr. + (print_debug_addr_section): Likewise. + (print_debug_aranges_section): Likewise. + (print_debug_rnglists_section): Likewise. + (print_debug_ranges_section): Likewise. + (print_debug_frame_section): Likewise. + (attr_callback): Likewise. + (print_decoded_line_section): Likewise. + (print_debug_line_section): Likewise. + (print_debug_loclists_section): Likewise. + (print_debug_loc_section): Likewise. + (print_gdb_index_section): Likewsie. + +2018-06-05 Mark Wielaard + + * readelf.c (print_debug_addr_section): Set unit_length always to + (next_unitp - readp) in case we don't have a real header. + +2018-06-05 Mark Wielaard + + * readelf.c (print_debug_loc_section): Set begin to idx when failing + to read the start address if DW_LLE_GNU_start_end_entry. + +2018-06-05 Mark Wielaard + + * readelf.c (handle_sysv_hash): Don't leak lengths array when + detecting an invalid chain. + (handle_sysv_hash64): Likewise. + +2018-06-05 Mark Wielaard + + * readelf.c (print_debug_macro_section): Extend vendor array by one + to include max DW_MACRO_hi_user opcode. + +2018-06-07 Mark Wielaard + + * readelf.c (main): Lookup "no" for no_str. + (print_debug_abbrev_section): Use yes_str and no_str. + (print_form_data): Likewise. + +2018-06-04 Mark Wielaard + + * readelf (format_result): New static char pointer. + (format_result_size): New static size_t. + (format_dwarf_addr): Calculate max string size, reuse format_result + if possible, otherwise realloc. Use sprintf on result, not asprintf. + (print_ops): Don't free format_dwarf_addr, make sure result is + printed before calling format_dwarf_addr again. + (print_debug_addr_section): Likewise. + (print_debug_aranges_section): Likewise. + (print_debug_rnglists_section): Likewise. + (print_debug_ranges_section): Likewise. + (print_debug_frame_section): Likewise. + (attr_callback): Likewise. + (print_decoded_line_section): Likewise. + (print_debug_line_section): Likewise. + (print_debug_loclists_section): Likewise. + (print_debug_loc_section): Likewise. + (print_gdb_index_section): Likewsie. + +2018-06-04 Mark Wielaard + + * readelf.c (yes_str): New static char pointer. + (no_str): Likewise. + (main): Set yes_str and no_str using gettext. + (attr_callback): Use yes_str and no_str instead of calling gettext. + +2018-06-04 Mark Wielaard + + * readelf.c (main): Call __fsetlocking (stdout, FSETLOCKING_BYCALLER). + +2018-05-31 Mark Wielaard + + * readelf.c (print_debug_units): Print the dwo name and id when + unable to find a .dwo file. + +2018-05-31 Mark Wielaard + + * readelf.c (enum section_e): Make section_types not an alias of + section_info. + (section_all): Add section_types. + (parse_opt): Add both section_info and section_types for "info" + and "info+". + (print_debug_units): Don't be silent for debug_types. + +2018-05-31 Mark Wielaard + + * readelf.c (attr_callback): Only register section_loc when not + looking at a split dwarf from a skeleton. + +2018-05-30 Mark Wielaard + + * readelf.c (print_debug_loc_section): Use correct listptr for + locview attribute. + +2018-05-31 Mark Wielaard + + * readelf.c (print_debug_units): Check offset against -1 not ~0ul. + +2018-05-29 Mark Wielaard + + * readelf.c (print_debug_loc_section): Handle GNU DebugFission list + entries. + +2018-05-29 Mark Wielaard + + * readelf.c (print_debug): Record and reset section_info status in + implicit_debug_sections and print_debug_sections. + +2018-05-28 Mark Wielaard + + * readelf.c (print_debug_units): Turn "Could not find split compile + unit" into an Warning instead of an error. + +2018-04-29 Mark Wielaard + + * readelf.c (parse_opt): Request implicit section_info for "str". + (known_stroffbases): New static variable. + (attr_callbackattr_callback): Handle DW_AT_str_offets_base. + (print_debug_str_offsets_section): New function. + (print_debug): Handle .debug_str_offsets as section_str. Reset + known_stroffbases. + +2018-04-27 Mark Wielaard + + * readelf.c (options): Add addr. + (enum section_e): Add section_addr. + (section_all): Add section_addr. + (parse_opt): Parse "addr". + (known_addrbases): New static variable. + (get_listptr): New function. + (print_debug_addr_section): Likewise. + (attr_callback): Handle DW_AT_addr_base and DW_AT_GNU_addr_base. + (print_debug): Add NEW_SECTION (addr). Reset known_addrbases. + +2018-04-07 Mark Wielaard + + * readelf.c (attr_callback): Handle DW_FORM_loclistx and + DW_AT_segment. + +2018-04-12 Mark Wielaard + + * readelf.c (dwarf_loc_list_encoding_string): New functions. + (dwarf_loc_list_encoding_name): Likewise. + (known_loclistptr): Renamed and split in two... + (known_locsptr): this and ... + (known_loclistsptr): this. + (listptr_base): Split out... + (cudie_base): ...this. + (is_split_dwarf): New function. + (attr_callback): Handle DW_AT_loclists_base and notice sec_offset + in correct list. + (print_debug_rnglists_section): Use spit_dwarf_cu_base. + (print_debug_loclists_section): New function. + (print_debug_loc_section): Use known_locsptr instead of + known_loclistptr. + (print_debug): Recognize .debug_loclists. Reset known_locsptr and + known_loclistsptr. + +2018-05-25 Mark Wielaard + + * readelf.c (DWARF_SKELETON): New constant. + (do_not_close_dwfl): New bool. + (options): Add dwarf-skeleton. + (dwarf_skeleton): New static variable. + (parse_opt): Handle DWARF_SKELETON, set dwarf_skeleton. + (create_dwfl): New function, with code extracted from... + (process_file): ...here. Check do_not_close_dwfl. + (is_split_darf): New function. + (getone_dwflmod): Likewise. + (print_debug): Use new functions to find skeleton DWARF file to use + when inspecting .dwo split DWARF file. + +2018-04-11 Mark Wielaard + + * readelf.c (dwarf_range_list_encoding_string): New function. + (dwarf_range_list_encoding_name): Likewise. + (known_rnglistptr): New static variable. + (listptr_cu): New function. + (print_debug_rnglists_section): Likewise. + (attr_callback): Call notice_listptr for DW_AT_ranges. Handle + DW_AT_rnglists_base. Handle DW_FORM_rnglistx. DW_AT_start_scope + can also have a rnglist. + (print_debug_units): Do (silently) scan split DWARF also for + debug_ranges before DWARF5 to catch all rangelistptrs. + (print_debug): Recognize .debug_rnglists. Reset known_rnglistptr. + +2018-01-21 Mark Wielaard + + * readelf.c (get_indexed_addr): New function. + (print_ops): Handle DW_OP_addrx, DW_OP_GNU_addr_index, + DW_OP_constx, DW_OP_GNU_const_index separately and resolve + address. + (attr_callback): Print index and address for + DW_FORM_GNU_addr_index and DW_FORM_addrx[1234]. + +2018-01-19 Mark Wielaard + + * readelf.c (options): Add info+. + (show_split_units): New static boolean defaulting to false. + (parse_opt): For all (no arg) --debug-dump set show_split_units + to yes. For "info+" enable section_info and show_split_units. + (attrcb_args): Add is_split field. + (attr_callback): Use is_split to format DIE offsets differently. + (print_debug_units): Likewise. Get subdie (type or split) only + when needed. When not silent reiterate over split DIEs when + found. + +2018-05-15 Mark Wielaard + + * readelf.c (print_debug_units): Print unit type and id for any + unit type that has it even when version < 5. + +2018-05-14 Mark Wielaard + + * readelf.c (print_ops): Handle DW_OP_GNU_addr_index and + DW_OP_GNU_const_index. + (attr_callback): Handle DW_FORM_GNU_addr_index as DW_FORM_addrx. + Handle DW_FORM_GNU_str_index as DW_FORM_constx. Add as_hex_id. + Handle DW_AT_GNU_dwo_id as_hex_id. + (print_form_data): Handle DW_FORM_GNU_str_index as DW_FORM_strx. + +2018-05-12 Mark Wielaard + + * readelf.c (print_debug): Also recognize .dwo section name variants. + +2018-05-15 Dmitry V. Levin + + * elflint.c (check_elf_header): Fix typo in error diagnostics. + +2018-05-15 Mark Wielaard + + * readelf.c (print_form_data): Cast comparisons against offset_len to + ptrdiff_t. + (print_debug_line_section): Print uint64_t as PRIu64. + +2018-05-11 Mark Wielaard + + * readelf.c (print_debug_macro_section): Use libdw_valid_user_form. + Use print_form_data for strx and sup strings. + +2018-05-09 Mark Wielaard + + * readelf.c (dwarf_line_content_description_string): New function. + (dwarf_line_content_description_name): Likewise. + (print_bytes): Likewise. + (print_form_data): Likewise. Based on code taken from... + (print_debug_macro_section): ...here. Now calls print_form_data + and str_offsets_base_off. + (print_debug_line_section): Parse DWARF5 header, directory and file + name tables. + +2018-05-12 Mark Wielaard + + * addr2line.c (main): Add fflush (stdout) after handle_address () + when reading from stdin. + +2018-04-24 Mark Wielaard + + * readelf.c (print_debug_aranges_section): Try elf_rawdata if no + sectiondata. + (print_debug_ranges_section): Likewise. + (print_debug_frame_section): Likewise. + (print_debug_line_section): Likewise. Check for data == NULL. + (print_debug_loc_section): Likewise. + (print_debug_macinfo_section): Likewise. + (print_debug_macro_section): Likewise. + +2018-04-28 Mark Wielaard + + * readelf.c (print_debug): If .debug_info is needed implicitly by + then handle it first before handling any other debug section. + (parse_opt): Set implicit_debug_sections to section_info when + showing all debug sections. + +2018-05-05 Mark Wielaard + + * readelf.c (attr_callback): Handle DW_FORM_ref_sup4 and + DW_FORM_ref_sup8 as references. + +2018-04-24 Mark Wielaard + + * readelf.c (print_debug_str_section): Take raw section data. Don't + use dwarf_getstring, but determine start and end of string from + offset and section data directly. + (print_debug): Handle ".debug_line_str" like ".debug_str". + +2018-04-19 Andreas Schwab + + * elflint.c (valid_e_machine): Add EM_RISCV. + +2018-04-16 Mark Wielaard + + * readelf.c (print_debug_line_section). In advance_pc, advance + using op_addr_advance, not op_advance. + +2018-04-14 Mark Wielaard + + * readelf.c (attr_callback): Only show errors when not silent. + +2018-03-23 Mark Wielaard + + * readelf.c (attr_callback): Handle DW_FORM_strx[1234]. + +2018-03-22 Mark Wielaard + + * readelf.c (attr_callback): Handle DW_FORM_addrx[1234]. + +2018-03-28 Mark Wielaard + + * readelf.c (handle_sysv_hash): Break bucket chain after nchain + entries are found. + (handle_sysv_hash64): Likewise. + +2018-03-27 Mark Wielaard + + * readelf.c (attr_callback): Print dwarf_dieoffset as %PRIx64, + not %zx. + +2018-03-20 Mark Wielaard + + * readelf.c (attr_callback): Report error when DW_AT_decl_file or + DW_AT_call_file cannot be resolved. + +2018-03-06 Mark Wielaard + + * readelf.c (print_ops): Handle DW_OP_addrx, DW_OP_constx, + DW_OP_implicit_pointer, DW_OP_entry_value, DW_OP_const_type, + DW_OP_regval_type, DW_OP_deref_type, DW_OP_xderef_type, + DW_OP_convert, DW_OP_reinterpret. + +2018-03-01 Mark Wielaard + + * readelf.c (struct listptr): Add attr field. + (compare_listptr): Warn when two listptrs for the same offset have + different attributes. + (notice_listptr): Take attr as argument and add it to listptr. + (skip_listptr_hole): New attr argument. + (next_listptr_offset): New function. + (print_debug_ranges_section): Pass NULL attr to skip_listptr_hole. + (attr_callback): Handle DW_AT_GNU_locviews. Call notice_listptr with + attr. + (print_debug_loc_section): Keep track of which attr is associated with + a listptr. If the attr is DW_AT_GNU_locview print view pairs till the + next listptr offset. + +2018-02-09 Mark Wielaard + + * elflint.c (check_group): Make sure we can read a complete + element when iterating over the group. + +2018-02-09 Mark Wielaard + + * readelf.c (attr_callback): Handle DW_FORM_data16 as Dwarf_Block. + +2018-02-09 Mark Wielaard + + * readelf.c (print_debug_abbrev_section): Print the value of a + DW_FORM_implicit_const using dwarf_getabbrevattr_data. + (attr_callback): Handle DW_FORM_implicit_const. + +2018-01-30 Mark Wielaard + + * readelf.c (dwarf_unit_string): New function. + (dwarf_unit_name): Likewise. + (print_debug_units): Use dwarf_get_units and dwarf_cu_die instead + of dwarf_next_unit. Print unit type, id and subdie if available. + +2018-02-09 Joshua Watt + + * addr2line.c (handle_address): Use FALLTHROUGH macro instead of + comment. + * elfcompress.c (parse_opt): Likewise. + * elflint.c (check_dynamic): Likewise. + (check_sections): Likewise. + (check_note_data): Likewise. + * objdump.c (parse_opt): Likewise. + * readelf.c (parse_opt): Likewise. + (attr_callback): Likewise. + (handle_auxv_note): Likewise. + * strings.c (parse_opt): Likewise. + * backtrace.c (callback_verify): Likewise. + +2018-01-25 Mark Wielaard + + * readelf.c (print_debug_ranges_section): Initialize cu to last_cu. + (print_debug_loc_section): Likewise. + +2018-01-01 Mark Wielaard + + * readelf.c (attr_callback): Use dwarf_form_name for unknown forms. + (print_debug_macro_section): Print form using dwarf_form_name. + +2017-12-28 Mark Wielaard + + * readelf.c (print_debug_units): Print DIE offset in error message + as hex. + +2017-12-18 Mark Wielaard + + * readelf.c (handle_notes_data): Don't use EXIT_FAILURE in error. + Adjust error message depending on whether or not we got data. + +2017-12-07 Mark Wielaard + + * readelf.c (print_ops): Update data pointer and print arguments + to DW_OP_call2 and DW_OP_call4 as DIE offsets. + +2017-11-29 Mark Wielaard + + * readelf.c (argp_options): Add "section-groups", 'g'. + +2017-11-29 Mark Wielaard + + * readelf.c (print_debug_loc_section): Print CU base and unresolved + addresses. Adjust formatting. + +2017-11-29 Mark Wielaard + + * readelf.c (print_debug_ranges_section): Print CU base and unresolved + addresses. Adjust formatting. + +2017-11-29 Mark Wielaard + + * readelf.c (attr_callback): Set valuestr to resolved file name + for DW_AT_decl_file and DW_AT_call_file. + +2017-11-29 Mark Wielaard + + * readelf.c (print_debug_units): Print abbrev code after DIE tag. + +2017-11-29 Mark Wielaard + + * readelf.c (print_ops): Use only2 space for index. re-indent +5 + for DW_OP_GNU_entry_value. + +2017-11-21 Mark Wielaard + + * readelf.c (attr_callback): Print attribute name and form in error + message. If only the value cannot be retrieved/resolved don't abort. + +2017-10-03 Mark Wielaard + + * readelf.c (attr_callback): Print DIE offset in error messages. + +2017-11-03 Mark Wielaard + + * readelf.c (print_ops): Handle DW_OP_GNU_variable_value. Print + referenced DIE as offset. + +2017-09-10 Mark Wielaard + + * ar.c (do_oper_delete): Remove DEBUG conditional check. + (no0print): Return bool. Check snprintf return value. + (do_oper_insert): Initialize elf. Remove DEBUG conditional check. + Check no0print calls succeed. Explicitly elf_end found elfs. + (do_oper_extract): Make sure we don't create an empty variable + length array. + +2017-09-01 Mark Wielaard + + * stack.c (main): Replace \v in doc string with \n\n. + * unstrip.c (main): Likewise. + +2017-05-04 Ulf Hermann + + * stack.c: Print pid_t using %lld. + +2017-08-18 Ulf Hermann + + * readelf.c: Hardcode the signal numbers for non-linux systems. + +2017-07-26 Mark Wielaard + + * readelf.c (print_debug_macro_section): Accept either version 4 or + version 5. Use DW_MACRO names instead of DW_MACRO_GNU names. Add + minimal support for DW_MACRO_define_sup, DW_MACRO_undef_sup, + DW_MACRO_import_sup, DW_MACRO_define_strx and DW_MACRO_undef_strx. + +2017-07-26 Mark Wielaard + + * readelf.c (dwarf_defaulted_string): New function. + (dwarf_defaulted_name): Likewise. + (attr_callback): Use dwarf_defaulted_name to get value of + DW_AT_defaulted. + +2017-07-20 Mark Wielaard + + * strip.c (handle_elf): Deal with data marker symbols pointing to + debug sections (they can be removed). + +2017-07-14 Mark Wielaard + + * strip (OPT_KEEP_SECTION): New define. + (options): Add documentation for remove-section. Add keep-section. + (struct section_pattern): New data type. + (keep_secs, remove_secs): New globals. + (add_pattern, free_sec_patterns, free_patterns, section_name_matches): + New functions. + (main): Call free_patterns. + (parse_opt): Handle 'R' and OPT_KEEP_SECTION. Check remove_comment + on ARGP_KEY_SUCCESS. + (handle_elf): Handle and sanity check keep_secs and remove_secs. + +2017-06-07 Mark Wielaard + + * strip.c (handle_elf): Introduce new handle_elf boolean. Use it to + determine whether to create an output and/or debug file. Remove new + output file on error. + +2017-06-06 Mark Wielaard + + * strip.c (handle_elf): Assume e_shstrndx section can be removed. + +2017-04-20 Ulf Hermann + + * readelf.c: Include strings.h. + +2017-04-20 Ulf Hermann + + * unstrip.c: Check shnum for 0 before subtracting from it. + +2017-04-20 Ulf Hermann + + * readelf.c: Replace YESSTR and NOSTR with gettext ("yes") and + gettext ("no"), respectively. + +2017-04-05 Mark Wielaard + + * elflint.c (check_elf_header): Decompress all sections. + +2017-03-28 Mark Wielaard + + * elflint (check_group): Don't check if there is no flag word. + +2017-03-27 Mark Wielaard + + * elflint.c (check_elf_header): Sanity check phnum and shnum. + +2017-03-27 Mark Wielaard + + * elflint.c (check_sysv_hash): Return early if section size is + too small. + (check_sysv_hash64): Likewise. + (check_hash): Calculate expect_entsize to check section size. + +2017-03-27 Mark Wielaard + + * elflint.c (check_symtab_shndx): Check data->d_size. + +2017-03-24 Mark Wielaard + + * elfcmp.c (main): If n_namesz == 0 then the note name data is the + empty string. + * readelf.c (handle_notes_data): Likewise. + +2017-03-24 Mark Wielaard + + * readelf.c (handle_gnu_hash): Check inner < max_nsyms before + indexing into chain array. + 2017-02-16 Ulf Hermann * addr2line.c: Include printversion.h diff --git a/src/addr2line.c b/src/addr2line.c index ba414a74..b7eb893e 100644 --- a/src/addr2line.c +++ b/src/addr2line.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -187,6 +186,7 @@ main (int argc, char *argv[]) buf[chars - 1] = '\0'; result = handle_address (buf, dwfl); + fflush (stdout); } free (buf); @@ -618,7 +618,7 @@ handle_address (const char *string, Dwfl *dwfl) case 1: addr = 0; j = i; - /* Fallthrough */ + FALLTHROUGH; case 2: if (string[j] != '\0') break; diff --git a/src/ar.c b/src/ar.c index ec32cee5..6f98f75d 100644 --- a/src/ar.c +++ b/src/ar.c @@ -1,5 +1,5 @@ /* Create, modify, and extract from archives. - Copyright (C) 2005-2012, 2016 Red Hat, Inc. + Copyright (C) 2005-2012, 2016, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2005. @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -442,7 +441,7 @@ static int do_oper_extract (int oper, const char *arfname, char **argv, int argc, long int instance) { - bool found[argc]; + bool found[argc > 0 ? argc : 1]; memset (found, '\0', sizeof (found)); size_t name_max = 0; @@ -1056,13 +1055,11 @@ do_oper_delete (const char *arfname, char **argv, int argc, goto nonew_unlink; errout: -#ifdef DEBUG elf_end (elf); arlib_fini (); close (fd); -#endif not_found (argc, argv, found); @@ -1070,12 +1067,18 @@ do_oper_delete (const char *arfname, char **argv, int argc, } -static void +/* Prints the given value in the given buffer without a trailing zero char. + Returns false if the given value doesn't fit in the given buffer. */ +static bool no0print (bool ofmt, char *buf, int bufsize, long int val) { char tmpbuf[bufsize + 1]; - snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val); + int ret = snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", + bufsize, val); + if (ret >= (int) sizeof (tmpbuf)) + return false; memcpy (buf, tmpbuf, bufsize); + return true; } @@ -1084,7 +1087,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc, const char *member) { int status = 0; - Elf *elf; + Elf *elf = NULL; struct stat st; int fd = open_archive (arfname, O_RDONLY, 0, &elf, &st, oper != oper_move); @@ -1303,13 +1306,11 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc, if (status != 0) { -#ifdef DEBUG elf_end (elf); arlib_fini (); close (fd); -#endif return status; } @@ -1463,14 +1464,36 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc, memcpy (arhdr.ar_name, tmpbuf, sizeof (arhdr.ar_name)); } - no0print (false, arhdr.ar_date, sizeof (arhdr.ar_date), - all->sec); - no0print (false, arhdr.ar_uid, sizeof (arhdr.ar_uid), all->uid); - no0print (false, arhdr.ar_gid, sizeof (arhdr.ar_gid), all->gid); - no0print (true, arhdr.ar_mode, sizeof (arhdr.ar_mode), - all->mode); - no0print (false, arhdr.ar_size, sizeof (arhdr.ar_size), - all->size); + if (! no0print (false, arhdr.ar_date, sizeof (arhdr.ar_date), + all->sec)) + { + error (0, errno, gettext ("cannot represent ar_date")); + goto nonew_unlink; + } + if (! no0print (false, arhdr.ar_uid, sizeof (arhdr.ar_uid), + all->uid)) + { + error (0, errno, gettext ("cannot represent ar_uid")); + goto nonew_unlink; + } + if (! no0print (false, arhdr.ar_gid, sizeof (arhdr.ar_gid), + all->gid)) + { + error (0, errno, gettext ("cannot represent ar_gid")); + goto nonew_unlink; + } + if (! no0print (true, arhdr.ar_mode, sizeof (arhdr.ar_mode), + all->mode)) + { + error (0, errno, gettext ("cannot represent ar_mode")); + goto nonew_unlink; + } + if (! no0print (false, arhdr.ar_size, sizeof (arhdr.ar_size), + all->size)) + { + error (0, errno, gettext ("cannot represent ar_size")); + goto nonew_unlink; + } memcpy (arhdr.ar_fmag, ARFMAG, sizeof (arhdr.ar_fmag)); if (unlikely (write_retry (newfd, &arhdr, sizeof (arhdr)) @@ -1514,13 +1537,15 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc, goto nonew_unlink; errout: -#ifdef DEBUG + for (int cnt = 0; cnt < argc; ++cnt) + elf_end (found[cnt]->elf); + elf_end (elf); arlib_fini (); - close (fd); -#endif + if (fd != -1) + close (fd); return status; } diff --git a/src/arlib.c b/src/arlib.c index e0839aab..778e0878 100644 --- a/src/arlib.c +++ b/src/arlib.c @@ -21,7 +21,6 @@ #endif #include -#include #include #include #include @@ -31,6 +30,7 @@ #include +#include "system.h" #include "arlib.h" diff --git a/src/arlib2.c b/src/arlib2.c index 553fc57b..11f44e5d 100644 --- a/src/arlib2.c +++ b/src/arlib2.c @@ -20,7 +20,6 @@ # include #endif -#include #include #include #include diff --git a/src/elfcmp.c b/src/elfcmp.c index 7673cf21..b40df8bf 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -36,7 +35,7 @@ #include #include "../libelf/elf-knowledge.h" #include "../libebl/libeblP.h" - +#include "system.h" /* Prototypes of local functions. */ static Elf *open_file (const char *fname, int *fdp, Ebl **eblp); @@ -419,7 +418,8 @@ main (int argc, char *argv[]) && (off1 = gelf_getnote (data1, off1, ¬e1, &name_offset, &desc_offset)) > 0) { - const char *name1 = data1->d_buf + name_offset; + const char *name1 = (note1.n_namesz == 0 + ? "" : data1->d_buf + name_offset); const void *desc1 = data1->d_buf + desc_offset; if (off2 >= data2->d_size) { @@ -435,7 +435,8 @@ main (int argc, char *argv[]) error (2, 0, gettext ("\ cannot read note section [%zu] '%s' in '%s': %s"), elf_ndxscn (scn2), sname2, fname2, elf_errmsg (-1)); - const char *name2 = data2->d_buf + name_offset; + const char *name2 = (note2.n_namesz == 0 + ? "" : data2->d_buf + name_offset); const void *desc2 = data2->d_buf + desc_offset; if (note1.n_namesz != note2.n_namesz diff --git a/src/elfcompress.c b/src/elfcompress.c index 8e0d5c55..6ba6af41 100644 --- a/src/elfcompress.c +++ b/src/elfcompress.c @@ -1,5 +1,5 @@ /* Compress or decompress an ELF file. - Copyright (C) 2015, 2016 Red Hat, Inc. + Copyright (C) 2015, 2016, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -34,6 +33,7 @@ #include ELFUTILS_HEADER(ebl) #include ELFUTILS_HEADER(dwelf) #include +#include "system.h" #include "libeu.h" #include "printversion.h" @@ -149,7 +149,7 @@ parse_opt (int key, char *arg __attribute__ ((unused)), N_("Only one input file allowed together with '-o'")); /* We only use this for checking the number of arguments, we don't actually want to consume them. */ - /* Fallthrough */ + FALLTHROUGH; default: return ARGP_ERR_UNKNOWN; } @@ -286,6 +286,15 @@ process_file (const char *fname) return (sections[ndx / WORD_BITS] & (1U << (ndx % WORD_BITS))) != 0; } + /* How many sections are we going to change? */ + size_t get_sections (void) + { + size_t s = 0; + for (size_t i = 0; i < shnum / WORD_BITS + 1; i++) + s += __builtin_popcount (sections[i]); + return s; + } + int cleanup (int res) { elf_end (elf); @@ -422,6 +431,9 @@ process_file (const char *fname) names change and whether there is a symbol table that might need to be adjusted be if the section header name table is changed. + If nothing needs changing, and the input and output file are the + same, we are done. + Second a collection pass that creates the Elf sections and copies the data. This pass will compress/decompress section data when needed. And it will collect all data needed if we'll need to @@ -464,7 +476,26 @@ process_file (const char *fname) if (section_name_matches (sname)) { - if (shdr->sh_type != SHT_NOBITS + if (!force && type == T_DECOMPRESS + && (shdr->sh_flags & SHF_COMPRESSED) == 0 + && strncmp (sname, ".zdebug", strlen (".zdebug")) != 0) + { + if (verbose > 0) + printf ("[%zd] %s already decompressed\n", ndx, sname); + } + else if (!force && type == T_COMPRESS_ZLIB + && (shdr->sh_flags & SHF_COMPRESSED) != 0) + { + if (verbose > 0) + printf ("[%zd] %s already compressed\n", ndx, sname); + } + else if (!force && type == T_COMPRESS_GNU + && strncmp (sname, ".zdebug", strlen (".zdebug")) == 0) + { + if (verbose > 0) + printf ("[%zd] %s already GNU compressed\n", ndx, sname); + } + else if (shdr->sh_type != SHT_NOBITS && (shdr->sh_flags & SHF_ALLOC) == 0) { set_section (ndx); @@ -518,6 +549,14 @@ process_file (const char *fname) } } + if (foutput == NULL && get_sections () == 0) + { + if (verbose > 0) + printf ("Nothing to do.\n"); + fnew = NULL; + return cleanup (0); + } + if (adjust_names) { names = dwelf_strtab_init (true); @@ -1235,13 +1274,16 @@ process_file (const char *fname) elf_end (elfnew); elfnew = NULL; - /* Try to match mode and owner.group of the original file. */ - if (fchmod (fdnew, st.st_mode & ALLPERMS) != 0) - if (verbose >= 0) - error (0, errno, "Couldn't fchmod %s", fnew); + /* Try to match mode and owner.group of the original file. + Note to set suid bits we have to make sure the owner is setup + correctly first. Otherwise fchmod will drop them silently + or fchown may clear them. */ if (fchown (fdnew, st.st_uid, st.st_gid) != 0) if (verbose >= 0) error (0, errno, "Couldn't fchown %s", fnew); + if (fchmod (fdnew, st.st_mode & ALLPERMS) != 0) + if (verbose >= 0) + error (0, errno, "Couldn't fchmod %s", fnew); /* Finally replace the old file with the new file. */ if (foutput == NULL) @@ -1276,7 +1318,7 @@ main (int argc, char **argv) N_("Print a message for each section being (de)compressed"), 0 }, { "force", 'f', NULL, 0, - N_("Force compression of section even if it would become larger"), + N_("Force compression of section even if it would become larger or update/rewrite the file even if no section would be (de)compressed"), 0 }, { "permissive", 'p', NULL, 0, N_("Relax a few rules to handle slightly broken ELF files"), diff --git a/src/elflint.c b/src/elflint.c index 66a13ca2..90e8fed4 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -1,5 +1,5 @@ /* Pedantic checking of ELF files compliance with gABI/psABI spec. - Copyright (C) 2001-2015 Red Hat, Inc. + Copyright (C) 2001-2015, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2001. @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -331,7 +330,7 @@ static const int valid_e_machine[] = EM_CRIS, EM_JAVELIN, EM_FIREPATH, EM_ZSP, EM_MMIX, EM_HUANY, EM_PRISM, EM_AVR, EM_FR30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300, EM_MN10200, EM_PJ, EM_OPENRISC, EM_ARC_A5, EM_XTENSA, EM_ALPHA, - EM_TILEGX, EM_TILEPRO, EM_AARCH64, EM_BPF + EM_TILEGX, EM_TILEPRO, EM_AARCH64, EM_BPF, EM_RISCV }; #define nvalid_e_machine \ (sizeof (valid_e_machine) / sizeof (valid_e_machine[0])) @@ -376,9 +375,9 @@ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size) EI_OSABI, ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf))); - /* No ABI versions other than zero supported either. */ + /* No ABI versions other than zero are supported either. */ if (ehdr->e_ident[EI_ABIVERSION] != 0) - ERROR (gettext ("unsupport ABI version e_ident[%d] == %d\n"), + ERROR (gettext ("unsupported ABI version e_ident[%d] == %d\n"), EI_ABIVERSION, ehdr->e_ident[EI_ABIVERSION]); for (cnt = EI_PAD; cnt < EI_NIDENT; ++cnt) @@ -456,6 +455,24 @@ invalid number of section header table entries\n")); ERROR (gettext ("invalid section header index\n")); } + /* Check the shdrs actually exist. And uncompress them before + further checking. Indexes between sections reference the + uncompressed data. */ + unsigned int scnt; + Elf_Scn *scn = NULL; + for (scnt = 1; scnt < shnum; ++scnt) + { + scn = elf_nextscn (ebl->elf, scn); + if (scn == NULL) + break; + /* If the section wasn't compressed this does nothing, but + returns an error. We don't care. */ + elf_compress (scn, 0, 0); + } + if (scnt < shnum) + ERROR (gettext ("Can only check %u headers, shnum was %u\n"), scnt, shnum); + shnum = scnt; + phnum = ehdr->e_phnum; if (ehdr->e_phnum == PN_XNUM) { @@ -474,6 +491,19 @@ invalid number of program header table entries\n")); } } + /* Check the phdrs actually exist. */ + unsigned int pcnt; + for (pcnt = 0; pcnt < phnum; ++pcnt) + { + GElf_Phdr phdr_mem; + GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem); + if (phdr == NULL) + break; + } + if (pcnt < phnum) + ERROR (gettext ("Can only check %u headers, phnum was %u\n"), pcnt, phnum); + phnum = pcnt; + /* Check the e_flags field. */ if (!ebl_machine_flag_check (ebl, ehdr->e_flags)) ERROR (gettext ("invalid machine flags: %s\n"), @@ -1733,7 +1763,7 @@ section [%2d] '%s': entry %zu: pointer does not match address of section [%2d] ' if (dyn->d_tag < DT_ADDRRNGLO || dyn->d_tag > DT_ADDRRNGHI) /* Value is no pointer. */ break; - /* FALLTHROUGH */ + FALLTHROUGH; case DT_AUXILIARY: case DT_FILTER: @@ -1959,7 +1989,8 @@ section [%2d] '%s': extended section index in section [%2zu] '%s' refers to same return; } - if (*((Elf32_Word *) data->d_buf) != 0) + if (data->d_size < sizeof (Elf32_Word) + || *((Elf32_Word *) data->d_buf) != 0) ERROR (gettext ("symbol 0 should have zero extended section index\n")); for (size_t cnt = 1; cnt < data->d_size / sizeof (Elf32_Word); ++cnt) @@ -1992,11 +2023,14 @@ check_sysv_hash (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx, Elf32_Word nbucket = ((Elf32_Word *) data->d_buf)[0]; Elf32_Word nchain = ((Elf32_Word *) data->d_buf)[1]; - if (shdr->sh_size < (2 + nbucket + nchain) * shdr->sh_entsize) - ERROR (gettext ("\ + if (shdr->sh_size < (2ULL + nbucket + nchain) * sizeof (Elf32_Word)) + { + ERROR (gettext ("\ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"), - idx, section_name (ebl, idx), (long int) shdr->sh_size, - (long int) ((2 + nbucket + nchain) * shdr->sh_entsize)); + idx, section_name (ebl, idx), (long int) shdr->sh_size, + (long int) ((2 + nbucket + nchain) * sizeof (Elf32_Word))); + return; + } size_t maxidx = nchain; @@ -2043,11 +2077,17 @@ check_sysv_hash64 (Ebl *ebl, GElf_Shdr *shdr, Elf_Data *data, int idx, Elf64_Xword nbucket = ((Elf64_Xword *) data->d_buf)[0]; Elf64_Xword nchain = ((Elf64_Xword *) data->d_buf)[1]; - if (shdr->sh_size < (2 + nbucket + nchain) * shdr->sh_entsize) - ERROR (gettext ("\ + uint64_t maxwords = shdr->sh_size / sizeof (Elf64_Xword); + if (maxwords < 2 + || maxwords - 2 < nbucket + || maxwords - 2 - nbucket < nchain) + { + ERROR (gettext ("\ section [%2d] '%s': hash table section is too small (is %ld, expected %ld)\n"), - idx, section_name (ebl, idx), (long int) shdr->sh_size, - (long int) ((2 + nbucket + nchain) * shdr->sh_entsize)); + idx, section_name (ebl, idx), (long int) shdr->sh_size, + (long int) ((2 + nbucket + nchain) * sizeof (Elf64_Xword))); + return; + } size_t maxidx = nchain; @@ -2287,10 +2327,12 @@ section [%2d] '%s': hash table not for dynamic symbol table\n"), section [%2d] '%s': invalid sh_link symbol table section index [%2d]\n"), idx, section_name (ebl, idx), shdr->sh_link); - if (shdr->sh_entsize != (tag == SHT_GNU_HASH + size_t expect_entsize = (tag == SHT_GNU_HASH ? (gelf_getclass (ebl->elf) == ELFCLASS32 ? sizeof (Elf32_Word) : 0) - : (size_t) ebl_sysvhash_entrysize (ebl))) + : (size_t) ebl_sysvhash_entrysize (ebl)); + + if (shdr->sh_entsize != expect_entsize) ERROR (gettext ("\ section [%2d] '%s': hash table entry size incorrect\n"), idx, section_name (ebl, idx)); @@ -2299,7 +2341,7 @@ section [%2d] '%s': hash table entry size incorrect\n"), ERROR (gettext ("section [%2d] '%s': not marked to be allocated\n"), idx, section_name (ebl, idx)); - if (shdr->sh_size < (tag == SHT_GNU_HASH ? 4 : 2) * (shdr->sh_entsize ?: 4)) + if (shdr->sh_size < (tag == SHT_GNU_HASH ? 4 : 2) * (expect_entsize ?: 4)) { ERROR (gettext ("\ section [%2d] '%s': hash table has not even room for initial administrative entries\n"), @@ -2646,9 +2688,12 @@ section [%2d] '%s': section size not multiple of sizeof(Elf32_Word)\n"), idx, section_name (ebl, idx)); if (data->d_size < elsize) - ERROR (gettext ("\ + { + ERROR (gettext ("\ section [%2d] '%s': section group without flags word\n"), idx, section_name (ebl, idx)); + return; + } else if (be_strict) { if (data->d_size < 2 * elsize) @@ -2670,7 +2715,7 @@ section [%2d] '%s': section group with only one member\n"), ERROR (gettext ("section [%2d] '%s': unknown section group flags\n"), idx, section_name (ebl, idx)); - for (cnt = elsize; cnt < data->d_size; cnt += elsize) + for (cnt = elsize; cnt + elsize <= data->d_size; cnt += elsize) { #if ALLOW_UNALIGNED val = *((Elf32_Word *) ((char *) data->d_buf + cnt)); @@ -3950,7 +3995,7 @@ section [%2zu] '%s': merge flag set but entry size is zero\n"), case SHT_NOBITS: if (is_debuginfo) break; - /* Fallthrough */ + FALLTHROUGH; default: ERROR (gettext ("\ section [%2zu] '%s' has unexpected type %d for an executable section\n"), @@ -4094,7 +4139,7 @@ section [%2zu] '%s': ELF header says this is the section header string table but ERROR (gettext ("\ section [%2zu] '%s': relocatable files cannot have dynamic symbol tables\n"), cnt, section_name (ebl, cnt)); - /* FALLTHROUGH */ + FALLTHROUGH; case SHT_SYMTAB: check_symtab (ebl, ehdr, shdr, cnt); break; @@ -4293,7 +4338,7 @@ section [%2d] '%s': unknown core file note type %" PRIu32 if (nhdr.n_namesz == sizeof "Linux" && !memcmp (data->d_buf + name_offset, "Linux", sizeof "Linux")) break; - /* Fallthrough */ + FALLTHROUGH; default: if (shndx == 0) ERROR (gettext ("\ diff --git a/src/findtextrel.c b/src/findtextrel.c index 8f1e239a..49731592 100644 --- a/src/findtextrel.c +++ b/src/findtextrel.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -37,7 +36,7 @@ #include #include - +#include "system.h" struct segments { diff --git a/src/nm.c b/src/nm.c index 969c6d35..ffe8ca69 100644 --- a/src/nm.c +++ b/src/nm.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/src/objdump.c b/src/objdump.c index 860cfac6..6b365d5c 100644 --- a/src/objdump.c +++ b/src/objdump.c @@ -21,7 +21,6 @@ #endif #include -#include #include #include #include @@ -223,7 +222,7 @@ parse_opt (int key, char *arg, } /* We only use this for checking the number of arguments, we don't actually want to consume them. */ - /* Fallthrough */ + FALLTHROUGH; default: return ARGP_ERR_UNKNOWN; } diff --git a/src/ranlib.c b/src/ranlib.c index cc0ee233..b9083484 100644 --- a/src/ranlib.c +++ b/src/ranlib.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/src/readelf.c b/src/readelf.c index 8d96ba3f..7b488ac5 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -1,7 +1,6 @@ /* Print information from ELF file in human-readable form. - Copyright (C) 1999-2016 Red Hat, Inc. + Copyright (C) 1999-2018 Red Hat, Inc. This file is part of elfutils. - Written by Ulrich Drepper , 1999. 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 @@ -25,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +34,11 @@ #include #include #include +#include +#include #include #include +#include #include #include #include @@ -56,6 +57,20 @@ #include "../libdw/known-dwarf.h" +#ifdef __linux__ +#define CORE_SIGILL SIGILL +#define CORE_SIGBUS SIGBUS +#define CORE_SIGFPE SIGFPE +#define CORE_SIGSEGV SIGSEGV +#define CORE_SI_USER SI_USER +#else +/* We want the linux version of those as that is what shows up in the core files. */ +#define CORE_SIGILL 4 /* Illegal instruction (ANSI). */ +#define CORE_SIGBUS 7 /* BUS error (4.2 BSD). */ +#define CORE_SIGFPE 8 /* Floating-point exception (ANSI). */ +#define CORE_SIGSEGV 11 /* Segmentation violation (ANSI). */ +#define CORE_SI_USER 0 /* Sent by kill, sigsend. */ +#endif /* Name and version of program. */ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; @@ -66,6 +81,13 @@ ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; /* argp key value for --elf-section, non-ascii. */ #define ELF_INPUT_SECTION 256 +/* argp key value for --dwarf-skeleton, non-ascii. */ +#define DWARF_SKELETON 257 + +/* Terrible hack for hooking unrelated skeleton/split compile units, + see __libdw_link_skel_split in print_debug. */ +static bool do_not_close_dwfl = false; + /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = { @@ -73,6 +95,9 @@ static const struct argp_option options[] = { "elf-section", ELF_INPUT_SECTION, "SECTION", OPTION_ARG_OPTIONAL, N_("Use the named SECTION (default .gnu_debugdata) as (compressed) ELF " "input data"), 0 }, + { "dwarf-skeleton", DWARF_SKELETON, "FILE", 0, + N_("Used with -w to find the skeleton Compile Units in FILE associated " + "with the Split Compile units in a .dwo input file"), 0 }, { NULL, 0, NULL, 0, N_("ELF output selection:"), 0 }, { "all", 'a', NULL, 0, N_("All these plus -p .strtab -p .dynstr -p .comment"), 0 }, @@ -83,6 +108,7 @@ static const struct argp_option options[] = { "program-headers", 'l', NULL, 0, N_("Display the program headers"), 0 }, { "segments", 'l', NULL, OPTION_ALIAS | OPTION_HIDDEN, NULL, 0 }, { "relocs", 'r', NULL, 0, N_("Display relocations"), 0 }, + { "section-groups", 'g', NULL, 0, N_("Display the section groups"), 0 }, { "section-headers", 'S', NULL, 0, N_("Display the sections' headers"), 0 }, { "sections", 'S', NULL, OPTION_ALIAS | OPTION_HIDDEN, NULL, 0 }, { "symbols", 's', "SECTION", OPTION_ARG_OPTIONAL, @@ -96,8 +122,8 @@ static const struct argp_option options[] = { NULL, 0, NULL, 0, N_("Additional output selection:"), 0 }, { "debug-dump", 'w', "SECTION", OPTION_ARG_OPTIONAL, - N_("Display DWARF section content. SECTION can be one of abbrev, " - "aranges, decodedaranges, frame, gdb_index, info, loc, line, " + N_("Display DWARF section content. SECTION can be one of abbrev, addr, " + "aranges, decodedaranges, frame, gdb_index, info, info+, loc, line, " "decodedline, ranges, pubnames, str, macinfo, macro or exception"), 0 }, { "hex-dump", 'x', "SECTION", 0, N_("Dump the uninterpreted contents of SECTION, by number or name"), 0 }, @@ -138,6 +164,9 @@ static struct argp argp = /* If non-null, the section from which we should read to (compressed) ELF. */ static const char *elf_input_section = NULL; +/* If non-null, the file that contains the skeleton CUs. */ +static const char *dwarf_skeleton = NULL; + /* Flags set by the option controlling the output. */ /* True if dynamic segment should be printed. */ @@ -200,14 +229,16 @@ static bool decodedline = false; /* True if we want to show more information about compressed sections. */ static bool print_decompress = false; +/* True if we want to show split compile units for debug_info skeletons. */ +static bool show_split_units = false; + /* Select printing of debugging sections. */ static enum section_e { section_abbrev = 1, /* .debug_abbrev */ section_aranges = 2, /* .debug_aranges */ section_frame = 4, /* .debug_frame or .eh_frame & al. */ - section_info = 8, /* .debug_info, .debug_types */ - section_types = section_info, + section_info = 8, /* .debug_info, (implies .debug_types) */ section_line = 16, /* .debug_line */ section_loc = 32, /* .debug_loc */ section_pubnames = 64, /* .debug_pubnames */ @@ -217,11 +248,13 @@ static enum section_e section_exception = 1024, /* .eh_frame & al. */ section_gdb_index = 2048, /* .gdb_index */ section_macro = 4096, /* .debug_macro */ + section_addr = 8192, /* .debug_addr */ + section_types = 16384, /* .debug_types (implied by .debug_info) */ section_all = (section_abbrev | section_aranges | section_frame | section_info | section_line | section_loc | section_pubnames | section_str | section_macinfo | section_ranges | section_exception | section_gdb_index - | section_macro) + | section_macro | section_addr | section_types) } print_debug_sections, implicit_debug_sections; /* Select hex dumping of sections. */ @@ -275,15 +308,26 @@ static void print_strings (Ebl *ebl); static void dump_archive_index (Elf *, const char *); +/* Looked up once with gettext in main. */ +static char *yes_str; +static char *no_str; + int main (int argc, char *argv[]) { + /* We use no threads here which can interfere with handling a stream. */ + (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); + /* Set locale. */ setlocale (LC_ALL, ""); /* Initialize the message catalog. */ textdomain (PACKAGE_TARNAME); + /* Look up once. */ + yes_str = gettext ("yes"); + no_str = gettext ("no"); + /* Parse and process arguments. */ int remaining; argp_parse (&argp, argc, argv, 0, &remaining, NULL); @@ -404,9 +448,18 @@ parse_opt (int key, char *arg, break; case 'w': if (arg == NULL) - print_debug_sections = section_all; + { + print_debug_sections = section_all; + implicit_debug_sections = section_info; + show_split_units = true; + } else if (strcmp (arg, "abbrev") == 0) print_debug_sections |= section_abbrev; + else if (strcmp (arg, "addr") == 0) + { + print_debug_sections |= section_addr; + implicit_debug_sections |= section_info; + } else if (strcmp (arg, "aranges") == 0) print_debug_sections |= section_aranges; else if (strcmp (arg, "decodedaranges") == 0) @@ -422,7 +475,16 @@ parse_opt (int key, char *arg, else if (strcmp (arg, "frame") == 0 || strcmp (arg, "frames") == 0) print_debug_sections |= section_frame; else if (strcmp (arg, "info") == 0) - print_debug_sections |= section_info; + { + print_debug_sections |= section_info; + print_debug_sections |= section_types; + } + else if (strcmp (arg, "info+") == 0) + { + print_debug_sections |= section_info; + print_debug_sections |= section_types; + show_split_units = true; + } else if (strcmp (arg, "loc") == 0) { print_debug_sections |= section_loc; @@ -438,7 +500,11 @@ parse_opt (int key, char *arg, else if (strcmp (arg, "pubnames") == 0) print_debug_sections |= section_pubnames; else if (strcmp (arg, "str") == 0) - print_debug_sections |= section_str; + { + print_debug_sections |= section_str; + /* For mapping string offset tables to CUs. */ + implicit_debug_sections |= section_info; + } else if (strcmp (arg, "macinfo") == 0) print_debug_sections |= section_macinfo; else if (strcmp (arg, "macro") == 0) @@ -464,7 +530,7 @@ parse_opt (int key, char *arg, print_string_sections = true; break; } - /* Fall through. */ + FALLTHROUGH; case 'x': add_dump_section (arg, false); any_control_option = true; @@ -499,6 +565,9 @@ parse_opt (int key, char *arg, else elf_input_section = arg; break; + case DWARF_SKELETON: + dwarf_skeleton = arg; + break; default: return ARGP_ERR_UNKNOWN; } @@ -721,31 +790,9 @@ find_no_debuginfo (Dwfl_Module *mod, debuglink_crc, debuginfo_file_name); } -/* Process one input file. */ -static void -process_file (int fd, const char *fname, bool only_one) +static Dwfl * +create_dwfl (int fd, const char *fname) { - if (print_archive_index) - check_archive_index (fd, fname, only_one); - - if (!any_control_option) - return; - - if (elf_input_section != NULL) - { - /* Replace fname and fd with section content. */ - char *fnname = alloca (strlen (fname) + strlen (elf_input_section) + 2); - sprintf (fnname, "%s:%s", fname, elf_input_section); - fd = open_input_section (fd); - if (fd == -1) - { - error (0, 0, gettext ("No such section '%s' in '%s'"), - elf_input_section, fname); - return; - } - fname = fnname; - } - /* Duplicate an fd for dwfl_report_offline to swallow. */ int dwfl_fd = dup (fd); if (unlikely (dwfl_fd < 0)) @@ -773,11 +820,42 @@ process_file (int fd, const char *fname, bool only_one) error (0, 0, gettext ("failed reading '%s': %s"), fname, dwfl_errmsg (-1)); close (dwfl_fd); /* Consumed on success, not on failure. */ + dwfl = NULL; } else + dwfl_report_end (dwfl, NULL, NULL); + + return dwfl; +} + +/* Process one input file. */ +static void +process_file (int fd, const char *fname, bool only_one) +{ + if (print_archive_index) + check_archive_index (fd, fname, only_one); + + if (!any_control_option) + return; + + if (elf_input_section != NULL) { - dwfl_report_end (dwfl, NULL, NULL); + /* Replace fname and fd with section content. */ + char *fnname = alloca (strlen (fname) + strlen (elf_input_section) + 2); + sprintf (fnname, "%s:%s", fname, elf_input_section); + fd = open_input_section (fd); + if (fd == -1) + { + error (0, 0, gettext ("No such section '%s' in '%s'"), + elf_input_section, fname); + return; + } + fname = fnname; + } + Dwfl *dwfl = create_dwfl (fd, fname); + if (dwfl != NULL) + { if (only_one) { /* Clear ONLY_ONE if we have multiple modules, from an archive. */ @@ -789,7 +867,10 @@ process_file (int fd, const char *fname, bool only_one) struct process_dwflmod_args a = { .fd = fd, .only_one = only_one }; dwfl_getmodules (dwfl, &process_dwflmod, &a, 0); } - dwfl_end (dwfl); + /* Terrible hack for hooking unrelated skeleton/split compile units, + see __libdw_link_skel_split in print_debug. */ + if (! do_not_close_dwfl) + dwfl_end (dwfl); /* Need to close the replaced fd if we created it. Caller takes care of original. */ @@ -3125,9 +3206,18 @@ handle_sysv_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) for (Elf32_Word cnt = 0; cnt < nbucket; ++cnt) { Elf32_Word inner = bucket[cnt]; + Elf32_Word chain_len = 0; while (inner > 0 && inner < nchain) { ++nsyms; + ++chain_len; + if (chain_len > nchain) + { + error (0, 0, gettext ("invalid chain in sysv.hash section %d"), + (int) elf_ndxscn (scn)); + free (lengths); + return; + } if (maxlength < ++lengths[cnt]) ++maxlength; @@ -3182,9 +3272,18 @@ handle_sysv_hash64 (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) for (Elf64_Xword cnt = 0; cnt < nbucket; ++cnt) { Elf64_Xword inner = bucket[cnt]; + Elf64_Xword chain_len = 0; while (inner > 0 && inner < nchain) { ++nsyms; + ++chain_len; + if (chain_len > nchain) + { + error (0, 0, gettext ("invalid chain in sysv.hash64 section %d"), + (int) elf_ndxscn (scn)); + free (lengths); + return; + } if (maxlength < ++lengths[cnt]) ++maxlength; @@ -3263,7 +3362,7 @@ handle_gnu_hash (Ebl *ebl, Elf_Scn *scn, GElf_Shdr *shdr, size_t shstrndx) ++nsyms; if (maxlength < ++lengths[cnt]) ++maxlength; - if (inner > max_nsyms) + if (inner >= max_nsyms) goto invalid_data; } while ((chain[inner++] & 1) == 0); @@ -3605,9 +3704,9 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) } -static char * -format_dwarf_addr (Dwfl_Module *dwflmod, - int address_size, Dwarf_Addr address, Dwarf_Addr raw) +void +print_dwarf_addr (Dwfl_Module *dwflmod, + int address_size, Dwarf_Addr address, Dwarf_Addr raw) { /* See if there is a name we can give for this address. */ GElf_Sym sym; @@ -3633,61 +3732,41 @@ format_dwarf_addr (Dwfl_Module *dwflmod, : dwfl_module_relocation_info (dwflmod, i, NULL)); } - char *result; if ((name != NULL ? (off != 0 ? (scn != NULL ? (address_size == 0 - ? asprintf (&result, - gettext ("%s+%#" PRIx64 " <%s+%#" PRIx64 ">"), - scn, address, name, off) - : asprintf (&result, - gettext ("%s+%#0*" PRIx64 " <%s+%#" PRIx64 ">"), - scn, 2 + address_size * 2, address, - name, off)) + ? printf ("%s+%#" PRIx64 " <%s+%#" PRIx64 ">", + scn, address, name, off) + : printf ("%s+%#0*" PRIx64 " <%s+%#" PRIx64 ">", + scn, 2 + address_size * 2, address, + name, off)) : (address_size == 0 - ? asprintf (&result, - gettext ("%#" PRIx64 " <%s+%#" PRIx64 ">"), - address, name, off) - : asprintf (&result, - gettext ("%#0*" PRIx64 " <%s+%#" PRIx64 ">"), - 2 + address_size * 2, address, - name, off))) + ? printf ("%#" PRIx64 " <%s+%#" PRIx64 ">", + address, name, off) + : printf ("%#0*" PRIx64 " <%s+%#" PRIx64 ">", + 2 + address_size * 2, address, + name, off))) : (scn != NULL ? (address_size == 0 - ? asprintf (&result, - gettext ("%s+%#" PRIx64 " <%s>"), - scn, address, name) - : asprintf (&result, - gettext ("%s+%#0*" PRIx64 " <%s>"), - scn, 2 + address_size * 2, address, name)) + ? printf ("%s+%#" PRIx64 " <%s>", scn, address, name) + : printf ("%s+%#0*" PRIx64 " <%s>", + scn, 2 + address_size * 2, address, name)) : (address_size == 0 - ? asprintf (&result, - gettext ("%#" PRIx64 " <%s>"), - address, name) - : asprintf (&result, - gettext ("%#0*" PRIx64 " <%s>"), - 2 + address_size * 2, address, name)))) + ? printf ("%#" PRIx64 " <%s>", address, name) + : printf ("%#0*" PRIx64 " <%s>", + 2 + address_size * 2, address, name)))) : (scn != NULL ? (address_size == 0 - ? asprintf (&result, - gettext ("%s+%#" PRIx64), - scn, address) - : asprintf (&result, - gettext ("%s+%#0*" PRIx64), - scn, 2 + address_size * 2, address)) + ? printf ("%s+%#" PRIx64, scn, address) + : printf ("%s+%#0*" PRIx64, scn, 2 + address_size * 2, address)) : (address_size == 0 - ? asprintf (&result, - "%#" PRIx64, - address) - : asprintf (&result, - "%#0*" PRIx64, - 2 + address_size * 2, address)))) < 0) - error (EXIT_FAILURE, 0, _("memory exhausted")); - - return result; + ? printf ("%#" PRIx64, address) + : printf ("%#0*" PRIx64, 2 + address_size * 2, address)))) < 0) + error (EXIT_FAILURE, 0, _("sprintf failure")); } + static const char * dwarf_tag_string (unsigned int tag) { @@ -3795,6 +3874,23 @@ dwarf_access_string (unsigned int code) } +static const char * +dwarf_defaulted_string (unsigned int code) +{ + static const char *const known[] = + { +#define DWARF_ONE_KNOWN_DW_DEFAULTED(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_DEFAULTED +#undef DWARF_ONE_KNOWN_DW_DEFAULTED + }; + + if (likely (code < sizeof (known) / sizeof (known[0]))) + return known[code]; + + return NULL; +} + + static const char * dwarf_visibility_string (unsigned int code) { @@ -3917,6 +4013,62 @@ dwarf_locexpr_opcode_string (unsigned int code) } +static const char * +dwarf_unit_string (unsigned int type) +{ + switch (type) + { +#define DWARF_ONE_KNOWN_DW_UT(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_UT +#undef DWARF_ONE_KNOWN_DW_UT + default: + return NULL; + } +} + + +static const char * +dwarf_range_list_encoding_string (unsigned int kind) +{ + switch (kind) + { +#define DWARF_ONE_KNOWN_DW_RLE(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_RLE +#undef DWARF_ONE_KNOWN_DW_RLE + default: + return NULL; + } +} + + +static const char * +dwarf_loc_list_encoding_string (unsigned int kind) +{ + switch (kind) + { +#define DWARF_ONE_KNOWN_DW_LLE(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_LLE +#undef DWARF_ONE_KNOWN_DW_LLE + default: + return NULL; + } +} + + +static const char * +dwarf_line_content_description_string (unsigned int kind) +{ + switch (kind) + { +#define DWARF_ONE_KNOWN_DW_LNCT(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_LNCT +#undef DWARF_ONE_KNOWN_DW_LNCT + default: + return NULL; + } +} + + /* Used by all dwarf_foo_name functions. */ static const char * string_or_unknown (const char *known, unsigned int code, @@ -4000,6 +4152,14 @@ dwarf_access_name (unsigned int code) } +static const char * +dwarf_defaulted_name (unsigned int code) +{ + const char *ret = dwarf_defaulted_string (code); + return string_or_unknown (ret, code, 0, 0, false); +} + + static const char * dwarf_visibility_name (unsigned int code) { @@ -4048,6 +4208,39 @@ dwarf_discr_list_name (unsigned int code) } +static const char * +dwarf_unit_name (unsigned int type) +{ + const char *ret = dwarf_unit_string (type); + return string_or_unknown (ret, type, DW_UT_lo_user, DW_UT_hi_user, true); +} + + +static const char * +dwarf_range_list_encoding_name (unsigned int kind) +{ + const char *ret = dwarf_range_list_encoding_string (kind); + return string_or_unknown (ret, kind, 0, 0, false); +} + + +static const char * +dwarf_loc_list_encoding_name (unsigned int kind) +{ + const char *ret = dwarf_loc_list_encoding_string (kind); + return string_or_unknown (ret, kind, 0, 0, false); +} + + +static const char * +dwarf_line_content_description_name (unsigned int kind) +{ + const char *ret = dwarf_line_content_description_string (kind); + return string_or_unknown (ret, kind, DW_LNCT_lo_user, DW_LNCT_hi_user, + false); +} + + static void print_block (size_t n, const void *block) { @@ -4064,6 +4257,43 @@ print_block (size_t n, const void *block) } } +static void +print_bytes (size_t n, const unsigned char *bytes) +{ + while (n-- > 0) + { + printf ("%02x", *bytes++); + if (n > 0) + printf (" "); + } +} + +static int +get_indexed_addr (Dwarf_CU *cu, Dwarf_Word idx, Dwarf_Addr *addr) +{ + if (cu == NULL) + return -1; + + Elf_Data *debug_addr = cu->dbg->sectiondata[IDX_debug_addr]; + if (debug_addr == NULL) + return -1; + + Dwarf_Off base = __libdw_cu_addr_base (cu); + Dwarf_Word off = idx * cu->address_size; + if (base > debug_addr->d_size + || off > debug_addr->d_size - base + || cu->address_size > debug_addr->d_size - base - off) + return -1; + + const unsigned char *addrp = debug_addr->d_buf + base + off; + if (cu->address_size == 4) + *addr = read_4ubyte_unaligned (cu->dbg, addrp); + else + *addr = read_8ubyte_unaligned (cu->dbg, addrp); + + return 0; +} + static void print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, unsigned int vers, unsigned int addrsize, unsigned int offset_size, @@ -4111,15 +4341,16 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, data += addrsize; CONSUME (addrsize); - char *a = format_dwarf_addr (dwflmod, 0, addr, addr); - printf ("%*s[%4" PRIuMAX "] %s %s\n", - indent, "", (uintmax_t) offset, op_name, a); - free (a); + printf ("%*s[%2" PRIuMAX "] %s ", + indent, "", (uintmax_t) offset, op_name); + print_dwarf_addr (dwflmod, 0, addr, addr); + printf ("\n"); offset += 1 + addrsize; break; case DW_OP_call_ref: + case DW_OP_GNU_variable_value: /* Offset operand. */ if (ref_size != 4 && ref_size != 8) goto invalid; /* Cannot be used in CFA. */ @@ -4130,8 +4361,8 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, addr = read_8ubyte_unaligned (dbg, data); data += ref_size; CONSUME (ref_size); - - printf ("%*s[%4" PRIuMAX "] %s %#" PRIxMAX "\n", + /* addr is a DIE offset, so format it as one. */ + printf ("%*s[%2" PRIuMAX "] %s [%6" PRIxMAX "]\n", indent, "", (uintmax_t) offset, op_name, (uintmax_t) addr); offset += 1 + ref_size; @@ -4143,7 +4374,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const1u: // XXX value might be modified by relocation NEED (1); - printf ("%*s[%4" PRIuMAX "] %s %" PRIu8 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu8 "\n", indent, "", (uintmax_t) offset, op_name, *((uint8_t *) data)); ++data; @@ -4154,7 +4385,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const2u: NEED (2); // XXX value might be modified by relocation - printf ("%*s[%4" PRIuMAX "] %s %" PRIu16 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu16 "\n", indent, "", (uintmax_t) offset, op_name, read_2ubyte_unaligned (dbg, data)); CONSUME (2); @@ -4165,7 +4396,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const4u: NEED (4); // XXX value might be modified by relocation - printf ("%*s[%4" PRIuMAX "] %s %" PRIu32 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu32 "\n", indent, "", (uintmax_t) offset, op_name, read_4ubyte_unaligned (dbg, data)); CONSUME (4); @@ -4176,7 +4407,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const8u: NEED (8); // XXX value might be modified by relocation - printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu64 "\n", indent, "", (uintmax_t) offset, op_name, (uint64_t) read_8ubyte_unaligned (dbg, data)); CONSUME (8); @@ -4187,7 +4418,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const1s: NEED (1); // XXX value might be modified by relocation - printf ("%*s[%4" PRIuMAX "] %s %" PRId8 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRId8 "\n", indent, "", (uintmax_t) offset, op_name, *((int8_t *) data)); ++data; @@ -4198,7 +4429,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const2s: NEED (2); // XXX value might be modified by relocation - printf ("%*s[%4" PRIuMAX "] %s %" PRId16 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRId16 "\n", indent, "", (uintmax_t) offset, op_name, read_2sbyte_unaligned (dbg, data)); CONSUME (2); @@ -4209,7 +4440,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const4s: NEED (4); // XXX value might be modified by relocation - printf ("%*s[%4" PRIuMAX "] %s %" PRId32 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRId32 "\n", indent, "", (uintmax_t) offset, op_name, read_4sbyte_unaligned (dbg, data)); CONSUME (4); @@ -4220,7 +4451,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_const8s: NEED (8); // XXX value might be modified by relocation - printf ("%*s[%4" PRIuMAX "] %s %" PRId64 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRId64 "\n", indent, "", (uintmax_t) offset, op_name, read_8sbyte_unaligned (dbg, data)); CONSUME (8); @@ -4236,10 +4467,30 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, uint64_t uleb; NEED (1); get_uleb128 (uleb, data, data + len); - printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu64 "\n", + indent, "", (uintmax_t) offset, op_name, uleb); + CONSUME (data - start); + offset += 1 + (data - start); + break; + + case DW_OP_addrx: + case DW_OP_GNU_addr_index: + case DW_OP_constx: + case DW_OP_GNU_const_index:; + start = data; + NEED (1); + get_uleb128 (uleb, data, data + len); + printf ("%*s[%2" PRIuMAX "] %s [%" PRIu64 "] ", indent, "", (uintmax_t) offset, op_name, uleb); CONSUME (data - start); offset += 1 + (data - start); + if (get_indexed_addr (cu, uleb, &addr) != 0) + printf ("???\n"); + else + { + print_dwarf_addr (dwflmod, 0, addr, addr); + printf ("\n"); + } break; case DW_OP_bit_piece: @@ -4249,7 +4500,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, get_uleb128 (uleb, data, data + len); NEED (1); get_uleb128 (uleb2, data, data + len); - printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 ", %" PRIu64 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu64 ", %" PRIu64 "\n", indent, "", (uintmax_t) offset, op_name, uleb, uleb2); CONSUME (data - start); offset += 1 + (data - start); @@ -4262,7 +4513,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, int64_t sleb; NEED (1); get_sleb128 (sleb, data, data + len); - printf ("%*s[%4" PRIuMAX "] %s %" PRId64 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRId64 "\n", indent, "", (uintmax_t) offset, op_name, sleb); CONSUME (data - start); offset += 1 + (data - start); @@ -4274,7 +4525,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, get_uleb128 (uleb, data, data + len); NEED (1); get_sleb128 (sleb, data, data + len); - printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 " %" PRId64 "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu64 " %" PRId64 "\n", indent, "", (uintmax_t) offset, op_name, uleb, sleb); CONSUME (data - start); offset += 1 + (data - start); @@ -4282,26 +4533,28 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, case DW_OP_call2: NEED (2); - printf ("%*s[%4" PRIuMAX "] %s %" PRIu16 "\n", + printf ("%*s[%2" PRIuMAX "] %s [%6" PRIx16 "]\n", indent, "", (uintmax_t) offset, op_name, read_2ubyte_unaligned (dbg, data)); CONSUME (2); + data += 2; offset += 3; break; case DW_OP_call4: NEED (4); - printf ("%*s[%4" PRIuMAX "] %s %" PRIu32 "\n", + printf ("%*s[%2" PRIuMAX "] %s [%6" PRIx32 "]\n", indent, "", (uintmax_t) offset, op_name, read_4ubyte_unaligned (dbg, data)); CONSUME (4); + data += 4; offset += 5; break; case DW_OP_skip: case DW_OP_bra: NEED (2); - printf ("%*s[%4" PRIuMAX "] %s %" PRIuMAX "\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIuMAX "\n", indent, "", (uintmax_t) offset, op_name, (uintmax_t) (offset + read_2sbyte_unaligned (dbg, data) + 3)); CONSUME (2); @@ -4313,7 +4566,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, start = data; NEED (1); get_uleb128 (uleb, data, data + len); - printf ("%*s[%4" PRIuMAX "] %s: ", + printf ("%*s[%2" PRIuMAX "] %s: ", indent, "", (uintmax_t) offset, op_name); NEED (uleb); print_block (uleb, data); @@ -4322,6 +4575,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, offset += 1 + (data - start); break; + case DW_OP_implicit_pointer: case DW_OP_GNU_implicit_pointer: /* DIE offset operand. */ start = data; @@ -4337,28 +4591,30 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, NEED (1); get_sleb128 (sleb, data, data + len); - printf ("%*s[%4" PRIuMAX "] %s [%6" PRIxMAX "] %+" PRId64 "\n", + printf ("%*s[%2" PRIuMAX "] %s [%6" PRIxMAX "] %+" PRId64 "\n", indent, "", (intmax_t) offset, op_name, (uintmax_t) addr, sleb); CONSUME (data - start); offset += 1 + (data - start); break; + case DW_OP_entry_value: case DW_OP_GNU_entry_value: /* Size plus expression block. */ start = data; NEED (1); get_uleb128 (uleb, data, data + len); - printf ("%*s[%4" PRIuMAX "] %s:\n", + printf ("%*s[%2" PRIuMAX "] %s:\n", indent, "", (uintmax_t) offset, op_name); NEED (uleb); - print_ops (dwflmod, dbg, indent + 6, indent + 6, vers, + print_ops (dwflmod, dbg, indent + 5, indent + 5, vers, addrsize, offset_size, cu, uleb, data); data += uleb; CONSUME (data - start); offset += 1 + (data - start); break; + case DW_OP_const_type: case DW_OP_GNU_const_type: /* uleb128 CU relative DW_TAG_base_type DIE offset, 1-byte unsigned size plus block. */ @@ -4370,7 +4626,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, NEED (1); uint8_t usize = *(uint8_t *) data++; NEED (usize); - printf ("%*s[%4" PRIuMAX "] %s [%6" PRIxMAX "] ", + printf ("%*s[%2" PRIuMAX "] %s [%6" PRIxMAX "] ", indent, "", (uintmax_t) offset, op_name, uleb); print_block (usize, data); data += usize; @@ -4378,6 +4634,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, offset += 1 + (data - start); break; + case DW_OP_regval_type: case DW_OP_GNU_regval_type: /* uleb128 register number, uleb128 CU relative DW_TAG_base_type DIE offset. */ @@ -4388,12 +4645,13 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, get_uleb128 (uleb2, data, data + len); if (! print_unresolved_addresses && cu != NULL) uleb2 += cu->start; - printf ("%*s[%4" PRIuMAX "] %s %" PRIu64 " [%6" PRIx64 "]\n", + printf ("%*s[%2" PRIuMAX "] %s %" PRIu64 " [%6" PRIx64 "]\n", indent, "", (uintmax_t) offset, op_name, uleb, uleb2); CONSUME (data - start); offset += 1 + (data - start); break; + case DW_OP_deref_type: case DW_OP_GNU_deref_type: /* 1-byte unsigned size of value, uleb128 CU relative DW_TAG_base_type DIE offset. */ @@ -4404,6 +4662,20 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, get_uleb128 (uleb, data, data + len); if (! print_unresolved_addresses && cu != NULL) uleb += cu->start; + printf ("%*s[%2" PRIuMAX "] %s %" PRIu8 " [%6" PRIxMAX "]\n", + indent, "", (uintmax_t) offset, + op_name, usize, uleb); + CONSUME (data - start); + offset += 1 + (data - start); + break; + + case DW_OP_xderef_type: + /* 1-byte unsigned size of value, uleb128 base_type DIE offset. */ + start = data; + NEED (1); + usize = *(uint8_t *) data++; + NEED (1); + get_uleb128 (uleb, data, data + len); printf ("%*s[%4" PRIuMAX "] %s %" PRIu8 " [%6" PRIxMAX "]\n", indent, "", (uintmax_t) offset, op_name, usize, uleb); @@ -4411,7 +4683,9 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, offset += 1 + (data - start); break; + case DW_OP_convert: case DW_OP_GNU_convert: + case DW_OP_reinterpret: case DW_OP_GNU_reinterpret: /* uleb128 CU relative offset to DW_TAG_base_type, or zero for conversion to untyped. */ @@ -4420,7 +4694,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, 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", + printf ("%*s[%2" PRIuMAX "] %s [%6" PRIxMAX "]\n", indent, "", (uintmax_t) offset, op_name, uleb); CONSUME (data - start); offset += 1 + (data - start); @@ -4433,7 +4707,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, uintmax_t param_off = (uintmax_t) read_4ubyte_unaligned (dbg, data); if (! print_unresolved_addresses && cu != NULL) param_off += cu->start; - printf ("%*s[%4" PRIuMAX "] %s [%6" PRIxMAX "]\n", + printf ("%*s[%2" PRIuMAX "] %s [%6" PRIxMAX "]\n", indent, "", (uintmax_t) offset, op_name, param_off); CONSUME (4); data += 4; @@ -4442,7 +4716,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, default: /* No Operand. */ - printf ("%*s[%4" PRIuMAX "] %s\n", + printf ("%*s[%2" PRIuMAX "] %s\n", indent, "", (uintmax_t) offset, op_name); ++offset; break; @@ -4452,7 +4726,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest, continue; invalid: - printf (gettext ("%*s[%4" PRIuMAX "] %s \n"), + printf (gettext ("%*s[%2" PRIuMAX "] %s \n"), indent, "", (uintmax_t) offset, op_name); break; } @@ -4466,31 +4740,38 @@ struct listptr bool dwarf64:1; bool warned:1; struct Dwarf_CU *cu; + unsigned int attr; }; #define listptr_offset_size(p) ((p)->dwarf64 ? 8 : 4) #define listptr_address_size(p) ((p)->addr64 ? 8 : 4) static Dwarf_Addr -listptr_base (struct listptr *p) +cudie_base (Dwarf_Die *cudie) { Dwarf_Addr base; - Dwarf_Die cu = CUDIE (p->cu); /* Find the base address of the compilation unit. It will normally be specified by DW_AT_low_pc. In DWARF-3 draft 4, the base address could be overridden by DW_AT_entry_pc. It's been removed, but GCC emits DW_AT_entry_pc and not DW_AT_lowpc for compilation units with discontinuous ranges. */ - if (unlikely (dwarf_lowpc (&cu, &base) != 0)) + if (unlikely (dwarf_lowpc (cudie, &base) != 0)) { Dwarf_Attribute attr_mem; - if (dwarf_formaddr (dwarf_attr (&cu, DW_AT_entry_pc, &attr_mem), + if (dwarf_formaddr (dwarf_attr (cudie, DW_AT_entry_pc, &attr_mem), &base) != 0) base = 0; } return base; } +static Dwarf_Addr +listptr_base (struct listptr *p) +{ + Dwarf_Die cu = CUDIE (p->cu); + return cudie_base (&cu); +} + static int compare_listptr (const void *a, const void *b, void *arg) { @@ -4526,6 +4807,15 @@ compare_listptr (const void *a, const void *b, void *arg) gettext ("%s %#" PRIx64 " used with different base addresses"), name, (uint64_t) p1->offset); } + if (p1->attr != p2 ->attr) + { + p1->warned = p2->warned = true; + error (0, 0, + gettext ("%s %#" PRIx64 + " used with different attribute %s and %s"), + name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), + dwarf_attr_name (p2->attr)); + } } return 0; @@ -4538,8 +4828,12 @@ struct listptr_table struct listptr *table; }; -static struct listptr_table known_loclistptr; +static struct listptr_table known_locsptr; +static struct listptr_table known_loclistsptr; static struct listptr_table known_rangelistptr; +static struct listptr_table known_rnglistptr; +static struct listptr_table known_addrbases; +static struct listptr_table known_stroffbases; static void reset_listptr (struct listptr_table *table) @@ -4553,7 +4847,7 @@ reset_listptr (struct listptr_table *table) 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) + struct Dwarf_CU *cu, Dwarf_Off offset, unsigned int attr) { if (print_debug_sections & section) { @@ -4574,7 +4868,8 @@ notice_listptr (enum section_e section, struct listptr_table *table, .addr64 = address_size == 8, .dwarf64 = offset_size == 8, .offset = offset, - .cu = cu + .cu = cu, + .attr = attr }; if (p->offset != offset) @@ -4598,7 +4893,8 @@ static bool skip_listptr_hole (struct listptr_table *table, size_t *idxp, uint_fast8_t *address_sizep, uint_fast8_t *offset_sizep, Dwarf_Addr *base, struct Dwarf_CU **cu, ptrdiff_t offset, - unsigned char **readp, unsigned char *endp) + unsigned char **readp, unsigned char *endp, + unsigned int *attr) { if (table->n == 0) return false; @@ -4633,10 +4929,62 @@ skip_listptr_hole (struct listptr_table *table, size_t *idxp, *base = listptr_base (p); if (cu != NULL) *cu = p->cu; + if (attr != NULL) + *attr = p->attr; return false; } +static Dwarf_Off +next_listptr_offset (struct listptr_table *table, size_t idx) +{ + /* Note that multiple attributes could in theory point to the same loclist + offset, so make sure we pick one that is bigger than the current one. + The table is sorted on offset. */ + Dwarf_Off offset = table->table[idx].offset; + while (++idx < table->n) + { + Dwarf_Off next = table->table[idx].offset; + if (next > offset) + return next; + } + return 0; +} + +/* Returns the listptr associated with the given index, or NULL. */ +static struct listptr * +get_listptr (struct listptr_table *table, size_t idx) +{ + if (idx >= table->n) + return NULL; + return &table->table[idx]; +} + +/* Returns the next index, base address and CU associated with the + list unit offsets. If there is none false is returned, otherwise + true. Assumes the table has been sorted. */ +static bool +listptr_cu (struct listptr_table *table, size_t *idxp, + Dwarf_Off start, Dwarf_Off end, + Dwarf_Addr *base, struct Dwarf_CU **cu) +{ + while (*idxp < table->n + && table->table[*idxp].offset < start) + ++*idxp; + + if (*idxp < table->n + && table->table[*idxp].offset >= start + && table->table[*idxp].offset < end) + { + struct listptr *p = &table->table[*idxp]; + *base = listptr_base (p); + *cu = p->cu; + ++*idxp; + return true; + } + + return false; +} static void print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)), @@ -4686,20 +5034,22 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)), printf (gettext (" [%5u] offset: %" PRId64 ", children: %s, tag: %s\n"), code, (int64_t) offset, - has_children ? gettext ("yes") : gettext ("no"), + has_children ? yes_str : no_str, dwarf_tag_name (tag)); size_t cnt = 0; unsigned int name; unsigned int form; + Dwarf_Sword data; Dwarf_Off enoffset; - while (dwarf_getabbrevattr (&abbrev, cnt, - &name, &form, &enoffset) == 0) + while (dwarf_getabbrevattr_data (&abbrev, cnt, &name, &form, + &data, &enoffset) == 0) { - printf (" attr: %s, form: %s, offset: %#" PRIx64 "\n", - dwarf_attr_name (name), dwarf_form_name (form), - (uint64_t) enoffset); - + printf (" attr: %s, form: %s", + dwarf_attr_name (name), dwarf_form_name (form)); + if (form == DW_FORM_implicit_const) + printf (" (%" PRId64 ")", data); + printf (", offset: %#" PRIx64 "\n", (uint64_t) enoffset); ++cnt; } @@ -4709,23 +5059,247 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)), } -/* Print content of DWARF .debug_aranges section. We fortunately do - not have to know a bit about the structure of the section, libdwarf - takes care of it. */ static void -print_decoded_aranges_section (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, - GElf_Shdr *shdr, Dwarf *dbg) +print_debug_addr_section (Dwfl_Module *dwflmod __attribute__ ((unused)), + Ebl *ebl, GElf_Ehdr *ehdr, + Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg) { - Dwarf_Aranges *aranges; - size_t cnt; - if (unlikely (dwarf_getaranges (dbg, &aranges, &cnt) != 0)) + printf (gettext ("\ +\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"), + elf_ndxscn (scn), section_name (ebl, ehdr, shdr), + (uint64_t) shdr->sh_offset); + + if (shdr->sh_size == 0) + return; + + /* We like to get the section from libdw to make sure they are relocated. */ + Elf_Data *data = (dbg->sectiondata[IDX_debug_addr] + ?: elf_rawdata (scn, NULL)); + if (unlikely (data == NULL)) { - error (0, 0, gettext ("cannot get .debug_aranges content: %s"), - dwarf_errmsg (-1)); + error (0, 0, gettext ("cannot get .debug_addr section data: %s"), + elf_errmsg (-1)); return; } - GElf_Shdr glink_mem; + size_t idx = 0; + sort_listptr (&known_addrbases, "addr_base"); + + const unsigned char *start = (const unsigned char *) data->d_buf; + const unsigned char *readp = start; + const unsigned char *readendp = ((const unsigned char *) data->d_buf + + data->d_size); + + while (readp < readendp) + { + /* We cannot really know whether or not there is an header. The + DebugFission extension to DWARF4 doesn't add one. The DWARF5 + .debug_addr variant does. Whether or not we have an header, + DW_AT_[GNU_]addr_base points at "index 0". So if the current + offset equals the CU addr_base then we can just start + printing addresses. If there is no CU with an exact match + then we'll try to parse the header first. */ + Dwarf_Off off = (Dwarf_Off) (readp + - (const unsigned char *) data->d_buf); + + printf ("Table at offset %" PRIx64 " ", off); + + struct listptr *listptr = get_listptr (&known_addrbases, idx++); + const unsigned char *next_unitp; + + uint64_t unit_length; + uint16_t version; + uint8_t address_size; + uint8_t segment_size; + if (listptr == NULL) + { + error (0, 0, "Warning: No CU references .debug_addr after %" PRIx64, + off); + + /* We will have to assume it is just addresses to the end... */ + address_size = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; + next_unitp = readendp; + printf ("Unknown CU:\n"); + } + else + { + Dwarf_Die cudie; + if (dwarf_cu_die (listptr->cu, &cudie, + NULL, NULL, NULL, NULL, + NULL, NULL) == NULL) + printf ("Unknown CU (%s):\n", dwarf_errmsg (-1)); + else + printf ("for CU [%6" PRIx64 "]:\n", dwarf_dieoffset (&cudie)); + + if (listptr->offset == off) + { + address_size = listptr_address_size (listptr); + segment_size = 0; + version = 4; + + /* The addresses start here, but where do they end? */ + listptr = get_listptr (&known_addrbases, idx); + if (listptr == NULL) + next_unitp = readendp; + else if (listptr->cu->version < 5) + { + next_unitp = start + listptr->offset; + if (listptr->offset < off || listptr->offset > data->d_size) + { + error (0, 0, + "Warning: Bad address base for next unit at %" + PRIx64, off); + next_unitp = readendp; + } + } + else + { + /* Tricky, we don't have a header for this unit, but + there is one for the next. We will have to + "guess" how big it is and subtract it from the + offset (because that points after the header). */ + unsigned int offset_size = listptr_offset_size (listptr); + Dwarf_Off next_off = (listptr->offset + - (offset_size == 4 ? 4 : 12) /* len */ + - 2 /* version */ + - 1 /* address size */ + - 1); /* segment selector size */ + next_unitp = start + next_off; + if (next_off < off || next_off > data->d_size) + { + error (0, 0, + "Warning: Couldn't calculate .debug_addr " + " unit lenght at %" PRIx64, off); + next_unitp = readendp; + } + } + unit_length = (uint64_t) (next_unitp - readp); + + /* Pretend we have a header. */ + printf ("\n"); + printf (gettext (" Length: %8" PRIu64 "\n"), + unit_length); + printf (gettext (" DWARF version: %8" PRIu16 "\n"), version); + printf (gettext (" Address size: %8" PRIu64 "\n"), + (uint64_t) address_size); + printf (gettext (" Segment size: %8" PRIu64 "\n"), + (uint64_t) segment_size); + printf ("\n"); + } + else + { + /* OK, we have to parse an header first. */ + unit_length = read_4ubyte_unaligned_inc (dbg, readp); + if (unlikely (unit_length == 0xffffffff)) + { + if (unlikely (readp > readendp - 8)) + { + invalid_data: + error (0, 0, "Invalid data"); + return; + } + unit_length = read_8ubyte_unaligned_inc (dbg, readp); + } + printf ("\n"); + printf (gettext (" Length: %8" PRIu64 "\n"), + unit_length); + + /* We need at least 2-bytes (version) + 1-byte + (addr_size) + 1-byte (segment_size) = 4 bytes to + complete the header. And this unit cannot go beyond + the section data. */ + if (readp > readendp - 4 + || unit_length < 4 + || unit_length > (uint64_t) (readendp - readp)) + goto invalid_data; + + next_unitp = readp + unit_length; + + version = read_2ubyte_unaligned_inc (dbg, readp); + printf (gettext (" DWARF version: %8" PRIu16 "\n"), version); + + if (version != 5) + { + error (0, 0, gettext ("Unknown version")); + goto next_unit; + } + + address_size = *readp++; + printf (gettext (" Address size: %8" PRIu64 "\n"), + (uint64_t) address_size); + + if (address_size != 4 && address_size != 8) + { + error (0, 0, gettext ("unsupported address size")); + goto next_unit; + } + + segment_size = *readp++; + printf (gettext (" Segment size: %8" PRIu64 "\n"), + (uint64_t) segment_size); + printf ("\n"); + + if (segment_size != 0) + { + error (0, 0, gettext ("unsupported segment size")); + goto next_unit; + } + + if (listptr->offset != (Dwarf_Off) (readp - start)) + { + error (0, 0, "Address index doesn't start after header"); + goto next_unit; + } + } + } + + int digits = 1; + size_t addresses = (next_unitp - readp) / address_size; + while (addresses >= 10) + { + ++digits; + addresses /= 10; + } + + unsigned int uidx = 0; + size_t index_offset = readp - (const unsigned char *) data->d_buf; + printf (" Addresses start at offset 0x%zx:\n", index_offset); + while (readp <= next_unitp - address_size) + { + Dwarf_Addr addr = read_addr_unaligned_inc (address_size, dbg, + readp); + printf (" [%*u] ", digits, uidx++); + print_dwarf_addr (dwflmod, address_size, addr, addr); + printf ("\n"); + } + printf ("\n"); + + if (readp != next_unitp) + error (0, 0, "extra %zd bytes at end of unit", + (size_t) (next_unitp - readp)); + + next_unit: + readp = next_unitp; + } +} + +/* Print content of DWARF .debug_aranges section. We fortunately do + not have to know a bit about the structure of the section, libdwarf + takes care of it. */ +static void +print_decoded_aranges_section (Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, + GElf_Shdr *shdr, Dwarf *dbg) +{ + Dwarf_Aranges *aranges; + size_t cnt; + if (unlikely (dwarf_getaranges (dbg, &aranges, &cnt) != 0)) + { + error (0, 0, gettext ("cannot get .debug_aranges content: %s"), + dwarf_errmsg (-1)); + return; + } + + GElf_Shdr glink_mem; GElf_Shdr *glink; glink = gelf_getshdr (elf_getscn (ebl->elf, shdr->sh_link), &glink_mem); if (glink == NULL) @@ -4789,7 +5363,8 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), return; } - Elf_Data *data = dbg->sectiondata[IDX_debug_aranges]; + Elf_Data *data = (dbg->sectiondata[IDX_debug_aranges] + ?: elf_rawdata (scn, NULL)); if (unlikely (data == NULL)) { @@ -4872,6 +5447,8 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), goto next_table; } + if (readp + 1 > readendp) + goto invalid_data; unsigned int segment_size = *readp++; printf (gettext (" Segment size: %6" PRIu64 "\n\n"), (uint64_t) segment_size); @@ -4911,18 +5488,17 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), if (range_address == 0 && range_length == 0 && segment == 0) break; - char *b = format_dwarf_addr (dwflmod, address_size, range_address, - range_address); - char *e = format_dwarf_addr (dwflmod, address_size, - range_address + range_length - 1, - range_length); + printf (" "); + print_dwarf_addr (dwflmod, address_size, range_address, + range_address); + printf (".."); + print_dwarf_addr (dwflmod, address_size, + range_address + range_length - 1, + range_length); if (segment_size != 0) - printf (gettext (" %s..%s (%" PRIx64 ")\n"), b, e, - (uint64_t) segment); + printf (" (%" PRIx64 ")\n", (uint64_t) segment); else - printf (gettext (" %s..%s\n"), b, e); - free (b); - free (e); + printf ("\n"); } next_table: @@ -4936,6 +5512,402 @@ print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)), } +static bool is_split_dwarf (Dwarf *dbg, uint64_t *id, Dwarf_CU **split_cu); + +/* Returns true and sets cu and cu_base if the given Dwarf is a split + DWARF (.dwo) file. */ +static bool +split_dwarf_cu_base (Dwarf *dbg, Dwarf_CU **cu, Dwarf_Addr *cu_base) +{ + uint64_t id; + if (is_split_dwarf (dbg, &id, cu)) + { + Dwarf_Die cudie; + if (dwarf_cu_info (*cu, NULL, NULL, &cudie, NULL, NULL, NULL, NULL) == 0) + { + *cu_base = cudie_base (&cudie); + return true; + } + } + return false; +} + +/* Print content of DWARF .debug_rnglists section. */ +static void +print_debug_rnglists_section (Dwfl_Module *dwflmod, + Ebl *ebl, GElf_Ehdr *ehdr, + Elf_Scn *scn, GElf_Shdr *shdr, + Dwarf *dbg __attribute__((unused))) +{ + printf (gettext ("\ +\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"), + elf_ndxscn (scn), section_name (ebl, ehdr, shdr), + (uint64_t) shdr->sh_offset); + + Elf_Data *data =(dbg->sectiondata[IDX_debug_rnglists] + ?: elf_rawdata (scn, NULL)); + if (unlikely (data == NULL)) + { + error (0, 0, gettext ("cannot get .debug_rnglists content: %s"), + elf_errmsg (-1)); + return; + } + + /* For the listptr to get the base address/CU. */ + sort_listptr (&known_rnglistptr, "rnglistptr"); + size_t listptr_idx = 0; + + const unsigned char *readp = data->d_buf; + const unsigned char *const dataend = ((unsigned char *) data->d_buf + + data->d_size); + while (readp < dataend) + { + if (unlikely (readp > dataend - 4)) + { + invalid_data: + error (0, 0, gettext ("invalid data in section [%zu] '%s'"), + elf_ndxscn (scn), section_name (ebl, ehdr, shdr)); + return; + } + + ptrdiff_t offset = readp - (unsigned char *) data->d_buf; + printf (gettext ("Table at Offset 0x%" PRIx64 ":\n\n"), + (uint64_t) offset); + + uint64_t unit_length = read_4ubyte_unaligned_inc (dbg, readp); + unsigned int offset_size = 4; + if (unlikely (unit_length == 0xffffffff)) + { + if (unlikely (readp > dataend - 8)) + goto invalid_data; + + unit_length = read_8ubyte_unaligned_inc (dbg, readp); + offset_size = 8; + } + printf (gettext (" Length: %8" PRIu64 "\n"), unit_length); + + /* We need at least 2-bytes + 1-byte + 1-byte + 4-bytes = 8 + bytes to complete the header. And this unit cannot go beyond + the section data. */ + if (readp > dataend - 8 + || unit_length < 8 + || unit_length > (uint64_t) (dataend - readp)) + goto invalid_data; + + const unsigned char *nexthdr = readp + unit_length; + + uint16_t version = read_2ubyte_unaligned_inc (dbg, readp); + printf (gettext (" DWARF version: %8" PRIu16 "\n"), version); + + if (version != 5) + { + error (0, 0, gettext ("Unknown version")); + goto next_table; + } + + uint8_t address_size = *readp++; + printf (gettext (" Address size: %8" PRIu64 "\n"), + (uint64_t) address_size); + + if (address_size != 4 && address_size != 8) + { + error (0, 0, gettext ("unsupported address size")); + goto next_table; + } + + uint8_t segment_size = *readp++; + printf (gettext (" Segment size: %8" PRIu64 "\n"), + (uint64_t) segment_size); + + if (segment_size != 0 && segment_size != 4 && segment_size != 8) + { + error (0, 0, gettext ("unsupported segment size")); + goto next_table; + } + + uint32_t offset_entry_count = read_4ubyte_unaligned_inc (dbg, readp); + printf (gettext (" Offset entries: %8" PRIu64 "\n"), + (uint64_t) offset_entry_count); + + /* We need the CU that uses this unit to get the initial base address. */ + Dwarf_Addr cu_base = 0; + struct Dwarf_CU *cu = NULL; + if (listptr_cu (&known_rnglistptr, &listptr_idx, + (Dwarf_Off) offset, + (Dwarf_Off) (nexthdr - (unsigned char *) data->d_buf), + &cu_base, &cu) + || split_dwarf_cu_base (dbg, &cu, &cu_base)) + { + Dwarf_Die cudie; + if (dwarf_cu_die (cu, &cudie, + NULL, NULL, NULL, NULL, + NULL, NULL) == NULL) + printf (gettext (" Unknown CU base: ")); + else + printf (gettext (" CU [%6" PRIx64 "] base: "), + dwarf_dieoffset (&cudie)); + print_dwarf_addr (dwflmod, address_size, cu_base, cu_base); + printf ("\n"); + } + else + printf (gettext (" Not associated with a CU.\n")); + + printf ("\n"); + + const unsigned char *offset_array_start = readp; + if (offset_entry_count > 0) + { + uint64_t max_entries = (unit_length - 8) / offset_size; + if (offset_entry_count > max_entries) + { + error (0, 0, + gettext ("too many offset entries for unit length")); + offset_entry_count = max_entries; + } + + printf (gettext (" Offsets starting at 0x%" PRIx64 ":\n"), + (uint64_t) (offset_array_start + - (unsigned char *) data->d_buf)); + for (uint32_t idx = 0; idx < offset_entry_count; idx++) + { + printf (" [%6" PRIu32 "] ", idx); + if (offset_size == 4) + { + uint32_t off = read_4ubyte_unaligned_inc (dbg, readp); + printf ("0x%" PRIx32 "\n", off); + } + else + { + uint64_t off = read_8ubyte_unaligned_inc (dbg, readp); + printf ("0x%" PRIx64 "\n", off); + } + } + printf ("\n"); + } + + Dwarf_Addr base = cu_base; + bool start_of_list = true; + while (readp < nexthdr) + { + uint8_t kind = *readp++; + uint64_t op1, op2; + + /* Skip padding. */ + if (start_of_list && kind == DW_RLE_end_of_list) + continue; + + if (start_of_list) + { + base = cu_base; + printf (" Offset: %" PRIx64 ", Index: %" PRIx64 "\n", + (uint64_t) (readp - (unsigned char *) data->d_buf - 1), + (uint64_t) (readp - offset_array_start - 1)); + start_of_list = false; + } + + printf (" %s", dwarf_range_list_encoding_name (kind)); + switch (kind) + { + case DW_RLE_end_of_list: + start_of_list = true; + printf ("\n\n"); + break; + + case DW_RLE_base_addressx: + if ((uint64_t) (nexthdr - readp) < 1) + { + invalid_range: + error (0, 0, gettext ("invalid range list data")); + goto next_table; + } + get_uleb128 (op1, readp, nexthdr); + printf (" %" PRIx64 "\n", op1); + if (! print_unresolved_addresses) + { + Dwarf_Addr addr; + if (get_indexed_addr (cu, op1, &addr) != 0) + printf (" ???\n"); + else + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, addr, addr); + printf ("\n"); + } + } + break; + + case DW_RLE_startx_endx: + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_range; + get_uleb128 (op1, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_range; + get_uleb128 (op2, readp, nexthdr); + printf (" %" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + Dwarf_Addr addr1; + Dwarf_Addr addr2; + if (get_indexed_addr (cu, op1, &addr1) != 0 + || get_indexed_addr (cu, op2, &addr2) != 0) + { + printf (" ???..\n"); + printf (" ???\n"); + } + else + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, addr1, addr1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, + addr2 - 1, addr2); + printf ("\n"); + } + } + break; + + case DW_RLE_startx_length: + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_range; + get_uleb128 (op1, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_range; + get_uleb128 (op2, readp, nexthdr); + printf (" %" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + Dwarf_Addr addr1; + Dwarf_Addr addr2; + if (get_indexed_addr (cu, op1, &addr1) != 0) + { + printf (" ???..\n"); + printf (" ???\n"); + } + else + { + addr2 = addr1 + op2; + printf (" "); + print_dwarf_addr (dwflmod, address_size, addr1, addr1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, + addr2 - 1, addr2); + printf ("\n"); + } + } + break; + + case DW_RLE_offset_pair: + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_range; + get_uleb128 (op1, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_range; + get_uleb128 (op2, readp, nexthdr); + printf (" %" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + op1 += base; + op2 += base; + printf (" "); + print_dwarf_addr (dwflmod, address_size, op1, op1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, op2 - 1, op2); + printf ("\n"); + } + break; + + case DW_RLE_base_address: + if (address_size == 4) + { + if ((uint64_t) (nexthdr - readp) < 4) + goto invalid_range; + op1 = read_4ubyte_unaligned_inc (dbg, readp); + } + else + { + if ((uint64_t) (nexthdr - readp) < 8) + goto invalid_range; + op1 = read_8ubyte_unaligned_inc (dbg, readp); + } + base = op1; + printf (" 0x%" PRIx64 "\n", base); + if (! print_unresolved_addresses) + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, base, base); + printf ("\n"); + } + break; + + case DW_RLE_start_end: + if (address_size == 4) + { + if ((uint64_t) (nexthdr - readp) < 8) + goto invalid_range; + op1 = read_4ubyte_unaligned_inc (dbg, readp); + op2 = read_4ubyte_unaligned_inc (dbg, readp); + } + else + { + if ((uint64_t) (nexthdr - readp) < 16) + goto invalid_range; + op1 = read_8ubyte_unaligned_inc (dbg, readp); + op2 = read_8ubyte_unaligned_inc (dbg, readp); + } + printf (" 0x%" PRIx64 "..0x%" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, op1, op1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, op2 - 1, op2); + printf ("\n"); + } + break; + + case DW_RLE_start_length: + if (address_size == 4) + { + if ((uint64_t) (nexthdr - readp) < 4) + goto invalid_range; + op1 = read_4ubyte_unaligned_inc (dbg, readp); + } + else + { + if ((uint64_t) (nexthdr - readp) < 8) + goto invalid_range; + op1 = read_8ubyte_unaligned_inc (dbg, readp); + } + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_range; + get_uleb128 (op2, readp, nexthdr); + printf (" 0x%" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + op2 = op1 + op2; + printf (" "); + print_dwarf_addr (dwflmod, address_size, op1, op1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, op2 - 1, op2); + printf ("\n"); + } + break; + + default: + goto invalid_range; + } + } + + next_table: + if (readp != nexthdr) + { + size_t padding = nexthdr - readp; + printf (gettext (" %zu padding bytes\n\n"), padding); + readp = nexthdr; + } + } +} + /* Print content of DWARF .debug_ranges section. */ static void print_debug_ranges_section (Dwfl_Module *dwflmod, @@ -4943,8 +5915,8 @@ print_debug_ranges_section (Dwfl_Module *dwflmod, Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg) { - Elf_Data *data = dbg->sectiondata[IDX_debug_ranges]; - + Elf_Data *data = (dbg->sectiondata[IDX_debug_ranges] + ?: elf_rawdata (scn, NULL)); if (unlikely (data == NULL)) { error (0, 0, gettext ("cannot get .debug_ranges content: %s"), @@ -4966,15 +5938,32 @@ print_debug_ranges_section (Dwfl_Module *dwflmod, Dwarf_Addr base = 0; unsigned char *const endp = (unsigned char *) data->d_buf + data->d_size; unsigned char *readp = data->d_buf; + Dwarf_CU *last_cu = NULL; while (readp < endp) { ptrdiff_t offset = readp - (unsigned char *) data->d_buf; + Dwarf_CU *cu = last_cu; if (first && skip_listptr_hole (&known_rangelistptr, &listptr_idx, - &address_size, NULL, &base, NULL, - offset, &readp, endp)) + &address_size, NULL, &base, &cu, + offset, &readp, endp, NULL)) continue; + if (last_cu != cu) + { + Dwarf_Die cudie; + if (dwarf_cu_die (cu, &cudie, + NULL, NULL, NULL, NULL, + NULL, NULL) == NULL) + printf (gettext ("\n Unknown CU base: ")); + else + printf (gettext ("\n CU [%6" PRIx64 "] base: "), + dwarf_dieoffset (&cudie)); + print_dwarf_addr (dwflmod, address_size, base, base); + printf ("\n"); + } + last_cu = cu; + if (unlikely (data->d_size - offset < (size_t) address_size * 2)) { printf (gettext (" [%6tx] \n"), offset); @@ -4998,30 +5987,36 @@ print_debug_ranges_section (Dwfl_Module *dwflmod, if (begin == (Dwarf_Addr) -1l) /* Base address entry. */ { - char *b = format_dwarf_addr (dwflmod, address_size, end, end); - printf (gettext (" [%6tx] base address %s\n"), offset, b); - free (b); + printf (gettext (" [%6tx] base address\n "), offset); + print_dwarf_addr (dwflmod, address_size, end, end); + printf ("\n"); base = end; } else if (begin == 0 && end == 0) /* End of list entry. */ { if (first) - printf (gettext (" [%6tx] empty list\n"), offset); + printf (gettext (" [%6tx] empty list\n"), offset); first = true; } else { - char *b = format_dwarf_addr (dwflmod, address_size, base + begin, - begin); - char *e = format_dwarf_addr (dwflmod, address_size, base + end, - end); /* We have an address range entry. */ if (first) /* First address range entry in a list. */ - printf (gettext (" [%6tx] %s..%s\n"), offset, b, e); + printf (" [%6tx] ", offset); else - printf (gettext (" %s..%s\n"), b, e); - free (b); - free (e); + printf (" "); + + printf ("range %" PRIx64 ", %" PRIx64 "\n", begin, end); + if (! print_unresolved_addresses) + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, base + begin, + base + begin); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, + base + end - 1, base + end); + printf ("\n"); + } first = false; } @@ -5515,7 +6510,8 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, bool is_eh_frame = strcmp (scnname, ".eh_frame") == 0; Elf_Data *data = (is_eh_frame ? elf_rawdata (scn, NULL) - : dbg->sectiondata[IDX_debug_frame]); + : (dbg->sectiondata[IDX_debug_frame] + ?: elf_rawdata (scn, NULL))); if (unlikely (data == NULL)) { @@ -5784,14 +6780,13 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, + (base - (const unsigned char *) data->d_buf) - bias); - char *a = format_dwarf_addr (dwflmod, cie->address_size, - pc_start, initial_location); printf ("\n [%6tx] FDE length=%" PRIu64 " cie=[%6tx]\n" " CIE_pointer: %" PRIu64 "\n" - " initial_location: %s", + " initial_location: ", offset, (uint64_t) unit_length, - cie->cie_offset, (uint64_t) cie_id, a); - free (a); + cie->cie_offset, (uint64_t) cie_id); + print_dwarf_addr (dwflmod, cie->address_size, + pc_start, initial_location); if ((fde_encoding & 0x70) == DW_EH_PE_pcrel) { vma_base = (((uint64_t) shdr->sh_offset @@ -5875,6 +6870,33 @@ print_debug_frame_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, } +/* Returns the signedness (or false if it cannot be determined) and + the byte size (or zero if it cannot be gotten) of the given DIE + DW_AT_type attribute. Uses dwarf_peel_type and dwarf_aggregate_size. */ +static void +die_type_sign_bytes (Dwarf_Die *die, bool *is_signed, int *bytes) +{ + Dwarf_Attribute attr; + Dwarf_Die type; + + *bytes = 0; + *is_signed = false; + + if (dwarf_peel_type (dwarf_formref_die (dwarf_attr_integrate (die, + DW_AT_type, + &attr), &type), + &type) == 0) + { + Dwarf_Word val; + *is_signed = (dwarf_formudata (dwarf_attr (&type, DW_AT_encoding, + &attr), &val) == 0 + && (val == DW_ATE_signed || val == DW_ATE_signed_char)); + + if (dwarf_aggregate_size (&type, &val) == 0) + *bytes = val; + } +} + struct attrcb_args { Dwfl_Module *dwflmod; @@ -5882,6 +6904,7 @@ struct attrcb_args Dwarf_Die *die; int level; bool silent; + bool is_split; unsigned int version; unsigned int addrsize; unsigned int offset_size; @@ -5894,13 +6917,16 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) { struct attrcb_args *cbargs = (struct attrcb_args *) arg; const int level = cbargs->level; + Dwarf_Die *die = cbargs->die; + bool is_split = cbargs->is_split; unsigned int attr = dwarf_whatattr (attrp); if (unlikely (attr == 0)) { if (!cbargs->silent) - error (0, 0, gettext ("cannot get attribute code: %s"), - dwarf_errmsg (-1)); + error (0, 0, gettext ("DIE [%" PRIx64 "] " + "cannot get attribute code: %s"), + dwarf_dieoffset (die), dwarf_errmsg (-1)); return DWARF_CB_ABORT; } @@ -5908,14 +6934,21 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) if (unlikely (form == 0)) { if (!cbargs->silent) - error (0, 0, gettext ("cannot get attribute form: %s"), - dwarf_errmsg (-1)); + error (0, 0, gettext ("DIE [%" PRIx64 "] " + "cannot get attribute form: %s"), + dwarf_dieoffset (die), dwarf_errmsg (-1)); return DWARF_CB_ABORT; } switch (form) { case DW_FORM_addr: + case DW_FORM_addrx: + case DW_FORM_addrx1: + case DW_FORM_addrx2: + case DW_FORM_addrx3: + case DW_FORM_addrx4: + case DW_FORM_GNU_addr_index: if (!cbargs->silent) { Dwarf_Addr addr; @@ -5923,23 +6956,45 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) { attrval_out: if (!cbargs->silent) - error (0, 0, gettext ("cannot get attribute value: %s"), + error (0, 0, gettext ("DIE [%" PRIx64 "] " + "cannot get attribute '%s' (%s) value: " + "%s"), + dwarf_dieoffset (die), + dwarf_attr_name (attr), + dwarf_form_name (form), dwarf_errmsg (-1)); - return DWARF_CB_ABORT; + /* Don't ABORT, it might be other attributes can be resolved. */ + return DWARF_CB_OK; } - char *a = format_dwarf_addr (cbargs->dwflmod, cbargs->addrsize, - addr, addr); - printf (" %*s%-20s (%s) %s\n", - (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), a); - free (a); + if (form != DW_FORM_addr ) + { + Dwarf_Word word; + if (dwarf_formudata (attrp, &word) != 0) + goto attrval_out; + printf (" %*s%-20s (%s) [%" PRIx64 "] ", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), word); + } + else + printf (" %*s%-20s (%s) ", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form)); + print_dwarf_addr (cbargs->dwflmod, cbargs->addrsize, addr, addr); + printf ("\n"); } break; case DW_FORM_indirect: case DW_FORM_strp: + case DW_FORM_line_strp: + case DW_FORM_strx: + case DW_FORM_strx1: + case DW_FORM_strx2: + case DW_FORM_strx3: + case DW_FORM_strx4: case DW_FORM_string: case DW_FORM_GNU_strp_alt: + case DW_FORM_GNU_str_index: if (cbargs->silent) break; const char *str = dwarf_formstring (attrp); @@ -5957,15 +7012,21 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_FORM_ref2: case DW_FORM_ref1: case DW_FORM_GNU_ref_alt: + case DW_FORM_ref_sup4: + case DW_FORM_ref_sup8: if (cbargs->silent) break; Dwarf_Die ref; if (unlikely (dwarf_formref_die (attrp, &ref) == NULL)) goto attrval_out; - printf (" %*s%-20s (%s) [%6" PRIxMAX "]\n", + printf (" %*s%-20s (%s) ", (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), (uintmax_t) dwarf_dieoffset (&ref)); + dwarf_form_name (form)); + if (is_split) + printf ("{%6" PRIxMAX "}\n", (uintmax_t) dwarf_dieoffset (&ref)); + else + printf ("[%6" PRIxMAX "]\n", (uintmax_t) dwarf_dieoffset (&ref)); break; case DW_FORM_ref_sig8: @@ -5978,9 +7039,12 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) break; case DW_FORM_sec_offset: + case DW_FORM_rnglistx: + case DW_FORM_loclistx: + case DW_FORM_implicit_const: case DW_FORM_udata: case DW_FORM_sdata: - case DW_FORM_data8: + case DW_FORM_data8: /* Note no data16 here, we see that as block. */ case DW_FORM_data4: case DW_FORM_data2: case DW_FORM_data1:; @@ -5989,6 +7053,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) goto attrval_out; const char *valuestr = NULL; + bool as_hex_id = false; switch (attr) { /* This case can take either a constant or a loclistptr. */ @@ -6003,9 +7068,9 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) dwarf_form_name (form), (uintmax_t) num); return DWARF_CB_OK; } - /* else fallthrough */ + FALLTHROUGH; - /* These cases always take a loclistptr and no constant. */ + /* These cases always take a loclist[ptr] and no constant. */ case DW_AT_location: case DW_AT_data_location: case DW_AT_vtable_elem_location: @@ -6014,14 +7079,65 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_AT_frame_base: 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: + case DW_AT_GNU_locviews: { - bool nlpt = notice_listptr (section_loc, &known_loclistptr, - cbargs->addrsize, cbargs->offset_size, - cbargs->cu, num); + bool nlpt; + if (cbargs->cu->version < 5) + { + if (! cbargs->is_split) + { + nlpt = notice_listptr (section_loc, &known_locsptr, + cbargs->addrsize, + cbargs->offset_size, + cbargs->cu, num, attr); + } + else + nlpt = true; + } + else + { + /* Only register for a real section offset. Otherwise + it is a DW_FORM_loclistx which is just an index + number and we should already have registered the + section offset for the index when we saw the + DW_AT_loclists_base CU attribute. */ + if (form == DW_FORM_sec_offset) + nlpt = notice_listptr (section_loc, &known_loclistsptr, + cbargs->addrsize, cbargs->offset_size, + cbargs->cu, num, attr); + else + nlpt = true; + + } + + if (!cbargs->silent) + { + if (cbargs->cu->version < 5 || form == DW_FORM_sec_offset) + 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 ? "" : " "); + else + printf (" %*s%-20s (%s) location index [%6" + PRIxMAX "]\n", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), (uintmax_t) num); + } + } + return DWARF_CB_OK; + + case DW_AT_loclists_base: + { + bool nlpt = notice_listptr (section_loc, &known_loclistsptr, + cbargs->addrsize, cbargs->offset_size, + cbargs->cu, num, attr); + if (!cbargs->silent) printf (" %*s%-20s (%s) location list [%6" PRIxMAX "]%s\n", (int) (level * 2), "", dwarf_attr_name (attr), @@ -6031,18 +7147,90 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) return DWARF_CB_OK; case DW_AT_ranges: + case DW_AT_start_scope: + { + bool nlpt; + if (cbargs->cu->version < 5) + nlpt = notice_listptr (section_ranges, &known_rangelistptr, + cbargs->addrsize, cbargs->offset_size, + cbargs->cu, num, attr); + else + { + /* Only register for a real section offset. Otherwise + it is a DW_FORM_rangelistx which is just an index + number and we should already have registered the + section offset for the index when we saw the + DW_AT_rnglists_base CU attribute. */ + if (form == DW_FORM_sec_offset) + nlpt = notice_listptr (section_ranges, &known_rnglistptr, + cbargs->addrsize, cbargs->offset_size, + cbargs->cu, num, attr); + else + nlpt = true; + } + + if (!cbargs->silent) + { + if (cbargs->cu->version < 5 || form == DW_FORM_sec_offset) + 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 ? "" : " "); + else + printf (" %*s%-20s (%s) range index [%6" + PRIxMAX "]\n", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), (uintmax_t) num); + } + } + return DWARF_CB_OK; + + case DW_AT_rnglists_base: { - bool nlpt = notice_listptr (section_ranges, &known_rangelistptr, + bool nlpt = notice_listptr (section_ranges, &known_rnglistptr, cbargs->addrsize, cbargs->offset_size, - cbargs->cu, num); + cbargs->cu, num, attr); if (!cbargs->silent) - printf (" %*s%-20s (%s) range list [%6" PRIxMAX "]%s\n", + printf (" %*s%-20s (%s) range list [%6" + PRIxMAX "]%s\n", (int) (level * 2), "", dwarf_attr_name (attr), dwarf_form_name (form), (uintmax_t) num, nlpt ? "" : " "); } return DWARF_CB_OK; + case DW_AT_addr_base: + case DW_AT_GNU_addr_base: + { + bool addrbase = notice_listptr (section_addr, &known_addrbases, + cbargs->addrsize, + cbargs->offset_size, + cbargs->cu, num, attr); + if (!cbargs->silent) + printf (" %*s%-20s (%s) address base [%6" + PRIxMAX "]%s\n", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), (uintmax_t) num, + addrbase ? "" : " "); + } + return DWARF_CB_OK; + + case DW_AT_str_offsets_base: + { + bool stroffbase = notice_listptr (section_str, &known_stroffbases, + cbargs->addrsize, + cbargs->offset_size, + cbargs->cu, num, attr); + if (!cbargs->silent) + printf (" %*s%-20s (%s) str offsets base [%6" + PRIxMAX "]%s\n", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), (uintmax_t) num, + stroffbase ? "" : " "); + } + return DWARF_CB_OK; + case DW_AT_language: valuestr = dwarf_lang_name (num); break; @@ -6052,6 +7240,9 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_AT_accessibility: valuestr = dwarf_access_name (num); break; + case DW_AT_defaulted: + valuestr = dwarf_defaulted_name (num); + break; case DW_AT_visibility: valuestr = dwarf_visibility_name (num); break; @@ -6073,6 +7264,49 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_AT_discr_list: valuestr = dwarf_discr_list_name (num); break; + case DW_AT_decl_file: + case DW_AT_call_file: + { + if (cbargs->silent) + break; + + /* Try to get the actual file, the current interface only + gives us full paths, but we only want to show the file + name for now. */ + Dwarf_Die cudie; + if (dwarf_cu_die (cbargs->cu, &cudie, + NULL, NULL, NULL, NULL, NULL, NULL) != NULL) + { + Dwarf_Files *files; + size_t nfiles; + if (dwarf_getsrcfiles (&cudie, &files, &nfiles) == 0) + { + valuestr = dwarf_filesrc (files, num, NULL, NULL); + if (valuestr != NULL) + { + char *filename = strrchr (valuestr, '/'); + if (filename != NULL) + valuestr = filename + 1; + } + else + error (0, 0, gettext ("invalid file (%" PRId64 "): %s"), + num, dwarf_errmsg (-1)); + } + else + error (0, 0, gettext ("no srcfiles for CU [%" PRIx64 "]"), + dwarf_dieoffset (&cudie)); + } + else + error (0, 0, gettext ("couldn't get DWARF CU: %s"), + dwarf_errmsg (-1)); + if (valuestr == NULL) + valuestr = "???"; + } + break; + case DW_AT_GNU_dwo_id: + as_hex_id = true; + break; + default: /* Nothing. */ break; @@ -6086,39 +7320,97 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) Dwarf_Addr highpc; if (attr == DW_AT_high_pc && dwarf_highpc (cbargs->die, &highpc) == 0) { - char *a = format_dwarf_addr (cbargs->dwflmod, cbargs->addrsize, - highpc, highpc); - printf (" %*s%-20s (%s) %" PRIuMAX " (%s)\n", + printf (" %*s%-20s (%s) %" PRIuMAX " (", (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), (uintmax_t) num, a); - free (a); + dwarf_form_name (form), (uintmax_t) num); + print_dwarf_addr (cbargs->dwflmod, cbargs->addrsize, highpc, highpc); + printf (")\n"); } else { - Dwarf_Sword snum = 0; - if (form == DW_FORM_sdata) - if (unlikely (dwarf_formsdata (attrp, &snum) != 0)) - goto attrval_out; + if (as_hex_id) + { + printf (" %*s%-20s (%s) 0x%.16" PRIx64 "\n", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), num); + } + else + { + Dwarf_Sword snum = 0; + bool is_signed; + int bytes = 0; + if (attr == DW_AT_const_value) + die_type_sign_bytes (cbargs->die, &is_signed, &bytes); + else + is_signed = (form == DW_FORM_sdata + || form == DW_FORM_implicit_const); + + if (is_signed) + if (unlikely (dwarf_formsdata (attrp, &snum) != 0)) + goto attrval_out; + + if (valuestr == NULL) + { + printf (" %*s%-20s (%s) ", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form)); + } + else + { + printf (" %*s%-20s (%s) %s (", + (int) (level * 2), "", dwarf_attr_name (attr), + dwarf_form_name (form), valuestr); + } + + switch (bytes) + { + case 1: + if (is_signed) + printf ("%" PRId8, (int8_t) snum); + else + printf ("%" PRIu8, (uint8_t) num); + break; + + case 2: + if (is_signed) + printf ("%" PRId16, (int16_t) snum); + else + printf ("%" PRIu16, (uint16_t) num); + break; + + case 4: + if (is_signed) + printf ("%" PRId32, (int32_t) snum); + else + printf ("%" PRIu32, (uint32_t) num); + break; + + case 8: + if (is_signed) + printf ("%" PRId64, (int64_t) snum); + else + printf ("%" PRIu64, (uint64_t) num); + break; + + default: + if (is_signed) + printf ("%" PRIdMAX, (intmax_t) snum); + else + printf ("%" PRIuMAX, (uintmax_t) num); + break; + } - if (valuestr == NULL) - { - printf (" %*s%-20s (%s)", - (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form)); - if (form == DW_FORM_sdata) - printf (" %" PRIdMAX "\n", (intmax_t) snum); - else - printf (" %" PRIuMAX "\n", (uintmax_t) num); - } - else - { - printf (" %*s%-20s (%s) %s", - (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), valuestr); - if (form == DW_FORM_sdata) - printf (" (%" PRIdMAX ")\n", (intmax_t) snum); + /* Make clear if we switched from a signed encoding to + an unsigned value. */ + if (attr == DW_AT_const_value + && (form == DW_FORM_sdata || form == DW_FORM_implicit_const) + && !is_signed) + printf (" (%" PRIdMAX ")", (intmax_t) num); + + if (valuestr == NULL) + printf ("\n"); else - printf (" (%" PRIuMAX ")\n", (uintmax_t) num); + printf (")\n"); } } break; @@ -6132,7 +7424,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) printf (" %*s%-20s (%s) %s\n", (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), nl_langinfo (flag ? YESSTR : NOSTR)); + dwarf_form_name (form), flag ? yes_str : no_str); break; case DW_FORM_flag_present: @@ -6140,7 +7432,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) break; printf (" %*s%-20s (%s) %s\n", (int) (level * 2), "", dwarf_attr_name (attr), - dwarf_form_name (form), nl_langinfo (YESSTR)); + dwarf_form_name (form), yes_str); break; case DW_FORM_exprloc: @@ -6148,6 +7440,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) case DW_FORM_block2: case DW_FORM_block1: case DW_FORM_block: + case DW_FORM_data16: /* DWARF5 calls this a constant class. */ if (cbargs->silent) break; Dwarf_Block block; @@ -6166,7 +7459,7 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) print_block (block.length, block.data); break; } - /* Fall through. */ + FALLTHROUGH; case DW_AT_location: case DW_AT_data_location: @@ -6191,11 +7484,16 @@ 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: - putchar ('\n'); - print_ops (cbargs->dwflmod, cbargs->dbg, - 12 + level * 2, 12 + level * 2, - cbargs->version, cbargs->addrsize, cbargs->offset_size, - attrp->cu, block.length, block.data); + if (form != DW_FORM_data16) + { + putchar ('\n'); + print_ops (cbargs->dwflmod, cbargs->dbg, + 12 + level * 2, 12 + level * 2, + cbargs->version, cbargs->addrsize, cbargs->offset_size, + attrp->cu, block.length, block.data); + } + else + print_block (block.length, block.data); break; } break; @@ -6203,9 +7501,9 @@ attr_callback (Dwarf_Attribute *attrp, void *arg) default: if (cbargs->silent) break; - printf (" %*s%-20s (form: %#x) ???\n", + printf (" %*s%-20s (%s) ???\n", (int) (level * 2), "", dwarf_attr_name (attr), - (int) form); + dwarf_form_name (form)); break; } @@ -6218,7 +7516,7 @@ print_debug_units (Dwfl_Module *dwflmod, Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg, bool debug_types) { - const bool silent = !(print_debug_sections & section_info); + const bool silent = !(print_debug_sections & section_info) && !debug_types; const char *secname = section_name (ebl, ehdr, shdr); if (!silent) @@ -6233,73 +7531,140 @@ print_debug_units (Dwfl_Module *dwflmod, int maxdies = 20; Dwarf_Die *dies = (Dwarf_Die *) xmalloc (maxdies * sizeof (Dwarf_Die)); - Dwarf_Off offset = 0; - /* New compilation unit. */ - size_t cuhl; Dwarf_Half version; + + Dwarf_Die result; Dwarf_Off abbroffset; uint8_t addrsize; uint8_t offsize; - Dwarf_Off nextcu; - uint64_t typesig; - Dwarf_Off typeoff; + uint64_t unit_id; + Dwarf_Off subdie_off; + + int unit_res; + Dwarf_CU *cu; + Dwarf_CU cu_mem; + uint8_t unit_type; + Dwarf_Die cudie; + + /* We cheat a little because we want to see only the CUs from .debug_info + or .debug_types. We know the Dwarf_CU struct layout. Set it up at + the end of .debug_info if we want .debug_types only. Check the returned + Dwarf_CU is still in the expected section. */ + if (debug_types) + { + cu_mem.dbg = dbg; + cu_mem.end = dbg->sectiondata[IDX_debug_info]->d_size; + cu_mem.sec_idx = IDX_debug_info; + cu = &cu_mem; + } + else + cu = NULL; + next_cu: - if (dwarf_next_unit (dbg, offset, &nextcu, &cuhl, &version, - &abbroffset, &addrsize, &offsize, - debug_types ? &typesig : NULL, - debug_types ? &typeoff : NULL) != 0) + unit_res = dwarf_get_units (dbg, cu, &cu, &version, &unit_type, + &cudie, NULL); + if (unit_res == 1) + goto do_return; + + if (unit_res == -1) + { + if (!silent) + error (0, 0, gettext ("cannot get next unit: %s"), dwarf_errmsg (-1)); + goto do_return; + } + + if (cu->sec_idx != (size_t) (debug_types ? IDX_debug_types : IDX_debug_info)) goto do_return; + dwarf_cu_die (cu, &result, NULL, &abbroffset, &addrsize, &offsize, + &unit_id, &subdie_off); + if (!silent) { - if (debug_types) - printf (gettext (" Type unit at offset %" PRIu64 ":\n" - " Version: %" PRIu16 ", Abbreviation section offset: %" - PRIu64 ", Address size: %" PRIu8 - ", Offset size: %" PRIu8 - "\n Type signature: %#" PRIx64 - ", Type offset: %#" PRIx64 "\n"), - (uint64_t) offset, version, abbroffset, addrsize, offsize, - typesig, (uint64_t) typeoff); + Dwarf_Off offset = cu->start; + if (debug_types && version < 5) + { + Dwarf_Die typedie; + Dwarf_Off dieoffset; + dieoffset = dwarf_dieoffset (dwarf_offdie_types (dbg, subdie_off, + &typedie)); + printf (gettext (" Type unit at offset %" PRIu64 ":\n" + " Version: %" PRIu16 + ", Abbreviation section offset: %" PRIu64 + ", Address size: %" PRIu8 + ", Offset size: %" PRIu8 + "\n Type signature: %#" PRIx64 + ", Type offset: %#" PRIx64 " [%" PRIx64 "]\n"), + (uint64_t) offset, version, abbroffset, addrsize, offsize, + unit_id, (uint64_t) subdie_off, dieoffset); + } else - printf (gettext (" Compilation unit at offset %" PRIu64 ":\n" - " Version: %" PRIu16 ", Abbreviation section offset: %" - PRIu64 ", Address size: %" PRIu8 - ", Offset size: %" PRIu8 "\n"), - (uint64_t) offset, version, abbroffset, addrsize, offsize); + { + printf (gettext (" Compilation unit at offset %" PRIu64 ":\n" + " Version: %" PRIu16 + ", Abbreviation section offset: %" PRIu64 + ", Address size: %" PRIu8 + ", Offset size: %" PRIu8 "\n"), + (uint64_t) offset, version, abbroffset, addrsize, offsize); + + if (version >= 5 || (unit_type != DW_UT_compile + && unit_type != DW_UT_partial)) + { + printf (gettext (" Unit type: %s (%" PRIu8 ")"), + dwarf_unit_name (unit_type), unit_type); + if (unit_type == DW_UT_type + || unit_type == DW_UT_skeleton + || unit_type == DW_UT_split_compile + || unit_type == DW_UT_split_type) + printf (", Unit id: 0x%.16" PRIx64 "", unit_id); + if (unit_type == DW_UT_type + || unit_type == DW_UT_split_type) + { + Dwarf_Die typedie; + Dwarf_Off dieoffset; + dwarf_cu_info (cu, NULL, NULL, NULL, &typedie, + NULL, NULL, NULL); + dieoffset = dwarf_dieoffset (&typedie); + printf (", Unit DIE off: %#" PRIx64 " [%" PRIx64 "]", + subdie_off, dieoffset); + } + printf ("\n"); + } + } + } + + if (version < 2 || version > 5 + || unit_type < DW_UT_compile || unit_type > DW_UT_split_type) + { + if (!silent) + error (0, 0, gettext ("unknown version (%d) or unit type (%d)"), + version, unit_type); + goto next_cu; } struct attrcb_args args = { .dwflmod = dwflmod, - .dbg = dbg, .silent = silent, .version = version, .addrsize = addrsize, .offset_size = offsize }; - offset += cuhl; - + bool is_split = false; int level = 0; - - if (unlikely ((debug_types ? dwarf_offdie_types : dwarf_offdie) - (dbg, offset, &dies[level]) == NULL)) - { - if (!silent) - error (0, 0, gettext ("cannot get DIE at offset %" PRIu64 - " in section '%s': %s"), - (uint64_t) offset, secname, dwarf_errmsg (-1)); - goto do_return; - } - + dies[0] = cudie; args.cu = dies[0].cu; + args.dbg = dbg; + args.is_split = is_split; + /* We might return here again for the split CU subdie. */ + do_cu: do { - offset = dwarf_dieoffset (&dies[level]); - if (unlikely (offset == ~0ul)) + Dwarf_Off offset = dwarf_dieoffset (&dies[level]); + if (unlikely (offset == (Dwarf_Off) -1)) { if (!silent) error (0, 0, gettext ("cannot get DIE offset: %s"), @@ -6311,16 +7676,22 @@ print_debug_units (Dwfl_Module *dwflmod, if (unlikely (tag == DW_TAG_invalid)) { if (!silent) - error (0, 0, gettext ("cannot get tag of DIE at offset %" PRIu64 - " in section '%s': %s"), + error (0, 0, gettext ("cannot get tag of DIE at offset [%" PRIx64 + "] in section '%s': %s"), (uint64_t) offset, secname, dwarf_errmsg (-1)); goto do_return; } if (!silent) - printf (" [%6" PRIx64 "] %*s%s\n", - (uint64_t) offset, (int) (level * 2), "", - dwarf_tag_name (tag)); + { + unsigned int code = dwarf_getabbrevcode (dies[level].abbrev); + if (is_split) + printf (" {%6" PRIx64 "} ", (uint64_t) offset); + else + printf (" [%6" PRIx64 "] ", (uint64_t) offset); + printf ("%*s%-20s abbrev: %u\n", (int) (level * 2), "", + dwarf_tag_name (tag), code); + } /* Print the attribute values. */ args.level = level; @@ -6360,9 +7731,68 @@ print_debug_units (Dwfl_Module *dwflmod, } while (level >= 0); - offset = nextcu; - if (offset != 0) - goto next_cu; + /* We might want to show the split compile unit if this was a skeleton. + We need to scan it if we are requesting printing .debug_ranges for + DWARF4 since GNU DebugFission uses "offsets" into the main ranges + section. */ + if (unit_type == DW_UT_skeleton + && ((!silent && show_split_units) + || (version < 5 && (print_debug_sections & section_ranges) != 0))) + { + Dwarf_Die subdie; + if (dwarf_cu_info (cu, NULL, NULL, NULL, &subdie, NULL, NULL, NULL) != 0 + || dwarf_tag (&subdie) == DW_TAG_invalid) + { + if (!silent) + { + Dwarf_Attribute dwo_at; + const char *dwo_name = + (dwarf_formstring (dwarf_attr (&cudie, DW_AT_dwo_name, + &dwo_at)) + ?: (dwarf_formstring (dwarf_attr (&cudie, DW_AT_GNU_dwo_name, + &dwo_at)) + ?: "")); + fprintf (stderr, + "Could not find split unit '%s', id: %" PRIx64 "\n", + dwo_name, unit_id); + } + } + else + { + Dwarf_CU *split_cu = subdie.cu; + dwarf_cu_die (split_cu, &result, NULL, &abbroffset, + &addrsize, &offsize, &unit_id, &subdie_off); + Dwarf_Off offset = cu->start; + + if (!silent) + { + printf (gettext (" Split compilation unit at offset %" + PRIu64 ":\n" + " Version: %" PRIu16 + ", Abbreviation section offset: %" PRIu64 + ", Address size: %" PRIu8 + ", Offset size: %" PRIu8 "\n"), + (uint64_t) offset, version, abbroffset, + addrsize, offsize); + printf (gettext (" Unit type: %s (%" PRIu8 ")"), + dwarf_unit_name (unit_type), unit_type); + printf (", Unit id: 0x%.16" PRIx64 "", unit_id); + printf ("\n"); + } + + unit_type = DW_UT_split_compile; + is_split = true; + level = 0; + dies[0] = subdie; + args.cu = dies[0].cu; + args.dbg = split_cu->dbg; + args.is_split = is_split; + goto do_cu; + } + } + + /* And again... */ + goto next_cu; do_return: free (dies); @@ -6395,23 +7825,51 @@ print_decoded_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, size_t address_size = elf_getident (ebl->elf, NULL)[EI_CLASS] == ELFCLASS32 ? 4 : 8; - Dwarf_Off cuoffset; - Dwarf_Off ncuoffset = 0; - size_t hsize; - while (dwarf_nextcu (dbg, cuoffset = ncuoffset, &ncuoffset, &hsize, - NULL, NULL, NULL) == 0) + Dwarf_Lines *lines; + size_t nlines; + Dwarf_Off off, next_off = 0; + Dwarf_CU *cu = NULL; + while (dwarf_next_lines (dbg, off = next_off, &next_off, &cu, NULL, NULL, + &lines, &nlines) == 0) { Dwarf_Die cudie; - if (dwarf_offdie (dbg, cuoffset + hsize, &cudie) == NULL) - continue; + if (cu != NULL && dwarf_cu_info (cu, NULL, NULL, &cudie, + NULL, NULL, NULL, NULL) == 0) + printf (" CU [%" PRIx64 "] %s\n", + dwarf_dieoffset (&cudie), dwarf_diename (&cudie)); + else + { + /* DWARF5 lines can be independent of any CU, but they probably + are used by some CU. Determine the CU this block is for. */ + Dwarf_Off cuoffset; + Dwarf_Off ncuoffset = 0; + size_t hsize; + while (dwarf_nextcu (dbg, cuoffset = ncuoffset, &ncuoffset, &hsize, + NULL, NULL, NULL) == 0) + { + if (dwarf_offdie (dbg, cuoffset + hsize, &cudie) == NULL) + continue; + Dwarf_Attribute stmt_list; + if (dwarf_attr (&cudie, DW_AT_stmt_list, &stmt_list) == NULL) + continue; + Dwarf_Word lineoff; + if (dwarf_formudata (&stmt_list, &lineoff) != 0) + continue; + if (lineoff == off) + { + /* Found the CU. */ + cu = cudie.cu; + break; + } + } - size_t nlines; - Dwarf_Lines *lines; - if (dwarf_getsrclines (&cudie, &lines, &nlines) != 0) - continue; + if (cu != NULL) + printf (" CU [%" PRIx64 "] %s\n", + dwarf_dieoffset (&cudie), dwarf_diename (&cudie)); + else + printf (" No CU\n"); + } - printf (" CU [%" PRIx64 "] %s\n", - dwarf_dieoffset (&cudie), dwarf_diename (&cudie)); printf (" line:col SBPE* disc isa op address" " (Statement Block Prologue Epilogue *End)\n"); const char *last_file = ""; @@ -6454,17 +7912,17 @@ print_decoded_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, dwarf_linediscriminator (line, &disc); /* End sequence is special, it is one byte past. */ - char *a = format_dwarf_addr (dwflmod, address_size, - address - (endseq ? 1 : 0), address); - printf (" %4d:%-3d %c%c%c%c%c %4d %3d %2d %s\n", + printf (" %4d:%-3d %c%c%c%c%c %4d %3d %2d ", lineno, colno, (statement ? 'S' : ' '), (block ? 'B' : ' '), (prologue_end ? 'P' : ' '), (epilogue_begin ? 'E' : ' '), (endseq ? '*' : ' '), - disc, isa, lineop, a); - free (a); + disc, isa, lineop); + print_dwarf_addr (dwflmod, address_size, + address - (endseq ? 1 : 0), address); + printf ("\n"); if (endseq) printf("\n"); @@ -6473,6 +7931,231 @@ print_decoded_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, } +/* Print the value of a form. + Returns new value of readp, or readendp on failure. */ +static const unsigned char * +print_form_data (Dwarf *dbg, int form, const unsigned char *readp, + const unsigned char *readendp, unsigned int offset_len, + Dwarf_Off str_offsets_base) +{ + Dwarf_Word val; + unsigned char *endp; + Elf_Data *data; + char *str; + switch (form) + { + case DW_FORM_data1: + if (readendp - readp < 1) + { + invalid_data: + error (0, 0, "invalid data"); + return readendp; + } + val = *readp++; + printf (" %" PRIx8, (unsigned int) val); + break; + + case DW_FORM_data2: + if (readendp - readp < 2) + goto invalid_data; + val = read_2ubyte_unaligned_inc (dbg, readp); + printf(" %" PRIx16, (unsigned int) val); + break; + + case DW_FORM_data4: + if (readendp - readp < 4) + goto invalid_data; + val = read_4ubyte_unaligned_inc (dbg, readp); + printf (" %" PRIx32, (unsigned int) val); + break; + + case DW_FORM_data8: + if (readendp - readp < 8) + goto invalid_data; + val = read_8ubyte_unaligned_inc (dbg, readp); + printf (" %" PRIx64, val); + break; + + case DW_FORM_sdata: + if (readendp - readp < 1) + goto invalid_data; + get_sleb128 (val, readp, readendp); + printf (" %" PRIx64, val); + break; + + case DW_FORM_udata: + if (readendp - readp < 1) + goto invalid_data; + get_uleb128 (val, readp, readendp); + printf (" %" PRIx64, val); + break; + + case DW_FORM_block: + if (readendp - readp < 1) + goto invalid_data; + get_uleb128 (val, readp, readendp); + if ((size_t) (readendp - readp) < val) + goto invalid_data; + print_bytes (val, readp); + readp += val; + break; + + case DW_FORM_block1: + if (readendp - readp < 1) + goto invalid_data; + val = *readp++; + if ((size_t) (readendp - readp) < val) + goto invalid_data; + print_bytes (val, readp); + readp += val; + break; + + case DW_FORM_block2: + if (readendp - readp < 2) + goto invalid_data; + val = read_2ubyte_unaligned_inc (dbg, readp); + if ((size_t) (readendp - readp) < val) + goto invalid_data; + print_bytes (val, readp); + readp += val; + break; + + case DW_FORM_block4: + if (readendp - readp < 4) + goto invalid_data; + val = read_4ubyte_unaligned_inc (dbg, readp); + if ((size_t) (readendp - readp) < val) + goto invalid_data; + print_bytes (val, readp); + readp += val; + break; + + case DW_FORM_data16: + if (readendp - readp < 16) + goto invalid_data; + print_bytes (16, readp); + readp += 16; + break; + + case DW_FORM_flag: + if (readendp - readp < 1) + goto invalid_data; + val = *readp++; + printf ("%s", val != 0 ? yes_str : no_str); + break; + + case DW_FORM_string: + endp = memchr (readp, '\0', readendp - readp); + if (endp == NULL) + goto invalid_data; + printf ("%s", readp); + readp = endp + 1; + break; + + case DW_FORM_strp: + case DW_FORM_line_strp: + case DW_FORM_strp_sup: + if ((size_t) (readendp - readp) < offset_len) + goto invalid_data; + if (offset_len == 8) + val = read_8ubyte_unaligned_inc (dbg, readp); + else + val = read_4ubyte_unaligned_inc (dbg, readp); + if (form == DW_FORM_strp) + data = dbg->sectiondata[IDX_debug_str]; + else if (form == DW_FORM_line_strp) + data = dbg->sectiondata[IDX_debug_line_str]; + else /* form == DW_FORM_strp_sup */ + { + Dwarf *alt = dwarf_getalt (dbg); + data = alt != NULL ? alt->sectiondata[IDX_debug_str] : NULL; + } + if (data == NULL || val >= data->d_size + || memchr (data->d_buf + val, '\0', data->d_size - val) == NULL) + str = "???"; + else + str = (char *) data->d_buf + val; + printf ("%s (%" PRIu64 ")", str, val); + break; + + case DW_FORM_sec_offset: + if ((size_t) (readendp - readp) < offset_len) + goto invalid_data; + if (offset_len == 8) + val = read_8ubyte_unaligned_inc (dbg, readp); + else + val = read_4ubyte_unaligned_inc (dbg, readp); + printf ("[%" PRIx64 "]", val); + break; + + case DW_FORM_strx: + case DW_FORM_GNU_str_index: + if (readendp - readp < 1) + goto invalid_data; + get_uleb128 (val, readp, readendp); + strx_val: + data = dbg->sectiondata[IDX_debug_str_offsets]; + if (data == NULL + || data->d_size - str_offsets_base < val) + str = "???"; + else + { + const unsigned char *strreadp = data->d_buf + str_offsets_base + val; + const unsigned char *strreadendp = data->d_buf + data->d_size; + if ((size_t) (strreadendp - strreadp) < offset_len) + str = "???"; + else + { + Dwarf_Off idx; + if (offset_len == 8) + idx = read_8ubyte_unaligned (dbg, strreadp); + else + idx = read_4ubyte_unaligned (dbg, strreadp); + + data = dbg->sectiondata[IDX_debug_str]; + if (data == NULL || idx >= data->d_size + || memchr (data->d_buf + idx, '\0', + data->d_size - idx) == NULL) + str = "???"; + else + str = (char *) data->d_buf + idx; + } + } + printf ("%s (%" PRIu64 ")", str, val); + break; + + case DW_FORM_strx1: + if (readendp - readp < 1) + goto invalid_data; + val = *readp++; + goto strx_val; + + case DW_FORM_strx2: + if (readendp - readp < 2) + goto invalid_data; + val = read_2ubyte_unaligned_inc (dbg, readp); + goto strx_val; + + case DW_FORM_strx3: + if (readendp - readp < 3) + goto invalid_data; + val = read_3ubyte_unaligned_inc (dbg, readp); + goto strx_val; + + case DW_FORM_strx4: + if (readendp - readp < 4) + goto invalid_data; + val = read_4ubyte_unaligned_inc (dbg, readp); + goto strx_val; + + default: + error (0, 0, gettext ("unknown form: %s"), dwarf_form_name (form)); + return readendp; + } + + return readp; +} + static void print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg) @@ -6493,8 +8176,9 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, /* There is no functionality in libdw to read the information in the way it is represented here. Hardcode the decoder. */ - Elf_Data *data = dbg->sectiondata[IDX_debug_line]; - if (unlikely (data == NULL || data->d_buf == NULL)) + Elf_Data *data = (dbg->sectiondata[IDX_debug_line] + ?: elf_rawdata (scn, NULL)); + if (unlikely (data == NULL)) { error (0, 0, gettext ("cannot get line data section data: %s"), elf_errmsg (-1)); @@ -6529,35 +8213,67 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, } /* Check whether we have enough room in the section. */ - if (unlikely (unit_length > (size_t) (lineendp - linep) - || unit_length < 2 + length + 5 * 1)) + if (unlikely (unit_length > (size_t) (lineendp - linep))) goto invalid_data; lineendp = linep + unit_length; /* The next element of the header is the version identifier. */ + if ((size_t) (lineendp - linep) < 2) + goto invalid_data; uint_fast16_t version = read_2ubyte_unaligned_inc (dbg, linep); + size_t address_size + = elf_getident (ebl->elf, NULL)[EI_CLASS] == ELFCLASS32 ? 4 : 8; + unsigned char segment_selector_size = 0; + if (version > 4) + { + if ((size_t) (lineendp - linep) < 2) + goto invalid_data; + address_size = *linep++; + segment_selector_size = *linep++; + } + /* Next comes the header length. */ Dwarf_Word header_length; if (length == 4) - header_length = read_4ubyte_unaligned_inc (dbg, linep); + { + if ((size_t) (lineendp - linep) < 4) + goto invalid_data; + header_length = read_4ubyte_unaligned_inc (dbg, linep); + } else - header_length = read_8ubyte_unaligned_inc (dbg, linep); - //const unsigned char *header_start = linep; + { + if ((size_t) (lineendp - linep) < 8) + goto invalid_data; + header_length = read_8ubyte_unaligned_inc (dbg, linep); + } /* Next the minimum instruction length. */ + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; uint_fast8_t minimum_instr_len = *linep++; /* Next the maximum operations per instruction, in version 4 format. */ - uint_fast8_t max_ops_per_instr = version < 4 ? 1 : *linep++; + uint_fast8_t max_ops_per_instr; + if (version < 4) + max_ops_per_instr = 1; + else + { + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + max_ops_per_instr = *linep++; + } + + /* We need at least 4 more bytes. */ + if ((size_t) (lineendp - linep) < 4) + goto invalid_data; - /* Then the flag determining the default value of the is_stmt - register. */ + /* 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 = *((const int_fast8_t *) linep); - ++linep; + int_fast8_t line_base = *linep++; /* And the line range. */ uint_fast8_t line_range = *linep++; @@ -6567,22 +8283,49 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, /* Print what we got so far. */ printf (gettext ("\n" - " Length: %" PRIu64 "\n" - " DWARF version: %" PRIuFAST16 "\n" - " Prologue length: %" PRIu64 "\n" - " Minimum instruction length: %" PRIuFAST8 "\n" - " Maximum operations per instruction: %" PRIuFAST8 "\n" - " Initial value if '%s': %" PRIuFAST8 "\n" - " Line base: %" PRIdFAST8 "\n" - " Line range: %" PRIuFAST8 "\n" - " Opcode base: %" PRIuFAST8 "\n" + " Length: %" PRIu64 "\n" + " DWARF version: %" PRIuFAST16 "\n" + " Prologue length: %" PRIu64 "\n" + " Address size: %zd\n" + " Segment selector size: %zd\n" + " Min instruction length: %" PRIuFAST8 "\n" + " Max operations per instruction: %" PRIuFAST8 "\n" + " Initial value if 'is_stmt': %" PRIuFAST8 "\n" + " Line base: %" PRIdFAST8 "\n" + " Line range: %" PRIuFAST8 "\n" + " Opcode base: %" PRIuFAST8 "\n" "\n" "Opcodes:\n"), (uint64_t) unit_length, version, (uint64_t) header_length, + address_size, (size_t) segment_selector_size, minimum_instr_len, max_ops_per_instr, - "is_stmt", default_is_stmt, line_base, + default_is_stmt, line_base, line_range, opcode_base); + if (version < 2 || version > 5) + { + error (0, 0, gettext ("cannot handle .debug_line version: %u\n"), + (unsigned int) version); + linep = lineendp; + continue; + } + + if (address_size != 4 && address_size != 8) + { + error (0, 0, gettext ("cannot handle address size: %u\n"), + (unsigned int) address_size); + linep = lineendp; + continue; + } + + if (segment_selector_size != 0) + { + error (0, 0, gettext ("cannot handle segment selector size: %u\n"), + (unsigned int) segment_selector_size); + linep = lineendp; + continue; + } + if (unlikely (linep + opcode_base - 1 >= lineendp)) { invalid_unit: @@ -6607,59 +8350,182 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, (int) linep[cnt - 1]), opcode_base_l10, cnt, linep[cnt - 1]); linep += opcode_base - 1; + + if (unlikely (linep >= lineendp)) + goto invalid_unit; + + Dwarf_Off str_offsets_base = str_offsets_base_off (dbg, NULL); + + puts (gettext ("\nDirectory table:")); + if (version > 4) + { + struct encpair { uint16_t desc; uint16_t form; }; + struct encpair enc[256]; + + printf (gettext (" [")); + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + unsigned char directory_entry_format_count = *linep++; + for (int i = 0; i < directory_entry_format_count; i++) + { + uint16_t desc, form; + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (desc, linep, lineendp); + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (form, linep, lineendp); + + enc[i].desc = desc; + enc[i].form = form; + + printf ("%s(%s)", + dwarf_line_content_description_name (desc), + dwarf_form_name (form)); + if (i + 1 < directory_entry_format_count) + printf (", "); + } + printf ("]\n"); + + uint64_t directories_count; + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (directories_count, linep, lineendp); + + if (directory_entry_format_count == 0 + && directories_count != 0) + goto invalid_data; + + for (uint64_t i = 0; i < directories_count; i++) + { + printf (" %-5" PRIu64 " ", i); + for (int j = 0; j < directory_entry_format_count; j++) + { + linep = print_form_data (dbg, enc[j].form, + linep, lineendp, length, + str_offsets_base); + if (j + 1 < directory_entry_format_count) + printf (", "); + } + printf ("\n"); + if (linep >= lineendp) + goto invalid_unit; + } + } + else + { + while (*linep != 0) + { + unsigned char *endp = memchr (linep, '\0', lineendp - linep); + if (unlikely (endp == NULL)) + goto invalid_unit; + + printf (" %s\n", (char *) linep); + + linep = endp + 1; + } + /* Skip the final NUL byte. */ + ++linep; + } + if (unlikely (linep >= lineendp)) goto invalid_unit; - puts (gettext ("\nDirectory table:")); - while (*linep != 0) + puts (gettext ("\nFile name table:")); + if (version > 4) { - unsigned char *endp = memchr (linep, '\0', lineendp - linep); - if (unlikely (endp == NULL)) - goto invalid_unit; + struct encpair { uint16_t desc; uint16_t form; }; + struct encpair enc[256]; - printf (" %s\n", (char *) linep); + printf (gettext (" [")); + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + unsigned char file_name_format_count = *linep++; + for (int i = 0; i < file_name_format_count; i++) + { + uint64_t desc, form; + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (desc, linep, lineendp); + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (form, linep, lineendp); - linep = endp + 1; - } - /* Skip the final NUL byte. */ - ++linep; + if (! libdw_valid_user_form (form)) + goto invalid_data; - if (unlikely (linep >= lineendp)) - goto invalid_unit; - puts (gettext ("\nFile name table:\n" - " Entry Dir Time Size Name")); - for (unsigned int cnt = 1; *linep != 0; ++cnt) + enc[i].desc = desc; + enc[i].form = form; + + printf ("%s(%s)", + dwarf_line_content_description_name (desc), + dwarf_form_name (form)); + if (i + 1 < file_name_format_count) + printf (", "); + } + printf ("]\n"); + + uint64_t file_name_count; + if ((size_t) (lineendp - linep) < 1) + goto invalid_data; + get_uleb128 (file_name_count, linep, lineendp); + + if (file_name_format_count == 0 + && file_name_count != 0) + goto invalid_data; + + for (uint64_t i = 0; i < file_name_count; i++) + { + printf (" %-5" PRIu64 " ", i); + for (int j = 0; j < file_name_format_count; j++) + { + linep = print_form_data (dbg, enc[j].form, + linep, lineendp, length, + str_offsets_base); + if (j + 1 < file_name_format_count) + printf (", "); + } + printf ("\n"); + if (linep >= lineendp) + goto invalid_unit; + } + } + else { - /* First comes the file name. */ - char *fname = (char *) linep; - unsigned char *endp = memchr (fname, '\0', lineendp - linep); - if (unlikely (endp == NULL)) - goto invalid_unit; - linep = endp + 1; + puts (gettext (" Entry Dir Time Size Name")); + for (unsigned int cnt = 1; *linep != 0; ++cnt) + { + /* First comes the file name. */ + char *fname = (char *) linep; + unsigned char *endp = memchr (fname, '\0', lineendp - linep); + if (unlikely (endp == NULL)) + goto invalid_unit; + linep = endp + 1; - /* Then the index. */ - unsigned int diridx; - if (lineendp - linep < 1) - goto invalid_unit; - get_uleb128 (diridx, linep, lineendp); + /* Then the index. */ + unsigned int diridx; + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (diridx, linep, lineendp); - /* Next comes the modification time. */ - unsigned int mtime; - if (lineendp - linep < 1) - goto invalid_unit; - get_uleb128 (mtime, linep, lineendp); + /* Next comes the modification time. */ + unsigned int mtime; + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (mtime, linep, lineendp); - /* Finally the length of the file. */ - unsigned int fsize; - if (lineendp - linep < 1) - goto invalid_unit; - get_uleb128 (fsize, linep, lineendp); + /* Finally the length of the file. */ + unsigned int fsize; + if (lineendp - linep < 1) + goto invalid_unit; + get_uleb128 (fsize, linep, lineendp); - printf (" %-5u %-5u %-9u %-9u %s\n", - cnt, diridx, mtime, fsize, fname); + printf (" %-5u %-5u %-9u %-9u %s\n", + cnt, diridx, mtime, fsize, fname); + } + /* Skip the final NUL byte. */ + ++linep; } - /* Skip the final NUL byte. */ - ++linep; puts (gettext ("\nLine number statements:")); Dwarf_Word address = 0; @@ -6667,34 +8533,6 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, size_t line = 1; uint_fast8_t is_stmt = default_is_stmt; - /* Default address value, in case we do not find the CU. */ - size_t address_size - = elf_getident (ebl->elf, NULL)[EI_CLASS] == ELFCLASS32 ? 4 : 8; - - /* Determine the CU this block is for. */ - Dwarf_Off cuoffset; - Dwarf_Off ncuoffset = 0; - size_t hsize; - while (dwarf_nextcu (dbg, cuoffset = ncuoffset, &ncuoffset, &hsize, - NULL, NULL, NULL) == 0) - { - Dwarf_Die cudie; - if (dwarf_offdie (dbg, cuoffset + hsize, &cudie) == NULL) - continue; - Dwarf_Attribute stmt_list; - if (dwarf_attr (&cudie, DW_AT_stmt_list, &stmt_list) == NULL) - continue; - Dwarf_Word lineoff; - if (dwarf_formudata (&stmt_list, &lineoff) != 0) - continue; - if (lineoff == start_offset) - { - /* Found the CU. */ - address_size = cudie.cu->address_size; - break; - } - } - /* Apply the "operation advance" from a special opcode or DW_LNS_advance_pc (as per DWARF4 6.2.5.1). */ unsigned int op_addr_advance; @@ -6703,7 +8541,7 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, { op_addr_advance = minimum_instr_len * ((op_index + op_advance) / max_ops_per_instr); - address += op_advance; + address += op_addr_advance; show_op_index = (op_index > 0 || (op_index + op_advance) % max_ops_per_instr > 0); op_index = (op_index + op_advance) % max_ops_per_instr; @@ -6746,17 +8584,15 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, line += line_increment; advance_pc ((opcode - opcode_base) / line_range); - char *a = format_dwarf_addr (dwflmod, 0, address, address); + printf (gettext (" special opcode %u: address+%u = "), + opcode, op_addr_advance); + print_dwarf_addr (dwflmod, 0, address, address); if (show_op_index) - printf (gettext ("\ - special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n"), - opcode, op_addr_advance, a, op_index, - line_increment, line); + printf (gettext (", op_index = %u, line%+d = %zu\n"), + op_index, line_increment, line); else - printf (gettext ("\ - special opcode %u: address+%u = %s, line%+d = %zu\n"), - opcode, op_addr_advance, a, line_increment, line); - free (a); + printf (gettext (", line%+d = %zu\n"), + line_increment, line); } else if (opcode == 0) { @@ -6796,9 +8632,9 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, else address = read_8ubyte_unaligned_inc (dbg, linep); { - char *a = format_dwarf_addr (dwflmod, 0, address, address); - printf (gettext (" set address to %s\n"), a); - free (a); + printf (gettext (" set address to ")); + print_dwarf_addr (dwflmod, 0, address, address); + printf ("\n"); } break; @@ -6863,15 +8699,12 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, get_uleb128 (u128, linep, lineendp); advance_pc (u128); { - char *a = format_dwarf_addr (dwflmod, 0, address, address); + printf (gettext (" advance address by %u to "), + op_addr_advance); + print_dwarf_addr (dwflmod, 0, address, address); if (show_op_index) - printf (gettext ("\ - advance address by %u to %s, op_index to %u\n"), - op_addr_advance, a, op_index); - else - printf (gettext (" advance address by %u to %s\n"), - op_addr_advance, a); - free (a); + printf (gettext (", op_index to %u"), op_index); + printf ("\n"); } break; @@ -6922,16 +8755,12 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, advance_pc ((255 - opcode_base) / line_range); { - char *a = format_dwarf_addr (dwflmod, 0, address, address); + printf (gettext (" advance address by constant %u to "), + op_addr_advance); + print_dwarf_addr (dwflmod, 0, address, address); if (show_op_index) - printf (gettext ("\ - advance address by constant %u to %s, op_index to %u\n"), - op_addr_advance, a, op_index); - else - printf (gettext ("\ - advance address by constant %u to %s\n"), - op_addr_advance, a); - free (a); + printf (gettext (", op_index to %u"), op_index); + printf ("\n"); } break; @@ -6945,11 +8774,11 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, address += u128; op_index = 0; { - char *a = format_dwarf_addr (dwflmod, 0, address, address); printf (gettext ("\ - advance address by fixed value %u to %s\n"), - u128, a); - free (a); + advance address by fixed value %u to \n"), + u128); + print_dwarf_addr (dwflmod, 0, address, address); + printf ("\n"); } break; @@ -7001,12 +8830,440 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, } +static void +print_debug_loclists_section (Dwfl_Module *dwflmod, + Ebl *ebl, GElf_Ehdr *ehdr, + Elf_Scn *scn, GElf_Shdr *shdr, + Dwarf *dbg) +{ + printf (gettext ("\ +\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"), + elf_ndxscn (scn), section_name (ebl, ehdr, shdr), + (uint64_t) shdr->sh_offset); + + Elf_Data *data = (dbg->sectiondata[IDX_debug_loclists] + ?: elf_rawdata (scn, NULL)); + if (unlikely (data == NULL)) + { + error (0, 0, gettext ("cannot get .debug_loclists content: %s"), + elf_errmsg (-1)); + return; + } + + /* For the listptr to get the base address/CU. */ + sort_listptr (&known_loclistsptr, "loclistsptr"); + size_t listptr_idx = 0; + + const unsigned char *readp = data->d_buf; + const unsigned char *const dataend = ((unsigned char *) data->d_buf + + data->d_size); + while (readp < dataend) + { + if (unlikely (readp > dataend - 4)) + { + invalid_data: + error (0, 0, gettext ("invalid data in section [%zu] '%s'"), + elf_ndxscn (scn), section_name (ebl, ehdr, shdr)); + return; + } + + ptrdiff_t offset = readp - (unsigned char *) data->d_buf; + printf (gettext ("Table at Offset 0x%" PRIx64 ":\n\n"), + (uint64_t) offset); + + uint64_t unit_length = read_4ubyte_unaligned_inc (dbg, readp); + unsigned int offset_size = 4; + if (unlikely (unit_length == 0xffffffff)) + { + if (unlikely (readp > dataend - 8)) + goto invalid_data; + + unit_length = read_8ubyte_unaligned_inc (dbg, readp); + offset_size = 8; + } + printf (gettext (" Length: %8" PRIu64 "\n"), unit_length); + + /* We need at least 2-bytes + 1-byte + 1-byte + 4-bytes = 8 + bytes to complete the header. And this unit cannot go beyond + the section data. */ + if (readp > dataend - 8 + || unit_length < 8 + || unit_length > (uint64_t) (dataend - readp)) + goto invalid_data; + + const unsigned char *nexthdr = readp + unit_length; + + uint16_t version = read_2ubyte_unaligned_inc (dbg, readp); + printf (gettext (" DWARF version: %8" PRIu16 "\n"), version); + + if (version != 5) + { + error (0, 0, gettext ("Unknown version")); + goto next_table; + } + + uint8_t address_size = *readp++; + printf (gettext (" Address size: %8" PRIu64 "\n"), + (uint64_t) address_size); + + if (address_size != 4 && address_size != 8) + { + error (0, 0, gettext ("unsupported address size")); + goto next_table; + } + + uint8_t segment_size = *readp++; + printf (gettext (" Segment size: %8" PRIu64 "\n"), + (uint64_t) segment_size); + + if (segment_size != 0) + { + error (0, 0, gettext ("unsupported segment size")); + goto next_table; + } + + uint32_t offset_entry_count = read_4ubyte_unaligned_inc (dbg, readp); + printf (gettext (" Offset entries: %8" PRIu64 "\n"), + (uint64_t) offset_entry_count); + + /* We need the CU that uses this unit to get the initial base address. */ + Dwarf_Addr cu_base = 0; + struct Dwarf_CU *cu = NULL; + if (listptr_cu (&known_loclistsptr, &listptr_idx, + (Dwarf_Off) offset, + (Dwarf_Off) (nexthdr - (unsigned char *) data->d_buf), + &cu_base, &cu) + || split_dwarf_cu_base (dbg, &cu, &cu_base)) + { + Dwarf_Die cudie; + if (dwarf_cu_die (cu, &cudie, + NULL, NULL, NULL, NULL, + NULL, NULL) == NULL) + printf (gettext (" Unknown CU base: ")); + else + printf (gettext (" CU [%6" PRIx64 "] base: "), + dwarf_dieoffset (&cudie)); + print_dwarf_addr (dwflmod, address_size, cu_base, cu_base); + printf ("\n"); + } + else + printf (gettext (" Not associated with a CU.\n")); + + printf ("\n"); + + const unsigned char *offset_array_start = readp; + if (offset_entry_count > 0) + { + uint64_t max_entries = (unit_length - 8) / offset_size; + if (offset_entry_count > max_entries) + { + error (0, 0, + gettext ("too many offset entries for unit length")); + offset_entry_count = max_entries; + } + + printf (gettext (" Offsets starting at 0x%" PRIx64 ":\n"), + (uint64_t) (offset_array_start + - (unsigned char *) data->d_buf)); + for (uint32_t idx = 0; idx < offset_entry_count; idx++) + { + printf (" [%6" PRIu32 "] ", idx); + if (offset_size == 4) + { + uint32_t off = read_4ubyte_unaligned_inc (dbg, readp); + printf ("0x%" PRIx32 "\n", off); + } + else + { + uint64_t off = read_8ubyte_unaligned_inc (dbg, readp); + printf ("0x%" PRIx64 "\n", off); + } + } + printf ("\n"); + } + + Dwarf_Addr base = cu_base; + bool start_of_list = true; + while (readp < nexthdr) + { + uint8_t kind = *readp++; + uint64_t op1, op2, len; + + /* Skip padding. */ + if (start_of_list && kind == DW_LLE_end_of_list) + continue; + + if (start_of_list) + { + base = cu_base; + printf (" Offset: %" PRIx64 ", Index: %" PRIx64 "\n", + (uint64_t) (readp - (unsigned char *) data->d_buf - 1), + (uint64_t) (readp - offset_array_start - 1)); + start_of_list = false; + } + + printf (" %s", dwarf_loc_list_encoding_name (kind)); + switch (kind) + { + case DW_LLE_end_of_list: + start_of_list = true; + printf ("\n\n"); + break; + + case DW_LLE_base_addressx: + if ((uint64_t) (nexthdr - readp) < 1) + { + invalid_entry: + error (0, 0, gettext ("invalid loclists data")); + goto next_table; + } + get_uleb128 (op1, readp, nexthdr); + printf (" %" PRIx64 "\n", op1); + if (! print_unresolved_addresses) + { + Dwarf_Addr addr; + if (get_indexed_addr (cu, op1, &addr) != 0) + printf (" ???\n"); + else + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, addr, addr); + printf ("\n"); + } + } + break; + + case DW_LLE_startx_endx: + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (op1, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (op2, readp, nexthdr); + printf (" %" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + Dwarf_Addr addr1; + Dwarf_Addr addr2; + if (get_indexed_addr (cu, op1, &addr1) != 0 + || get_indexed_addr (cu, op2, &addr2) != 0) + { + printf (" ???..\n"); + printf (" ???\n"); + } + else + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, addr1, addr1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, + addr2 - 1, addr2); + printf ("\n"); + } + } + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (len, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < len) + goto invalid_entry; + print_ops (dwflmod, dbg, 8, 8, version, + address_size, offset_size, cu, len, readp); + readp += len; + break; + + case DW_LLE_startx_length: + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (op1, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (op2, readp, nexthdr); + printf (" %" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + Dwarf_Addr addr1; + Dwarf_Addr addr2; + if (get_indexed_addr (cu, op1, &addr1) != 0) + { + printf (" ???..\n"); + printf (" ???\n"); + } + else + { + addr2 = addr1 + op2; + printf (" "); + print_dwarf_addr (dwflmod, address_size, addr1, addr1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, + addr2 - 1, addr2); + printf ("\n"); + } + } + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (len, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < len) + goto invalid_entry; + print_ops (dwflmod, dbg, 8, 8, version, + address_size, offset_size, cu, len, readp); + readp += len; + break; + + case DW_LLE_offset_pair: + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (op1, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (op2, readp, nexthdr); + printf (" %" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + op1 += base; + op2 += base; + printf (" "); + print_dwarf_addr (dwflmod, address_size, op1, op1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, op2 - 1, op2); + printf ("\n"); + } + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (len, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < len) + goto invalid_entry; + print_ops (dwflmod, dbg, 8, 8, version, + address_size, offset_size, cu, len, readp); + readp += len; + break; + + case DW_LLE_default_location: + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (len, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < len) + goto invalid_entry; + print_ops (dwflmod, dbg, 8, 8, version, + address_size, offset_size, cu, len, readp); + readp += len; + break; + + case DW_LLE_base_address: + if (address_size == 4) + { + if ((uint64_t) (nexthdr - readp) < 4) + goto invalid_entry; + op1 = read_4ubyte_unaligned_inc (dbg, readp); + } + else + { + if ((uint64_t) (nexthdr - readp) < 8) + goto invalid_entry; + op1 = read_8ubyte_unaligned_inc (dbg, readp); + } + base = op1; + printf (" 0x%" PRIx64 "\n", base); + if (! print_unresolved_addresses) + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, base, base); + printf ("\n"); + } + break; + + case DW_LLE_start_end: + if (address_size == 4) + { + if ((uint64_t) (nexthdr - readp) < 8) + goto invalid_entry; + op1 = read_4ubyte_unaligned_inc (dbg, readp); + op2 = read_4ubyte_unaligned_inc (dbg, readp); + } + else + { + if ((uint64_t) (nexthdr - readp) < 16) + goto invalid_entry; + op1 = read_8ubyte_unaligned_inc (dbg, readp); + op2 = read_8ubyte_unaligned_inc (dbg, readp); + } + printf (" 0x%" PRIx64 "..0x%" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + printf (" "); + print_dwarf_addr (dwflmod, address_size, op1, op1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, op2 - 1, op2); + printf ("\n"); + } + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (len, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < len) + goto invalid_entry; + print_ops (dwflmod, dbg, 8, 8, version, + address_size, offset_size, cu, len, readp); + readp += len; + break; + + case DW_LLE_start_length: + if (address_size == 4) + { + if ((uint64_t) (nexthdr - readp) < 4) + goto invalid_entry; + op1 = read_4ubyte_unaligned_inc (dbg, readp); + } + else + { + if ((uint64_t) (nexthdr - readp) < 8) + goto invalid_entry; + op1 = read_8ubyte_unaligned_inc (dbg, readp); + } + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (op2, readp, nexthdr); + printf (" 0x%" PRIx64 ", %" PRIx64 "\n", op1, op2); + if (! print_unresolved_addresses) + { + op2 = op1 + op2; + printf (" "); + print_dwarf_addr (dwflmod, address_size, op1, op1); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, op2 - 1, op2); + printf ("\n"); + } + if ((uint64_t) (nexthdr - readp) < 1) + goto invalid_entry; + get_uleb128 (len, readp, nexthdr); + if ((uint64_t) (nexthdr - readp) < len) + goto invalid_entry; + print_ops (dwflmod, dbg, 8, 8, version, + address_size, offset_size, cu, len, readp); + readp += len; + break; + + default: + goto invalid_entry; + } + } + + next_table: + if (readp != nexthdr) + { + size_t padding = nexthdr - readp; + printf (gettext (" %zu padding bytes\n\n"), padding); + readp = nexthdr; + } + } +} + + static void print_debug_loc_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg) { - Elf_Data *data = dbg->sectiondata[IDX_debug_loc]; + Elf_Data *data = (dbg->sectiondata[IDX_debug_loc] + ?: elf_rawdata (scn, NULL)); if (unlikely (data == NULL)) { @@ -7020,35 +9277,154 @@ print_debug_loc_section (Dwfl_Module *dwflmod, elf_ndxscn (scn), section_name (ebl, ehdr, shdr), (uint64_t) shdr->sh_offset); - sort_listptr (&known_loclistptr, "loclistptr"); + sort_listptr (&known_locsptr, "loclistptr"); size_t listptr_idx = 0; uint_fast8_t address_size = ehdr->e_ident[EI_CLASS] == ELFCLASS32 ? 4 : 8; uint_fast8_t offset_size = 4; bool first = true; - struct Dwarf_CU *cu = NULL; Dwarf_Addr base = 0; unsigned char *readp = data->d_buf; unsigned char *const endp = (unsigned char *) data->d_buf + data->d_size; + Dwarf_CU *last_cu = NULL; while (readp < endp) { ptrdiff_t offset = readp - (unsigned char *) data->d_buf; + Dwarf_CU *cu = last_cu; + unsigned int attr = 0; - if (first && skip_listptr_hole (&known_loclistptr, &listptr_idx, + if (first && skip_listptr_hole (&known_locsptr, &listptr_idx, &address_size, &offset_size, &base, - &cu, offset, &readp, endp)) + &cu, offset, &readp, endp, &attr)) continue; - if (unlikely (data->d_size - offset < (size_t) address_size * 2)) - { + if (last_cu != cu) + { + Dwarf_Die cudie; + if (dwarf_cu_die (cu, &cudie, + NULL, NULL, NULL, NULL, + NULL, NULL) == NULL) + printf (gettext ("\n Unknown CU base: ")); + else + printf (gettext ("\n CU [%6" PRIx64 "] base: "), + dwarf_dieoffset (&cudie)); + print_dwarf_addr (dwflmod, address_size, base, base); + printf ("\n"); + } + last_cu = cu; + + if (attr == DW_AT_GNU_locviews) + { + Dwarf_Off next_off = next_listptr_offset (&known_locsptr, + listptr_idx); + const unsigned char *locp = readp; + const unsigned char *locendp; + if (next_off == 0 + || next_off > (size_t) (endp + - (const unsigned char *) data->d_buf)) + locendp = endp; + else + locendp = (const unsigned char *) data->d_buf + next_off; + + while (locp < locendp) + { + uint64_t v1, v2; + get_uleb128 (v1, locp, locendp); + if (locp >= locendp) + { + printf (gettext (" [%6tx] \n"), offset); + break; + } + get_uleb128 (v2, locp, locendp); + if (first) /* First view pair in a list. */ + printf (" [%6tx] ", offset); + else + printf (" "); + printf ("view pair %" PRId64 ", %" PRId64 "\n", v1, v2); + first = false; + } + + first = true; + readp = (unsigned char *) locendp; + continue; + } + + /* GNU DebugFission encoded addresses as addrx. */ + bool is_debugfission = ((cu != NULL + || split_dwarf_cu_base (dbg, &cu, &base)) + && (cu->version < 5 + && cu->unit_type == DW_UT_split_compile)); + if (!is_debugfission + && unlikely (data->d_size - offset < (size_t) address_size * 2)) + { + invalid_data: printf (gettext (" [%6tx] \n"), offset); break; } - Dwarf_Addr begin; - Dwarf_Addr end; - if (address_size == 8) + Dwarf_Addr begin; + Dwarf_Addr end; + bool use_base = true; + if (is_debugfission) + { + const unsigned char *locp = readp; + const unsigned char *locendp = readp + data->d_size; + if (locp >= locendp) + goto invalid_data; + + Dwarf_Word idx; + unsigned char code = *locp++; + switch (code) + { + case DW_LLE_GNU_end_of_list_entry: + begin = 0; + end = 0; + break; + + case DW_LLE_GNU_base_address_selection_entry: + if (locp >= locendp) + goto invalid_data; + begin = (Dwarf_Addr) -1; + get_uleb128 (idx, locp, locendp); + if (get_indexed_addr (cu, idx, &end) != 0) + end = idx; /* ... */ + break; + + case DW_LLE_GNU_start_end_entry: + if (locp >= locendp) + goto invalid_data; + get_uleb128 (idx, locp, locendp); + if (get_indexed_addr (cu, idx, &begin) != 0) + begin = idx; /* ... */ + if (locp >= locendp) + goto invalid_data; + get_uleb128 (idx, locp, locendp); + if (get_indexed_addr (cu, idx, &end) != 0) + end = idx; /* ... */ + use_base = false; + break; + + case DW_LLE_GNU_start_length_entry: + if (locp >= locendp) + goto invalid_data; + get_uleb128 (idx, locp, locendp); + if (get_indexed_addr (cu, idx, &begin) != 0) + begin = idx; /* ... */ + if (locendp - locp < 4) + goto invalid_data; + end = read_4ubyte_unaligned_inc (dbg, locp); + end += begin; + use_base = false; + break; + + default: + goto invalid_data; + } + + readp = (unsigned char *) locp; + } + else if (address_size == 8) { begin = read_8ubyte_unaligned_inc (dbg, readp); end = read_8ubyte_unaligned_inc (dbg, readp); @@ -7063,15 +9439,15 @@ print_debug_loc_section (Dwfl_Module *dwflmod, if (begin == (Dwarf_Addr) -1l) /* Base address entry. */ { - char *b = format_dwarf_addr (dwflmod, address_size, end, end); - printf (gettext (" [%6tx] base address %s\n"), offset, b); - free (b); + printf (gettext (" [%6tx] base address\n "), offset); + print_dwarf_addr (dwflmod, address_size, end, end); + printf ("\n"); base = end; } else if (begin == 0 && end == 0) /* End of list entry. */ { if (first) - printf (gettext (" [%6tx] empty list\n"), offset); + printf (gettext (" [%6tx] empty list\n"), offset); first = true; } else @@ -7079,18 +9455,22 @@ print_debug_loc_section (Dwfl_Module *dwflmod, /* We have a location expression entry. */ uint_fast16_t len = read_2ubyte_unaligned_inc (dbg, readp); - char *b = format_dwarf_addr (dwflmod, address_size, base + begin, - begin); - char *e = format_dwarf_addr (dwflmod, address_size, base + end, - end); - if (first) /* First entry in a list. */ - printf (gettext (" [%6tx] %s..%s"), offset, b, e); + printf (" [%6tx] ", offset); else - printf (gettext (" %s..%s"), b, e); + printf (" "); - free (b); - free (e); + printf ("range %" PRIx64 ", %" PRIx64 "\n", begin, end); + if (! print_unresolved_addresses) + { + Dwarf_Addr dab = use_base ? base + begin : begin; + Dwarf_Addr dae = use_base ? base + end : end; + printf (" "); + print_dwarf_addr (dwflmod, address_size, dab, dab); + printf ("..\n "); + print_dwarf_addr (dwflmod, address_size, dae - 1, dae); + printf ("\n"); + } if (endp - readp <= (ptrdiff_t) len) { @@ -7098,8 +9478,9 @@ print_debug_loc_section (Dwfl_Module *dwflmod, break; } - print_ops (dwflmod, dbg, 1, 18 + (address_size * 4), - 3 /*XXX*/, address_size, offset_size, cu, len, readp); + print_ops (dwflmod, dbg, 11, 11, + cu != NULL ? cu->version : 3, + address_size, offset_size, cu, len, readp); first = false; readp += len; @@ -7143,8 +9524,9 @@ print_debug_macinfo_section (Dwfl_Module *dwflmod __attribute__ ((unused)), /* There is no function in libdw to iterate over the raw content of the section but it is easy enough to do. */ - Elf_Data *data = dbg->sectiondata[IDX_debug_macinfo]; - if (unlikely (data == NULL || data->d_buf == NULL)) + Elf_Data *data = (dbg->sectiondata[IDX_debug_macinfo] + ?: elf_rawdata (scn, NULL)); + if (unlikely (data == NULL)) { error (0, 0, gettext ("cannot get macro information section data: %s"), elf_errmsg (-1)); @@ -7305,8 +9687,9 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), (uint64_t) shdr->sh_offset); putc_unlocked ('\n', stdout); - Elf_Data *data = dbg->sectiondata[IDX_debug_macro]; - if (unlikely (data == NULL || data->d_buf == NULL)) + Elf_Data *data = (dbg->sectiondata[IDX_debug_macro] + ?: elf_rawdata (scn, NULL)); + if (unlikely (data == NULL)) { error (0, 0, gettext ("cannot get macro information section data: %s"), elf_errmsg (-1)); @@ -7365,7 +9748,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), // Version 4 is the GNU extension for DWARF4. DWARF5 will use version // 5 when it gets standardized. - if (vers != 4) + if (vers != 4 && vers != 5) { printf (gettext (" unknown version, cannot parse section\n")); return; @@ -7389,7 +9772,19 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), line_offset); } - const unsigned char *vendor[DW_MACRO_GNU_hi_user - DW_MACRO_GNU_lo_user]; + struct mac_culist *cu = NULL; + if (line_offset != (Dwarf_Off) -1) + { + cu = culist; + while (cu != NULL && line_offset != cu->offset) + cu = cu->next; + } + + Dwarf_Off str_offsets_base = str_offsets_base_off (dbg, (cu != NULL + ? cu->die.cu + : NULL)); + + const unsigned char *vendor[DW_MACRO_hi_user - DW_MACRO_lo_user + 1]; memset (vendor, 0, sizeof vendor); if (flag & 0x04) { @@ -7406,12 +9801,12 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), goto invalid_data; unsigned int opcode = *readp++; printf (gettext (" [%" PRIx8 "]"), opcode); - if (opcode < DW_MACRO_GNU_lo_user - || opcode > DW_MACRO_GNU_hi_user) + if (opcode < DW_MACRO_lo_user + || opcode > DW_MACRO_hi_user) goto invalid_data; // Record the start of description for this vendor opcode. // uleb128 nr args, 1 byte per arg form. - vendor[opcode - DW_MACRO_GNU_lo_user] = readp; + vendor[opcode - DW_MACRO_lo_user] = readp; if (readp + 1 > readendp) goto invalid_data; unsigned int args = *readp++; @@ -7423,21 +9818,8 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), if (readp + 1 > readendp) goto invalid_data; unsigned int form = *readp++; - printf (" %s", dwarf_form_string (form)); - if (form != DW_FORM_data1 - && form != DW_FORM_data2 - && form != DW_FORM_data4 - && form != DW_FORM_data8 - && form != DW_FORM_sdata - && form != DW_FORM_udata - && form != DW_FORM_block - && form != DW_FORM_block1 - && form != DW_FORM_block2 - && form != DW_FORM_block4 - && form != DW_FORM_flag - && form != DW_FORM_string - && form != DW_FORM_strp - && form != DW_FORM_sec_offset) + printf (" %s", dwarf_form_name (form)); + if (! libdw_valid_user_form (form)) goto invalid_data; args--; if (args > 0) @@ -7464,7 +9846,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), switch (opcode) { - case DW_MACRO_GNU_start_file: + case DW_MACRO_start_file: get_uleb128 (u128, readp, readendp); if (readp >= readendp) goto invalid_data; @@ -7472,34 +9854,28 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), /* Find the CU DIE that matches this line offset. */ const char *fname = "???"; - if (line_offset != (Dwarf_Off) -1) + if (cu != NULL) { - struct mac_culist *cu = culist; - while (cu != NULL && line_offset != cu->offset) - cu = cu->next; - if (cu != NULL) - { - if (cu->files == NULL - && dwarf_getsrcfiles (&cu->die, &cu->files, - NULL) != 0) - cu->files = (Dwarf_Files *) -1l; - - if (cu->files != (Dwarf_Files *) -1l) - fname = (dwarf_filesrc (cu->files, u128_2, - NULL, NULL) ?: "???"); - } + if (cu->files == NULL + && dwarf_getsrcfiles (&cu->die, &cu->files, + NULL) != 0) + cu->files = (Dwarf_Files *) -1l; + + if (cu->files != (Dwarf_Files *) -1l) + fname = (dwarf_filesrc (cu->files, u128_2, + NULL, NULL) ?: "???"); } printf ("%*sstart_file %u, [%u] %s\n", level, "", u128, u128_2, fname); ++level; break; - case DW_MACRO_GNU_end_file: + case DW_MACRO_end_file: --level; printf ("%*send_file\n", level, ""); break; - case DW_MACRO_GNU_define: + case DW_MACRO_define: get_uleb128 (u128, readp, readendp); endp = memchr (readp, '\0', readendp - readp); if (endp == NULL) @@ -7509,7 +9885,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), readp = endp + 1; break; - case DW_MACRO_GNU_undef: + case DW_MACRO_undef: get_uleb128 (u128, readp, readendp); endp = memchr (readp, '\0', readendp - readp); if (endp == NULL) @@ -7519,7 +9895,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), readp = endp + 1; break; - case DW_MACRO_GNU_define_indirect: + case DW_MACRO_define_strp: get_uleb128 (u128, readp, readendp); if (readp + offset_len > readendp) goto invalid_data; @@ -7531,7 +9907,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), level, "", dwarf_getstring (dbg, off, NULL), u128); break; - case DW_MACRO_GNU_undef_indirect: + case DW_MACRO_undef_strp: get_uleb128 (u128, readp, readendp); if (readp + offset_len > readendp) goto invalid_data; @@ -7543,7 +9919,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), level, "", dwarf_getstring (dbg, off, NULL), u128); break; - case DW_MACRO_GNU_transparent_include: + case DW_MACRO_import: if (readp + offset_len > readendp) goto invalid_data; if (offset_len == 8) @@ -7554,141 +9930,83 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)), level, "", off); break; + case DW_MACRO_define_sup: + get_uleb128 (u128, readp, readendp); + if (readp + offset_len > readendp) + goto invalid_data; + printf ("%*s#define ", level, ""); + readp = print_form_data (dbg, DW_FORM_strp_sup, + readp, readendp, offset_len, + str_offsets_base); + printf (", line %u (sup)\n", u128); + break; + + case DW_MACRO_undef_sup: + get_uleb128 (u128, readp, readendp); + if (readp + offset_len > readendp) + goto invalid_data; + printf ("%*s#undef ", level, ""); + readp = print_form_data (dbg, DW_FORM_strp_sup, + readp, readendp, offset_len, + str_offsets_base); + printf (", line %u (sup)\n", u128); + break; + + case DW_MACRO_import_sup: + if (readp + offset_len > readendp) + goto invalid_data; + if (offset_len == 8) + off = read_8ubyte_unaligned_inc (dbg, readp); + else + off = read_4ubyte_unaligned_inc (dbg, readp); + // XXX Needs support for reading from supplementary object file. + printf ("%*s#include offset 0x%" PRIx64 " (sup)\n", + level, "", off); + break; + + case DW_MACRO_define_strx: + get_uleb128 (u128, readp, readendp); + if (readp + offset_len > readendp) + goto invalid_data; + printf ("%*s#define ", level, ""); + readp = print_form_data (dbg, DW_FORM_strx, + readp, readendp, offset_len, + str_offsets_base); + printf (", line %u (strx)\n", u128); + break; + + case DW_MACRO_undef_strx: + get_uleb128 (u128, readp, readendp); + if (readp + offset_len > readendp) + goto invalid_data; + printf ("%*s#undef ", level, ""); + readp = print_form_data (dbg, DW_FORM_strx, + readp, readendp, offset_len, + str_offsets_base); + printf (", line %u (strx)\n", u128); + break; + default: printf ("%*svendor opcode 0x%" PRIx8, level, "", opcode); - if (opcode < DW_MACRO_GNU_lo_user - || opcode > DW_MACRO_GNU_lo_user - || vendor[opcode - DW_MACRO_GNU_lo_user] == NULL) + if (opcode < DW_MACRO_lo_user + || opcode > DW_MACRO_lo_user + || vendor[opcode - DW_MACRO_lo_user] == NULL) goto invalid_data; const unsigned char *op_desc; - op_desc = vendor[opcode - DW_MACRO_GNU_lo_user]; + op_desc = vendor[opcode - DW_MACRO_lo_user]; // Just skip the arguments, we cannot really interpret them, // but print as much as we can. unsigned int args = *op_desc++; - while (args > 0) + while (args > 0 && readp < readendp) { unsigned int form = *op_desc++; - Dwarf_Word val; - switch (form) - { - case DW_FORM_data1: - if (readp + 1 > readendp) - goto invalid_data; - val = *readp++; - printf (" %" PRIx8, (unsigned int) val); - break; - - case DW_FORM_data2: - if (readp + 2 > readendp) - goto invalid_data; - val = read_2ubyte_unaligned_inc (dbg, readp); - printf(" %" PRIx16, (unsigned int) val); - break; - - case DW_FORM_data4: - if (readp + 4 > readendp) - goto invalid_data; - val = read_4ubyte_unaligned_inc (dbg, readp); - printf (" %" PRIx32, (unsigned int) val); - break; - - case DW_FORM_data8: - if (readp + 8 > readendp) - goto invalid_data; - val = read_8ubyte_unaligned_inc (dbg, readp); - printf (" %" PRIx64, val); - break; - - case DW_FORM_sdata: - get_sleb128 (val, readp, readendp); - printf (" %" PRIx64, val); - break; - - case DW_FORM_udata: - get_uleb128 (val, readp, readendp); - printf (" %" PRIx64, val); - break; - - case DW_FORM_block: - get_uleb128 (val, readp, readendp); - printf (" block[%" PRIu64 "]", val); - if (readp + val > readendp) - goto invalid_data; - readp += val; - break; - - case DW_FORM_block1: - if (readp + 1 > readendp) - goto invalid_data; - val = *readp++; - printf (" block[%" PRIu64 "]", val); - if (readp + val > readendp) - goto invalid_data; - break; - - case DW_FORM_block2: - if (readp + 2 > readendp) - goto invalid_data; - val = read_2ubyte_unaligned_inc (dbg, readp); - printf (" block[%" PRIu64 "]", val); - if (readp + val > readendp) - goto invalid_data; - break; - - case DW_FORM_block4: - if (readp + 2 > readendp) - goto invalid_data; - val =read_4ubyte_unaligned_inc (dbg, readp); - printf (" block[%" PRIu64 "]", val); - if (readp + val > readendp) - goto invalid_data; - break; - - case DW_FORM_flag: - if (readp + 1 > readendp) - goto invalid_data; - val = *readp++; - printf (" %s", nl_langinfo (val != 0 ? YESSTR : NOSTR)); - break; - - case DW_FORM_string: - endp = memchr (readp, '\0', readendp - readp); - if (endp == NULL) - goto invalid_data; - printf (" %s", readp); - readp = endp + 1; - break; - - case DW_FORM_strp: - if (readp + offset_len > readendp) - goto invalid_data; - if (offset_len == 8) - val = read_8ubyte_unaligned_inc (dbg, readp); - else - val = read_4ubyte_unaligned_inc (dbg, readp); - printf (" %s", dwarf_getstring (dbg, val, NULL)); - break; - - case DW_FORM_sec_offset: - if (readp + offset_len > readendp) - goto invalid_data; - if (offset_len == 8) - val = read_8ubyte_unaligned_inc (dbg, readp); - else - val = read_4ubyte_unaligned_inc (dbg, readp); - printf (" %" PRIx64, val); - break; - - default: - error (0, 0, gettext ("vendor opcode not verified?")); - return; - } - + readp = print_form_data (dbg, form, readp, readendp, + offset_len, str_offsets_base); args--; if (args > 0) - putchar_unlocked (','); + printf (", "); } putchar_unlocked ('\n'); } @@ -7736,10 +10054,11 @@ print_debug_pubnames_section (Dwfl_Module *dwflmod __attribute__ ((unused)), static void print_debug_str_section (Dwfl_Module *dwflmod __attribute__ ((unused)), Ebl *ebl, GElf_Ehdr *ehdr, - Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg) + Elf_Scn *scn, GElf_Shdr *shdr, + Dwarf *dbg __attribute__ ((unused))) { - const size_t sh_size = (dbg->sectiondata[IDX_debug_str] ? - dbg->sectiondata[IDX_debug_str]->d_size : 0); + Elf_Data *data = elf_rawdata (scn, NULL); + const size_t sh_size = data ? data->d_size : 0; /* Compute floor(log16(shdr->sh_size)). */ GElf_Addr tmp = sh_size; @@ -7762,20 +10081,207 @@ print_debug_str_section (Dwfl_Module *dwflmod __attribute__ ((unused)), while (offset < sh_size) { size_t len; - const char *str = dwarf_getstring (dbg, offset, &len); - if (unlikely (str == NULL)) + const char *str = (const char *) data->d_buf + offset; + const char *endp = memchr (str, '\0', sh_size - offset); + if (unlikely (endp == NULL)) { - printf (gettext (" *** error while reading strings: %s\n"), - dwarf_errmsg (-1)); + printf (gettext (" *** error, missing string terminator\n")); break; } printf (" [%*" PRIx64 "] \"%s\"\n", digits, (uint64_t) offset, str); - + len = endp - str; offset += len + 1; } } +static void +print_debug_str_offsets_section (Dwfl_Module *dwflmod __attribute__ ((unused)), + Ebl *ebl, GElf_Ehdr *ehdr, + Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg) +{ + printf (gettext ("\ +\nDWARF section [%2zu] '%s' at offset %#" PRIx64 ":\n"), + elf_ndxscn (scn), section_name (ebl, ehdr, shdr), + (uint64_t) shdr->sh_offset); + + if (shdr->sh_size == 0) + return; + + /* We like to get the section from libdw to make sure they are relocated. */ + Elf_Data *data = (dbg->sectiondata[IDX_debug_str_offsets] + ?: elf_rawdata (scn, NULL)); + if (unlikely (data == NULL)) + { + error (0, 0, gettext ("cannot get .debug_str_offsets section data: %s"), + elf_errmsg (-1)); + return; + } + + size_t idx = 0; + sort_listptr (&known_stroffbases, "str_offsets"); + + const unsigned char *start = (const unsigned char *) data->d_buf; + const unsigned char *readp = start; + const unsigned char *readendp = ((const unsigned char *) data->d_buf + + data->d_size); + + while (readp < readendp) + { + /* Most string offset tables will have a header. For split + dwarf unit GNU DebugFission didn't add one. But they were + also only defined for split units (main or skeleton units + didn't have indirect strings). So if we don't have a + DW_AT_str_offsets_base at all and this is offset zero, then + just start printing offsets immediately, if this is a .dwo + section. */ + Dwarf_Off off = (Dwarf_Off) (readp + - (const unsigned char *) data->d_buf); + + printf ("Table at offset %" PRIx64 " ", off); + + struct listptr *listptr = get_listptr (&known_stroffbases, idx++); + const unsigned char *next_unitp = readendp; + uint8_t offset_size; + bool has_header; + if (listptr == NULL) + { + /* This can happen for .dwo files. There is only an header + in the case this is a version 5 split DWARF file. */ + Dwarf_CU *cu; + uint8_t unit_type; + if (dwarf_get_units (dbg, NULL, &cu, NULL, &unit_type, + NULL, NULL) != 0) + { + error (0, 0, "Warning: Cannot find any DWARF unit."); + /* Just guess some values. */ + has_header = false; + offset_size = 4; + } + else if (off == 0 + && (unit_type == DW_UT_split_type + || unit_type == DW_UT_split_compile)) + { + has_header = cu->version > 4; + offset_size = cu->offset_size; + } + else + { + error (0, 0, + "Warning: No CU references .debug_str_offsets after %" + PRIx64, off); + has_header = cu->version > 4; + offset_size = cu->offset_size; + } + printf ("\n"); + } + else + { + /* This must be DWARF5, since GNU DebugFission didn't define + DW_AT_str_offsets_base. */ + has_header = true; + + Dwarf_Die cudie; + if (dwarf_cu_die (listptr->cu, &cudie, + NULL, NULL, NULL, NULL, + NULL, NULL) == NULL) + printf ("Unknown CU (%s):\n", dwarf_errmsg (-1)); + else + printf ("for CU [%6" PRIx64 "]:\n", dwarf_dieoffset (&cudie)); + } + + if (has_header) + { + uint64_t unit_length; + uint16_t version; + uint16_t padding; + + unit_length = read_4ubyte_unaligned_inc (dbg, readp); + if (unlikely (unit_length == 0xffffffff)) + { + if (unlikely (readp > readendp - 8)) + { + invalid_data: + error (0, 0, "Invalid data"); + return; + } + unit_length = read_8ubyte_unaligned_inc (dbg, readp); + offset_size = 8; + } + else + offset_size = 4; + + printf ("\n"); + printf (gettext (" Length: %8" PRIu64 "\n"), + unit_length); + printf (gettext (" Offset size: %8" PRIu8 "\n"), + offset_size); + + /* We need at least 2-bytes (version) + 2-bytes (padding) = + 4 bytes to complete the header. And this unit cannot go + beyond the section data. */ + if (readp > readendp - 4 + || unit_length < 4 + || unit_length > (uint64_t) (readendp - readp)) + goto invalid_data; + + next_unitp = readp + unit_length; + + version = read_2ubyte_unaligned_inc (dbg, readp); + printf (gettext (" DWARF version: %8" PRIu16 "\n"), version); + + if (version != 5) + { + error (0, 0, gettext ("Unknown version")); + goto next_unit; + } + + padding = read_2ubyte_unaligned_inc (dbg, readp); + printf (gettext (" Padding: %8" PRIx16 "\n"), padding); + + if (listptr != NULL + && listptr->offset != (Dwarf_Off) (readp - start)) + { + error (0, 0, "String offsets index doesn't start after header"); + goto next_unit; + } + + printf ("\n"); + } + + int digits = 1; + size_t offsets = (next_unitp - readp) / offset_size; + while (offsets >= 10) + { + ++digits; + offsets /= 10; + } + + unsigned int uidx = 0; + size_t index_offset = readp - (const unsigned char *) data->d_buf; + printf (" Offsets start at 0x%zx:\n", index_offset); + while (readp <= next_unitp - offset_size) + { + Dwarf_Word offset; + if (offset_size == 4) + offset = read_4ubyte_unaligned_inc (dbg, readp); + else + offset = read_8ubyte_unaligned_inc (dbg, readp); + const char *str = dwarf_getstring (dbg, offset, NULL); + printf (" [%*u] [%*" PRIx64 "] \"%s\"\n", + digits, uidx++, (int) offset_size * 2, offset, str ?: "???"); + } + printf ("\n"); + + if (readp != next_unitp) + error (0, 0, "extra %zd bytes at end of unit", + (size_t) (next_unitp - readp)); + + next_unit: + readp = next_unitp; + } +} + /* Print the content of the call frame search table section '.eh_frame_hdr'. */ @@ -8222,12 +10728,11 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, uint32_t idx = read_4ubyte_unaligned (dbg, readp); readp += 4; - char *l = format_dwarf_addr (dwflmod, 8, low, low); - char *h = format_dwarf_addr (dwflmod, 8, high - 1, high); - printf (" [%4zu] %s..%s, CU index: %5" PRId32 "\n", - n, l, h, idx); - free (l); - free (h); + printf (" [%4zu] ", n); + print_dwarf_addr (dwflmod, 8, low, low); + printf (".."); + print_dwarf_addr (dwflmod, 8, high - 1, high); + printf (", CU index: %5" PRId32 "\n", idx); n++; } @@ -8312,9 +10817,60 @@ print_gdb_index_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, } } +/* Returns true and sets split DWARF CU id if there is a split compile + unit in the given Dwarf, and no non-split units are found (before it). */ +static bool +is_split_dwarf (Dwarf *dbg, uint64_t *id, Dwarf_CU **split_cu) +{ + Dwarf_CU *cu = NULL; + while (dwarf_get_units (dbg, cu, &cu, NULL, NULL, NULL, NULL) == 0) + { + uint8_t unit_type; + if (dwarf_cu_info (cu, NULL, &unit_type, NULL, NULL, + id, NULL, NULL) != 0) + return false; + + if (unit_type != DW_UT_split_compile && unit_type != DW_UT_split_type) + return false; + + /* We really only care about the split compile unit, the types + should be fine and self sufficient. Also they don't have an + id that we can match with a skeleton unit. */ + if (unit_type == DW_UT_split_compile) + { + *split_cu = cu; + return true; + } + } + + return false; +} + +/* Check that there is one and only one Dwfl_Module, return in arg. */ +static int +getone_dwflmod (Dwfl_Module *dwflmod, + void **userdata __attribute__ ((unused)), + const char *name __attribute__ ((unused)), + Dwarf_Addr base __attribute__ ((unused)), + void *arg) +{ + Dwfl_Module **m = (Dwfl_Module **) arg; + if (*m != NULL) + return DWARF_CB_ABORT; + *m = dwflmod; + return DWARF_CB_OK; +} + static void print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) { + /* Used for skeleton file, if necessary for split DWARF. */ + Dwfl *skel_dwfl = NULL; + Dwfl_Module *skel_mod = NULL; + char *skel_name = NULL; + Dwarf *split_dbg = NULL; + Dwarf_CU *split_cu = NULL; + /* Before we start the real work get a debug context descriptor. */ Dwarf_Addr dwbias; Dwarf *dbg = dwfl_module_getdwarf (dwflmod, &dwbias); @@ -8330,6 +10886,141 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) dwfl_errmsg (-1)); dbg = &dummy_dbg; } + else + { + /* If we are asked about a split dwarf (.dwo) file, use the user + provided, or find the corresponding skeleton file. If we got + a skeleton file, replace the given dwflmod and dbg, with one + derived from the skeleton file to provide enough context. */ + uint64_t split_id; + if (is_split_dwarf (dbg, &split_id, &split_cu)) + { + if (dwarf_skeleton != NULL) + skel_name = strdup (dwarf_skeleton); + else + { + /* Replace file.dwo with file.o and see if that matches. */ + const char *fname; + dwfl_module_info (dwflmod, NULL, NULL, NULL, NULL, NULL, + &fname, NULL); + if (fname != NULL) + { + size_t flen = strlen (fname); + if (flen > 4 && strcmp (".dwo", fname + flen - 4) == 0) + { + skel_name = strdup (fname); + if (skel_name != NULL) + { + skel_name[flen - 3] = 'o'; + skel_name[flen - 2] = '\0'; + } + } + } + } + + if (skel_name != NULL) + { + int skel_fd = open (skel_name, O_RDONLY); + if (skel_fd == -1) + fprintf (stderr, "Warning: Couldn't open DWARF skeleton file" + " '%s'\n", skel_name); + else + skel_dwfl = create_dwfl (skel_fd, skel_name); + + if (skel_dwfl != NULL) + { + if (dwfl_getmodules (skel_dwfl, &getone_dwflmod, + &skel_mod, 0) != 0) + { + fprintf (stderr, "Warning: Bad DWARF skeleton," + " multiple modules '%s'\n", skel_name); + dwfl_end (skel_dwfl); + skel_mod = NULL; + } + } + else if (skel_fd != -1) + fprintf (stderr, "Warning: Couldn't create skeleton dwfl for" + " '%s': %s\n", skel_name, dwfl_errmsg (-1)); + + if (skel_mod != NULL) + { + Dwarf *skel_dbg = dwfl_module_getdwarf (skel_mod, &dwbias); + if (skel_dbg != NULL) + { + /* First check the skeleton CU DIE, only fetch + the split DIE if we know the id matches to + not unnecessary search for any split DIEs we + don't need. */ + Dwarf_CU *cu = NULL; + while (dwarf_get_units (skel_dbg, cu, &cu, + NULL, NULL, NULL, NULL) == 0) + { + uint8_t unit_type; + uint64_t skel_id; + if (dwarf_cu_info (cu, NULL, &unit_type, NULL, NULL, + &skel_id, NULL, NULL) == 0 + && unit_type == DW_UT_skeleton + && split_id == skel_id) + { + Dwarf_Die subdie; + if (dwarf_cu_info (cu, NULL, NULL, NULL, + &subdie, + NULL, NULL, NULL) == 0 + && dwarf_tag (&subdie) != DW_TAG_invalid) + { + split_dbg = dwarf_cu_getdwarf (subdie.cu); + if (split_dbg == NULL) + fprintf (stderr, + "Warning: Couldn't get split_dbg:" + " %s\n", dwarf_errmsg (-1)); + break; + } + else + { + /* Everything matches up, but not + according to libdw. Which means + the user knew better. So... + Terrible hack... We can never + destroy the underlying dwfl + because it would free the wrong + Dwarfs... So we leak memory...*/ + if (cu->split == NULL + && dwarf_skeleton != NULL) + { + do_not_close_dwfl = true; + __libdw_link_skel_split (cu, split_cu); + split_dbg = dwarf_cu_getdwarf (split_cu); + break; + } + else + fprintf (stderr, "Warning: Couldn't get" + " skeleton subdie: %s\n", + dwarf_errmsg (-1)); + } + } + } + if (split_dbg == NULL) + fprintf (stderr, "Warning: '%s' didn't contain a skeleton for split id %" PRIx64 "\n", skel_name, split_id); + } + else + fprintf (stderr, "Warning: Couldn't get skeleton DWARF:" + " %s\n", dwfl_errmsg (-1)); + } + } + + if (split_dbg != NULL) + { + dbg = split_dbg; + dwflmod = skel_mod; + } + else if (skel_name == NULL) + fprintf (stderr, + "Warning: split DWARF file, but no skeleton found.\n"); + } + else if (dwarf_skeleton != NULL) + fprintf (stderr, "Warning: DWARF skeleton given," + " but not a split DWARF file\n"); + } /* Get the section header string table index. */ size_t shstrndx; @@ -8337,6 +11028,42 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) error (EXIT_FAILURE, 0, gettext ("cannot get section header string table index")); + /* If the .debug_info section is listed as implicitly required then + we must make sure to handle it before handling any other debug + section. Various other sections depend on the CU DIEs being + scanned (silently) first. */ + bool implicit_info = (implicit_debug_sections & section_info) != 0; + bool explicit_info = (print_debug_sections & section_info) != 0; + if (implicit_info) + { + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (ebl->elf, scn)) != NULL) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + + if (shdr != NULL && shdr->sh_type == SHT_PROGBITS) + { + const char *name = elf_strptr (ebl->elf, shstrndx, + shdr->sh_name); + if (name == NULL) + continue; + + if (strcmp (name, ".debug_info") == 0 + || strcmp (name, ".debug_info.dwo") == 0 + || strcmp (name, ".zdebug_info") == 0 + || strcmp (name, ".zdebug_info.dwo") == 0) + { + print_debug_info_section (dwflmod, ebl, ehdr, + scn, shdr, dbg); + break; + } + } + } + print_debug_sections &= ~section_info; + implicit_debug_sections &= ~section_info; + } + /* Look through all the sections for the debugging sections to print. */ Elf_Scn *scn = NULL; while ((scn = elf_nextscn (ebl->elf, scn)) != NULL) @@ -8357,17 +11084,30 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) #define NEW_SECTION(name) \ { ".debug_" #name, section_##name, print_debug_##name##_section } NEW_SECTION (abbrev), + NEW_SECTION (addr), NEW_SECTION (aranges), NEW_SECTION (frame), NEW_SECTION (info), NEW_SECTION (types), NEW_SECTION (line), NEW_SECTION (loc), + /* loclists is loc for DWARF5. */ + { ".debug_loclists", section_loc, + print_debug_loclists_section }, NEW_SECTION (pubnames), NEW_SECTION (str), + /* A DWARF5 specialised debug string section. */ + { ".debug_line_str", section_str, + print_debug_str_section }, + /* DWARF5 string offsets table. */ + { ".debug_str_offsets", section_str, + print_debug_str_offsets_section }, NEW_SECTION (macinfo), NEW_SECTION (macro), NEW_SECTION (ranges), + /* rnglists is ranges for DWARF5. */ + { ".debug_rnglists", section_ranges, + print_debug_rnglists_section }, { ".eh_frame", section_frame | section_exception, print_debug_frame_section }, { ".eh_frame_hdr", section_frame | section_exception, @@ -8385,22 +11125,45 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr) int n; for (n = 0; n < ndebug_sections; ++n) - if (strcmp (name, debug_sections[n].name) == 0 - || (name[0] == '.' && name[1] == 'z' - && debug_sections[n].name[1] == 'd' - && strcmp (&name[2], &debug_sections[n].name[1]) == 0) - ) - { - if ((print_debug_sections | implicit_debug_sections) - & debug_sections[n].bitmask) - debug_sections[n].fp (dwflmod, ebl, ehdr, scn, shdr, dbg); - break; - } + { + size_t dbglen = strlen (debug_sections[n].name); + size_t scnlen = strlen (name); + if ((strncmp (name, debug_sections[n].name, dbglen) == 0 + && (dbglen == scnlen + || (scnlen == dbglen + 4 + && strstr (name, ".dwo") == name + dbglen))) + || (name[0] == '.' && name[1] == 'z' + && debug_sections[n].name[1] == 'd' + && strncmp (&name[2], &debug_sections[n].name[1], + dbglen - 1) == 0 + && (scnlen == dbglen + 1 + || (scnlen == dbglen + 5 + && strstr (name, ".dwo") == name + dbglen + 1)))) + { + if ((print_debug_sections | implicit_debug_sections) + & debug_sections[n].bitmask) + debug_sections[n].fp (dwflmod, ebl, ehdr, scn, shdr, dbg); + break; + } + } } } - reset_listptr (&known_loclistptr); + dwfl_end (skel_dwfl); + free (skel_name); + + /* Turn implicit and/or explicit back on in case we go over another file. */ + if (implicit_info) + implicit_debug_sections |= section_info; + if (explicit_info) + print_debug_sections |= section_info; + + reset_listptr (&known_locsptr); + reset_listptr (&known_loclistsptr); reset_listptr (&known_rangelistptr); + reset_listptr (&known_rnglistptr); + reset_listptr (&known_addrbases); + reset_listptr (&known_stroffbases); } @@ -9134,7 +11897,7 @@ handle_auxv_note (Ebl *ebl, Elf *core, GElf_Word descsz, GElf_Off desc_pos) printf (" %s\n", name); break; } - /* Fall through */ + FALLTHROUGH; case 'x': /* hex */ case 'p': /* address */ case 's': /* address of string */ @@ -9243,10 +12006,10 @@ handle_siginfo_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos) if (si_code > 0) switch (si_signo) { - case SIGILL: - case SIGFPE: - case SIGSEGV: - case SIGBUS: + case CORE_SIGILL: + case CORE_SIGFPE: + case CORE_SIGSEGV: + case CORE_SIGBUS: { uint64_t addr; if (! buf_read_ulong (core, &ptr, end, &addr)) @@ -9257,7 +12020,7 @@ handle_siginfo_note (Elf *core, GElf_Word descsz, GElf_Off desc_pos) default: ; } - else if (si_code == SI_USER) + else if (si_code == CORE_SI_USER) { int pid, uid; if (! buf_read_int (core, &ptr, end, &pid) @@ -9365,7 +12128,7 @@ handle_notes_data (Ebl *ebl, const GElf_Ehdr *ehdr, && (offset = gelf_getnote (data, offset, &nhdr, &name_offset, &desc_offset)) > 0) { - const char *name = data->d_buf + name_offset; + const char *name = nhdr.n_namesz == 0 ? "" : data->d_buf + name_offset; const char *desc = data->d_buf + desc_offset; char buf[100]; @@ -9419,9 +12182,9 @@ handle_notes_data (Ebl *ebl, const GElf_Ehdr *ehdr, return; bad_note: - error (EXIT_FAILURE, 0, - gettext ("cannot get content of note section: %s"), - elf_errmsg (-1)); + error (0, 0, + gettext ("cannot get content of note: %s"), + data != NULL ? "garbage data" : elf_errmsg (-1)); } static void diff --git a/src/size.c b/src/size.c index ad8dbcbb..5ff3f2af 100644 --- a/src/size.c +++ b/src/size.c @@ -21,7 +21,6 @@ #endif #include -#include #include #include #include diff --git a/src/stack.c b/src/stack.c index 6f2ff69f..c5f347e1 100644 --- a/src/stack.c +++ b/src/stack.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -362,7 +361,7 @@ print_frames (struct frames *frames, pid_t tid, int dwflerr, const char *what) if (frames->frames > 0) frames_shown = true; - printf ("TID %d:\n", tid); + printf ("TID %lld:\n", (long long) tid); int frame_nr = 0; for (int nr = 0; nr < frames->frames && (maxframes == 0 || frame_nr < maxframes); nr++) @@ -419,8 +418,8 @@ print_frames (struct frames *frames, pid_t tid, int dwflerr, const char *what) } if (frames->frames > 0 && frame_nr == maxframes) - error (0, 0, "tid %d: shown max number of frames " - "(%d, use -n 0 for unlimited)", tid, maxframes); + error (0, 0, "tid %lld: shown max number of frames " + "(%d, use -n 0 for unlimited)", (long long) tid, maxframes); else if (dwflerr != 0) { if (frames->frames > 0) @@ -440,11 +439,12 @@ print_frames (struct frames *frames, pid_t tid, int dwflerr, const char *what) else modname = ""; } - error (0, 0, "%s tid %d at 0x%" PRIx64 " in %s: %s", what, tid, - pc_adjusted, modname, dwfl_errmsg (dwflerr)); + error (0, 0, "%s tid %lld at 0x%" PRIx64 " in %s: %s", what, + (long long) tid, pc_adjusted, modname, dwfl_errmsg (dwflerr)); } else - error (0, 0, "%s tid %d: %s", what, tid, dwfl_errmsg (dwflerr)); + error (0, 0, "%s tid %lld: %s", what, (long long) tid, + dwfl_errmsg (dwflerr)); } } @@ -575,10 +575,11 @@ parse_opt (int key, char *arg __attribute__ ((unused)), int err = dwfl_linux_proc_report (dwfl, pid); if (err < 0) - error (EXIT_BAD, 0, "dwfl_linux_proc_report pid %d: %s", pid, - dwfl_errmsg (-1)); + error (EXIT_BAD, 0, "dwfl_linux_proc_report pid %lld: %s", + (long long) pid, dwfl_errmsg (-1)); else if (err > 0) - error (EXIT_BAD, err, "dwfl_linux_proc_report pid %d", pid); + error (EXIT_BAD, err, "dwfl_linux_proc_report pid %lld", + (long long) pid); } if (core != NULL) @@ -597,10 +598,11 @@ parse_opt (int key, char *arg __attribute__ ((unused)), { int err = dwfl_linux_proc_attach (dwfl, pid, false); if (err < 0) - error (EXIT_BAD, 0, "dwfl_linux_proc_attach pid %d: %s", pid, - dwfl_errmsg (-1)); + error (EXIT_BAD, 0, "dwfl_linux_proc_attach pid %lld: %s", + (long long) pid, dwfl_errmsg (-1)); else if (err > 0) - error (EXIT_BAD, err, "dwfl_linux_proc_attach pid %d", pid); + error (EXIT_BAD, err, "dwfl_linux_proc_attach pid %lld", + (long long) pid); } if (core != NULL) @@ -675,7 +677,8 @@ main (int argc, char **argv) { .options = options, .parser = parse_opt, - .doc = N_("Print a stack for each thread in a process or core file.\v\ + .doc = N_("Print a stack for each thread in a process or core file.\n\ +\n\ Program exits with return code 0 if all frames were shown without \ any errors. If some frames were shown, but there were some non-fatal \ errors, possibly causing an incomplete backtrace, the program exits \ @@ -688,7 +691,7 @@ invoked with bad or missing arguments it will exit with return code 64.") if (show_modules) { - printf ("PID %d - %s module memory map\n", dwfl_pid (dwfl), + printf ("PID %lld - %s module memory map\n", (long long) dwfl_pid (dwfl), pid != 0 ? "process" : "core"); if (dwfl_getmodules (dwfl, module_callback, NULL, 0) != 0) error (EXIT_BAD, 0, "dwfl_getmodules: %s", dwfl_errmsg (-1)); @@ -721,7 +724,8 @@ invoked with bad or missing arguments it will exit with return code 64.") } else { - printf ("PID %d - %s\n", dwfl_pid (dwfl), pid != 0 ? "process" : "core"); + printf ("PID %lld - %s\n", (long long) dwfl_pid (dwfl), + pid != 0 ? "process" : "core"); switch (dwfl_getthreads (dwfl, thread_callback, &frames)) { case DWARF_CB_OK: diff --git a/src/strings.c b/src/strings.c index d214356c..ef40d5ec 100644 --- a/src/strings.c +++ b/src/strings.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -246,7 +245,7 @@ parse_opt (int key, char *arg, case 'b': case 'B': big_endian = true; - /* FALLTHROUGH */ + FALLTHROUGH; case 'l': case 'L': diff --git a/src/strip.c b/src/strip.c index f7474418..1367de77 100644 --- a/src/strip.c +++ b/src/strip.c @@ -1,5 +1,5 @@ /* Discard section not used at runtime from object files. - Copyright (C) 2000-2012, 2014, 2015, 2016 Red Hat, Inc. + Copyright (C) 2000-2012, 2014, 2015, 2016, 2017 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper , 2000. @@ -24,8 +24,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -60,6 +60,7 @@ ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; #define OPT_PERMISSIVE 0x101 #define OPT_STRIP_SECTIONS 0x102 #define OPT_RELOC_DEBUG 0x103 +#define OPT_KEEP_SECTION 0x104 /* Definitions of arguments for argp functions. */ @@ -83,7 +84,8 @@ static const struct argp_option options[] = N_("Resolve all trivial relocations between debug sections if the removed sections are placed in a debug file (only relevant for ET_REL files, operation is not reversable, needs -f)"), 0 }, { "remove-comment", OPT_REMOVE_COMMENT, NULL, 0, N_("Remove .comment section"), 0 }, - { "remove-section", 'R', "SECTION", OPTION_HIDDEN, NULL, 0 }, + { "remove-section", 'R', "SECTION", 0, N_("Remove the named section. SECTION is an extended wildcard pattern. May be given more than once. Only non-allocated sections can be removed."), 0 }, + { "keep-section", OPT_KEEP_SECTION, "SECTION", 0, N_("Keep the named section. SECTION is an extended wildcard pattern. May be given more than once."), 0 }, { "permissive", OPT_PERMISSIVE, NULL, 0, N_("Relax a few rules to handle slightly broken ELF files"), 0 }, { NULL, 0, NULL, 0, NULL, 0 } @@ -157,6 +159,58 @@ static bool permissive; /* If true perform relocations between debug sections. */ static bool reloc_debug; +/* Sections the user explicitly wants to keep or remove. */ +struct section_pattern +{ + char *pattern; + struct section_pattern *next; +}; + +static struct section_pattern *keep_secs = NULL; +static struct section_pattern *remove_secs = NULL; + +static void +add_pattern (struct section_pattern **patterns, const char *pattern) +{ + struct section_pattern *p = xmalloc (sizeof *p); + p->pattern = xstrdup (pattern); + p->next = *patterns; + *patterns = p; +} + +static void +free_sec_patterns (struct section_pattern *patterns) +{ + struct section_pattern *pattern = patterns; + while (pattern != NULL) + { + struct section_pattern *p = pattern; + pattern = p->next; + free (p->pattern); + free (p); + } +} + +static void +free_patterns (void) +{ + free_sec_patterns (keep_secs); + free_sec_patterns (remove_secs); +} + +static bool +section_name_matches (struct section_pattern *patterns, const char *name) +{ + struct section_pattern *pattern = patterns; + while (pattern != NULL) + { + if (fnmatch (pattern->pattern, name, FNM_EXTMATCH) == 0) + return true; + pattern = pattern->next; + } + return false; +} + int main (int argc, char *argv[]) @@ -207,6 +261,7 @@ Only one input file allowed together with '-o' and '-f'")); while (++remaining < argc); } + free_patterns (); return result; } @@ -257,14 +312,13 @@ parse_opt (int key, char *arg, struct argp_state *state) break; case 'R': - if (!strcmp (arg, ".comment")) + if (fnmatch (arg, ".comment", FNM_EXTMATCH) == 0) remove_comment = true; - else - { - argp_error (state, - gettext ("-R option supports only .comment section")); - return EINVAL; - } + add_pattern (&remove_secs, arg); + break; + + case OPT_KEEP_SECTION: + add_pattern (&keep_secs, arg); break; case 'g': @@ -284,6 +338,16 @@ parse_opt (int key, char *arg, struct argp_state *state) case 's': /* Ignored for compatibility. */ break; + case ARGP_KEY_SUCCESS: + if (remove_comment == true + && section_name_matches (keep_secs, ".comment")) + { + argp_error (state, + gettext ("cannot both keep and remove .comment section")); + return EINVAL; + } + break; + default: return ARGP_ERR_UNKNOWN; } @@ -597,6 +661,11 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, memset (shdr_info, '\0', (shnum + 2) * sizeof (struct shdr_info)); } + /* Track whether allocated sections all come before non-allocated ones. */ + bool seen_allocated = false; + bool seen_unallocated = false; + bool mixed_allocated_unallocated = false; + /* Prepare section information data structure. */ scn = NULL; cnt = 1; @@ -612,6 +681,17 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (gelf_getshdr (scn, &shdr_info[cnt].shdr) == NULL) INTERNAL_ERROR (fname); + /* Normally (in non-ET_REL files) we see all allocated sections first, + then all non-allocated. */ + if ((shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) == 0) + seen_unallocated = true; + else + { + if (seen_unallocated && seen_allocated) + mixed_allocated_unallocated = true; + seen_allocated = true; + } + /* Get the name of the section. */ shdr_info[cnt].name = elf_strptr (elf, shstrndx, shdr_info[cnt].shdr.sh_name); @@ -622,6 +702,28 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, goto fail_close; } + /* Sanity check the user. */ + if (section_name_matches (remove_secs, shdr_info[cnt].name)) + { + if ((shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) != 0) + { + error (0, 0, + gettext ("Cannot remove allocated section '%s'"), + shdr_info[cnt].name); + result = 1; + goto fail_close; + } + + if (section_name_matches (keep_secs, shdr_info[cnt].name)) + { + error (0, 0, + gettext ("Cannot both keep and remove section '%s'"), + shdr_info[cnt].name); + result = 1; + goto fail_close; + } + } + /* Mark them as present but not yet investigated. */ shdr_info[cnt].idx = 1; @@ -709,14 +811,22 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, know how to handle them - if a section is referred to from a section which is not removed in the sh_link or sh_info element it cannot be removed either + - the user might have explicitly said to remove or keep a section */ for (cnt = 1; cnt < shnum; ++cnt) - /* Check whether the section can be removed. */ + /* Check whether the section can be removed. Since we will create + a new .shstrtab assume it will be removed too. */ if (remove_shdrs ? !(shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) - : ebl_section_strip_p (ebl, ehdr, &shdr_info[cnt].shdr, - shdr_info[cnt].name, remove_comment, - remove_debug)) + : (ebl_section_strip_p (ebl, ehdr, &shdr_info[cnt].shdr, + shdr_info[cnt].name, remove_comment, + remove_debug) + || cnt == ehdr->e_shstrndx + || section_name_matches (remove_secs, shdr_info[cnt].name))) { + /* The user might want to explicitly keep this one. */ + if (section_name_matches (keep_secs, shdr_info[cnt].name)) + continue; + /* For now assume this section will be removed. */ shdr_info[cnt].idx = 0; @@ -865,8 +975,19 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, if (shdr_info[scnidx].idx == 0) /* This symbol table has a real symbol in a discarded section. So preserve the - original table in the debug file. */ - shdr_info[cnt].debug_data = symdata; + original table in the debug file. Unless + it is a redundant data marker to a debug + (data only) section. */ + if (! (ebl_section_strip_p (ebl, ehdr, + &shdr_info[scnidx].shdr, + shdr_info[scnidx].name, + remove_comment, + remove_debug) + && ebl_data_marker_symbol (ebl, sym, + elf_strptr (elf, + shdr_info[cnt].shdr.sh_link, + sym->st_name)))) + shdr_info[cnt].debug_data = symdata; } } @@ -1061,13 +1182,17 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, shdr_info[cnt].se = dwelf_strtab_add (shst, shdr_info[cnt].name); } - /* Test whether we are doing anything at all. */ - if (cnt == idx) - /* Nope, all removable sections are already gone. */ - goto fail_close; + /* Test whether we are doing anything at all. Either all removable + sections are already gone. Or the only section we would remove is + the .shstrtab section which we would add again. */ + bool removing_sections = !(cnt == idx + || (cnt == idx + 1 + && shdr_info[ehdr->e_shstrndx].idx == 0)); + if (output_fname == NULL && !removing_sections) + goto fail_close; - /* Create the reference to the file with the debug info. */ - if (debug_fname != NULL && !remove_shdrs) + /* Create the reference to the file with the debug info (if any). */ + if (debug_fname != NULL && !remove_shdrs && removing_sections) { /* Add the section header string table section name. */ shdr_info[cnt].se = dwelf_strtab_add_len (shst, ".gnu_debuglink", 15); @@ -1194,7 +1319,10 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, shdr_info[cnt].shdr.sh_name = dwelf_strent_off (shdr_info[cnt].se); /* Update the section header from the input file. Some fields - might be section indeces which now have to be adjusted. */ + might be section indeces which now have to be adjusted. Keep + the index to the "current" sh_link in case we need it to lookup + symbol table names. */ + size_t sh_link = shdr_info[cnt].shdr.sh_link; if (shdr_info[cnt].shdr.sh_link != 0) shdr_info[cnt].shdr.sh_link = shdr_info[shdr_info[cnt].shdr.sh_link].idx; @@ -1393,13 +1521,17 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* The symbol points to a section that is discarded but isn't preserved in the debug file. Check that this is a section or group signature symbol - for a section which has been removed. */ + for a section which has been removed. Or a special + data marker symbol to a debug section. */ { elf_assert (GELF_ST_TYPE (sym->st_info) == STT_SECTION || ((shdr_info[sidx].shdr.sh_type == SHT_GROUP) && (shdr_info[sidx].shdr.sh_info - == inner))); + == inner)) + || ebl_data_marker_symbol (ebl, sym, + elf_strptr (elf, sh_link, + sym->st_name))); } } @@ -1419,24 +1551,58 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, } } - /* If we have to, compute the offset of the section. */ - if (shdr_info[cnt].shdr.sh_offset == 0) - shdr_info[cnt].shdr.sh_offset - = ((lastoffset + shdr_info[cnt].shdr.sh_addralign - 1) - & ~((GElf_Off) (shdr_info[cnt].shdr.sh_addralign - 1))); - - /* Set the section header in the new file. */ - if (unlikely (gelf_update_shdr (scn, &shdr_info[cnt].shdr) == 0)) - /* There cannot be any overflows. */ - INTERNAL_ERROR (fname); + /* If we have to, compute the offset of the section. + If allocate and unallocated sections are mixed, we only update + the allocated ones now. The unallocated ones come second. */ + if (! mixed_allocated_unallocated + || (shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) != 0) + { + if (shdr_info[cnt].shdr.sh_offset == 0) + shdr_info[cnt].shdr.sh_offset + = ((lastoffset + shdr_info[cnt].shdr.sh_addralign - 1) + & ~((GElf_Off) (shdr_info[cnt].shdr.sh_addralign - 1))); + + /* Set the section header in the new file. */ + if (unlikely (gelf_update_shdr (scn, &shdr_info[cnt].shdr) == 0)) + /* There cannot be any overflows. */ + INTERNAL_ERROR (fname); - /* Remember the last section written so far. */ - GElf_Off filesz = (shdr_info[cnt].shdr.sh_type != SHT_NOBITS - ? shdr_info[cnt].shdr.sh_size : 0); - if (lastoffset < shdr_info[cnt].shdr.sh_offset + filesz) - lastoffset = shdr_info[cnt].shdr.sh_offset + filesz; + /* Remember the last section written so far. */ + GElf_Off filesz = (shdr_info[cnt].shdr.sh_type != SHT_NOBITS + ? shdr_info[cnt].shdr.sh_size : 0); + if (lastoffset < shdr_info[cnt].shdr.sh_offset + filesz) + lastoffset = shdr_info[cnt].shdr.sh_offset + filesz; + } } + /* We might have to update the unallocated sections after we done the + allocated ones. lastoffset is set to right after the last allocated + section. */ + if (mixed_allocated_unallocated) + for (cnt = 1; cnt <= shdridx; ++cnt) + if (shdr_info[cnt].idx > 0) + { + scn = elf_getscn (newelf, shdr_info[cnt].idx); + if ((shdr_info[cnt].shdr.sh_flags & SHF_ALLOC) == 0) + { + if (shdr_info[cnt].shdr.sh_offset == 0) + shdr_info[cnt].shdr.sh_offset + = ((lastoffset + shdr_info[cnt].shdr.sh_addralign - 1) + & ~((GElf_Off) (shdr_info[cnt].shdr.sh_addralign - 1))); + + /* Set the section header in the new file. */ + if (unlikely (gelf_update_shdr (scn, &shdr_info[cnt].shdr) == 0)) + /* There cannot be any overflows. */ + INTERNAL_ERROR (fname); + + /* Remember the last section written so far. */ + GElf_Off filesz = (shdr_info[cnt].shdr.sh_type != SHT_NOBITS + ? shdr_info[cnt].shdr.sh_size : 0); + if (lastoffset < shdr_info[cnt].shdr.sh_offset + filesz) + lastoffset = shdr_info[cnt].shdr.sh_offset + filesz; + } + } + /* Adjust symbol references if symbol tables changed. */ if (any_symtab_changes) /* Find all relocation sections which use this symbol table. */ @@ -1755,7 +1921,8 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Remove any relocations between debug sections in ET_REL for the debug file when requested. These relocations are always zero based between the unallocated sections. */ - if (debug_fname != NULL && reloc_debug && ehdr->e_type == ET_REL) + if (debug_fname != NULL && removing_sections + && reloc_debug && ehdr->e_type == ET_REL) { scn = NULL; cnt = 0; @@ -1993,7 +2160,7 @@ handle_elf (int fd, Elf *elf, const char *prefix, const char *fname, /* Now that we have done all adjustments to the data, we can actually write out the debug file. */ - if (debug_fname != NULL) + if (debug_fname != NULL && removing_sections) { /* Finally write the file. */ if (unlikely (elf_update (debugelf, ELF_C_WRITE) == -1)) @@ -2167,14 +2334,14 @@ while computing checksum for debug information")); if (shdr_info != NULL) { /* For some sections we might have created an table to map symbol - table indices. */ - if (any_symtab_changes) - for (cnt = 1; cnt <= shdridx; ++cnt) - { - free (shdr_info[cnt].newsymidx); - if (shdr_info[cnt].debug_data != NULL) - free (shdr_info[cnt].debug_data->d_buf); - } + table indices. Or we might kept (original) data around to put + into the .debug file. */ + for (cnt = 1; cnt <= shdridx; ++cnt) + { + free (shdr_info[cnt].newsymidx); + if (shdr_info[cnt].debug_data != NULL) + free (shdr_info[cnt].debug_data->d_buf); + } /* Free data we allocated for the .gnu_debuglink section. */ free (debuglink_buf); @@ -2226,7 +2393,11 @@ cannot set access and modification date of '%s'"), /* Close the file descriptor if we created a new file. */ if (output_fname != NULL) - close (fd); + { + close (fd); + if (result != 0) + unlink (output_fname); + } return result; } diff --git a/src/unstrip.c b/src/unstrip.c index 6e57a6b5..ec46c952 100644 --- a/src/unstrip.c +++ b/src/unstrip.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -48,6 +47,7 @@ #include #include #include +#include "system.h" #include "libdwelf.h" #include "libeu.h" #include "printversion.h" @@ -563,7 +563,11 @@ adjust_all_relocs (Elf *elf, Elf_Scn *symtab, const GElf_Shdr *symshdr, GElf_Shdr shdr_mem; GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); ELF_CHECK (shdr != NULL, _("cannot get section header: %s")); - if (shdr->sh_type != SHT_NOBITS && shdr->sh_link == new_sh_link) + /* Don't redo SHT_GROUP, groups are in both the stripped and debug, + it will already have been done by adjust_relocs for the + stripped_symtab. */ + if (shdr->sh_type != SHT_NOBITS && shdr->sh_type != SHT_GROUP + && shdr->sh_link == new_sh_link) adjust_relocs (scn, scn, shdr, map, symshdr); } } @@ -705,6 +709,12 @@ compare_unalloc_sections (const GElf_Shdr *shdr1, const GElf_Shdr *shdr2, if (shdr1->sh_flags > shdr2->sh_flags) return 1; + /* Sizes should be the same. */ + if (shdr1->sh_size < shdr2->sh_size) + return -1; + if (shdr1->sh_size > shdr2->sh_size) + return 1; + /* Sort by name as last resort. */ return strcmp (name1, name2); } @@ -1027,21 +1037,24 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, shnum = ehdr.e64.e_shnum; } + bool class32 = ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32; + size_t shsize = class32 ? sizeof (Elf32_Shdr) : sizeof (Elf64_Shdr); + if (unlikely (shnum == 0 || shnum > SIZE_MAX / shsize + 1)) + error (EXIT_FAILURE, 0, _("overflow with shnum = %zu in '%s' section"), + (size_t) shnum, ".gnu.prelink_undo"); + + --shnum; + size_t phsize = gelf_fsize (main, ELF_T_PHDR, phnum, EV_CURRENT); src.d_buf += src.d_size + phsize; - src.d_size = gelf_fsize (main, ELF_T_SHDR, shnum - 1, EV_CURRENT); + src.d_size = gelf_fsize (main, ELF_T_SHDR, shnum, EV_CURRENT); src.d_type = ELF_T_SHDR; if ((size_t) (src.d_buf - undodata->d_buf) > undodata->d_size || undodata->d_size - (src.d_buf - undodata->d_buf) != src.d_size) error (EXIT_FAILURE, 0, _("invalid contents in '%s' section"), ".gnu.prelink_undo"); - bool class32 = ehdr.e32.e_ident[EI_CLASS] == ELFCLASS32; - size_t shsize = class32 ? sizeof (Elf32_Shdr) : sizeof (Elf64_Shdr); - if (unlikely ((shnum - 1) > SIZE_MAX / shsize)) - error (EXIT_FAILURE, 0, _("overflow with shnum = %zu in '%s' section"), - (size_t) shnum, ".gnu.prelink_undo"); - const size_t shdr_bytes = (shnum - 1) * shsize; + const size_t shdr_bytes = shnum * shsize; void *shdr = xmalloc (shdr_bytes); dst.d_buf = shdr; dst.d_size = shdr_bytes; @@ -1049,12 +1062,12 @@ find_alloc_sections_prelink (Elf *debug, Elf_Data *debug_shstrtab, main_ehdr->e_ident[EI_DATA]) != NULL, _("cannot read '.gnu.prelink_undo' section: %s")); - undo_sections = xmalloc ((shnum - 1) * sizeof undo_sections[0]); - for (size_t i = 0; i < shnum - 1; ++i) + undo_sections = xmalloc (shnum * sizeof undo_sections[0]); + for (size_t i = 0; i < shnum; ++i) { struct section *sec = &undo_sections[undo_nalloc]; - Elf32_Shdr (*s32)[shnum - 1] = shdr; - Elf64_Shdr (*s64)[shnum - 1] = shdr; + Elf32_Shdr (*s32)[shnum] = shdr; + Elf64_Shdr (*s64)[shnum] = shdr; if (class32) { #define COPY(field) sec->shdr.field = (*s32)[i].field @@ -2380,7 +2393,8 @@ main (int argc, char **argv) .children = argp_children, .args_doc = N_("STRIPPED-FILE DEBUG-FILE\n[MODULE...]"), .doc = N_("\ -Combine stripped files with separate symbols and debug information.\v\ +Combine stripped files with separate symbols and debug information.\n\ +\n\ The first form puts the result in DEBUG-FILE if -o was not given.\n\ \n\ MODULE arguments give file name patterns matching modules to process.\n\ diff --git a/tests/ChangeLog b/tests/ChangeLog index e6656c75..2a20ffa5 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,701 @@ +2018-07-24 Mark Wielaard + + * run-annobingroup.sh: Add testfile-annobingroup-i386.o tests. + * testfile-annobingroup-i386.o.bz2: New test file. + * Makefile.am (EXTRA_DIST): Add testfile-annobingroup-i386.o.bz2. + +2018-07-21 Mark Wielaard + + * run-annobingroup.sh: New test. + * testfile-annobingroup.o.bz2: New test file. + * Makefile.am (TESTS): Add run-annobingroup.sh. + (EXTRA_DIST): Add run-annobingroup.sh and + testfile-annobingroup.o.bz2. + +2018-07-19 Andreas Schwab + + * Makefile.am (TESTS): Add run-strip-test12.sh. + (EXTRA_DIST): Add run-strip-test12.sh, testfile-riscv64.bz2, + testfile-riscv64-s.bz2, testfile-riscv64-core.bz2. + (run-strip-test11.sh): New file. + (testfile-riscv64.bz2): New file. + (testfile-riscv64-s.bz2): New file. + (testfile-riscv64-core.bz2): New file. + * run-allregs.sh: Add test for testfile-riscv64-core. + * run-readelf-mixed-corenote.sh: Likewise. + +2018-07-16 Ulf Hermann + + * run-strip-reloc.sh: Remove previous testfiles before running the + next test. + +2018-07-17 Mark Wielaard + + * hello_riscv64.ko.bz2: Updated with debuginfo. + * run-strip-reloc.sh: Add documentation on CONFIG_DEBUG_INFO=y. + +2018-07-05 Mark Wielaard + + * next_cfi.c (handle_section): Take a new argument name. Check + whether the section is compressed and uncompress if so. + (main): Check also for .zdebug_frame and pass the name of the + section to handle_section. + +2018-07-04 Ross Burton + + * addrscopes.c: Remove error.h include, add system.h include. + * allregs.c: Likewise. + * backtrace-data.c: Likewise. + * backtrace-dwarf.c: Likewise. + * backtrace.c: Likewise. + * buildid.c: Likewise. + * debugaltlink.c: Likewise. + * debuglink.c: Likewise. + * deleted.c : Likewise. + * dwarfcfi.c: Likewise. + * dwfl-addr-sect.c: Likewise. + * dwfl-bug-addr-overflow.c: Likewise. + * dwfl-bug-fd-leak.c: Likewise. + * dwfl-bug-getmodules.c: Likewise. + * dwfl-proc-attach.c: Likewise. + * dwfl-report-elf-align.c: Likewise. + * dwfllines.c: Likewise. + * dwflmodtest.c: Likewise. + * dwflsyms.c: Likewise. + * early-offscn.c: Likewise + * ecp.c: Likewise. + * elfstrmerge.c: Likewise. + * find-prologues.c: Likewise. + * funcretval.c: Likewise. + * funcscopes.c: Likewise. + * getsrc_die.c: Likewise. + * line2addr.c: Likewise. + * low_high_pc.c: Likewise. + * next_cfi.c: Likewise. + * rdwrmmap.c: Likewise. + * saridx.c: Likewise. + * sectiondump.c: Likewise. + * varlocs.c: Likewise. + * vdsosyms.c: Likewise. + +2018-06-28 Mark Wielaard + + * next_cfi.c: New file. + * run-next-cfi.sh: New test. + * run-next-cfi-self.sh: Likewise. + * Makefile.am (check_PROGRAMS): Add next_cfi. + (TESTS): Add run-next-cfi.sh and run-next-cfi-self.sh. + (EXTRA_DIST): Likewise. + (next_cfi_LDADD): New variable. + +2018-06-27 Mark Wielaard + + * dwarf_cfi.c: New file. + * run-dwarfcfi.sh: New test. + * testfile11-debugframe.bz2: New testfile. + * testfile12-debugframe.bz2: Likewise. + * testfileaarch64-debugframe.bz2: Likewise. + * testfilearm-debugframe.bz2: Likewise. + * testfileppc32-debugframe.bz2: Likewise. + * testfileppc64-debugframe.bz2: Likewise. + * Makefile.am (check_PROGRAMS): Add dwarfcfi. + (TESTS): Add run-dwarfcfi.sh. + (EXTRA_DIST): Add run-dwarfcfi.sh, testfile11-debugframe.bz2, + testfile12-debugframe.bz2, testfileaarch64-debugframe.bz2, + testfilearm-debugframe.bz2, testfileppc32-debugframe.bz2 and + testfileppc64-debugframe.bz2. + +2018-06-23 Mark Wielaard + + * varlocs.c (print_expr): Take a new depth argument. Check it isn't + greater than MAX_DEPTH (64). Pass on to print_expr_block. + (print_expr_block): Take a new depth argument. Pass it to print_expr. + (print_expr_block_addrs): Call print_expr_block with zero depth. + +2018-06-25 Mark Wielaard + + * next-files.c: New file. + * next-lines.c: Likewise. + * run-next-files.sh: New test. + * run-next-lines.sh: Likewise. + * testfile-only-debug-line.bz2: New test file. + * Makefile.am (check_PROGRAMS): Add next-files and next-lines. + (TESTS): Add run-next-files.sh and run-next-lines.sh. + (EXTRA_DIST): Add run-next-files.sh, run-next-lines.sh and + testfile-only-debug-line.bz2. + (next_lines_LDADD): New variable. + (next_files_LDADD): Likewise. + +2018-06-16 Yonghong Song + + * run-reloc-bpf.sh: New test. + * testfile-bpf-reloc.o.bz2: New test file. + * testfile-bpf-reloc.expect.bz2: New test file. + * Makefile.am (TESTS): Add run-reloc-bpf.sh. + (EXTRA_DIST): Add run-reloc-bpf.sh, testfile-bpf-reloc.o.bz2 and + testfile-bpf-reloc.expect.bz2. + +2018-06-13 Mark Wielaard + + * run-readelf-const-values.sh: New test. + * testfile-const-values.debug.bz2: New test file. + * run-readelf-zdebug-rel.sh: Adjust expected const_value. + * Makefile.am (TESTS): Add run-readelf-const-values.sh. + (EXTRA_DIST): Add run-readelf-const-values.sh and + testfile-const-values.debug.bz2. + +2018-06-08 Mark Wielaard + + * varlocs.c (print_expr): Error on bad DW_OP_GNU_parameter_ref + target, do not assert. + +2018-06-08 Mark Wielaard + + * get-units-invalid.c (main): Check invalid dwarf_getabbrev call. + * show-abbrev.c (main): Check illegal dwarf_getabbrev offset call. + +2018-06-08 Mark Wielaard + + * varlocs.c (main): Only assert when cfi_debug_bias != 0 if there + actually is a cfi_debug. + +2018-06-07 Mark Wielaard + + * run-readelf-loc.sh: Fix expected output for startx_length. + +2018-06-06 Mark Wielaard + + * varlocs.c (print_base_type): Use error, not assert when the DIE + isn't a base type. + +2018-06-02 Mark Wielaard + + * test-subr.sh (self_test_files_exe): Drop shared libraries. + Keep addr2line, elfcmp, objdump and readelf. + +2018-05-31 Mark Wielaard + + * run-readelf-types.sh: New test. + * Makefile.am (TESTS): Add run-readelf-types.sh. + (EXTRA_DIST): Likewise. + +2018-05-31 Mark Wielaard + + * splitdwarf4-not-split4.dwo.bz2: New test file. + * testfile-splitdwarf4-not-split4.debug.bz2: Likewise. + * run-readelf-loc.sh: Add test for splitdwarf4-not-split4.dwo + and testfile-splitdwarf4-not-split4.debug. + * run-varlocs.sh: Test testfile-splitdwarf4-not-split4.debug. + * Makefile.am (EXTRA_DIST): Add splitdwarf4-not-split4.dwo.bz2 + and testfile-splitdwarf4-not-split4.debug.bz2. + +2018-05-31 Mark Wielaard + + * test-subr.sh (self_test_files): Split into self_test_files_exe, + self_test_files_lib and self_test_obj. + (testrun_on_self_exe): New function. + (testrun_on_self_lib): Likewise. + * run-get-units-split.sh: Replace testrun_on_self with + testrun_on_self_exe and testrun_on_self_lib. + * run-unit-info.sh: Likewise. + +2018-05-31 Mark Wielaard + + * low_high_pc.c (handle_die): Handle NULL name. Print offset and + name of die. + (main): Check if the cu DIE is a skeleton, then get and handle + the split subdie. + * run-low-high-pc.sh: Run on testfile-splitdwarf-4 and + testfile-splitdwarf-5. Run on all selftest files. + +2018-05-31 Mark Wielaard + + * get-units-invalid.c (main): Check dwarf_cuoffset and + dwarf_dieoffset. + +2018-05-29 Mark Wielaard + + * dwarf-die-addr-die.c (check_dbg): Also check subdies, split or + type, gotten through dwarf_get_units. + * run-dwarf-die-addr-die.sh: Add tests for dwarf-4, dwarf-5, + split-dwarf-4, split-dwarf-5 and dwo files. + +2018-05-29 Mark Wielaard + + * run-readelf-loc.sh: Add GNU DebugFission split-dwarf variant. + * run-varlocs.sh: Likewise. + +2018-05-29 Mark Wielaard + + * run-readelf-twofiles.sh: Add --debug-dump=loc testcase. + +2018-05-28 Mark Wielaard + + * run-readelf-info-plus.sh: New test. + * Makefile.am (TESTS): Add run-readelf-info-plus.sh. + (EXTRA_DIST): Likewise. + +2018-04-29 Mark Wielaard + + * run-readelf-addr.sh: New test. + * Makefile.am (TESTS): Add run-readelf-addr.sh. + (EXTRA_DIST): Likewise. + +2018-04-27 Mark Wielaard + + * run-readelf-ranges.sh: Adjust expected output for address base. + * run-readelf-addr.sh: New test. + * Makefile.am (TESTS): Add run-readelf-addr.sh. + (EXTRA_DIST): Likewise. + +2018-04-07 Mark Wielaard + + * run-varlocs.sh: Run on testfileranges5.debug and + testsplitfileranges5.debug. + * varlocs.c (is_debug): New bool. + (print_expr): Don't fail on missing CFI for is_debug. + (main): Parse --debug, set is_debug. + +2018-04-12 Mark Wielaard + + * run-readelf-loc.sh: Add new testcases. + +2018-04-06 Mark Wielaard + + * testfileranges5.debug.bz2: New testfile. + * testfilesplitranges5.debug.bz2: Likewise. + * testfile-ranges-hello5.dwo.bz2: Likewise. + * testfile-ranges-world5.dwo.bz2: Likewise. + * run-dwarf-ranges.sh: Run on testfileranges5.debug. + * run-all-dwarf-ranges.sh: Run on testfilesplitranges5.debug. + * tests/Makefile.am (EXTRA_DIST): Add testfileranges5.debug.bz2, + testfilesplitranges5.debug.bz2, testfile-ranges-hello5.dwo.bz2 and + testfile-ranges-world5.dwo.bz2. + +2018-04-11 Mark Wielaard + + * run-readelf-ranges.sh: New test. + * Makefile.am (TESTS): Add run-readelf-ranges.sh. + (EXTRA_DIST): Likewise. + +2018-05-21 Mark Wielaard + + * addrx_constx-4.dwo.bz2: New testfile. + * addrx_constx-5.dwo.bz2: Likewise. + * testfile-addrx_constx-4.bz2: Likewise. + * testfile-addrx_constx-5.bz2: Likewise + * Makefile.am (EXTRA_DIST): Add addrx_constx-5.dwo.bz2 + testfile-addrx_constx-4\ .bz2 testfile-addrx_constx-5.bz2. + * run-varlocs.sh: Add addrx_constx tests for DWARF4 and DWARF5. + * varlocx.c (print_expr): Handle DW_OP_GNU_addr_index, + DW_OP_addrx, DW_OP_GNU_const_index and DW_OP_constx. + (main): Handle split DWARF. + * run-all-dwarf-ranges.sh: Add new ranges for addrx low/highpc. + +2018-05-20 Mark Wielaard + + * unit-info.c: New test. + * run-unit-info.sh: New test runner. + * Makefile.am (check_PROGRAMS): Add unit-info. + (TESTS): Add run-unit-info.sh + (EXTRA_INFO): Likewise. + (unit_info_LDADD): New variable. + +2018-05-24 Mark Wielaard + + * get-units-invalid.c (main): Add check for invalid dwarf_ranges. + * run-all-dwarf-ranges.sh: Correct expected output. + +2018-05-18 Mark Wielaard + + * Makefiles.am (check_PROGRAMS): Add all-dwarf-ranges. + (TESTS): Add run-all-dwarf-ranges.sh. + (EXTRA_DIST): Add run-all-dwarf-ranges.sh, + testfilesplitranges4.debug.bz2, testfile-ranges-hello.dwo.bz2 + and testfile-ranges-world.dwo.bz2. + (all_dwarf_ranges_LDADD): New variable. + * all-dwarf-ranges.c: New test program. + * run-all-dwarf-ranges: New test runner. + * testfile-ranges-hello.dwo.bz2: New test file. + * testfile-ranges-world.dwo.bz2: Likewise. + * testfilesplitranges4.debug.bz2: Likewise. + +2018-05-18 Mark Wielaard + + * run-get-files.sh: Add testcases for testfile-splitdwarf-4, + testfile-hello4.dwo, testfile-world4.dwo and testfile-splitdwarf-5, + testfile-hello5.dwo, testfile-world5.dwo. + +2018-05-17 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add attr-integrate-skel. + (TESTS): Add run-attr-integrate-skel. + (EXTRA_DIST): Likewise. + (attr_integrate_skel_LDADD): New variable. + * attr-integrate-skel.c: New test. + * run-attr-integrate-skel.sh: New test runner. + +2018-05-16 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add get-units-split. + (TESTS): Add run-get-units-split.sh. + (EXTRA_DIST): Add run-get-units-split.sh, testfile-hello4.dwo.bz2, + testfile-hello5.dwo.bz2, testfile-splitdwarf-4.bz2, + testfile-splitdwarf-5.bz2, testfile-world5.dwo.bz2 and + testfile-world4.dwo.bz2. + (get_units_split_LDADD): New variable. + * get-units-split.c: New test. + * run-get-units-split.sh: New test runner. + * testfile-dwarf-45.source: Extend with build instructions for new + test files. + * testfile-hello4.dwo.bz2: New test file. + * testfile-hello5.dwo.bz2: Likewise. + * testfile-splitdwarf-4.bz2: Likewise. + * testfile-splitdwarf-5.bz2: Likewise. + * testfile-world5.dwo.bz2 and: Likewise. + * testfile-world4.dwo.bz2: Likewise. + +2018-05-09 Mark Wielaard + + * run-readelf-zdebug.sh: Adjust test output for new header layout. + * run-readelf-line.sh: Likewise. Add new tests for testfile-dwarf-4 + and testfile-dwarf-5. + +2018-05-11 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add get-units-invalid. + (TESTS): Add run-get-units-invalid.sh. + (EXTRA_DIST): Likewise. + (get_units_invalid_LDADD): New variable. + * get-units-invalid.c: New test program. + * run-get-units-invalid.sh: New test program runner. + +2018-05-05 Mark Wielaard + + * testfile-dwarf-45.source: New file. + * testfile-dwarf-4.bz2: New test file. + * testfile-dwarf-5.bz2: Likewise. + * run-readelf-line.sh: Add testcases for testfile-dwarf-4 and + testfile-dwarf-5. + * Makefile (EXTRA_DIST): Add testfile-dwarf-45.source, + testfile-dwarf-4.bz2 and testfile-dwarf-5.bz2. + +2018-04-19 Andreas Schwab + + * hello_riscv64.ko.bz2: New file. + * run-strip-reloc.sh: Test it. + * Makefile.am (EXTRA_DIST): Add it. + +2018-04-16 Mark Wielaard + + * testfile-ppc64-min-instr.bz2: New testfile. + * run-readelf-line.sh: Run against testfile-ppc64-min-instr.bz2. + * Makefile.am (EXTRA_DIST): Add testfile-ppc64-min-instr.bz2. + +2018-04-11 Mark Wielaard + + * run-addrcfi.sh: Adjust expected rule for aarch64 sp. + +2018-04-03 Mark Wielaard + + * testfileranges4.debug.bz2: New testfile. + * run-dwarf-ranges.sh: Run on testfileranges4.debug. + * tests/Makefile.am (EXTRA_DIST): Add testfileranges4.debug.bz2. + +2018-03-06 Mark Wielaard + + * varlocs.c (print_expr): Handle DW_OP_implicit_pointer, + DW_OP_entry_value, DW_OP_convert, DW_OP_reinterpret, + DW_OP_regval_type, DW_OP_deref_type, DW_OP_xderef_type and + DW_OP_const_type. + +2018-02-16 Mark Wielaard + + * backtrace-subr.sh (check_native_core): Check if there is any core, + if so, use it. + +2018-02-15 Mark Wielaard + + * backtrace-child.c: Include signal.h after sys/ptrace.h. + * backtrace-dwarf.c: Include sys/wait.h and signal.h after + sys/ptrace.h. + +2018-01-25 Mark Wielaard + + * Makefile.am (check_PROGRAMS): Add dwarf-die-addr-die. + (TESTS): Add run-dwarf-die-addr-die.sh. + (EXTRA_DIST): Likewise. + (dwarf_die_addr_die_LDADD): New variable. + * dwarf-die-addr-die.c: New file. + * run-dwarf-die-addr-die.sh: New test. + +2018-02-09 Joshua Watt + + * elfstrmerge.c (main): Use FALLTHROUGH macro instead of comment. + +2018-01-22 Mark Wielaard + + * allfcts.c (setup_alt): Print warning when alt file couldn't be + found. + * run-allfcts-multi.sh: Add testcase where alt file is in a subdir + where it cannot be found by allfcts itself (but it can by libdw). + +2018-01-25 Mark Wielaard + + * elfstrmerge.c (main): Initialize and check symtabshdr instead of + symtabndx. + +2018-01-14 Petr Machata + + * testfile-sizes4.o.bz2: New test file. + * testfile-sizes4.s: New test source. + * run-aggregate-size.sh: Check testfile-sizes4.o v size 257. + +2017-12-23 Mark Wielaard + + * backtrace-subr.sh (check_native_core): Use a lock file and try + to extract core using coredumpctl. + * Makefile.am (CLEANFILES): Clean core-dump-backtrace.lock. + +2017-12-11 Dima Kogan + + * run-aggregate-size.sh: Added check for multi-dimensional arrays. + * run-peel-type.sh: Likewise. + * testfile-sizes3.o.bz2: Likewise. + +2017-12-07 Mark Wielaard + + * run-readelf-variant.sh: New test. + * testfile-ada-variant.bz2: New testfile. + * Makefile.am (TESTS): Add run-readelf-variant.sh. + (EXTRA_DISTS): Add run-readelf-variant.sh and + testfile-ada-variant.bz2. + +2017-11-29 Mark Wielaard + + * run-readelf-loc.sh: Adjust expected loc list output. + * run-readelf-zdebug-rel.sh: Likewise. + * run-readelf-zdebug.sh: Likewise. + +2017-11-29 Mark Wielaard + + * run-readelf-loc.sh: Adjust expected range list output. + * run-readelf-zdebug.sh: Likewise. + +2017-11-29 Mark Wielaard + + * run-readelf-dwz-multi.sh: Add expected file names. + * run-readelf-zdebug-rel.sh: Likewise. + +2017-11-29 Mark Wielaard + + * run-readelf-dwz-multi.sh: Add expected abbrev codes. + * run-readelf-zdebug-rel.sh: Likewise. + +2017-11-29 Mark Wielaard + + * run-readelf-dwz-multi.sh: Adjust expected ops index spaces. + * run-readelf-loc.sh: Likewise. + * run-readelf-zdebug-rel.sh: Likewise. + * run-readelf-zdebug.sh: Likewise. + +2017-11-16 Mark Wielaard + + * varlocs.c (main): Fix cfi_debug => cfi_debug_bias typo in assert. + +2017-11-10 Mark Wielaard + + * run-exprlocs-self.sh: New test. + * run-varlocs-self.sh: Likewise. + * Makefile.am (TESTS) Add run-exprlocs-self.sh and + run-varlocs-self.sh. + (EXTRA_DIST): Likewise. + * varlocs.c (cfi_debug_bias): New global variable. + (is_ET_REL): Likewise. + (print_expr): Don't crash and burn when CFI cannot be found for an + ET_REL file for DW_OP_call_frame_cfa. + (handle_die): If there is no entry_pc pick the lowest pc start range + for the DIE. + (main): Check at least one CU was found. Use dwfl_module_dwarf_cfi + and dwfl_module_eh_cfi to fix memory leak. Set is_ET_REL. + +2017-11-03 Mark Wielaard + + * run-exprlocs.sh: New test. + * testfile-stridex.bz2: New testfile. + * Makefile.am (TESTS): Add run-exprlocs.sh. + (EXTRA_DIST): Add run-exprlocs.sh and testfile-stridex.bz2. + * varlocs.c (dwarf_tag_string): New function. + (dwarf_attr_string): Likewise. + (dwarf_form_string): Likewise. + (print_expr): Fix typo in error message.r + Handle DW_OP_GNU_variable_value. + (attr_arg): New struct. + (handle_attr): New function. + (handle_die): Likewise. + (main): Handle --exprlocs argument. Call handle_die. + +2017-10-16 Mark Wielaard + + * md5-sha1-test.c: Removed. + * Makefile.am (check_PROGRAMS): Remove md5-sha1-test. + (TESTS): Likewise. + (md5_sha1_test_LDADD): Removed. + +2017-10-04 Mark Wielaard + + * msg_tst.c: Handle ELF_E_INVALID_ELF. + +2017-09-10 Mark Wielaard + + * run-ar.sh: New test. + * Makefile.am (TESTS): Add run-ar.sh. + (EXTRA_DIST): Likewise. + +2017-08-18 Ulf Hermann + + * Makefile.am: Drop -rdynamic from deleted_lib_so_LDFLAGS. + +2017-04-27 Ulf Hermann + + * Makefile.am: Use fpie_CFLAGS and fpic_CFLAGS. + +2017-08-08 Dmitry V. Levin + + * run-strip-nothing.sh: Add -s. + +2017-07-26 Mark Wielaard + + * dwarf-getmacros.c (mac): Use DW_MACRO names instead of DW_MACRO_GNU. + +2016-10-27 Mark Wielaard + + * dwarf_default_lower_bound.c: New test. + * Makefile.am (check_PROGRAMS): Add dwarf_default_lower_bound. + (TESTS): Likewise. + (dwarf_default_lower_bound_LDADD): New variable. + +2017-07-21 Mark Wielaard + + * get-lines.c (main): Add dwarf_line_file test. + +2017-07-19 Gustavo Romero + + * run-addrcfi.sh: Update generic SPRs names to HTM SPRs names + * run-allregs.sh: Update generic SPRs names to HTM SPRs names + +2017-07-20 Mark Wielaard + + * run-strip-g.sh: New test. + * Makefile.am (TESTS): Add run-strip-g.sh. + (EXTRA_DIST): Likewise. + +2017-07-18 Mark Wielaard + + * Makefile.am (TESTS): Always add run-disasm-bpf.sh if HAVE_LIBASM. + +2017-05-04 Ulf Hermann + + * elfshphehdr.c: For writing, use /dev/null rather than /dev/zero. + +2017-07-14 Mark Wielaard + + * run-strip-remove-keep.sh: New test. + * Makefile.am (TESTS): Add run-strip-remove-keep.sh. + (EXTRA_DIST): Likewise. + +2017-06-07 Mark Wielaard + + * run-strip-nothing.sh: New test. + * Makefile.am (TESTS): Add run-strip-nothing.sh. + (EXTRA_DIST): Likewise. + +2017-06-06 Mark Wielaard + + * run-strip-test.sh: Test strip -g doesn't introduce extra .shstrtab. + +2017-05-30 Mark Wielaard + + * run-backtrace-fp-core-ppc64le.sh: New test. + * backtrace.ppc64le.fp.core.bz2: New test file. + * backtrace.ppc64le.fp.exec.bz2: New testfile. + * backtrace-subr.sh (check_backtracegen): Accept '(null)'. + * Makefile.am (TESTS): Add run-backtrace-fp-core-ppc64le.sh. + (EXTRA_DIST): Add run-backtrace-fp-core-ppc64le.sh, + backtrace.ppc64le.fp.core.bz2 and backtrace.ppc64le.fp.exec.bz2. + +2017-02-13 Ulf Hermann + Mark Wielaard + + * Makefile.am: Add test for unwinding with frame pointers on aarch64 + * backtrace.aarch64.fp.core.bz2: New file + * backtrace.aarch64.fp.exec.bz2: New file + * run-backtrace-fp-core-aarch64.sh: New file + * backtrace-subr.sh (check_err): Allow Invalid register. + * backtrace.c (callback_verify): Allow duplicate_sigusr2 frames. + +2017-04-06 Mark Wielaard + + * run-backtrace-fp-core-i386.sh: New test. + * backtrace.i386.fp.core.bz2: New test file. + * backtrace.i386.fp.exec.bz2: New testfile. + * Makefile.am (TESTS): Add run-backtrace-fp-core-i386.sh. + (EXTRA_DIST): Add run-backtrace-fp-core-i386.sh, + backtrace.i386.fp.core.bz2 and backtrace.i386.fp.exec.bz2. + +2017-02-09 Ulf Hermann + + * Makefile.am: Add test for unwinding with frame pointers on x86_64 + * backtrace.x86_64.fp.core.bz2: New file + * backtrace.x86_64.fp.exec.bz2: New file + * run-backtrace-fp-core-x86_64.sh: New file + +2017-04-25 Mark Wielaard + + * backtrace-subr.sh (check_backtracegen): New function. + (check_core): Add check_backtracegen call. + * backtrace.ppc.exec.bz2: Regenerated. + * backtrace.ppc.core.bz2: Likewise. + +2017-04-24 Mark Wielaard + + * backtrace.c: Remove option to allow unknown symbols in the trace. + * backtrace-substr.sh: Remove option to allow unknown symbols + to check_core() and allow failed symbol lookups in check_err(). + +2017-04-20 Ulf Hermann + + * run-readelf-dwz-multi.sh: Expect readelf to output "yes" for flags + that are set. + * run-readelf-zdebug-rel.sh: Likewise. + +2017-04-20 Ulf Hermann + + * backtrace-child.c: Include sys/ptrace.h only on linux. + * backtrace-dwarf.c: Likewise. + +2017-04-05 Mark Wielaard + + * test-subr.sh (testrun_on_self_compressed): New function. + * run-elflint-self.sh: Call testrun_on_self_compressed. + * run-elflint-test.sh: Add testfile42z and testfile-s390x-hash-bothz. + +2017-03-30 Mark Wielaard + + * peel_type.c: New file. + * run-peel-type.sh: New test. + * Makefile.am (check_PROGRAMS): Add peel_type.c. + (TESTS): Add run-peel-type.sh. + (EXTRA_DIST): Likewise. + (peel_type_LDADD): New variable. + +2017-03-27 Mark Wielaard + + * fillfile.c: New file. + * Makefile.am (check_PROGRAMS): Add fillfile. + (TESTS): Likewise. + (fillfile_LDADD): New variable. + 2017-02-15 Mark Wielaard * Makefile.am (EXTRA_DIST): Add testfileppc64attrs.o.bz2. diff --git a/tests/Makefile.am b/tests/Makefile.am index a27e8687..29460834 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2017 Red Hat, Inc. +## Copyright (C) 1996-2018 Red Hat, Inc. ## This file is part of elfutils. ## ## This file is free software; you can redistribute it and/or modify @@ -38,22 +38,28 @@ endif check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \ showptable update1 update2 update3 update4 test-nlist \ - show-die-info get-files get-lines get-pubnames \ + show-die-info get-files next-files get-lines next-lines \ + get-pubnames \ get-aranges allfcts line2addr addrscopes funcscopes \ show-abbrev hash newscn ecp dwflmodtest \ find-prologues funcretval allregs rdwrmmap \ dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \ dwfl-addr-sect dwfl-bug-report early-offscn \ dwfl-bug-getmodules dwarf-getmacros dwarf-ranges addrcfi \ + dwarfcfi \ test-flag-nobits dwarf-getstring rerequest_tag \ - alldts md5-sha1-test typeiter typeiter2 low_high_pc \ + alldts typeiter typeiter2 low_high_pc \ test-elf_cntl_gelf_getshdr dwflsyms dwfllines \ dwfl-report-elf-align varlocs backtrace backtrace-child \ backtrace-data backtrace-dwarf debuglink debugaltlink \ - buildid deleted deleted-lib.so aggregate_size vdsosyms \ + buildid deleted deleted-lib.so aggregate_size peel_type \ + vdsosyms \ getsrc_die strptr newdata elfstrtab dwfl-proc-attach \ elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \ - elfgetzdata elfputzdata zstrptr emptyfile vendorelf + elfgetzdata elfputzdata zstrptr emptyfile vendorelf \ + fillfile dwarf_default_lower_bound dwarf-die-addr-die \ + get-units-invalid get-units-split attr-integrate-skel \ + all-dwarf-ranges unit-info next_cfi asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \ asm-tst6 asm-tst7 asm-tst8 asm-tst9 @@ -70,17 +76,20 @@ backtrace-child-biarch$(EXEEXT): backtrace-child.c $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \ -o $@ $< -TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ +TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \ update1 update2 update3 update4 \ run-show-die-info.sh run-get-files.sh run-get-lines.sh \ + run-next-files.sh run-next-lines.sh \ run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \ run-show-abbrev.sh run-line2addr.sh hash \ newscn run-strip-test.sh run-strip-test2.sh \ run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \ run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \ run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \ + run-strip-test12.sh \ + run-strip-nothing.sh run-strip-g.sh run-annobingroup.sh \ run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \ - run-strip-nobitsalign.sh \ + run-strip-nobitsalign.sh run-strip-remove-keep.sh \ run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-test3.sh \ run-unstrip-test4.sh run-unstrip-M.sh run-elfstrmerge-test.sh \ run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \ @@ -88,10 +97,13 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ run-find-prologues.sh run-allregs.sh run-addrcfi.sh \ - run-nm-self.sh run-readelf-self.sh \ + run-dwarfcfi.sh \ + run-nm-self.sh run-readelf-self.sh run-readelf-info-plus.sh \ + run-readelf-const-values.sh \ + run-varlocs-self.sh run-exprlocs-self.sh \ run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \ run-readelf-test4.sh run-readelf-twofiles.sh \ - run-readelf-macro.sh run-readelf-loc.sh \ + run-readelf-macro.sh run-readelf-loc.sh run-readelf-ranges.sh \ run-readelf-aranges.sh run-readelf-line.sh run-readelf-z.sh \ run-native-test.sh run-bug1-test.sh \ run-debuglink.sh run-debugaltlink.sh run-buildid.sh \ @@ -106,28 +118,42 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \ run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \ run-test-archive64.sh run-readelf-vmcoreinfo.sh \ run-readelf-mixed-corenote.sh run-dwfllines.sh \ + run-readelf-variant.sh \ run-dwfl-report-elf-align.sh run-addr2line-test.sh \ run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \ run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \ - run-varlocs.sh run-funcretval.sh \ + run-varlocs.sh run-exprlocs.sh run-funcretval.sh \ run-backtrace-native.sh run-backtrace-data.sh run-backtrace-dwarf.sh \ run-backtrace-native-biarch.sh run-backtrace-native-core.sh \ run-backtrace-native-core-biarch.sh run-backtrace-core-x86_64.sh \ + run-backtrace-fp-core-x86_64.sh \ + run-backtrace-fp-core-aarch64.sh \ + run-backtrace-fp-core-ppc64le.sh \ run-backtrace-core-x32.sh \ - run-backtrace-core-i386.sh run-backtrace-core-ppc.sh \ + run-backtrace-core-i386.sh run-backtrace-fp-core-i386.sh \ + run-backtrace-core-ppc.sh \ run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \ run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \ run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \ run-stack-demangled-test.sh run-readelf-zx.sh run-readelf-zp.sh \ + run-readelf-addr.sh run-readelf-str.sh \ + run-readelf-types.sh \ run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \ - run-linkmap-cut.sh run-aggregate-size.sh vdsosyms run-readelf-A.sh \ + run-linkmap-cut.sh run-aggregate-size.sh run-peel-type.sh \ + vdsosyms run-readelf-A.sh \ run-getsrc-die.sh run-strptr.sh newdata elfstrtab dwfl-proc-attach \ elfshphehdr run-lfs-symbols.sh run-dwelfgnucompressed.sh \ run-elfgetchdr.sh \ run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \ run-compress-test.sh \ run-readelf-zdebug.sh run-readelf-zdebug-rel.sh \ - emptyfile vendorelf + emptyfile vendorelf fillfile dwarf_default_lower_bound \ + run-dwarf-die-addr-die.sh \ + run-get-units-invalid.sh run-get-units-split.sh \ + run-attr-integrate-skel.sh \ + run-all-dwarf-ranges.sh run-unit-info.sh \ + run-reloc-bpf.sh \ + run-next-cfi.sh run-next-cfi-self.sh if !BIARCH export ELFUTILS_DISABLE_BIARCH = 1 @@ -138,8 +164,8 @@ export ELFUTILS_DISABLE_DEMANGLE = 1 endif if !STANDALONE -check_PROGRAMS += msg_tst md5-sha1-test system-elf-libelf-test -TESTS += msg_tst md5-sha1-test system-elf-libelf-test +check_PROGRAMS += msg_tst system-elf-libelf-test +TESTS += msg_tst system-elf-libelf-test endif if LZMA @@ -148,14 +174,12 @@ endif if HAVE_LIBASM check_PROGRAMS += $(asm_TESTS) -TESTS += $(asm_TESTS) -if HAVE_LINUX_BPF_H -TESTS += run-disasm-bpf.sh -endif +TESTS += $(asm_TESTS) run-disasm-bpf.sh endif -EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ +EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \ run-show-die-info.sh run-get-files.sh run-get-lines.sh \ + run-next-files.sh run-next-lines.sh testfile-only-debug-line.bz2 \ run-get-pubnames.sh run-get-aranges.sh \ run-show-abbrev.sh run-strip-test.sh \ run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \ @@ -168,11 +192,15 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \ run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \ run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \ + run-strip-test12.sh \ + run-strip-nothing.sh run-strip-remove-keep.sh run-strip-g.sh \ + run-annobingroup.sh testfile-annobingroup.o.bz2 \ + testfile-annobingroup-i386.o.bz2 \ run-strip-strmerge.sh run-strip-nobitsalign.sh \ testfile-nobitsalign.bz2 testfile-nobitsalign.strip.bz2 \ run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \ hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \ - hello_m68k.ko.bz2 \ + hello_m68k.ko.bz2 hello_riscv64.ko.bz2 \ run-unstrip-test.sh run-unstrip-test2.sh \ testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \ testfile-info-link.stripped.bz2 run-unstrip-test3.sh \ @@ -182,12 +210,21 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \ run-ranlib-test3.sh run-ranlib-test4.sh \ run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \ - run-nm-self.sh run-readelf-self.sh run-addrcfi.sh \ + run-nm-self.sh run-readelf-self.sh run-readelf-info-plus.sh \ + run-readelf-const-values.sh testfile-const-values.debug.bz2 \ + run-addrcfi.sh run-dwarfcfi.sh \ + testfile11-debugframe.bz2 testfile12-debugframe.bz2 \ + testfileaarch64-debugframe.bz2 testfilearm-debugframe.bz2 \ + testfileppc32-debugframe.bz2 testfileppc64-debugframe.bz2 \ + run-varlocs-self.sh run-exprlocs-self.sh \ run-find-prologues.sh run-allregs.sh run-native-test.sh \ run-addrname-test.sh run-dwfl-bug-offline-rel.sh \ run-dwfl-addr-sect.sh run-early-offscn.sh \ run-dwarf-getmacros.sh \ run-dwarf-ranges.sh debug-ranges-no-lowpc.o.bz2 \ + testfileranges4.debug.bz2 testfileranges5.debug.bz2 \ + testfilesplitranges5.debug.bz2 \ + testfile-ranges-hello5.dwo.bz2 testfile-ranges-world5.dwo.bz2 \ run-test-flag-nobits.sh \ run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \ testfile15.bz2 testfile15.debug.bz2 \ @@ -218,11 +255,19 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfile-macros-0xff.bz2 \ run-readelf-macro.sh testfilemacro.bz2 \ run-readelf-loc.sh testfileloc.bz2 \ + splitdwarf4-not-split4.dwo.bz2 \ + testfile-splitdwarf4-not-split4.debug.bz2 \ + run-readelf-ranges.sh \ run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \ + testfile-ppc64-min-instr.bz2 \ + testfile-dwarf-45.source \ + testfile-dwarf-4.bz2 testfile-dwarf-5.bz2 \ run-readelf-z.sh \ run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \ testfile_multi.dwz.bz2 testfile_multi_main.bz2 \ testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \ + run-readelf-addr.sh run-readelf-str.sh \ + run-readelf-types.sh \ run-allfcts-multi.sh \ test-offset-loop.bz2 test-offset-loop.alt.bz2 \ run-prelink-addr-test.sh \ @@ -256,6 +301,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfilebazdynppc64.bz2 testfilebazmdbppc64.bz2 \ testfilebazminppc64.bz2 testfilebazminppc64_pl.bz2 \ testfilebazminppc64_plr.bz2 testfilebaztabppc64.bz2 \ + run-readelf-variant.sh testfile-ada-variant.bz2 \ run-dwflsyms.sh \ run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \ run-low_high_pc.sh testfile_low_high_pc.bz2 \ @@ -278,21 +324,31 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ testfileppc32.bz2 testfileppc64.bz2 \ testfiles390.bz2 testfiles390x.bz2 \ testfilearm.bz2 testfileaarch64.bz2 \ - run-varlocs.sh \ + run-varlocs.sh run-exprlocs.sh testfile-stridex.bz2 \ testfile_const_type.c testfile_const_type.bz2 \ testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \ testfile_parameter_ref.c testfile_parameter_ref.bz2 \ testfile_entry_value.c testfile_entry_value.bz2 \ testfile_implicit_value.c testfile_implicit_value.bz2 \ testfile_aarch64_core.bz2 testfile_i686_core.bz2 \ + addrx_constx-4.dwo.bz2 addrx_constx-5.dwo.bz2 \ + testfile-addrx_constx-4.bz2 testfile-addrx_constx-5.bz2 \ run-funcretval.sh funcretval_test.c funcretval_test_aarch64.bz2 \ run-backtrace-data.sh run-backtrace-dwarf.sh cleanup-13.c \ run-backtrace-native.sh run-backtrace-native-biarch.sh \ run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \ run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \ + run-backtrace-fp-core-x86_64.sh \ run-backtrace-core-x32.sh \ + run-backtrace-fp-core-aarch64.sh \ + backtrace.aarch64.fp.core.bz2 backtrace.aarch64.fp.exec.bz2 \ backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \ + run-backtrace-fp-core-i386.sh \ + backtrace.i386.fp.core.bz2 backtrace.i386.fp.exec.bz2 \ + run-backtrace-fp-core-ppc64le.sh \ + backtrace.ppc64le.fp.core.bz2 backtrace.ppc64le.fp.exec.bz2 \ backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \ + backtrace.x86_64.fp.core.bz2 backtrace.x86_64.fp.exec.bz2 \ backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \ run-backtrace-core-ppc.sh testfile66.bz2 testfile66.core.bz2 \ backtrace.s390x.core.bz2 backtrace.s390x.exec.bz2 \ @@ -315,7 +371,8 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \ linkmap-cut.bz2 linkmap-cut.core.bz2 \ run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \ - testfile-sizes3.o.bz2 \ + testfile-sizes3.o.bz2 testfile-sizes4.o.bz2 testfile-sizes4.s \ + run-peel-type.sh \ run-readelf-A.sh testfileppc32attrs.o.bz2 \ testfilesparc64attrs.o.bz2 testfileppc64attrs.o.bz2 \ testfile-debug-types.bz2 \ @@ -333,7 +390,20 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \ run-zstrptr.sh run-compress-test.sh \ run-disasm-bpf.sh \ testfile-bpf-dis1.expect.bz2 testfile-bpf-dis1.o.bz2 \ - testfile-m68k-core.bz2 testfile-m68k.bz2 testfile-m68k-s.bz2 + run-reloc-bpf.sh \ + testfile-bpf-reloc.expect.bz2 testfile-bpf-reloc.o.bz2 \ + testfile-m68k-core.bz2 testfile-m68k.bz2 testfile-m68k-s.bz2 \ + run-dwarf-die-addr-die.sh \ + run-get-units-invalid.sh run-get-units-split.sh \ + testfile-hello4.dwo.bz2 testfile-hello5.dwo.bz2 \ + testfile-splitdwarf-4.bz2 testfile-splitdwarf-5.bz2 \ + testfile-world5.dwo.bz2 testfile-world4.dwo.bz2 \ + run-attr-integrate-skel.sh \ + run-all-dwarf-ranges.sh testfilesplitranges4.debug.bz2 \ + testfile-ranges-hello.dwo.bz2 testfile-ranges-world.dwo.bz2 \ + run-unit-info.sh run-next-cfi.sh run-next-cfi-self.sh \ + testfile-riscv64.bz2 testfile-riscv64-s.bz2 \ + testfile-riscv64-core.bz2 if USE_VALGRIND valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1' @@ -415,7 +485,9 @@ show_die_info_LDADD = $(libdw) $(libelf) get_pubnames_LDADD = $(libdw) $(libelf) show_abbrev_LDADD = $(libdw) $(libelf) get_lines_LDADD = $(libdw) $(libelf) +next_lines_LDADD = $(libdw) $(libelf) get_files_LDADD = $(libdw) $(libelf) +next_files_LDADD = $(libdw) $(libelf) get_aranges_LDADD = $(libdw) $(libelf) allfcts_LDADD = $(libdw) $(libelf) line2addr_LDADD = $(libdw) $(argp_LDADD) @@ -446,10 +518,10 @@ dwarf_getmacros_LDADD = $(libdw) dwarf_ranges_LDADD = $(libdw) dwarf_getstring_LDADD = $(libdw) addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl +dwarfcfi_LDADD = $(libdw) $(libelf) test_flag_nobits_LDADD = $(libelf) rerequest_tag_LDADD = $(libdw) alldts_LDADD = $(libdw) $(libelf) -md5_sha1_test_LDADD = $(libeu) typeiter_LDADD = $(libdw) $(libelf) typeiter2_LDADD = $(libdw) $(libelf) low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD) @@ -460,7 +532,7 @@ dwfl_report_elf_align_LDADD = $(libdw) varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD) backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD) # backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables: -backtrace_child_CFLAGS = -fPIE +backtrace_child_CFLAGS = $(fpie_CFLAGS) backtrace_child_LDFLAGS = -pie -pthread backtrace_child_biarch_SOURCES = backtrace-child.c backtrace_data_LDADD = $(libdw) $(libelf) @@ -470,9 +542,10 @@ 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 +deleted_lib_so_LDFLAGS = -shared +deleted_lib_so_CFLAGS = $(fpic_CFLAGS) -fasynchronous-unwind-tables aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD) +peel_type_LDADD = $(libdw) $(libelf) $(argp_LDADD) vdsosyms_LDADD = $(libdw) $(libelf) getsrc_die_LDADD = $(libdw) $(libelf) strptr_LDADD = $(libelf) @@ -489,12 +562,24 @@ elfputzdata_LDADD = $(libelf) zstrptr_LDADD = $(libelf) emptyfile_LDADD = $(libelf) vendorelf_LDADD = $(libelf) +fillfile_LDADD = $(libelf) +dwarf_default_lower_bound_LDADD = $(libdw) +dwarf_die_addr_die_LDADD = $(libdw) +get_units_invalid_LDADD = $(libdw) +get_units_split_LDADD = $(libdw) +attr_integrate_skel_LDADD = $(libdw) +all_dwarf_ranges_LDADD = $(libdw) +unit_info_LDADD = $(libdw) +next_cfi_LDADD = $(libelf) $(libdw) # We want to test the libelf header against the system elf.h header. # Don't include any -I CPPFLAGS. system_elf_libelf_test_CPPFLAGS = system_elf_libelf_test_LDADD = $(libelf) +# A lock file used to make sure only one test dumps core at a time +CLEANFILES += core-dump-backtrace.lock + if GCOV check: check-am coverage .PHONY: coverage diff --git a/tests/addrscopes.c b/tests/addrscopes.c index 791569f5..b231b6a9 100644 --- a/tests/addrscopes.c +++ b/tests/addrscopes.c @@ -25,8 +25,8 @@ #include #include #include -#include #include +#include "system.h" static void diff --git a/tests/addrx_constx-4.dwo.bz2 b/tests/addrx_constx-4.dwo.bz2 new file mode 100644 index 00000000..f0bae1cd Binary files /dev/null and b/tests/addrx_constx-4.dwo.bz2 differ diff --git a/tests/addrx_constx-5.dwo.bz2 b/tests/addrx_constx-5.dwo.bz2 new file mode 100644 index 00000000..a5f4b1a6 Binary files /dev/null and b/tests/addrx_constx-5.dwo.bz2 differ diff --git a/tests/all-dwarf-ranges.c b/tests/all-dwarf-ranges.c new file mode 100644 index 00000000..4331a05b --- /dev/null +++ b/tests/all-dwarf-ranges.c @@ -0,0 +1,90 @@ +/* Test program for dwarf_ranges + Copyright (C) 2015, 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static void +ranges_die (Dwarf_Die *die) +{ + Dwarf_Addr base, start, end; + int ranges = dwarf_ranges (die, 0, &base, &start, &end); + if (ranges < 0) + puts (dwarf_errmsg (-1)); + else if (ranges > 0) + { + printf ("die: %s (%x)\n", dwarf_diename (die) ?: "", + dwarf_tag (die)); + for (ptrdiff_t off = 0; + (off = dwarf_ranges (die, off, &base, &start, &end)); ) + if (off == -1) + { + puts (dwarf_errmsg (-1)); + break; + } + else + printf (" %"PRIx64"..%"PRIx64"\n", start, end); + printf ("\n"); + } +} + +static void +walk_tree (Dwarf_Die *dwarf_die) +{ + Dwarf_Die die = *dwarf_die; + do + { + Dwarf_Die child; + ranges_die (&die); + if (dwarf_child (&die, &child) == 0) + walk_tree (&child); + } + while (dwarf_siblingof (&die, &die) == 0); +} + +int +main (int argc, char *argv[]) +{ + assert (argc >= 2); + const char *name = argv[1]; + + int fd = open (name, O_RDONLY); + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + + Dwarf_CU *cu = NULL; + Dwarf_Die cudie, subdie; + uint8_t unit_type; + while (dwarf_get_units (dbg, cu, &cu, NULL, + &unit_type, &cudie, &subdie) == 0) + { + Dwarf_Die die = (unit_type == DW_UT_skeleton + ? subdie : cudie); + walk_tree (&die); + } + dwarf_end (dbg); + + return 0; +} diff --git a/tests/allfcts.c b/tests/allfcts.c index d3c8d26a..f6373117 100644 --- a/tests/allfcts.c +++ b/tests/allfcts.c @@ -51,7 +51,10 @@ setup_alt (Dwarf *main) errx (1, "dwelf_dwarf_gnu_debugaltlink: %s", dwarf_errmsg (-1)); int fd = open (alt_name, O_RDONLY); if (fd < 0) - err (1, "open (%s)", alt_name); + { + printf ("Warning: no alt file found.\n"); + return NULL; + } Dwarf *dbg_alt = dwarf_begin (fd, DWARF_C_READ); if (dbg_alt == NULL) errx (1, "dwarf_begin (%s): %s", alt_name, dwarf_errmsg (-1)); diff --git a/tests/allregs.c b/tests/allregs.c index 286f7e3c..f18f0b28 100644 --- a/tests/allregs.c +++ b/tests/allregs.c @@ -21,13 +21,13 @@ #include #include #include -#include #include #include #include #include ELFUTILS_HEADER(dwfl) #include +#include "system.h" #include "../libdw/known-dwarf.h" static const char * diff --git a/tests/attr-integrate-skel.c b/tests/attr-integrate-skel.c new file mode 100644 index 00000000..644cd272 --- /dev/null +++ b/tests/attr-integrate-skel.c @@ -0,0 +1,109 @@ +/* Test dwarf_get_units finds split DWO CUs. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include + + +int +main (int argc, char *argv[]) +{ + for (int i = 1; i < argc; i++) + { + printf ("file: %s\n", argv[i]); + int fd = open (argv[i], O_RDONLY); + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + { + printf ("%s not usable: %s\n", argv[i], dwarf_errmsg (-1)); + return -1; + } + + Dwarf_CU *cu = NULL; + Dwarf_Die cudie, subdie; + uint8_t unit_type; + Dwarf_Half version; + int count = 0; + while (dwarf_get_units (dbg, cu, &cu, &version, + &unit_type, &cudie, &subdie) == 0) + { + count++; + if (unit_type == DW_UT_skeleton) + { + Dwarf_Attribute attr; + Dwarf_Word word; + Dwarf_Addr addr; + + printf ("Split DIE: %s\n", dwarf_diename (&subdie)); + + if (dwarf_attr_integrate (&subdie, + DW_AT_GNU_addr_base, &attr) == NULL + && dwarf_attr_integrate (&subdie, + DW_AT_addr_base, &attr) == NULL) + printf ("No addr_base"); + else if (dwarf_formudata (&attr, &word) != 0) + printf ("Bad addr_base: %s\n", dwarf_errmsg (-1)); + else + printf ("addr_base secoff: 0x%" PRIx64 "\n", word); + + if (dwarf_attr (&subdie, DW_AT_low_pc, &attr) != NULL) + printf ("Unexpected low_pc on split DIE.\n"); + + if (dwarf_attr_integrate (&subdie, + DW_AT_low_pc, &attr) == NULL) + printf ("No low_pc"); + else if (dwarf_formaddr (&attr, &addr) != 0) + printf ("Bad low_pc: %s\n", dwarf_errmsg (-1)); + else + printf ("low_pc addr: 0x%" PRIx64 "\n", addr); + + if (dwarf_hasattr (&subdie, DW_AT_high_pc)) + printf ("Unexpected highpc on split DIE\n"); + if (dwarf_hasattr (&subdie, DW_AT_ranges)) + printf ("Unexpected ranges on split DIE\n"); + + if (dwarf_hasattr_integrate (&subdie, DW_AT_high_pc)) + printf ("Skel has high_pc.\n"); + if (dwarf_hasattr_integrate (&subdie, DW_AT_ranges)) + printf ("Skel has ranges.\n"); + + printf ("\n"); + } + } + + if (count == 0) + { + printf ("No units found\n"); + return -1; + } + + dwarf_end (dbg); + close (fd); + } + + return 0; +} diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c index cf4547ca..9c6ba94f 100644 --- a/tests/backtrace-child.c +++ b/tests/backtrace-child.c @@ -81,9 +81,7 @@ #include #include #include -#include #include -#include #include #include #include @@ -100,6 +98,8 @@ main (int argc __attribute__ ((unused)), char **argv) } #else /* __linux__ */ +#include +#include #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) #define NOINLINE_NOCLONE __attribute__ ((noinline, noclone)) diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c index a387d8ff..67ecd475 100644 --- a/tests/backtrace-data.c +++ b/tests/backtrace-data.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #if defined(__x86_64__) && defined(__linux__) @@ -41,6 +40,7 @@ #include #include ELFUTILS_HEADER(dwfl) #endif +#include "system.h" #if !defined(__x86_64__) || !defined(__linux__) diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c index a644c8ab..e1eb4928 100644 --- a/tests/backtrace-dwarf.c +++ b/tests/backtrace-dwarf.c @@ -17,17 +17,14 @@ #include #include -#include #include #include #include #include -#include #include -#include #include -#include #include ELFUTILS_HEADER(dwfl) +#include "system.h" #ifndef __linux__ @@ -40,6 +37,9 @@ main (int argc __attribute__ ((unused)), char **argv) } #else /* __linux__ */ +#include +#include +#include #define main cleanup_13_main #include "cleanup-13.c" diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh index 5d3937c2..ff42c6ff 100644 --- a/tests/backtrace-subr.sh +++ b/tests/backtrace-subr.sh @@ -40,16 +40,26 @@ check_gsignal() false } + +# Makes sure we saw the function that initiated the backtrace +# when the core was generated through the tests backtrace --gencore. +# This might disappear when frame pointer chasing gone bad. +check_backtracegen() +{ + if grep -w backtracegen $1; then + return + fi + echo >&2 $2: no backtracegen + false +} + # Verify the STDERR output does not contain unexpected errors. # In some cases we cannot reliably find out we got behind _start as some # operating system do not properly terminate CFI by undefined PC. # Ignore it here as it is a bug of OS, not a bug of elfutils. -# If the CFI is not terminated correctly, we might find another frame by -# checking for frame pointers. This is still not our problem, but only -# gives an error message when trying to look up the function name. check_err() { - if [ $(egrep -v <$1 'dwfl_thread_getframes: (No DWARF information found|no matching address range|address out of range)$' \ + if [ $(egrep -v <$1 'dwfl_thread_getframes: (No DWARF information found|no matching address range|address out of range|Invalid register|\(null\))$' \ | wc -c) \ -eq 0 ] then @@ -64,9 +74,7 @@ check_all() bt=$1 err=$2 testname=$3 - if [ "x$4" != "x--allow-unknown" ]; then - check_main $bt $testname - fi + check_main $bt $testname check_gsignal $bt $testname check_err $err $testname } @@ -103,14 +111,14 @@ check_native_unsupported() check_core() { arch=$1 - args=$2 testfiles backtrace.$arch.{exec,core} tempfiles backtrace.$arch.{bt,err} echo ./backtrace ./backtrace.$arch.{exec,core} - testrun ${abs_builddir}/backtrace $args -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true + testrun ${abs_builddir}/backtrace -e ./backtrace.$arch.exec --core=./backtrace.$arch.core 1>backtrace.$arch.bt 2>backtrace.$arch.err || true cat backtrace.$arch.{bt,err} check_unsupported backtrace.$arch.err backtrace.$arch.core - check_all backtrace.$arch.{bt,err} backtrace.$arch.core $args + check_all backtrace.$arch.{bt,err} backtrace.$arch.core + check_backtracegen backtrace.$arch.bt backtrace.$arch.core } # Backtrace live process. @@ -129,19 +137,53 @@ check_native() # Backtrace core file. check_native_core() { +# systemd-coredump/coredumpctl doesn't seem to like concurrent core dumps +# use a lock file (fd 200) tests/core-dump-backtrace.lock +( child=$1 # Disable valgrind while dumping core. SAVED_VALGRIND_CMD="$VALGRIND_CMD" unset VALGRIND_CMD + # Wait for lock for 10 seconds or skip. + flock -x -w 10 200 || exit 77; + # Skip the test if we cannot adjust core ulimit. - core="core.`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`" + pid="`ulimit -c unlimited || exit 77; set +ex; testrun ${abs_builddir}/$child --gencore; true`" + core="core.$pid" # see if /proc/sys/kernel/core_uses_pid is set to 0 if [ -f core ]; then mv core "$core" fi - if [ ! -f "$core" ]; then echo "No $core file generated"; exit 77; fi + type -P coredumpctl && have_coredumpctl=1 || have_coredumpctl=0 + if [ ! -f "$core" -a $have_coredumpctl -eq 1 ]; then + # Maybe systemd-coredump took it. But give it some time to dump first... + sleep 1 + coredumpctl --output="$core" dump $pid || rm -f $core + + # Try a couple of times after waiting some more if something went wrong... + if [ ! -f "$core" ]; then + sleep 2 + coredumpctl --output="$core" dump $pid || rm -f $core + fi + + if [ ! -f "$core" ]; then + sleep 3 + coredumpctl --output="$core" dump $pid || rm -f $core + fi + fi + if [ ! -f "$core" ]; then + # In some containers our view of pids is confused. Since tests are + # run in a new fresh directory any core here is most like is ours. + if ls core.[0-9]* 1> /dev/null 2>&1; then + mv core.[0-9]* "$core" + fi + fi + if [ ! -f "$core" ]; then + echo "No $core file generated"; + exit 77; + fi if [ "x$SAVED_VALGRIND_CMD" != "x" ]; then VALGRIND_CMD="$SAVED_VALGRIND_CMD" @@ -155,4 +197,6 @@ check_native_core() cat $core.{bt,err} check_native_unsupported $core.err $child-$core check_all $core.{bt,err} $child-$core + rm $core{,.{bt,err}} +) 200>${abs_builddir}/core-dump-backtrace.lock } diff --git a/tests/backtrace.aarch64.fp.core.bz2 b/tests/backtrace.aarch64.fp.core.bz2 new file mode 100644 index 00000000..ff867881 Binary files /dev/null and b/tests/backtrace.aarch64.fp.core.bz2 differ diff --git a/tests/backtrace.aarch64.fp.exec.bz2 b/tests/backtrace.aarch64.fp.exec.bz2 new file mode 100644 index 00000000..9d06db1e Binary files /dev/null and b/tests/backtrace.aarch64.fp.exec.bz2 differ diff --git a/tests/backtrace.c b/tests/backtrace.c index 34a2ab0b..24ab68dd 100644 --- a/tests/backtrace.c +++ b/tests/backtrace.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #ifdef __linux__ @@ -39,6 +38,7 @@ #include #include ELFUTILS_HEADER(dwfl) #endif +#include "system.h" #ifndef __linux__ @@ -64,7 +64,6 @@ dump_modules (Dwfl_Module *mod, void **userdata __attribute__ ((unused)), return DWARF_CB_OK; } -static bool allow_unknown; static bool use_raise_jmp_patching; static pid_t check_tid; @@ -79,8 +78,7 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, seen_main = true; if (pc == 0) { - if (!allow_unknown) - assert (seen_main); + assert (seen_main); return; } if (check_tid == 0) @@ -92,6 +90,10 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, return; } Dwfl_Module *mod; + /* See case 4. Special case to help out simple frame pointer unwinders. */ + static bool duplicate_sigusr2 = false; + if (duplicate_sigusr2) + frameno--; static bool reduce_frameno = false; if (reduce_frameno) frameno--; @@ -105,12 +107,11 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, && (strcmp (symname, "__kernel_vsyscall") == 0 || strcmp (symname, "__libc_do_syscall") == 0)) reduce_frameno = true; - else if (!allow_unknown || symname) + else assert (symname && strcmp (symname, "raise") == 0); break; case 1: - if (!allow_unknown || symname) - assert (symname != NULL && strcmp (symname, "sigusr2") == 0); + assert (symname != NULL && strcmp (symname, "sigusr2") == 0); break; case 2: // x86_64 only /* __restore_rt - glibc maybe does not have to have this symbol. */ @@ -119,24 +120,28 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, if (use_raise_jmp_patching) { /* Verify we trapped on the very first instruction of jmp. */ - if (!allow_unknown || symname) - assert (symname != NULL && strcmp (symname, "jmp") == 0); + assert (symname != NULL && strcmp (symname, "jmp") == 0); mod = dwfl_addrmodule (dwfl, pc - 1); if (mod) symname2 = dwfl_module_addrname (mod, pc - 1); - if (!allow_unknown || symname2) - assert (symname2 == NULL || strcmp (symname2, "jmp") != 0); + assert (symname2 == NULL || strcmp (symname2, "jmp") != 0); break; } - /* FALLTHRU */ + FALLTHROUGH; case 4: - if (!allow_unknown || symname) - assert (symname != NULL && strcmp (symname, "stdarg") == 0); + /* Some simple frame unwinders get this wrong and think sigusr2 + is calling itself again. Allow it and just pretend there is + an extra sigusr2 frame. */ + if (symname != NULL && strcmp (symname, "sigusr2") == 0) + { + duplicate_sigusr2 = true; + break; + } + assert (symname != NULL && strcmp (symname, "stdarg") == 0); break; case 5: /* Verify we trapped on the very last instruction of child. */ - if (!allow_unknown || symname) - assert (symname != NULL && strcmp (symname, "backtracegen") == 0); + assert (symname != NULL && strcmp (symname, "backtracegen") == 0); mod = dwfl_addrmodule (dwfl, pc); if (mod) symname2 = dwfl_module_addrname (mod, pc); @@ -145,7 +150,7 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc, // there is no guarantee that the compiler doesn't reorder the // instructions or even inserts some padding instructions at the end // (which apparently happens on ppc64). - if (use_raise_jmp_patching && (!allow_unknown || symname2)) + if (use_raise_jmp_patching) assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0); break; } @@ -431,12 +436,10 @@ exec_dump (const char *exec) } #define OPT_BACKTRACE_EXEC 0x100 -#define OPT_ALLOW_UNKNOWN 0x200 static const struct argp_option options[] = { { "backtrace-exec", OPT_BACKTRACE_EXEC, "EXEC", 0, N_("Run executable"), 0 }, - { "allow-unknown", OPT_ALLOW_UNKNOWN, 0, 0, N_("Allow unknown symbols"), 0 }, { NULL, 0, NULL, 0, NULL, 0 } }; @@ -454,10 +457,6 @@ parse_opt (int key, char *arg, struct argp_state *state) exec_dump (arg); exit (0); - case OPT_ALLOW_UNKNOWN: - allow_unknown = true; - break; - default: return ARGP_ERR_UNKNOWN; } @@ -476,7 +475,6 @@ main (int argc __attribute__ ((unused)), char **argv) (void) setlocale (LC_ALL, ""); elf_version (EV_CURRENT); - allow_unknown = false; Dwfl *dwfl = NULL; const struct argp_child argp_children[] = diff --git a/tests/backtrace.i386.fp.core.bz2 b/tests/backtrace.i386.fp.core.bz2 new file mode 100644 index 00000000..3c49e247 Binary files /dev/null and b/tests/backtrace.i386.fp.core.bz2 differ diff --git a/tests/backtrace.i386.fp.exec.bz2 b/tests/backtrace.i386.fp.exec.bz2 new file mode 100755 index 00000000..cb4d32ef Binary files /dev/null and b/tests/backtrace.i386.fp.exec.bz2 differ diff --git a/tests/backtrace.ppc.core.bz2 b/tests/backtrace.ppc.core.bz2 index f20cd9f3..3a025d28 100644 Binary files a/tests/backtrace.ppc.core.bz2 and b/tests/backtrace.ppc.core.bz2 differ diff --git a/tests/backtrace.ppc.exec.bz2 b/tests/backtrace.ppc.exec.bz2 index 057c25a6..333c6be9 100644 Binary files a/tests/backtrace.ppc.exec.bz2 and b/tests/backtrace.ppc.exec.bz2 differ diff --git a/tests/backtrace.ppc64le.fp.core.bz2 b/tests/backtrace.ppc64le.fp.core.bz2 new file mode 100644 index 00000000..e63babf3 Binary files /dev/null and b/tests/backtrace.ppc64le.fp.core.bz2 differ diff --git a/tests/backtrace.ppc64le.fp.exec.bz2 b/tests/backtrace.ppc64le.fp.exec.bz2 new file mode 100755 index 00000000..ed1352af Binary files /dev/null and b/tests/backtrace.ppc64le.fp.exec.bz2 differ diff --git a/tests/backtrace.x86_64.fp.core.bz2 b/tests/backtrace.x86_64.fp.core.bz2 new file mode 100644 index 00000000..e773ca21 Binary files /dev/null and b/tests/backtrace.x86_64.fp.core.bz2 differ diff --git a/tests/backtrace.x86_64.fp.exec.bz2 b/tests/backtrace.x86_64.fp.exec.bz2 new file mode 100644 index 00000000..06958452 Binary files /dev/null and b/tests/backtrace.x86_64.fp.exec.bz2 differ diff --git a/tests/buildid.c b/tests/buildid.c index 87c18773..2390eff7 100644 --- a/tests/buildid.c +++ b/tests/buildid.c @@ -23,13 +23,13 @@ #include ELFUTILS_HEADER(elf) #include ELFUTILS_HEADER(dwelf) #include -#include #include #include #include #include #include #include +#include "system.h" int main (int argc, char *argv[]) diff --git a/tests/debugaltlink.c b/tests/debugaltlink.c index 6d97d500..e7dc8623 100644 --- a/tests/debugaltlink.c +++ b/tests/debugaltlink.c @@ -23,13 +23,13 @@ #include ELFUTILS_HEADER(dw) #include ELFUTILS_HEADER(dwelf) #include -#include #include #include #include #include #include #include +#include "system.h" int main (int argc, char *argv[]) diff --git a/tests/debuglink.c b/tests/debuglink.c index 935d1029..f92b9b59 100644 --- a/tests/debuglink.c +++ b/tests/debuglink.c @@ -21,13 +21,13 @@ #include #include ELFUTILS_HEADER(dwelf) #include -#include #include #include #include #include #include #include +#include "system.h" int main (int argc, char *argv[]) diff --git a/tests/deleted.c b/tests/deleted.c index 6be35bc2..f4e8f768 100644 --- a/tests/deleted.c +++ b/tests/deleted.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #ifdef __linux__ #include diff --git a/tests/dwarf-die-addr-die.c b/tests/dwarf-die-addr-die.c new file mode 100644 index 00000000..7899988f --- /dev/null +++ b/tests/dwarf-die-addr-die.c @@ -0,0 +1,186 @@ +/* Test program for dwarf_die_addr_die. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* The main Dwarf file. */ +static Dwarf *dwarf; + +int +check_die (Dwarf_Die *die) +{ + if (dwarf_tag (die) == DW_TAG_invalid) + { + printf ("Invalid die\n"); + return -1; + } + + int res = 0; + void *addr = die->addr; + Dwarf_Die die2; + if (dwarf_die_addr_die (dwarf, addr, &die2) == NULL) + { + printf ("Bad die addr die at offset %" PRIx64 "\n", + dwarf_dieoffset (die)); + res = -1; + } + + if (dwarf_tag (die) != dwarf_tag (&die2)) + { + printf ("Tags differ for die at offset %" PRIx64 "\n", + dwarf_dieoffset (die)); + res = -1; + } + + if (dwarf_cuoffset (die) != dwarf_cuoffset (&die2)) + { + printf ("CU offsets differ for die at offset %" PRIx64 "\n", + dwarf_dieoffset (die)); + res = -1; + } + + Dwarf_Die child; + if (dwarf_child (die, &child) == 0) + res |= check_die (&child); + + Dwarf_Die sibling; + if (dwarf_siblingof (die, &sibling) == 0) + res |= check_die (&sibling); + + return res; +} + +int +check_dbg (Dwarf *dbg) +{ + int res = 0; + Dwarf_Off off = 0; + Dwarf_Off old_off = 0; + size_t hsize; + Dwarf_Off abbrev; + uint8_t addresssize; + uint8_t offsetsize; + while (dwarf_nextcu (dbg, off, &off, &hsize, &abbrev, &addresssize, + &offsetsize) == 0) + { + Dwarf_Die die; + if (dwarf_offdie (dbg, old_off + hsize, &die) != NULL) + { + printf ("checking CU at %" PRIx64 "\n", old_off); + res |= check_die (&die); + } + + old_off = off; + } + + // Same for type... + Dwarf_Half version; + uint64_t typesig; + Dwarf_Off typeoff; + off = 0; + old_off = 0; + while (dwarf_next_unit (dbg, off, &off, &hsize, &version, &abbrev, + &addresssize, &offsetsize, &typesig, &typeoff) == 0) + { + Dwarf_Die die; + if (dwarf_offdie_types (dbg, old_off + hsize, &die) != NULL) + { + printf ("checking TU at %" PRIx64 "\n", old_off); + res |= check_die (&die); + } + + // We should have seen this already, but double check... + if (dwarf_offdie_types (dbg, old_off + typeoff, &die) != NULL) + { + printf ("checking Type DIE at %" PRIx64 "\n", + old_off + hsize + typeoff); + res |= check_die (&die); + } + + old_off = off; + } + + Dwarf *alt = dwarf_getalt (dbg); + if (alt != NULL) + { + printf ("checking alt debug\n"); + res |= check_dbg (alt); + } + + // Split or Type Dwarf_Dies gotten through dwarf_get_units. + Dwarf_CU *cu = NULL; + Dwarf_Die subdie; + uint8_t unit_type; + while (dwarf_get_units (dbg, cu, &cu, NULL, + &unit_type, NULL, &subdie) == 0) + { + if (dwarf_tag (&subdie) != DW_TAG_invalid) + { + printf ("checking %" PRIx8 " subdie\n", unit_type); + res |= check_die (&subdie); + } + } + + return res; +} + +int +main (int argc, char *argv[]) +{ + if (argc < 2) + { + printf ("No file given.\n"); + return -1; + } + + const char *name = argv[1]; + int fd = open (name, O_RDONLY); + if (fd < 0) + { + printf ("Cannnot open '%s': %s\n", name, strerror (errno)); + return -1; + } + + dwarf = dwarf_begin (fd, DWARF_C_READ); + if (dwarf == NULL) + { + printf ("Not a Dwarf file '%s': %s\n", name, dwarf_errmsg (-1)); + close (fd); + return -1; + } + + printf ("checking %s\n", name); + int res = check_dbg (dwarf); + + dwarf_end (dwarf); + close (fd); + + return res; +} diff --git a/tests/dwarf-getmacros.c b/tests/dwarf-getmacros.c index 92e093ca..ac70248d 100644 --- a/tests/dwarf-getmacros.c +++ b/tests/dwarf-getmacros.c @@ -38,7 +38,7 @@ mac (Dwarf_Macro *macro, void *dbg) dwarf_macro_opcode (macro, &opcode); switch (opcode) { - case DW_MACRO_GNU_transparent_include: + case DW_MACRO_import: { Dwarf_Attribute at; int r = dwarf_macro_param (macro, 0, &at); @@ -56,7 +56,7 @@ mac (Dwarf_Macro *macro, void *dbg) break; } - case DW_MACRO_GNU_start_file: + case DW_MACRO_start_file: { Dwarf_Files *files; size_t nfiles; @@ -73,7 +73,7 @@ mac (Dwarf_Macro *macro, void *dbg) break; } - case DW_MACRO_GNU_end_file: + case DW_MACRO_end_file: { --level; printf ("%*s/file\n", level, ""); @@ -81,7 +81,7 @@ mac (Dwarf_Macro *macro, void *dbg) } case DW_MACINFO_define: - case DW_MACRO_GNU_define_indirect: + case DW_MACRO_define_strp: { const char *value; dwarf_macro_param2 (macro, NULL, &value); @@ -90,7 +90,7 @@ mac (Dwarf_Macro *macro, void *dbg) } case DW_MACINFO_undef: - case DW_MACRO_GNU_undef_indirect: + case DW_MACRO_undef_strp: break; default: diff --git a/tests/dwarf_default_lower_bound.c b/tests/dwarf_default_lower_bound.c new file mode 100644 index 00000000..d57424fc --- /dev/null +++ b/tests/dwarf_default_lower_bound.c @@ -0,0 +1,83 @@ +/* Test all DW_LANG constants are handled by dwarf_default_lower_bound. + + Copyright (C) 2016 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include ELFUTILS_HEADER(dw) +#include "../libdw/known-dwarf.h" + +#include +#include +#include + +static void +test_lang (const char *name, int lang) +{ + Dwarf_Sword low; + int res = dwarf_default_lower_bound (lang, &low); + + /* Assembler is special, it doesn't really have arrays. */ + if (lang == DW_LANG_Mips_Assembler) + { + if (res == 0) + { + printf ("%s shouldn't have a known lower bound\n", name); + exit (-1); + } + printf ("%s: \n", name); + return; + } + + if (res != 0) + { + printf ("dwarf_default_lower_bound failed (%d) for %s\n", res, name); + exit (-1); + } + + /* All currently known lower bounds are either zero or one, but + they don't have to. Update test once one is a different value. */ + if (low != 0 && low != 1) + { + printf ("unexpected lower bound %" PRId64 " for %s\n", low, name); + exit (-1); + } + + printf ("%s: %" PRId64 "\n", name, low); +} + +int +main (int argc __attribute__ ((unused)), char *argv[] __attribute__ ((unused))) +{ + Dwarf_Sword low; + /* Bad language code must fail. */ + if (dwarf_default_lower_bound (-1, &low) == 0) + { + printf ("Bad lang code -1 succeeded (%" PRId64 ")\n", low); + exit (-1); + } + + /* Test all known language codes. */ +#define DWARF_ONE_KNOWN_DW_LANG(NAME, CODE) test_lang (#NAME, CODE); + DWARF_ALL_KNOWN_DW_LANG +#undef DWARF_ONE_KNOWN_DW_LANG + + return 0; +} diff --git a/tests/dwarfcfi.c b/tests/dwarfcfi.c new file mode 100644 index 00000000..29849e71 --- /dev/null +++ b/tests/dwarfcfi.c @@ -0,0 +1,175 @@ +/* Test program for DWARF (.debug_frame) CFI handling. + Copyright (C) 2009-2010, 2013, 2015, 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "system.h" +#include "../libdw/known-dwarf.h" + +static const char * +op_name (unsigned int code) +{ + static const char *const known[] = + { +#define DWARF_ONE_KNOWN_DW_OP(NAME, CODE) [CODE] = #NAME, + DWARF_ALL_KNOWN_DW_OP +#undef DWARF_ONE_KNOWN_DW_OP + }; + + if (likely (code < sizeof (known) / sizeof (known[0]))) + return known[code]; + + return NULL; +} + +static void +print_detail (int result, const Dwarf_Op *ops, size_t nops) +{ + if (result < 0) + printf ("indeterminate (%s)\n", dwarf_errmsg (-1)); + else if (nops == 0) + printf ("%s\n", ops == NULL ? "same_value" : "undefined"); + else + { + printf ("%s expression:", result == 0 ? "location" : "value"); + for (size_t i = 0; i < nops; ++i) + { + printf (" %s", op_name(ops[i].atom)); + if (ops[i].number2 == 0) + { + if (ops[i].atom == DW_OP_addr) + printf ("(%#" PRIx64 ")", ops[i].number); + else if (ops[i].number != 0) + printf ("(%" PRId64 ")", ops[i].number); + } + else + printf ("(%" PRId64 ",%" PRId64 ")", + ops[i].number, ops[i].number2); + } + puts (""); + } +} + +static int +handle_address (Dwarf_CFI *cfi, GElf_Addr pc) +{ + Dwarf_Frame *frame; + int result = dwarf_cfi_addrframe (cfi, pc, &frame); + if (result != 0) + { + printf ("dwarf_cfi_addrframe: %s\n", dwarf_errmsg (-1)); + return 1; + } + + Dwarf_Addr start = pc; + Dwarf_Addr end = pc; + bool signalp; + int ra_regno = dwarf_frame_info (frame, &start, &end, &signalp); + + printf ("%#" PRIx64 " => [%#" PRIx64 ", %#" PRIx64 "):\n", + pc, start, end); + + if (ra_regno < 0) + printf ("\treturn address register unavailable (%s)\n", + dwarf_errmsg (-1)); + else + printf ("\treturn address in reg%u%s\n", + ra_regno, signalp ? " (signal frame)" : ""); + + // Point cfa_ops to dummy to match print_detail expectations. + // (nops == 0 && cfa_ops != NULL => "undefined") + Dwarf_Op dummy; + Dwarf_Op *cfa_ops = &dummy; + size_t cfa_nops; + result = dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops); + + printf ("\tCFA "); + print_detail (result, cfa_ops, cfa_nops); + + // Print the location of the first 10 (DWARF nr) registers + for (int r = 0; r < 10; r++) + { + Dwarf_Op ops_mem[3]; + Dwarf_Op *ops; + size_t nops; + printf ("\treg%d: ", r); + int reg_result = dwarf_frame_register (frame, r, ops_mem, &ops, &nops); + print_detail (reg_result, ops, nops); + result |= reg_result; + } + + free (frame); + return result; +} + +int +main (int argc, char *argv[]) +{ + if (argc <= 2) + error (EXIT_FAILURE, 0, "need file name argument and addresses"); + + int fd = open (argv[1], O_RDONLY); + if (fd == -1) + error (EXIT_FAILURE, errno, "cannot open input file `%s'", argv[1]); + + elf_version (EV_CURRENT); + + Elf *elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + error (EXIT_FAILURE, 0, "cannot create ELF descriptor: %s", + elf_errmsg (-1)); + + Dwarf *dwarf = dwarf_begin_elf (elf, DWARF_C_READ, NULL); + if (dwarf == NULL) + error (EXIT_FAILURE, 0, "cannot create DWARF descriptor: %s", + dwarf_errmsg (-1)); + + Dwarf_CFI *cfi = dwarf_getcfi (dwarf); + if (cfi == NULL) + error (EXIT_FAILURE, 0, "cannot get DWARF CFI from .dwarf_frame: %s", + dwarf_errmsg (-1)); + + int result = 0; + int args = 2; + do + { + char *endp; + uintmax_t addr = strtoumax (argv[args], &endp, 0); + if (endp != argv[args]) + result |= handle_address (cfi, addr); + else + result = 1; + } + while (args++ < argc - 1); + + dwarf_end (dwarf); + elf_end (elf); + + return result; +} diff --git a/tests/dwfl-addr-sect.c b/tests/dwfl-addr-sect.c index 21e470a3..4d85c007 100644 --- a/tests/dwfl-addr-sect.c +++ b/tests/dwfl-addr-sect.c @@ -23,11 +23,11 @@ #include #include #include -#include #include #include #include ELFUTILS_HEADER(dwfl) #include +#include "system.h" static int handle_address (Dwfl *dwfl, Dwarf_Addr address) diff --git a/tests/dwfl-bug-addr-overflow.c b/tests/dwfl-bug-addr-overflow.c index aa8030e1..9a3373a6 100644 --- a/tests/dwfl-bug-addr-overflow.c +++ b/tests/dwfl-bug-addr-overflow.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include ELFUTILS_HEADER(dwfl) diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c index 689cdd79..ee3a916b 100644 --- a/tests/dwfl-bug-fd-leak.c +++ b/tests/dwfl-bug-fd-leak.c @@ -24,9 +24,9 @@ #include #include #include -#include #include #include +#include "system.h" #ifndef __linux__ int diff --git a/tests/dwfl-bug-getmodules.c b/tests/dwfl-bug-getmodules.c index 1ee989f8..2783f65c 100644 --- a/tests/dwfl-bug-getmodules.c +++ b/tests/dwfl-bug-getmodules.c @@ -17,8 +17,8 @@ #include #include ELFUTILS_HEADER(dwfl) +#include "system.h" -#include static const Dwfl_Callbacks callbacks = { diff --git a/tests/dwfl-proc-attach.c b/tests/dwfl-proc-attach.c index e7bb2010..102ba181 100644 --- a/tests/dwfl-proc-attach.c +++ b/tests/dwfl-proc-attach.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #ifdef __linux__ #include @@ -31,6 +30,7 @@ #include ELFUTILS_HEADER(dwfl) #include #endif +#include "system.h" #ifndef __linux__ int diff --git a/tests/dwfl-report-elf-align.c b/tests/dwfl-report-elf-align.c index a4e97d3c..6558ab81 100644 --- a/tests/dwfl-report-elf-align.c +++ b/tests/dwfl-report-elf-align.c @@ -20,11 +20,11 @@ #include #include #include -#include #include #include #include #include ELFUTILS_HEADER(dwfl) +#include "system.h" static const Dwfl_Callbacks offline_callbacks = diff --git a/tests/dwfllines.c b/tests/dwfllines.c index 90379dd2..d732e401 100644 --- a/tests/dwfllines.c +++ b/tests/dwfllines.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include "system.h" int main (int argc, char *argv[]) diff --git a/tests/dwflmodtest.c b/tests/dwflmodtest.c index 0027f96b..9251d158 100644 --- a/tests/dwflmodtest.c +++ b/tests/dwflmodtest.c @@ -23,11 +23,11 @@ #include #include #include -#include #include #include #include ELFUTILS_HEADER(dwfl) #include +#include "system.h" static bool show_inlines; diff --git a/tests/dwflsyms.c b/tests/dwflsyms.c index 49ac3346..bc23cb63 100644 --- a/tests/dwflsyms.c +++ b/tests/dwflsyms.c @@ -25,7 +25,6 @@ #include #include #include -#include #include static const char * diff --git a/tests/early-offscn.c b/tests/early-offscn.c index 924cb9ef..af29da5a 100644 --- a/tests/early-offscn.c +++ b/tests/early-offscn.c @@ -19,11 +19,11 @@ #endif #include -#include #include #include #include #include +#include "system.h" int main (int argc, char *argv[]) diff --git a/tests/ecp.c b/tests/ecp.c index 38a6859e..1df40a32 100644 --- a/tests/ecp.c +++ b/tests/ecp.c @@ -20,11 +20,11 @@ #endif #include -#include #include #include #include #include +#include "system.h" int main (int argc, char *argv[]) diff --git a/tests/elfshphehdr.c b/tests/elfshphehdr.c index 5a297e0d..8183937c 100644 --- a/tests/elfshphehdr.c +++ b/tests/elfshphehdr.c @@ -152,7 +152,7 @@ main (int argc __attribute__ ((unused)), char **argv __attribute ((unused))) { elf_version (EV_CURRENT); - int fd = fd = open("/dev/zero", O_WRONLY); + int fd = open("/dev/null", O_WRONLY); check ("open", fd >= 0); Elf *elf; diff --git a/tests/elfstrmerge.c b/tests/elfstrmerge.c index 8d5b53cb..ba0d68df 100644 --- a/tests/elfstrmerge.c +++ b/tests/elfstrmerge.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -195,7 +194,7 @@ main (int argc, char **argv) size_t symtabndx = 0; Elf_Scn *symtabscn = NULL; GElf_Shdr symtabshdr_mem; - GElf_Shdr *symtabshdr; + GElf_Shdr *symtabshdr = NULL; while ((symtabscn = elf_nextscn (elf, symtabscn)) != NULL) { symtabshdr = gelf_getshdr (symtabscn, &symtabshdr_mem); @@ -210,7 +209,7 @@ main (int argc, char **argv) } } - if (symtabndx == 0) + if (symtabshdr == NULL) fail ("No symtab found", fname); if ((symtabshdr->sh_flags & SHF_ALLOC) != 0) @@ -578,7 +577,8 @@ main (int argc, char **argv) break; case SHT_DYNAMIC: - /* Fallthrough. There are string indexes in here, but + FALLTHROUGH; + /* There are string indexes in here, but they (should) point to a allocated string table, which we don't alter. */ default: diff --git a/tests/fillfile.c b/tests/fillfile.c new file mode 100644 index 00000000..915e249d --- /dev/null +++ b/tests/fillfile.c @@ -0,0 +1,448 @@ +/* Test program for changing data in one section (but not others) with gaps. + Copyright (C) 2017 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include +#include +#include + +#include ELFUTILS_HEADER(elf) +#include + + +/* Index of last string added. Returned by add_string (). */ +static size_t stridx = 0; + +/* Adds a string and returns the offset in the section. */ +static size_t +add_strtab_entry (Elf_Scn *strtab, const char *str) +{ + size_t lastidx = stridx; + size_t size = strlen (str) + 1; + + Elf_Data *data = elf_newdata (strtab); + if (data == NULL) + { + printf ("cannot create data SHSTRTAB section: %s\n", elf_errmsg (-1)); + exit (1); + } + + data->d_buf = (char *) str; /* Discards const, but we will not change. */ + data->d_type = ELF_T_BYTE; + data->d_size = size; + data->d_align = 1; + data->d_version = EV_CURRENT; + + stridx += size; + printf ("add_string: '%s', stridx: %zd, lastidx: %zd\n", + str, stridx, lastidx); + return lastidx; +} + +static Elf_Scn * +create_strtab (Elf *elf) +{ + // Create strtab section. + Elf_Scn *scn = elf_newscn (elf); + if (scn == NULL) + { + printf ("cannot create strings section: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Add an empty string to the table as NUL entry for section zero. + add_strtab_entry (scn, ""); + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for new strtab section: %s\n", + elf_errmsg (-1)); + exit (1); + } + + shdr->sh_type = SHT_STRTAB; + shdr->sh_flags = 0; + shdr->sh_addr = 0; + shdr->sh_link = SHN_UNDEF; + shdr->sh_info = SHN_UNDEF; + shdr->sh_addralign = 1; + shdr->sh_entsize = 0; + shdr->sh_name = add_strtab_entry (scn, ".strtab"); + + // We have to store the section strtab index in the ELF header. + // So sections have actual names. + GElf_Ehdr ehdr_mem; + GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); + if (ehdr == NULL) + { + printf ("cannot get ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + int ndx = elf_ndxscn (scn); + ehdr->e_shstrndx = ndx; + + if (gelf_update_ehdr (elf, ehdr) == 0) + { + printf ("cannot update ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Finished strtab section, update the header. + if (gelf_update_shdr (scn, shdr) == 0) + { + printf ("cannot update STRTAB section header: %s\n", elf_errmsg (-1)); + exit (1); + } + + return scn; +} + +static char sec_data[] = { 1, 2, 3, 4, 5 }; +static char new_data[] = { 5, 4, 3, 2, 1 }; + +static void +add_data_section (Elf *elf, Elf_Scn *strtab, const char *sname) +{ + printf ("Add data section %s\n", sname); + Elf_Scn *scn = elf_newscn (elf); + if (scn == NULL) + { + printf ("cannot create strings section: %s\n", elf_errmsg (-1)); + exit (1); + } + + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for new %s section: %s\n", + sname, elf_errmsg (-1)); + exit (1); + } + + shdr->sh_type = SHT_PROGBITS; + shdr->sh_flags = 0; + shdr->sh_addr = 0; + shdr->sh_link = SHN_UNDEF; + shdr->sh_info = SHN_UNDEF; + shdr->sh_addralign = 128; // Large alignment to force gap between sections. + shdr->sh_entsize = 1; + shdr->sh_name = add_strtab_entry (strtab, sname); + + if (gelf_update_shdr (scn, shdr) == 0) + { + printf ("cannot update %s section header: %s\n", sname, elf_errmsg (-1)); + exit (1); + } + + /* Add some data, but less than alignment. */ + Elf_Data *data = elf_newdata (scn); + if (data == NULL) + { + printf ("cannot update %s section header: %s\n", sname, elf_errmsg (-1)); + exit (1); + } + data->d_buf = sec_data; + data->d_size = 5; +} + +static void +check_data (const char *sname, Elf_Data *data, char *buf) +{ + printf ("check data %s [", sname); + for (int i = 0; i < 5; i++) + printf ("%d%s", buf[i], i < 4 ? "," : ""); + printf ("]\n"); + if (data == NULL || data->d_buf == NULL) + { + printf ("No data in section %s\n", sname); + exit (1); + } + + if (data->d_size != 5 || memcmp (data->d_buf, buf, 5) != 0) + { + printf ("Wrong data in section %s [", sname); + for (size_t i = 0; i < data->d_size; i++) + printf ("%d%s", ((char *)data->d_buf)[i], + i < data->d_size - 1 ? "," : ""); + printf ("]\n"); + exit(1); + } +} + +static void +check_elf (const char *fname, int class, int use_mmap) +{ + printf ("\nfname: %s\n", fname); + stridx = 0; // Reset strtab strings index + + int fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666); + if (fd == -1) + { + printf ("cannot open `%s': %s\n", fname, strerror (errno)); + exit (1); + } + + Elf *elf = elf_begin (fd, use_mmap ? ELF_C_WRITE_MMAP : ELF_C_WRITE, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Create an ELF header. + if (gelf_newehdr (elf, class) == 0) + { + printf ("cannot create ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + GElf_Ehdr ehdr_mem; + GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem); + if (ehdr == NULL) + { + printf ("cannot get ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Initialize header. + ehdr->e_ident[EI_DATA] = class == ELFCLASS64 ? ELFDATA2LSB : ELFDATA2MSB; + ehdr->e_ident[EI_OSABI] = ELFOSABI_GNU; + ehdr->e_type = ET_NONE; + ehdr->e_machine = EM_X86_64; + ehdr->e_version = EV_CURRENT; + + if (gelf_update_ehdr (elf, ehdr) == 0) + { + printf ("cannot update ELF header: %s\n", elf_errmsg (-1)); + exit (1); + } + + Elf_Scn *strtab = create_strtab (elf); + add_data_section (elf, strtab, ".data1"); + add_data_section (elf, strtab, ".data2"); + add_data_section (elf, strtab, ".data3"); + add_data_section (elf, strtab, ".data4"); + + // Write everything to disk. + if (elf_update (elf, ELF_C_WRITE) < 0) + { + printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1)); + exit (1); + } + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + /* Reread the ELF from disk now. */ + printf ("Rereading %s\n", fname); + fd = open (fname, O_RDWR, 0666); + if (fd == -1) + { + printf ("cannot (re)open `%s': %s\n", fname, strerror (errno)); + exit (1); + } + + elf = elf_begin (fd, use_mmap ? ELF_C_RDWR_MMAP : ELF_C_RDWR, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor read-only: %s\n", elf_errmsg (-1)); + exit (1); + } + + /* We are going to change some data (in-place), but want the layout + to stay exactly the same. */ + elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); + + size_t shdrstrndx; + if (elf_getshdrstrndx (elf, &shdrstrndx) != 0) + { + printf ("cannot get shdr str ndx\n"); + exit (1); + } + printf ("shdrstrndx: %zd\n", shdrstrndx); + + // Get third data section and change it. + Elf_Scn *checkscn = NULL; + Elf_Scn *scn = elf_nextscn (elf, NULL); + while (scn != NULL) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for section: %s\n", elf_errmsg (-1)); + exit (1); + } + const char *sname = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (sname != NULL && strcmp (".data3", sname) == 0) + checkscn = scn; + + // Get all data, but don't really use it + // (this triggered the original bug). + Elf_Data *data = elf_getdata (scn, NULL); + if (data != NULL && data->d_buf != NULL && data->d_size == 0) + { + printf ("Bad data...n"); + exit (1); + } + scn = elf_nextscn (elf, scn); + } + + if (checkscn == NULL) + { + printf ("ELF file doesn't have a .data3 section\n"); + exit (1); + } + + Elf_Data *data = elf_getdata (checkscn, NULL); + check_data (".data3", data, sec_data); + memcpy (data->d_buf, new_data, 5); + elf_flagdata (data, ELF_C_SET, ELF_F_DIRTY); + + // Write everything to disk. + if (elf_update (elf, ELF_C_WRITE) < 0) + { + printf ("failure in elf_update(WRITE): %s\n", elf_errmsg (-1)); + exit (1); + } + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + // And read it in one last time. + printf ("Rereading %s again\n", fname); + fd = open (fname, O_RDONLY, 0666); + if (fd == -1) + { + printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno)); + exit (1); + } + + elf = elf_begin (fd, use_mmap ? ELF_C_READ_MMAP : ELF_C_READ, NULL); + if (elf == NULL) + { + printf ("cannot create ELF descriptor read-only: %s\n", elf_errmsg (-1)); + exit (1); + } + + // Get all .data sections and check them. + Elf_Scn *scn1 = NULL; + Elf_Scn *scn2 = NULL; + Elf_Scn *scn3 = NULL; + Elf_Scn *scn4 = NULL; + scn = elf_nextscn (elf, NULL); + while (scn != NULL) + { + GElf_Shdr shdr_mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem); + if (shdr == NULL) + { + printf ("cannot get header for section: %s\n", elf_errmsg (-1)); + exit (1); + } + const char *sname = elf_strptr (elf, shdrstrndx, shdr->sh_name); + if (sname != NULL && strcmp (".data1", sname) == 0) + scn1 = scn; + else if (sname != NULL && strcmp (".data2", sname) == 0) + scn2 = scn; + else if (sname != NULL && strcmp (".data3", sname) == 0) + scn3 = scn; + else if (sname != NULL && strcmp (".data4", sname) == 0) + scn4 = scn; + scn = elf_nextscn (elf, scn); + } + + if (scn1 == NULL) + { + printf ("ELF file doesn't have a .data1 section\n"); + exit (1); + } + data = elf_getdata (scn1, NULL); + check_data (".data1", data, sec_data); + + if (scn2 == NULL) + { + printf ("ELF file doesn't have a .data2 section\n"); + exit (1); + } + data = elf_getdata (scn2, NULL); + check_data (".data2", data, sec_data); + + if (scn3 == NULL) + { + printf ("ELF file doesn't have a .data3 section\n"); + exit (1); + } + data = elf_getdata (scn3, NULL); + check_data (".data3", data, new_data); + + if (scn4 == NULL) + { + printf ("ELF file doesn't have a .data4 section\n"); + exit (1); + } + data = elf_getdata (scn4, NULL); + check_data (".data4", data, sec_data); + + if (elf_end (elf) != 0) + { + printf ("failure in elf_end: %s\n", elf_errmsg (-1)); + exit (1); + } + + close (fd); + + unlink (fname); +} + +int +main (int argc __attribute__ ((unused)), + char *argv[] __attribute__ ((unused))) +{ + elf_version (EV_CURRENT); + + elf_fill (0xA); + + check_elf ("fill.elf.32", ELFCLASS32, 0); + check_elf ("fill.elf.32.mmap", ELFCLASS32, 1); + check_elf ("fill.elf.64", ELFCLASS64, 0); + check_elf ("fill.elf.64.mmap", ELFCLASS64, 1); + + return 0; +} diff --git a/tests/find-prologues.c b/tests/find-prologues.c index ba8ae371..b0bf9362 100644 --- a/tests/find-prologues.c +++ b/tests/find-prologues.c @@ -25,9 +25,9 @@ #include #include #include -#include #include #include +#include "system.h" struct args diff --git a/tests/funcretval.c b/tests/funcretval.c index 8d19d117..16cd1a44 100644 --- a/tests/funcretval.c +++ b/tests/funcretval.c @@ -25,9 +25,9 @@ #include #include #include -#include #include #include +#include "system.h" struct args diff --git a/tests/funcscopes.c b/tests/funcscopes.c index 9c901858..689d376a 100644 --- a/tests/funcscopes.c +++ b/tests/funcscopes.c @@ -25,9 +25,9 @@ #include #include #include -#include #include #include +#include "system.h" static void diff --git a/tests/get-lines.c b/tests/get-lines.c index c361a2c3..188d0162 100644 --- a/tests/get-lines.c +++ b/tests/get-lines.c @@ -24,6 +24,7 @@ #include #include ELFUTILS_HEADER(dw) #include +#include #include @@ -100,6 +101,28 @@ main (int argc, char *argv[]) printf ("%" PRIx64 ": %s:%d:", (uint64_t) addr, file ?: "???", line); + /* Getting the file path through the Dwarf_Files should + result in the same path. */ + Dwarf_Files *files; + size_t idx; + if (dwarf_line_file (l, &files, &idx) != 0) + { + printf ("%s: cannot get file from line (%zd): %s\n", + argv[cnt], i, dwarf_errmsg (-1)); + result = 1; + break; + } + const char *path = dwarf_filesrc (files, idx, NULL, NULL); + if ((path == NULL && file != NULL) + || (path != NULL && file == NULL) + || (strcmp (file, path) != 0)) + { + printf ("%s: line %zd srcline (%s) != file srcline (%s)\n", + argv[cnt], i, file ?: "???", path ?: "???"); + result = 1; + break; + } + int column; if (dwarf_linecol (l, &column) != 0) column = 0; diff --git a/tests/get-units-invalid.c b/tests/get-units-invalid.c new file mode 100644 index 00000000..155e12db --- /dev/null +++ b/tests/get-units-invalid.c @@ -0,0 +1,121 @@ +/* Test cudie and subdie properties. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include + + +int +main (int argc, char *argv[]) +{ + for (int i = 1; i < argc; i++) + { + printf ("file: %s\n", argv[i]); + int fd = open (argv[i], O_RDONLY); + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + { + printf ("%s not usable: %s\n", argv[i], dwarf_errmsg (-1)); + return -1; + } + + Dwarf_CU *cu = NULL; + Dwarf_Die cudie, subdie; + uint8_t unit_type; + while (dwarf_get_units (dbg, cu, &cu, NULL, + &unit_type, &cudie, &subdie) == 0) + { + printf ("Got cudie: %s, unit_type: %" PRIx8 "\n", + dwarf_diename (&cudie), unit_type); + + int tag = dwarf_tag (&subdie); + if (unit_type == DW_UT_compile) + { + if (tag != DW_TAG_invalid) + { + printf ("Not invalid: %x\n", dwarf_tag (&subdie)); + return -1; + } + if (dwarf_diename (&subdie) != NULL) + { + printf ("Should have NULL name: %s\n", + dwarf_diename (&subdie)); + return -1; + } + Dwarf_Die result; + if (dwarf_siblingof (&subdie, &result) != -1) + { + printf ("Should NOT have a valid sibling: %s\n", + dwarf_diename (&result)); + return -1; + } + if (dwarf_child (&subdie, &result) != -1) + { + printf ("Should NOT have a valid child: %s\n", + dwarf_diename (&result)); + return -1; + } + Dwarf_Addr base, start, end; + if (dwarf_ranges (&subdie, 0, &base, &start, &end) != -1) + { + printf ("Should NOT have a ranges: %s\n", + dwarf_diename (&subdie)); + return -1; + } + if (dwarf_cuoffset (&subdie) != (Dwarf_Off) -1) + { + printf ("Should NOT have a cuoffset: %s\n", + dwarf_diename (&subdie)); + return -1; + } + if (dwarf_dieoffset (&subdie) != (Dwarf_Off) -1) + { + printf ("Should NOT have a die offset: %s\n", + dwarf_diename (&subdie)); + return -1; + } + if (dwarf_getabbrev (&subdie, 0, NULL) != NULL) + { + printf ("Should NOT have an abbrev: %s\n", + dwarf_diename (&subdie)); + return -1; + } + } + else if (unit_type == DW_UT_type) + printf ("subdie: %s\n", dwarf_diename (&subdie)); + else + printf ("subdie tag: %x\n", dwarf_tag (&subdie)); + } + + dwarf_end (dbg); + close (fd); + + printf ("\n"); + } + + return 0; +} diff --git a/tests/get-units-split.c b/tests/get-units-split.c new file mode 100644 index 00000000..410483a0 --- /dev/null +++ b/tests/get-units-split.c @@ -0,0 +1,101 @@ +/* Test dwarf_get_units finds split DWO CUs. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include + + +int +main (int argc, char *argv[]) +{ + for (int i = 1; i < argc; i++) + { + printf ("file: %s\n", argv[i]); + int fd = open (argv[i], O_RDONLY); + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + { + printf ("%s not usable: %s\n", argv[i], dwarf_errmsg (-1)); + return -1; + } + + Dwarf_CU *cu = NULL; + Dwarf_Die cudie, subdie; + uint8_t unit_type; + int count = 0; + while (dwarf_get_units (dbg, cu, &cu, NULL, + &unit_type, &cudie, &subdie) == 0) + { + count++; + printf ("Got cudie unit_type: %" PRIx8 "\n", unit_type); + + if (unit_type == DW_UT_skeleton) + { + Dwarf_CU *skel_cu = cudie.cu; + Dwarf_CU *split_cu = subdie.cu; + Dwarf_Die skel_die, split_die; + uint64_t skel_id, split_id; + + printf ("Found a skeleton unit, with split die: %s\n", + dwarf_diename (&subdie)); + + if (dwarf_cu_die (skel_cu, &skel_die, NULL, NULL, NULL, NULL, + &skel_id, NULL) == NULL) + { + printf ("bad skel_cu: %s\n", dwarf_errmsg (-1)); + return -1; + } + + if (dwarf_cu_die (split_cu, &split_die, NULL, NULL, NULL, NULL, + &split_id, NULL) == NULL) + { + printf ("bad skel_cu: %s\n", dwarf_errmsg (-1)); + return -1; + } + + if (skel_id != split_id) + { + printf ("Skeleton id and Split id not equal!\n"); + return -1; + } + } + } + + if (count == 0) + { + printf ("No units found\n"); + return -1; + } + + dwarf_end (dbg); + close (fd); + + printf ("\n"); + } + + return 0; +} diff --git a/tests/getsrc_die.c b/tests/getsrc_die.c index 055aede0..f878fa62 100644 --- a/tests/getsrc_die.c +++ b/tests/getsrc_die.c @@ -19,7 +19,6 @@ #endif #include -#include #include #include #include @@ -27,6 +26,7 @@ #include #include #include +#include "system.h" int diff --git a/tests/hello_riscv64.ko.bz2 b/tests/hello_riscv64.ko.bz2 new file mode 100644 index 00000000..a086c380 Binary files /dev/null and b/tests/hello_riscv64.ko.bz2 differ diff --git a/tests/line2addr.c b/tests/line2addr.c index e0d65d3d..663746fd 100644 --- a/tests/line2addr.c +++ b/tests/line2addr.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include "system.h" static void diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c index d0f43023..78b6ad08 100644 --- a/tests/low_high_pc.c +++ b/tests/low_high_pc.c @@ -1,5 +1,5 @@ /* Test program for dwarf_lowpc and dwarf_highpc - Copyright (C) 2012 Red Hat, Inc. + Copyright (C) 2012, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -25,7 +25,6 @@ #include #include #include -#include #include #include @@ -55,7 +54,9 @@ handle_die (Dwarf_Die *die, void *arg) const char *name = dwarf_diename (die); if (name == NULL) - fail (off, "", "die without a name"); + name = ""; + + printf ("[%" PRIx64 "] %s\n", off, name); Dwarf_Addr lowpc = 0; Dwarf_Addr highpc = 0; @@ -101,9 +102,31 @@ main (int argc, char *argv[]) a.file = dwarf_diename (a.cu); handle_die (a.cu, &a); dwarf_getfuncs (a.cu, &handle_die, &a, 0); + + uint8_t unit_type; + Dwarf_Die subdie; + if (dwarf_cu_info (a.cu->cu, NULL, &unit_type, NULL, &subdie, + NULL, NULL, NULL) != 0) + { + Dwarf_Off off = dwarf_dieoffset (a.cu); + fail (off, "dwarf_cu_info", dwarf_errmsg (-1)); + } + + if (unit_type == DW_UT_skeleton) + { + const char *name = dwarf_diename (&subdie) ?: ""; + printf ("Following split subdie: %s\n", name); + struct args b = a; + b.cu = &subdie; + handle_die (b.cu, &b); + dwarf_getfuncs (b.cu, &handle_die, &b, 0); + printf ("Done subdie: %s\n", name); + } } dwfl_end (a.dwfl); + printf ("\n"); + return result; } diff --git a/tests/md5-sha1-test.c b/tests/md5-sha1-test.c deleted file mode 100644 index d50355e9..00000000 --- a/tests/md5-sha1-test.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 2011 Red Hat, Inc. - This file is part of elfutils. - - This file is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - elfutils is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include - -#include "md5.h" -#include "sha1.h" - -static const struct expected -{ - const char *sample; - const char *md5_expected; - const char *sha1_expected; -} tests[] = - { - { - "abc", - "\x90\x01\x50\x98\x3c\xd2\x4f\xb0\xd6\x96\x3f\x7d\x28\xe1\x7f\x72", - "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e" - "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d" - }, - { - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "\x82\x15\xef\x07\x96\xa2\x0b\xca\xaa\xe1\x16\xd3\x87\x6c\x66\x4a", - "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae" - "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1" - }, - { - "\0a", - "\x77\x07\xd6\xae\x4e\x02\x7c\x70\xee\xa2\xa9\x35\xc2\x29\x6f\x21", - "\x34\xaa\x97\x3c\xd4\xc4\xda\xa4\xf6\x1e" - "\xeb\x2b\xdb\xad\x27\x31\x65\x34\x01\x6f", - }, - { - "When in the Course of human events it becomes necessary", - "\x62\x6b\x5e\x22\xcd\x3d\x02\xea\x07\xde\xd4\x50\x62\x3d\xb9\x96", - "\x66\xc3\xc6\x8d\x62\x91\xc5\x1e\x63\x0c" - "\x85\xc8\x6c\xc4\x4b\x3a\x79\x3e\x07\x28", - }, - }; -#define NTESTS (sizeof tests / sizeof tests[0]) - -#define md5_size 16 -#define sha1_size 20 - -#define TEST_HASH(ALGO, I) \ - { \ - struct ALGO##_ctx ctx; \ - uint32_t result_buffer[(ALGO##_size + 3) / 4]; \ - ALGO##_init_ctx (&ctx); \ - if (tests[I].sample[0] == '\0') \ - { \ - char input_buffer[1000]; \ - memset (input_buffer, tests[I].sample[1], sizeof input_buffer); \ - for (int rept = 0; rept < 1000; ++rept) \ - ALGO##_process_bytes (input_buffer, sizeof input_buffer, &ctx); \ - } \ - else \ - ALGO##_process_bytes (tests[I].sample, strlen (tests[I].sample), &ctx); \ - char *result = ALGO##_finish_ctx (&ctx, result_buffer); \ - if (result != (void *) result_buffer \ - || memcmp (result, tests[I].ALGO##_expected, ALGO##_size) != 0) \ - error (0, 0, #ALGO " test %zu failed", 1 + I); \ - } - -int -main (void) -{ - for (size_t i = 0; i < NTESTS; ++i) - { - TEST_HASH (md5, i); - TEST_HASH (sha1, i); - } - return error_message_count; -} diff --git a/tests/msg_tst.c b/tests/msg_tst.c index 7baea0a2..aa974d00 100644 --- a/tests/msg_tst.c +++ b/tests/msg_tst.c @@ -39,6 +39,7 @@ static struct { ELF_E_INVALID_ENCODING, "invalid encoding" }, { ELF_E_NOMEM, "out of memory" }, { ELF_E_INVALID_FILE, "invalid file descriptor" }, + { ELF_E_INVALID_ELF, "invalid ELF file data" }, { ELF_E_INVALID_OP, "invalid operation" }, { ELF_E_NO_VERSION, "ELF version not set" }, { ELF_E_INVALID_CMD, "invalid command" }, diff --git a/tests/next-files.c b/tests/next-files.c new file mode 100644 index 00000000..9de5c8b0 --- /dev/null +++ b/tests/next-files.c @@ -0,0 +1,93 @@ +/* A variant of get-files test that uses dwarf_next_lines. + Copyright (C) 2002, 2004, 2005, 2007, 2014, 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include ELFUTILS_HEADER(dw) +#include +#include + + +int +main (int argc, char *argv[]) +{ + int result = 0; + int cnt; + + for (cnt = 1; cnt < argc; ++cnt) + { + int fd = open (argv[cnt], O_RDONLY); + + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + { + printf ("%s not usable\n", argv[cnt]); + result = 1; + if (fd != -1) + close (fd); + continue; + } + + Dwarf_Off off; + Dwarf_Off next_off = 0; + Dwarf_CU *cu = NULL; + Dwarf_Files *files; + size_t nfiles; + int res; + while ((res = dwarf_next_lines (dbg, off = next_off, &next_off, &cu, + &files, &nfiles, NULL, NULL)) == 0) + { + printf ("off = %" PRIu64 "\n", off); + + const char *const *dirs; + size_t ndirs; + if (dwarf_getsrcdirs (files, &dirs, &ndirs) != 0) + { + printf ("%s: cannot get include directories\n", argv[cnt]); + result = 1; + break; + } + + if (dirs[0] == NULL) + puts (" dirs[0] = (null)"); + else + printf (" dirs[0] = \"%s\"\n", dirs[0]); + for (size_t i = 1; i < ndirs; ++i) + printf (" dirs[%zu] = \"%s\"\n", i, dirs[i]); + + for (size_t i = 0; i < nfiles; ++i) + printf (" file[%zu] = \"%s\"\n", i, + dwarf_filesrc (files, i, NULL, NULL)); + } + + if (res < 0) + { + printf ("dwarf_next_lines failed: %s\n", dwarf_errmsg (-1)); + result = 1; + } + + dwarf_end (dbg); + close (fd); + } + + return result; +} diff --git a/tests/next-lines.c b/tests/next-lines.c new file mode 100644 index 00000000..cfb74cde --- /dev/null +++ b/tests/next-lines.c @@ -0,0 +1,144 @@ +/* A variant of get-lines that uses dwarf_next_lines. + Copyright (C) 2002, 2004, 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include + + +int +main (int argc, char *argv[]) +{ + int result = 0; + int cnt; + + for (cnt = 1; cnt < argc; ++cnt) + { + int fd = open (argv[cnt], O_RDONLY); + + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + { + printf ("%s not usable: %s\n", argv[cnt], dwarf_errmsg (-1)); + close (fd); + continue; + } + + Dwarf_Off off; + Dwarf_Off next_off = 0; + Dwarf_CU *cu = NULL; + Dwarf_Lines *lb; + size_t nlb; + int res; + while ((res = dwarf_next_lines (dbg, off = next_off, &next_off, &cu, + NULL, NULL, &lb, &nlb)) == 0) + { + printf ("off = %" PRIu64 "\n", off); + printf (" %zu lines\n", nlb); + + for (size_t i = 0; i < nlb; ++i) + { + Dwarf_Line *l = dwarf_onesrcline (lb, i); + if (l == NULL) + { + printf ("%s: cannot get individual line\n", argv[cnt]); + result = 1; + break; + } + + Dwarf_Addr addr; + if (dwarf_lineaddr (l, &addr) != 0) + addr = 0; + const char *file = dwarf_linesrc (l, NULL, NULL); + int line; + if (dwarf_lineno (l, &line) != 0) + line = 0; + + printf ("%" PRIx64 ": %s:%d:", (uint64_t) addr, + file ?: "???", line); + + /* Getting the file path through the Dwarf_Files should + result in the same path. */ + Dwarf_Files *files; + size_t idx; + if (dwarf_line_file (l, &files, &idx) != 0) + { + printf ("%s: cannot get file from line (%zd): %s\n", + argv[cnt], i, dwarf_errmsg (-1)); + result = 1; + break; + } + const char *path = dwarf_filesrc (files, idx, NULL, NULL); + if ((path == NULL && file != NULL) + || (path != NULL && file == NULL) + || (strcmp (file, path) != 0)) + { + printf ("%s: line %zd srcline (%s) != file srcline (%s)\n", + argv[cnt], i, file ?: "???", path ?: "???"); + result = 1; + break; + } + + int column; + if (dwarf_linecol (l, &column) != 0) + column = 0; + if (column >= 0) + printf ("%d:", column); + + bool is_stmt; + if (dwarf_linebeginstatement (l, &is_stmt) != 0) + is_stmt = false; + bool end_sequence; + if (dwarf_lineendsequence (l, &end_sequence) != 0) + end_sequence = false; + bool basic_block; + if (dwarf_lineblock (l, &basic_block) != 0) + basic_block = false; + bool prologue_end; + if (dwarf_lineprologueend (l, &prologue_end) != 0) + prologue_end = false; + bool epilogue_begin; + if (dwarf_lineepiloguebegin (l, &epilogue_begin) != 0) + epilogue_begin = false; + + printf (" is_stmt:%s, end_seq:%s, bb:%s, prologue:%s, epilogue:%s\n", + is_stmt ? "yes" : "no", end_sequence ? "yes" : "no", + basic_block ? "yes" : "no", prologue_end ? "yes" : "no", + epilogue_begin ? "yes" : "no"); + } + } + + if (res < 0) + { + printf ("dwarf_next_lines failed: %s\n", dwarf_errmsg (-1)); + result = 1; + } + + dwarf_end (dbg); + close (fd); + } + + return result; +} diff --git a/tests/next_cfi.c b/tests/next_cfi.c new file mode 100644 index 00000000..6a847b4d --- /dev/null +++ b/tests/next_cfi.c @@ -0,0 +1,150 @@ +/* Test program for dwarf_next_cfi + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include +#include +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "system.h" + +void +handle_section (char *name, const unsigned char e_ident[], + Elf_Scn *scn, const bool is_eh) +{ + if (is_eh) + printf (".eh_frame\n"); + else + printf (".debug_frame\n"); + + GElf_Shdr mem; + GElf_Shdr *shdr = gelf_getshdr (scn, &mem); + if (shdr == NULL) + error (EXIT_FAILURE, 0, "Couldn't get section header: %s", + elf_errmsg (-1)); + if ((shdr->sh_flags & SHF_COMPRESSED) != 0) + { + if (elf_compress (scn, 0, 0) < 0) + error (EXIT_FAILURE, 0, "Couldn't decompress section: %s", + elf_errmsg (-1)); + } + else if (name[0] == '.' && name[1] == 'z') + { + if (elf_compress_gnu (scn, 0, 0) < 0) + error (EXIT_FAILURE, 0, "Couldn't decompress section: %s", + elf_errmsg (-1)); + } + + Elf_Data *data = elf_getdata (scn, NULL); + if (data == NULL || data->d_buf == NULL) + error (EXIT_FAILURE, 0, "no section data"); + + int res; + Dwarf_Off off; + Dwarf_Off next_off = 0; + Dwarf_CFI_Entry entry; + while ((res = dwarf_next_cfi (e_ident, data, is_eh, off = next_off, + &next_off, &entry)) == 0) + { + printf ("[%" PRId64 "] ", off); + if (dwarf_cfi_cie_p (&entry)) + printf ("CIE augmentation=\"%s\"\n", entry.cie.augmentation); + else + { + printf ("FDE cie=[%" PRId64 "]\n", entry.fde.CIE_pointer); + + Dwarf_Off cie_off = entry.fde.CIE_pointer; + Dwarf_Off cie_off_next; + Dwarf_CFI_Entry cie_entry; + if (dwarf_next_cfi (e_ident, data, is_eh, cie_off, &cie_off_next, + &cie_entry) != 0 + || !dwarf_cfi_cie_p (&cie_entry)) + error (EXIT_FAILURE, 0, "FDE doesn't point to CIE"); + } + } + + if (res < 0) + error (EXIT_FAILURE, 0, "dwarf_next_cfi failed: %s\n", + dwarf_errmsg (-1)); +} + +int +main (int argc, char *argv[]) +{ + if (argc != 2) + error (EXIT_FAILURE, 0, "need file name argument"); + + const char *file = argv[1]; + printf ("%s\n", file); + + int fd = open (file, O_RDONLY); + if (fd == -1) + error (EXIT_FAILURE, errno, "cannot open input file `%s'", file); + + elf_version (EV_CURRENT); + + Elf *elf = elf_begin (fd, ELF_C_READ, NULL); + if (elf == NULL) + error (EXIT_FAILURE, 0, "cannot create ELF descriptor: %s", + elf_errmsg (-1)); + + size_t esize; + const unsigned char *ident = (const unsigned char *) elf_getident (elf, + &esize); + if (ident == NULL || esize < EI_NIDENT) + error (EXIT_FAILURE, 0, "no, or too small, ELF ident"); + + GElf_Ehdr ehdr; + if (gelf_getehdr (elf, &ehdr) == NULL) + error (EXIT_FAILURE, 0, "cannot get the ELF header: %s\n", + elf_errmsg (-1)); + + size_t strndx = ehdr.e_shstrndx; + + Elf_Scn *scn = NULL; + while ((scn = elf_nextscn (elf, scn)) != NULL) + { + GElf_Shdr shdr; + if (gelf_getshdr (scn, &shdr) != NULL) + { + char *name = elf_strptr (elf, strndx, (size_t) shdr.sh_name); + if (name != NULL && shdr.sh_type == SHT_PROGBITS) + { + if (strcmp (name, ".eh_frame") == 0) + handle_section (name, ident, scn, true); + if (strcmp (name, ".debug_frame") == 0 + || strcmp (name, ".zdebug_frame") == 0) + handle_section (name, ident, scn, false); + } + } + } + + elf_end (elf); + close (fd); + + return 0; +} diff --git a/tests/peel_type.c b/tests/peel_type.c new file mode 100644 index 00000000..bccce32e --- /dev/null +++ b/tests/peel_type.c @@ -0,0 +1,119 @@ +/* Test program for dwarf_peel_type. Peels type of top-level vars. + Copyright (C) 2017 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include +#include +#include +#include ELFUTILS_HEADER(dw) +#include ELFUTILS_HEADER(dwfl) +#include +#include +#include + +#include "../libdw/known-dwarf.h" + +static const char * +dwarf_tag_string (unsigned int tag) +{ + switch (tag) + { +#define DWARF_ONE_KNOWN_DW_TAG(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_TAG +#undef DWARF_ONE_KNOWN_DW_TAG + default: + return NULL; + } +} + +void +print_var_raw_type (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) + { + /* Test twice, once with a separate result DIE. Then with the + DIE itself. The resulting tag should be the same. */ + Dwarf_Die result_mem; + Dwarf_Die *result = &result_mem; + int res = dwarf_peel_type (type, result); + if (res < 0) + printf ("%s error peeling type: %s\n", name, dwarf_errmsg (-1)); + else if (res > 0) + printf ("%s missing DW_TAG_TYPE, could peel further: %s\n", + name, dwarf_tag_string (dwarf_tag (result))); + else + { + int tag = dwarf_tag (result); + printf ("%s raw type %s\n", name, dwarf_tag_string (tag)); + res = dwarf_peel_type (type, type); + if (res < 0) + printf ("%s cannot peel type itself: %s\n", name, + dwarf_errmsg (-1)); + else if (res > 0) + printf ("%s missing DW_TAG_TYPE, could peel type further: %s\n", + name, dwarf_tag_string (dwarf_tag (type))); + else if (dwarf_tag (type) != tag) + printf ("%s doesn't resolve the same: %s != %s\n", name, + dwarf_tag_string (tag), + dwarf_tag_string (dwarf_tag (type))); + } + } + 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_raw_type (die); + + if (dwarf_siblingof (die, &die_mem) != 0) + break; + } + } + + dwfl_end (dwfl); +} diff --git a/tests/rdwrmmap.c b/tests/rdwrmmap.c index 6f027dfe..490a4eea 100644 --- a/tests/rdwrmmap.c +++ b/tests/rdwrmmap.c @@ -19,11 +19,11 @@ #endif #include -#include #include #include #include #include +#include "system.h" int main (int argc __attribute__ ((unused)), char *argv[]) diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh index c864eeae..fd89d025 100755 --- a/tests/run-addrcfi.sh +++ b/tests/run-addrcfi.sh @@ -397,9 +397,9 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range privileged reg111 (spr11): undefined privileged reg112 (spr12): undefined privileged reg113 (spr13): undefined - privileged reg114 (spr14): undefined - privileged reg115 (spr15): undefined - privileged reg116 (spr16): undefined + privileged reg114 (tfhar): undefined + privileged reg115 (tfiar): undefined + privileged reg116 (texasr): undefined privileged reg117 (spr17): undefined privileged reg118 (dsisr): undefined privileged reg119 (dar): undefined @@ -1419,9 +1419,9 @@ testrun_compare ${abs_builddir}/addrcfi -e testfileppc32 0x100004d2 <<\EOF privileged reg111 (spr11): undefined privileged reg112 (spr12): undefined privileged reg113 (spr13): undefined - privileged reg114 (spr14): undefined - privileged reg115 (spr15): undefined - privileged reg116 (spr16): undefined + privileged reg114 (tfhar): undefined + privileged reg115 (tfiar): undefined + privileged reg116 (texasr): undefined privileged reg117 (spr17): undefined privileged reg118 (dsisr): undefined privileged reg119 (dar): undefined @@ -2447,9 +2447,9 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range privileged reg111 (spr11): undefined privileged reg112 (spr12): undefined privileged reg113 (spr13): undefined - privileged reg114 (spr14): undefined - privileged reg115 (spr15): undefined - privileged reg116 (spr16): undefined + privileged reg114 (tfhar): undefined + privileged reg115 (tfiar): undefined + privileged reg116 (texasr): undefined privileged reg117 (spr17): undefined privileged reg118 (dsisr): undefined privileged reg119 (dar): undefined @@ -3637,7 +3637,7 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range integer reg28 (x28): same_value integer reg29 (x29): same_value integer reg30 (x30): same_value - integer reg31 (sp): undefined + integer reg31 (sp): location expression: call_frame_cfa stack_value integer reg33 (elr): undefined FP/SIMD reg64 (v0): undefined FP/SIMD reg65 (v1): undefined diff --git a/tests/run-aggregate-size.sh b/tests/run-aggregate-size.sh index 42b0742b..08d57bbf 100755 --- a/tests/run-aggregate-size.sh +++ b/tests/run-aggregate-size.sh @@ -54,6 +54,7 @@ # volatile int ia[32]; # const volatile void * const volatile restrict va[64]; # struct s sa[8]; +# double d3d[3][4][5]; # # typedef const int foo; # typedef volatile foo bar; @@ -62,7 +63,9 @@ # # gcc -std=c99 -g -c -o testfile-sizes3.o sizes.c -testfiles testfile-sizes1.o testfile-sizes2.o testfile-sizes3.o +# The file testfile-size4.o is hand-crafted. + +testfiles testfile-sizes1.o testfile-sizes2.o testfile-sizes3.o testfile-sizes4.o testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes1.o <<\EOF c size 1 @@ -98,8 +101,13 @@ ca size 16 ia size 128 va size 512 sa size 128 +d3d size 480 f size 4 b size 4 EOF +testrun_compare ${abs_builddir}/aggregate_size -e testfile-sizes4.o <<\EOF +v size 257 +EOF + exit 0 diff --git a/tests/run-all-dwarf-ranges.sh b/tests/run-all-dwarf-ranges.sh new file mode 100755 index 00000000..cefb4231 --- /dev/null +++ b/tests/run-all-dwarf-ranges.sh @@ -0,0 +1,129 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-dwarf-ranges.sh +# Compiled with: +# gcc -c -O2 -o testfile-ranges-hello.o -gsplit-dwarf -gdwarf-4 hello.c +# gcc -c -O2 -o testfile-ranges-world.o -gsplit-dwarf -gdwarf-4 world.c +# gcc -o testfilesplitranges4 -O2 \ +# testfile-ranges-hello.o testfile-ranges-world.o +# eu-strip -f testfilesplitranges4.debug testfilesplitranges4 + +testfiles testfilesplitranges4.debug +testfiles testfile-ranges-hello.dwo testfile-ranges-world.dwo + +testrun_compare ${abs_builddir}/all-dwarf-ranges testfilesplitranges4.debug <<\EOF +die: hello.c (11) + 4004e0..4004ff + 4003e0..4003f7 + +die: no_say (2e) + 4004f0..4004ff + +die: main (2e) + 4003e0..4003f7 + +die: subject (1d) + 4003e3..4003ef + +die: subject (2e) + 4004e0..4004f0 + +die: world.c (11) + 400500..400567 + +die: no_main (2e) + 400550..400567 + +die: no_subject (1d) + 400553..40055f + +die: say (2e) + 400500..400540 + +die: happy (1d) + 40051c..400526 + 400530..400534 + 400535..40053f + +die: sad (1d) + 40051c..400526 + 400535..40053f + +die: no_subject (2e) + 400540..400550 + +EOF + +# Same with -gdwarf-5 +# gcc -c -O2 -o testfile-ranges-hello5.o -gsplit-dwarf -gdwarf-5 hello.c +# gcc -c -O2 -o testfile-ranges-world5.o -gsplit-dwarf -gdwarf-5 world.c +# gcc -o testfilesplitranges5 -O2 testfile-ranges-hello5.o testfile-ranges-world5.o +# eu-strip -f testfilesplitranges5.debug testfilesplitranges5 + +testfiles testfilesplitranges5.debug +testfiles testfile-ranges-hello5.dwo testfile-ranges-world5.dwo + +testrun_compare ${abs_builddir}/all-dwarf-ranges testfilesplitranges5.debug <<\EOF +die: hello.c (11) + 401150..40117a + 401050..401067 + +die: no_say (2e) + 401160..40117a + +die: main (2e) + 401050..401067 + +die: subject (1d) + 401053..40105f + +die: subject (2e) + 401150..401160 + +die: world.c (11) + 401180..4011e7 + +die: no_main (2e) + 4011d0..4011e7 + +die: no_subject (1d) + 4011d3..4011df + +die: say (2e) + 401180..4011c0 + +die: happy (1d) + 40119b..40119b + 40119c..4011a6 + 4011b0..4011b4 + 4011b5..4011bf + +die: sad (1d) + 40119b..40119b + 40119c..4011a6 + 4011b4..4011b4 + 4011b5..4011bf + +die: no_subject (2e) + 4011c0..4011d0 + +EOF + +exit 0 diff --git a/tests/run-allfcts-multi.sh b/tests/run-allfcts-multi.sh index 727b76ee..ef7bb30e 100755 --- a/tests/run-allfcts-multi.sh +++ b/tests/run-allfcts-multi.sh @@ -53,4 +53,20 @@ testrun_compare cat allfcts.out <<\EOF /tmp/test-offset-loop.c:7:main EOF +# allfcts has a too simple mechanism for setting the alt file. +# check that if we don't set it, things still work (because libdw will +# find the alt file for us). +mkdir subdir +mv test-offset-loop test-offset-loop.alt subdir/ +testrun ${abs_builddir}/allfcts subdir/test-offset-loop > allfcts.out +testrun_compare cat allfcts.out <<\EOF +Warning: no alt file found. +/tmp/test-offset-loop.c:6:get_errno +/tmp/test-offset-loop.c:5:is_error +/tmp/test-offset-loop.c:4:padding +/tmp/test-offset-loop.c:7:main +EOF + +rm -rf subdir + exit 0 diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh index d82f37e6..1422bd67 100755 --- a/tests/run-allregs.sh +++ b/tests/run-allregs.sh @@ -253,9 +253,9 @@ privileged registers: 111: spr11 (spr11), unsigned 32 bits 112: spr12 (spr12), unsigned 32 bits 113: spr13 (spr13), unsigned 32 bits - 114: spr14 (spr14), unsigned 32 bits - 115: spr15 (spr15), unsigned 32 bits - 116: spr16 (spr16), unsigned 32 bits + 114: tfhar (tfhar), unsigned 32 bits + 115: tfiar (tfiar), unsigned 32 bits + 116: texasr (texasr), unsigned 32 bits 117: spr17 (spr17), unsigned 32 bits 118: dsisr (dsisr), unsigned 32 bits 119: dar (dar), unsigned 32 bits @@ -1276,9 +1276,9 @@ privileged registers: 111: spr11 (spr11), unsigned 64 bits 112: spr12 (spr12), unsigned 64 bits 113: spr13 (spr13), unsigned 64 bits - 114: spr14 (spr14), unsigned 64 bits - 115: spr15 (spr15), unsigned 64 bits - 116: spr16 (spr16), unsigned 64 bits + 114: tfhar (tfhar), unsigned 64 bits + 115: tfiar (tfiar), unsigned 64 bits + 116: texasr (texasr), unsigned 64 bits 117: spr17 (spr17), unsigned 64 bits 118: dsisr (dsisr), unsigned 64 bits 119: dar (dar), unsigned 64 bits @@ -2902,4 +2902,75 @@ FPU registers: 22: %fp6 (fp6), float 96 bits 23: %fp7 (fp7), float 96 bits EOF + +# See run-readelf-mixed-corenote.sh for instructions to regenerate +# this core file. +regs_test testfile-riscv64-core <<\EOF +integer registers: + 0: zero (zero), signed 64 bits + 1: ra (ra), address 64 bits + 2: sp (sp), address 64 bits + 3: gp (gp), address 64 bits + 4: tp (tp), address 64 bits + 5: t0 (t0), signed 64 bits + 6: t1 (t1), signed 64 bits + 7: t2 (t2), signed 64 bits + 8: s0 (s0), signed 64 bits + 9: s1 (s1), signed 64 bits + 10: a0 (a0), signed 64 bits + 11: a1 (a1), signed 64 bits + 12: a2 (a2), signed 64 bits + 13: a3 (a3), signed 64 bits + 14: a4 (a4), signed 64 bits + 15: a5 (a5), signed 64 bits + 16: a6 (a6), signed 64 bits + 17: a7 (a7), signed 64 bits + 18: s2 (s2), signed 64 bits + 19: s3 (s3), signed 64 bits + 20: s4 (s4), signed 64 bits + 21: s5 (s5), signed 64 bits + 22: s6 (s6), signed 64 bits + 23: s7 (s7), signed 64 bits + 24: s8 (s8), signed 64 bits + 25: s9 (s9), signed 64 bits + 26: s10 (s10), signed 64 bits + 27: s11 (s11), signed 64 bits + 28: t3 (t3), signed 64 bits + 29: t4 (t4), signed 64 bits + 30: t5 (t5), signed 64 bits + 31: t6 (t6), signed 64 bits +FPU registers: + 32: ft0 (ft0), float 64 bits + 33: ft1 (ft1), float 64 bits + 34: ft2 (ft2), float 64 bits + 35: ft3 (ft3), float 64 bits + 36: ft4 (ft4), float 64 bits + 37: ft5 (ft5), float 64 bits + 38: ft6 (ft6), float 64 bits + 39: ft7 (ft7), float 64 bits + 40: fs0 (fs0), float 64 bits + 41: fs1 (fs1), float 64 bits + 42: fa0 (fa0), float 64 bits + 43: fa1 (fa1), float 64 bits + 44: fa2 (fa2), float 64 bits + 45: fa3 (fa3), float 64 bits + 46: fa4 (fa4), float 64 bits + 47: fa5 (fa5), float 64 bits + 48: fa6 (fa6), float 64 bits + 49: fa7 (fa7), float 64 bits + 50: fs2 (fs2), float 64 bits + 51: fs3 (fs3), float 64 bits + 52: fs4 (fs4), float 64 bits + 53: fs5 (fs5), float 64 bits + 54: fs6 (fs6), float 64 bits + 55: fs7 (fs7), float 64 bits + 56: fs8 (fs8), float 64 bits + 57: fs9 (fs9), float 64 bits + 58: fs10 (fs10), float 64 bits + 59: fs11 (fs11), float 64 bits + 60: ft8 (ft8), float 64 bits + 61: ft9 (ft9), float 64 bits + 62: ft10 (ft10), float 64 bits + 63: ft11 (ft11), float 64 bits +EOF exit 0 diff --git a/tests/run-annobingroup.sh b/tests/run-annobingroup.sh new file mode 100755 index 00000000..700df321 --- /dev/null +++ b/tests/run-annobingroup.sh @@ -0,0 +1,123 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Testfile generated by annobin, creates group. +# strip and unstrip it. Check group symbol/name is correct. + +# echo "int __attribute__((cold)) foo (void) { return 42; }" \ +# > testfile-annobingroup.c +# gcc -g -O2 -fplugin=annobin -c testfile-annobingroup.c +testfiles testfile-annobingroup.o + +tempfiles merged.elf stripped.elf debugfile.elf remerged.elf + +testrun_compare ${abs_top_builddir}/src/readelf -g testfile-annobingroup.o << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 7] .gnu.build.attributes..text.unlikely + [ 8] .rela.gnu.build.attributes..text.unlikely + [ 9] .text.unlikely +EOF + +testrun ${abs_top_builddir}/src/strip -o stripped.elf -f debugfile.elf testfile-annobingroup.o + +testrun_compare ${abs_top_builddir}/src/readelf -g stripped.elf << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 7] .gnu.build.attributes..text.unlikely + [ 8] .rela.gnu.build.attributes..text.unlikely + [ 9] .text.unlikely +EOF + +testrun_compare ${abs_top_builddir}/src/readelf -g debugfile.elf << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 7] .gnu.build.attributes..text.unlikely + [ 8] .rela.gnu.build.attributes..text.unlikely + [ 9] .text.unlikely +EOF + +testrun ${abs_top_builddir}/src/unstrip -o remerged.elf stripped.elf debugfile.elf + +testrun_compare ${abs_top_builddir}/src/readelf -g remerged.elf << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 7] .gnu.build.attributes..text.unlikely + [ 8] .rela.gnu.build.attributes..text.unlikely + [ 9] .text.unlikely +EOF + +testrun ${abs_top_builddir}/src/elfcmp testfile-annobingroup.o remerged.elf + +# echo "void * __attribute__((cold)) foo (void) { return foo; }" +# > testfile-annobingroup-i386.c +# gcc -fpic -g -O2 -fplugin=annobin -c testfile-annobingroup-i386.c +testfiles testfile-annobingroup-i386.o + +testrun_compare ${abs_top_builddir}/src/readelf -g testfile-annobingroup-i386.o << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 8] .gnu.build.attributes..text.unlikely + [ 9] .rel.gnu.build.attributes..text.unlikely + [10] .text.unlikely + +COMDAT section group [ 2] '.group' with signature '__x86.get_pc_thunk.ax' contains 1 entry: + [13] .text.__x86.get_pc_thunk.ax +EOF + +testrun ${abs_top_builddir}/src/strip -o stripped.elf -f debugfile.elf testfile-annobingroup-i386.o + +testrun_compare ${abs_top_builddir}/src/readelf -g stripped.elf << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 8] .gnu.build.attributes..text.unlikely + [ 9] .rel.gnu.build.attributes..text.unlikely + [10] .text.unlikely + +COMDAT section group [ 2] '.group' with signature '__x86.get_pc_thunk.ax' contains 1 entry: + [13] .text.__x86.get_pc_thunk.ax +EOF + +testrun_compare ${abs_top_builddir}/src/readelf -g debugfile.elf << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 8] .gnu.build.attributes..text.unlikely + [ 9] .rel.gnu.build.attributes..text.unlikely + [10] .text.unlikely + +COMDAT section group [ 2] '.group' with signature '__x86.get_pc_thunk.ax' contains 1 entry: + [13] .text.__x86.get_pc_thunk.ax +EOF + +testrun ${abs_top_builddir}/src/unstrip -o remerged.elf stripped.elf debugfile.elf + +testrun_compare ${abs_top_builddir}/src/readelf -g remerged.elf << EOF + +Section group [ 1] '.group' with signature '.text.unlikely.group' contains 3 entries: + [ 8] .gnu.build.attributes..text.unlikely + [ 9] .rel.gnu.build.attributes..text.unlikely + [10] .text.unlikely + +COMDAT section group [ 2] '.group' with signature '__x86.get_pc_thunk.ax' contains 1 entry: + [13] .text.__x86.get_pc_thunk.ax +EOF + +testrun ${abs_top_builddir}/src/elfcmp testfile-annobingroup-i386.o remerged.elf + +exit 0 diff --git a/tests/run-ar.sh b/tests/run-ar.sh new file mode 100755 index 00000000..fb9394d5 --- /dev/null +++ b/tests/run-ar.sh @@ -0,0 +1,40 @@ +#! /bin/bash +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +tempfiles objects.list test.ar + +echo Make a sorted list of the just build src .o files. +(cd ${abs_top_builddir}/src; ls *.o | sort) > objects.list +cat objects.list + +echo Create a new ar file with the .o files. +testrun ${abs_top_builddir}/src/ar -r test.ar \ + $(echo ${abs_top_builddir}/src/*.o | sort) + +echo List the ar file contents. +testrun_compare ${abs_top_builddir}/src/ar -t test.ar < objects.list + +echo Delete all objects again. +testrun ${abs_top_builddir}/src/ar -d test.ar $(cat objects.list) + +echo Check new ar file is now empty +testrun_compare ${abs_top_builddir}/src/ar -t test.ar << EOF +EOF + +exit 0 diff --git a/tests/run-attr-integrate-skel.sh b/tests/run-attr-integrate-skel.sh new file mode 100755 index 00000000..a9a9409a --- /dev/null +++ b/tests/run-attr-integrate-skel.sh @@ -0,0 +1,52 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# see tests/testfile-dwarf-45.source +testfiles testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo +testfiles testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo + +testrun_compare ${abs_builddir}/attr-integrate-skel testfile-splitdwarf-4 << EOF +file: testfile-splitdwarf-4 +Split DIE: hello.c +addr_base secoff: 0x0 +low_pc addr: 0x401160 +Skel has high_pc. + +Split DIE: world.c +addr_base secoff: 0x98 +low_pc addr: 0x0 +Skel has ranges. + +EOF + +testrun_compare ${abs_builddir}/attr-integrate-skel testfile-splitdwarf-5 << EOF +file: testfile-splitdwarf-5 +Split DIE: hello.c +addr_base secoff: 0x8 +low_pc addr: 0x401160 +Skel has high_pc. + +Split DIE: world.c +addr_base secoff: 0xa8 +low_pc addr: 0x0 +Skel has ranges. + +EOF + +exit 0 diff --git a/tests/run-backtrace-core-ppc.sh b/tests/run-backtrace-core-ppc.sh index 65c92795..555ac352 100755 --- a/tests/run-backtrace-core-ppc.sh +++ b/tests/run-backtrace-core-ppc.sh @@ -17,4 +17,13 @@ . $srcdir/backtrace-subr.sh +# executable generated by: +# +# gcc -D_GNU_SOURCE -I. -I.. -I../lib -m32 -pthread -static -g \ +# -o backtrace.ppc.exec backtrace-child.c +# +# core generated by: +# +# ./backtrace.ppc.exec --gencore + check_core ppc diff --git a/tests/run-backtrace-fp-core-aarch64.sh b/tests/run-backtrace-fp-core-aarch64.sh new file mode 100755 index 00000000..fda88d37 --- /dev/null +++ b/tests/run-backtrace-fp-core-aarch64.sh @@ -0,0 +1,28 @@ +#! /bin/bash +# Copyright (C) 2017 The Qt Company +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/backtrace-subr.sh + +# The binary is generated by compiling with eh_frame CFI, but with frame +# pointers. +# +# gcc -static -O2 -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \ +# -D_GNU_SOURCE -pthread -o tests/backtrace.aarch64.fp.exec -I. -Ilib \ +# tests/backtrace-child.c +# The core is generated by calling the binary with --gencore + +check_core aarch64.fp diff --git a/tests/run-backtrace-fp-core-i386.sh b/tests/run-backtrace-fp-core-i386.sh new file mode 100755 index 00000000..c58ff532 --- /dev/null +++ b/tests/run-backtrace-fp-core-i386.sh @@ -0,0 +1,29 @@ +#! /bin/bash +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/backtrace-subr.sh + +# The binary is generated by compiling backtrace-child without unwind +# information, but with -fno-omit-frame-pointer. +# +# gcc -static -O2 -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \ +# -D_GNU_SOURCE -pthread -o tests/backtrace.i386.fp.exec -I. -Ilib \ +# tests/backtrace-child.c +# +# The core is generated by calling tests/backtrace.i386.fp.exec --gencore + +check_core i386.fp diff --git a/tests/run-backtrace-fp-core-ppc64le.sh b/tests/run-backtrace-fp-core-ppc64le.sh new file mode 100755 index 00000000..326ca342 --- /dev/null +++ b/tests/run-backtrace-fp-core-ppc64le.sh @@ -0,0 +1,29 @@ +#! /bin/bash +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/backtrace-subr.sh + +# The binary is generated by compiling backtrace-child without unwind +# information, but with -fno-omit-frame-pointer. +# +# gcc -static -O2 -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \ +# -D_GNU_SOURCE -pthread -o tests/backtrace.ppc64le.fp.exec -I. -Ilib \ +# tests/backtrace-child.c +# +# The core is generated by calling tests/backtrace.ppc64le.fp.exec --gencore + +check_core ppc64le.fp diff --git a/tests/run-backtrace-fp-core-x86_64.sh b/tests/run-backtrace-fp-core-x86_64.sh new file mode 100755 index 00000000..348eb183 --- /dev/null +++ b/tests/run-backtrace-fp-core-x86_64.sh @@ -0,0 +1,29 @@ +#! /bin/bash +# Copyright (C) 2017 The Qt Company +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/backtrace-subr.sh + +# The binary is generated by compiling with eh_frame CFI, but with frame +# pointers. +# +# gcc -static -O2 -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \ +# -D_GNU_SOURCE -pthread -o tests/backtrace.x86_64.fp.exec -I. -Ilib \ +# tests/backtrace-child.c +# +# The core is generated by calling the binary with --gencore + +check_core x86_64.fp diff --git a/tests/run-dwarf-die-addr-die.sh b/tests/run-dwarf-die-addr-die.sh new file mode 100755 index 00000000..951d1c52 --- /dev/null +++ b/tests/run-dwarf-die-addr-die.sh @@ -0,0 +1,52 @@ +#! /bin/sh +# Copyright (C) 2012, 2015 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-typeiter.sh +testfiles testfile-debug-types + +testrun ${abs_builddir}/dwarf-die-addr-die testfile-debug-types + +# see run-readelf-dwz-multi.sh +testfiles testfile_multi_main testfile_multi.dwz + +testrun ${abs_builddir}/dwarf-die-addr-die testfile_multi_main + +# see tests/run-dwflsyms.sh +testfiles testfilebazdbgppc64.debug + +testrun ${abs_builddir}/dwarf-die-addr-die testfilebazdbgppc64.debug + +# see tests/testfile-dwarf-45.source +testfiles testfile-dwarf-4 testfile-dwarf-5 +testfiles testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo +testfiles testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo + +testrun ${abs_builddir}/dwarf-die-addr-die testfile-dwarf-4 +testrun ${abs_builddir}/dwarf-die-addr-die testfile-dwarf-5 +testrun ${abs_builddir}/dwarf-die-addr-die testfile-splitdwarf-4 +testrun ${abs_builddir}/dwarf-die-addr-die testfile-splitdwarf-5 +testrun ${abs_builddir}/dwarf-die-addr-die testfile-hello4.dwo +testrun ${abs_builddir}/dwarf-die-addr-die testfile-world4.dwo +testrun ${abs_builddir}/dwarf-die-addr-die testfile-hello5.dwo +testrun ${abs_builddir}/dwarf-die-addr-die testfile-world5.dwo + +# Self test +testrun_on_self ${abs_builddir}/dwarf-die-addr-die + +exit 0 diff --git a/tests/run-dwarf-ranges.sh b/tests/run-dwarf-ranges.sh index d202ed3f..ae25d6ef 100755 --- a/tests/run-dwarf-ranges.sh +++ b/tests/run-dwarf-ranges.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2015 Red Hat, Inc. +# Copyright (C) 2015, 2018 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -24,4 +24,103 @@ testrun_compare ${abs_builddir}/dwarf-ranges debug-ranges-no-lowpc.o 0xb <<\EOF 3..4 (base 0) EOF +# - hello.c +# int say (const char *prefix); +# +# char * +# subject (char *word, int count) +# { +# return count > 0 ? word : (word + count); +# } +# +# int +# main (int argc, char **argv) +# { +# return say (subject (argv[0], argc)); +# } +# +# int +# no_say (const char *prefix) +# { +# const char *world = subject ("World", 42); +# return prefix ? say (prefix) : say (world); +# } +# +# - world.c +# char * subject (char *word, int count); +# int no_say (const char *prefix); +# +# static int +# sad (char c) +# { +# return c > 0 ? c : c + 1; +# } +# +# static int +# happy (const char *w) +# { +# return sad (w[1]); +# } +# +# int +# say (const char *prefix) +# { +# const char *world = subject ("World", 42);; +# return prefix ? sad (prefix[0]) : happy (world); +# } +# +# char * +# no_subject (char *word, int count) +# { +# return count > 0 ? word : (word + count); +# } +# +# int +# no_main (int argc, char **argv) +# { +# return no_say (no_subject (argv[0], argc)); +# } +# +# - gcc -c -O2 -gdwarf-4 hello.c +# - gcc -c -O2 -gdwarf-4 world.c +# - gcc -o testfileranges4 -O2 -gdwarf-4 hello.o world.o +# - eu-strip -f testfileranges4.debug testfileranges4 + +testfiles testfileranges4.debug +testrun_compare ${abs_builddir}/dwarf-ranges testfileranges4.debug 0xb <<\EOF +400500..40053a (base 0) +400400..400415 (base 0) +EOF + +testrun_compare ${abs_builddir}/dwarf-ranges testfileranges4.debug 0xcd <<\EOF +400400..400402 (base 0) +400405..40040d (base 0) +EOF + +testrun_compare ${abs_builddir}/dwarf-ranges testfileranges4.debug 0x374 <<\EOF +4005a0..4005a2 (base 400540) +4005a5..4005ad (base 400540) +EOF + +# Like above, but with -gdwarf-5. +testfiles testfileranges5.debug +testrun_compare ${abs_builddir}/dwarf-ranges testfileranges5.debug 0xc <<\EOF +401150..40117a (base 0) +401050..401067 (base 0) +EOF + +testrun_compare ${abs_builddir}/dwarf-ranges testfileranges5.debug 0x2ce <<\EOF +40119b..40119b (base 401180) +40119c..4011a6 (base 401180) +4011b0..4011b4 (base 401180) +4011b5..4011bf (base 401180) +EOF + +testrun_compare ${abs_builddir}/dwarf-ranges testfileranges5.debug 0x2ef <<\EOF +40119b..40119b (base 401180) +40119c..4011a6 (base 401180) +4011b4..4011b4 (base 401180) +4011b5..4011bf (base 401180) +EOF + exit 0 diff --git a/tests/run-dwarfcfi.sh b/tests/run-dwarfcfi.sh new file mode 100755 index 00000000..98fa171d --- /dev/null +++ b/tests/run-dwarfcfi.sh @@ -0,0 +1,133 @@ +#! /bin/sh +# Test for dwarf_getcfi. +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Test files come from run-addrcfi with all sections stripped except +# the .debug_frame. +# for i in +# eu-strip -f $i-debugframe $i +# eu-strip -g --remove-comment --keep-section=.debug_frame $i-debugframe +# done +testfiles testfile11-debugframe testfile12-debugframe +testfiles testfileaarch64-debugframe +testfiles testfilearm-debugframe +testfiles testfileppc32-debugframe +testfiles testfileppc64-debugframe + +testfiles testfile11-debugframe +testrun_compare ${abs_builddir}/dwarfcfi testfile11-debugframe 0x080489b8 <<\EOF +0x80489b8 => [0x80489b8, 0x80489b9): + return address in reg8 + CFA location expression: bregx(4,4) + reg0: undefined + reg1: undefined + reg2: undefined + reg3: same_value + reg4: location expression: call_frame_cfa stack_value + reg5: same_value + reg6: same_value + reg7: same_value + reg8: location expression: call_frame_cfa plus_uconst(-4) + reg9: undefined +EOF + +testfiles testfile12-debugframe +testrun_compare ${abs_builddir}/dwarfcfi testfile12-debugframe 0x00000000000009d0 <<\EOF +0x9d0 => [0x9d0, 0x9d1): + return address in reg16 + CFA location expression: bregx(7,8) + reg0: same_value + reg1: undefined + reg2: undefined + reg3: undefined + reg4: undefined + reg5: undefined + reg6: same_value + reg7: location expression: call_frame_cfa stack_value + reg8: undefined + reg9: undefined +EOF + +testfiles testfileppc32-debugframe +testrun_compare ${abs_builddir}/dwarfcfi testfileppc32-debugframe 0x100004c0 <<\EOF +0x100004c0 => [0x100004c0, 0x100004d0): + return address in reg65 + CFA location expression: bregx(1) + reg0: undefined + reg1: location expression: call_frame_cfa stack_value + reg2: same_value + reg3: undefined + reg4: undefined + reg5: undefined + reg6: undefined + reg7: undefined + reg8: undefined + reg9: undefined +EOF + +testfiles testfileppc64-debugframe +testrun_compare ${abs_builddir}/dwarfcfi testfileppc64-debugframe 0x00000000100005b0 <<\EOF +0x100005b0 => [0x100005b0, 0x100005d0): + return address in reg65 + CFA location expression: bregx(1) + reg0: undefined + reg1: location expression: call_frame_cfa stack_value + reg2: same_value + reg3: undefined + reg4: undefined + reg5: undefined + reg6: undefined + reg7: undefined + reg8: undefined + reg9: undefined +EOF + +testfiles testfilearm-debugframe +testrun_compare ${abs_builddir}/dwarfcfi testfilearm-debugframe 0x00008510 <<\EOF +0x8510 => [0x8510, 0x8524): + return address in reg14 + CFA location expression: bregx(13) + reg0: undefined + reg1: undefined + reg2: undefined + reg3: undefined + reg4: same_value + reg5: same_value + reg6: same_value + reg7: same_value + reg8: same_value + reg9: undefined +EOF + +testfiles testfileaarch64-debugframe +testrun_compare ${abs_builddir}/dwarfcfi testfileaarch64-debugframe 0x400550 <<\EOF +0x400550 => [0x400550, 0x400568): + return address in reg30 + CFA location expression: bregx(31) + reg0: undefined + reg1: undefined + reg2: undefined + reg3: undefined + reg4: undefined + reg5: undefined + reg6: undefined + reg7: undefined + reg8: undefined + reg9: undefined +EOF diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh index 013109db..58fa7d0f 100755 --- a/tests/run-elflint-self.sh +++ b/tests/run-elflint-self.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005, 2007 Red Hat, Inc. +# Copyright (C) 2005, 2007, 2017 Red Hat, Inc. # This file is part of elfutils. # Written by Ulrich Drepper , 2005. # @@ -19,3 +19,4 @@ . $srcdir/test-subr.sh testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld +testrun_on_self_compressed ${abs_top_builddir}/src/elflint --quiet --gnu-ld diff --git a/tests/run-elflint-test.sh b/tests/run-elflint-test.sh index f3bd9012..caf172a6 100755 --- a/tests/run-elflint-test.sh +++ b/tests/run-elflint-test.sh @@ -33,6 +33,11 @@ testrun ${abs_top_builddir}/src/elflint -q testfile33 testfiles testfile42 testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42 +# Contains debuginfo, compress it, recheck +tempfiles testfile42z +testrun ${abs_top_builddir}/src/elfcompress -f -q -o testfile42z testfile42 +testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42z + testfiles testfile46 testrun ${abs_top_builddir}/src/elflint -q testfile46 @@ -47,4 +52,9 @@ testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testlib_dynseg.so testfiles testfile-s390x-hash-both testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile-s390x-hash-both +# Compress the symtab/strtab just because and recheck +tempfiles testfile-s390x-hash-bothz +testrun ${abs_top_builddir}/src/elfcompress -f -q --name='.s??tab' -o testfile-s390x-hash-bothz testfile-s390x-hash-both +testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile-s390x-hash-bothz + exit 0 diff --git a/tests/run-exprlocs-self.sh b/tests/run-exprlocs-self.sh new file mode 100755 index 00000000..73d3ab9f --- /dev/null +++ b/tests/run-exprlocs-self.sh @@ -0,0 +1,22 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Just makes sure exprlocs doesn't crash, triggers self-check/asserts +# or leaks memory under valgrind. +testrun_on_self_quiet ${abs_top_builddir}/tests/varlocs --exprlocs -e diff --git a/tests/run-exprlocs.sh b/tests/run-exprlocs.sh new file mode 100755 index 00000000..379ca52b --- /dev/null +++ b/tests/run-exprlocs.sh @@ -0,0 +1,180 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77589 +# +# program repro +# type small_stride +# character*40 long_string +# integer small_pad +# end type small_stride +# type(small_stride), dimension (20), target :: unpleasant +# character*40, pointer, dimension(:):: c40pt +# integer i +# do i = 0,19 +# unpleasant(i+1)%small_pad = i+1 +# unpleasant(i+1)%long_string = char (ichar('0') + i) // '-hello' +# end do +# c40pt => unpleasant%long_string +# print *, c40pt ! break-here +# end program repro +# +# Needs GCC7+ +# gfortran -o testfile-stridex dwarf-stridex.f90 -Wall -g + +testfiles testfile-stridex + +testrun_compare ${abs_top_builddir}/tests/varlocs --exprlocs -e testfile-stridex <<\EOF +module 'testfile-stridex' +[b] CU 'dwarf-stridex.f90'@400717 + producer (strp) + language (data1) + identifier_case (data1) + name (strp) + comp_dir (strp) + low_pc (addr) + high_pc (data8) + stmt_list (sec_offset) + [2e] base_type "integer(kind=8)" + byte_size (data1) + encoding (data1) + name (strp) + [35] structure_type "small_stride" + name (strp) + byte_size (data1) + decl_file (data1) + decl_line (data1) + sibling (ref4) + [41] member "long_string" + name (strp) + decl_file (data1) + decl_line (data1) + type (ref4) + data_member_location (data1) {plus_uconst(0)} + [4d] member "small_pad" + name (strp) + decl_file (data1) + decl_line (data1) + type (ref4) + data_member_location (data1) {plus_uconst(40)} + [5a] string_type + byte_size (data1) + [5c] base_type "integer(kind=4)" + byte_size (data1) + encoding (data1) + name (strp) + [63] const_type + type (ref4) + [68] subprogram "main" + external (flag_present) + name (strp) + decl_file (data1) + decl_line (data1) + type (ref4) + low_pc (addr) + high_pc (data8) + frame_base (exprloc) {call_frame_cfa {bregx(7,8)}} + GNU_all_tail_call_sites (flag_present) + sibling (ref4) + [89] formal_parameter "argc" + name (strp) + decl_file (data1) + decl_line (data1) + type (ref4) + location (exprloc) {fbreg(-20)} + [97] formal_parameter "argv" + name (strp) + decl_file (data1) + decl_line (data1) + type (ref4) + location (exprloc) {fbreg(-32), deref} + [a7] pointer_type + byte_size (data1) + type (ref4) + [ad] base_type "character(kind=1)" + byte_size (data1) + encoding (data1) + name (strp) + [b4] subprogram "repro" + name (strp) + decl_file (data1) + decl_line (data1) + main_subprogram (flag_present) + calling_convention (data1) + low_pc (addr) + high_pc (data8) + frame_base (exprloc) {call_frame_cfa {bregx(7,8)}} + GNU_all_tail_call_sites (flag_present) + sibling (ref4) + [d2] variable "c40pt" + name (strp) + decl_file (data1) + decl_line (data1) + type (ref4) + location (exprloc) {fbreg(-128)} + [e1] variable "span.0" + name (strp) + type (ref4) + artificial (flag_present) + location (exprloc) {fbreg(-80)} + [ee] variable "i" + name (string) + decl_file (data1) + decl_line (data1) + type (ref4) + location (exprloc) {fbreg(-68)} + [fb] variable "unpleasant" + name (strp) + decl_file (data1) + decl_line (data1) + type (ref4) + location (exprloc) {fbreg(-1008)} + [10a] lexical_block + low_pc (addr) + high_pc (data8) + sibling (ref4) + [11f] lexical_block + low_pc (addr) + high_pc (data8) + [131] lexical_block + low_pc (addr) + high_pc (data8) + [142] lexical_block + low_pc (addr) + high_pc (data8) + [153] lexical_block + low_pc (addr) + high_pc (data8) + [167] array_type + data_location (exprloc) {push_object_address, deref} + associated (exprloc) {push_object_address, deref, lit0, ne} + type (ref4) + sibling (ref4) + [178] subrange_type + lower_bound (exprloc) {push_object_address, plus_uconst(32), deref} + upper_bound (exprloc) {push_object_address, plus_uconst(40), deref} + byte_stride (exprloc) {push_object_address, plus_uconst(24), deref, GNU_variable_value([e1]) {fbreg(-80)}, mul} + [18f] array_type + type (ref4) + [194] subrange_type + type (ref4) + upper_bound (sdata) +EOF + +exit 0 diff --git a/tests/run-get-files.sh b/tests/run-get-files.sh index a2f2373b..6f90be7d 100755 --- a/tests/run-get-files.sh +++ b/tests/run-get-files.sh @@ -64,4 +64,70 @@ cuhl = 11, o = 267, asz = 4, osz = 4, ncu = 2680 file[1] = "/shoggoth/drepper/m.c" EOF +# see tests/testfile-dwarf-45.source +testfiles testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo +testfiles testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo + +testrun_compare ${abs_builddir}/get-files testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo <<\EOF +cuhl = 11, o = 0, asz = 8, osz = 4, ncu = 52 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +cuhl = 11, o = 26, asz = 8, osz = 4, ncu = 104 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +cuhl = 11, o = 0, asz = 8, osz = 4, ncu = 414 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +cuhl = 11, o = 0, asz = 8, osz = 4, ncu = 331 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +EOF + +testrun_compare ${abs_builddir}/get-files testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo <<\EOF +cuhl = 20, o = 0, asz = 8, osz = 4, ncu = 53 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "/home/mark/src/elfutils/tests/hello.c" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +cuhl = 20, o = 21, asz = 8, osz = 4, ncu = 106 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "/home/mark/src/elfutils/tests/world.c" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +cuhl = 20, o = 0, asz = 8, osz = 4, ncu = 386 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "/home/mark/src/elfutils/tests/hello.c" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +cuhl = 20, o = 0, asz = 8, osz = 4, ncu = 296 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "/home/mark/src/elfutils/tests/world.c" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +EOF + exit 0 diff --git a/tests/run-get-units-invalid.sh b/tests/run-get-units-invalid.sh new file mode 100755 index 00000000..66ef9444 --- /dev/null +++ b/tests/run-get-units-invalid.sh @@ -0,0 +1,44 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-typeiter.sh +testfiles testfile-debug-types + +testrun ${abs_builddir}/get-units-invalid testfile-debug-types + +# see run-readelf-dwz-multi.sh +testfiles testfile_multi_main testfile_multi.dwz + +testrun ${abs_builddir}/get-units-invalid testfile_multi_main + +# see tests/run-dwflsyms.sh +testfiles testfilebazdbgppc64.debug + +testrun ${abs_builddir}/get-units-invalid testfilebazdbgppc64.debug + +# see tests/testfile-dwarf-45.source +testfiles testfile-dwarf-4 testfile-dwarf-5 + +testrun ${abs_builddir}/get-units-invalid testfile-dwarf-4 +testrun ${abs_builddir}/get-units-invalid testfile-dwarf-5 + +# Self test +testrun_on_self ${abs_builddir}/get-units-invalid + +exit 0 diff --git a/tests/run-get-units-split.sh b/tests/run-get-units-split.sh new file mode 100755 index 00000000..7a43c670 --- /dev/null +++ b/tests/run-get-units-split.sh @@ -0,0 +1,66 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-typeiter.sh +testfiles testfile-debug-types + +testrun ${abs_builddir}/get-units-split testfile-debug-types + +# see run-readelf-dwz-multi.sh +testfiles testfile_multi_main testfile_multi.dwz + +testrun ${abs_builddir}/get-units-split testfile_multi_main + +# see tests/run-dwflsyms.sh +testfiles testfilebazdbgppc64.debug + +testrun ${abs_builddir}/get-units-split testfilebazdbgppc64.debug + +# see tests/testfile-dwarf-45.source +testfiles testfile-dwarf-4 testfile-dwarf-5 +testfiles testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo +testfiles testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo + +testrun ${abs_builddir}/get-units-split testfile-dwarf-4 +testrun ${abs_builddir}/get-units-split testfile-dwarf-5 + +# These two files are the only ones that actually have skeleton units. +testrun_compare ${abs_builddir}/get-units-split testfile-splitdwarf-4 << \EOF +file: testfile-splitdwarf-4 +Got cudie unit_type: 4 +Found a skeleton unit, with split die: hello.c +Got cudie unit_type: 4 +Found a skeleton unit, with split die: world.c + +EOF + +testrun_compare ${abs_builddir}/get-units-split testfile-splitdwarf-5 << \EOF +file: testfile-splitdwarf-5 +Got cudie unit_type: 4 +Found a skeleton unit, with split die: hello.c +Got cudie unit_type: 4 +Found a skeleton unit, with split die: world.c + +EOF + +# Self test (Not on obj files since those need relocation first). +testrun_on_self_exe ${abs_builddir}/get-units-split +testrun_on_self_lib ${abs_builddir}/get-units-split + +exit 0 diff --git a/tests/run-low_high_pc.sh b/tests/run-low_high_pc.sh index ab5f2c37..41ec4208 100755 --- a/tests/run-low_high_pc.sh +++ b/tests/run-low_high_pc.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005 Red Hat, Inc. +# Copyright (C) 2005, 2018 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -27,8 +27,15 @@ testfiles testfile_low_high_pc testrun ${abs_builddir}/low_high_pc -e ./testfile_low_high_pc testrun ${abs_builddir}/low_high_pc -e ${abs_builddir}/low_high_pc -testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip -testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip.o -testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/libelf/libelf.so + +# see tests/testfile-dwarf-45.source +testfiles testfile-splitdwarf-4 testfile-splitdwarf-5 +testfiles testfile-hello4.dwo testfile-hello5.dwo +testfiles testfile-world4.dwo testfile-world5.dwo + +testrun ${abs_builddir}/low_high_pc -e testfile-splitdwarf-4 +testrun ${abs_builddir}/low_high_pc -e testfile-splitdwarf-5 + +testrun_on_self ${abs_builddir}/low_high_pc -e exit 0 diff --git a/tests/run-next-cfi-self.sh b/tests/run-next-cfi-self.sh new file mode 100755 index 00000000..2c42ea3f --- /dev/null +++ b/tests/run-next-cfi-self.sh @@ -0,0 +1,21 @@ +#! /bin/sh +# Copyright (C) 2012 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Sanity check toolchain/dwarf_next_cfi +testrun_on_self ${abs_builddir}/next_cfi diff --git a/tests/run-next-cfi.sh b/tests/run-next-cfi.sh new file mode 100755 index 00000000..23c0d7d1 --- /dev/null +++ b/tests/run-next-cfi.sh @@ -0,0 +1,108 @@ +#! /bin/sh +# Test for dwarf_next_cfi. +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Test files come from run-addrcfi +testfiles testfile11 testfile12 +testfiles testfilearm testfileaarch64 +testfiles testfileppc32 testfileppc64 + +testrun_compare ${abs_builddir}/next_cfi testfile11 <<\EOF +testfile11 +.eh_frame +[0] CIE augmentation="zPL" +[28] FDE cie=[0] +[64] FDE cie=[0] +[96] FDE cie=[0] +[128] FDE cie=[0] +.debug_frame +[0] CIE augmentation="" +[20] FDE cie=[0] +[52] FDE cie=[0] +[76] FDE cie=[0] +[100] FDE cie=[0] +[124] FDE cie=[0] +[148] FDE cie=[0] +[172] FDE cie=[0] +[196] FDE cie=[0] +EOF + +testrun_compare ${abs_builddir}/next_cfi testfile12 <<\EOF +testfile12 +.eh_frame +[0] CIE augmentation="" +[16] CIE augmentation="zR" +[40] FDE cie=[16] +.debug_frame +[0] CIE augmentation="" +[24] FDE cie=[0] +EOF + +testrun_compare ${abs_builddir}/next_cfi testfilearm <<\EOF +testfilearm +.eh_frame +.debug_frame +[0] CIE augmentation="" +[16] FDE cie=[0] +[32] CIE augmentation="" +[48] FDE cie=[32] +EOF + +testrun_compare ${abs_builddir}/next_cfi testfileaarch64 <<\EOF +testfileaarch64 +.eh_frame +[0] CIE augmentation="zR" +[24] FDE cie=[0] +[80] FDE cie=[0] +.debug_frame +[0] CIE augmentation="" +[16] FDE cie=[0] +[40] CIE augmentation="" +[56] FDE cie=[40] +EOF + +testrun_compare ${abs_builddir}/next_cfi testfileppc32 <<\EOF +testfileppc32 +.eh_frame +[0] CIE augmentation="zR" +[20] FDE cie=[0] +[40] FDE cie=[0] +[96] FDE cie=[0] +.debug_frame +[0] CIE augmentation="" +[16] FDE cie=[0] +[32] CIE augmentation="" +[48] FDE cie=[32] +EOF + +testrun_compare ${abs_builddir}/next_cfi testfileppc64 <<\EOF +testfileppc64 +.eh_frame +[0] CIE augmentation="zR" +[20] FDE cie=[0] +[40] FDE cie=[0] +[64] CIE augmentation="zR" +[88] FDE cie=[64] +[144] FDE cie=[64] +.debug_frame +[0] CIE augmentation="" +[16] FDE cie=[0] +[56] CIE augmentation="" +[72] FDE cie=[56] +EOF diff --git a/tests/run-next-files.sh b/tests/run-next-files.sh new file mode 100755 index 00000000..7a3b6d0f --- /dev/null +++ b/tests/run-next-files.sh @@ -0,0 +1,165 @@ +#! /bin/sh +# Variant of run-get-files that uses dwarf_next_lines. +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +testfiles testfile testfile2 + +testrun_compare ${abs_builddir}/next-files testfile testfile2 <<\EOF +off = 0 + dirs[0] = "/home/drepper/gnu/new-bu/build/ttt" + file[0] = "???" + file[1] = "/home/drepper/gnu/new-bu/build/ttt/m.c" +off = 75 + dirs[0] = "/home/drepper/gnu/new-bu/build/ttt" + file[0] = "???" + file[1] = "/home/drepper/gnu/new-bu/build/ttt/b.c" + file[2] = "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h" + file[3] = "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h" + file[4] = "/usr/include/bits/types.h" + file[5] = "/usr/include/bits/sched.h" + file[6] = "/usr/include/bits/pthreadtypes.h" + file[7] = "/usr/include/stdio.h" + file[8] = "/usr/include/libio.h" + file[9] = "/usr/include/wchar.h" + file[10] = "/usr/include/_G_config.h" + file[11] = "/usr/include/gconv.h" +off = 480 + dirs[0] = "/home/drepper/gnu/new-bu/build/ttt" + file[0] = "???" + file[1] = "/home/drepper/gnu/new-bu/build/ttt/f.c" +off = 0 + dirs[0] = "/shoggoth/drepper" + file[0] = "???" + file[1] = "/shoggoth/drepper/b.c" + file[2] = "/home/geoffk/objs/laurel-000912-branch/lib/gcc-lib/powerpc-unknown-linux-gnu/2.96-laurel-000912/include/stddef.h" + file[3] = "/home/geoffk/objs/laurel-000912-branch/lib/gcc-lib/powerpc-unknown-linux-gnu/2.96-laurel-000912/include/stdarg.h" + file[4] = "/shoggoth/drepper/" + file[5] = "/usr/include/bits/types.h" + file[6] = "/usr/include/stdio.h" + file[7] = "/usr/include/libio.h" + file[8] = "/usr/include/_G_config.h" +off = 418 + dirs[0] = "/shoggoth/drepper" + file[0] = "???" + file[1] = "/shoggoth/drepper/f.c" +off = 485 + dirs[0] = "/shoggoth/drepper" + file[0] = "???" + file[1] = "/shoggoth/drepper/m.c" +EOF + +# see tests/testfile-dwarf-45.source +testfiles testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo +testfiles testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo + +testrun_compare ${abs_builddir}/next-files testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo <<\EOF +off = 0 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +off = 612 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +off = 0 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +off = 0 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "???" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +EOF + +# No problem with dirs[0] for DWARF5 line tables. +testrun_compare ${abs_builddir}/next-files testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo <<\EOF +off = 0 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "/home/mark/src/elfutils/tests/hello.c" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +off = 655 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "/home/mark/src/elfutils/tests/world.c" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +off = 0 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include" + file[0] = "/home/mark/src/elfutils/tests/hello.c" + file[1] = "/home/mark/src/elfutils/tests/hello.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include/stddef.h" +off = 0 + dirs[0] = "/home/mark/src/elfutils/tests" + dirs[1] = "/usr/include" + file[0] = "/home/mark/src/elfutils/tests/world.c" + file[1] = "/home/mark/src/elfutils/tests/world.c" + file[2] = "/home/mark/src/elfutils/tests/hello.h" + file[3] = "/usr/include/stdlib.h" +EOF + +# Created from testfile using +# cp testfile testfile-only-debug-line +# eu-strip -g --keep-section .debug_line +# +# Note how the comp dir cannot be retrieved and some files become relative. +testfiles testfile-only-debug-line +testrun_compare ${abs_builddir}/next-files testfile-only-debug-line <<\EOF +off = 0 + dirs[0] = (null) + file[0] = "???" + file[1] = "m.c" +off = 75 + dirs[0] = (null) + file[0] = "???" + file[1] = "b.c" + file[2] = "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h" + file[3] = "/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h" + file[4] = "/usr/include/bits/types.h" + file[5] = "/usr/include/bits/sched.h" + file[6] = "/usr/include/bits/pthreadtypes.h" + file[7] = "/usr/include/stdio.h" + file[8] = "/usr/include/libio.h" + file[9] = "/usr/include/wchar.h" + file[10] = "/usr/include/_G_config.h" + file[11] = "/usr/include/gconv.h" +off = 480 + dirs[0] = (null) + file[0] = "???" + file[1] = "f.c" +EOF + +exit 0 diff --git a/tests/run-next-lines.sh b/tests/run-next-lines.sh new file mode 100755 index 00000000..84aee1c7 --- /dev/null +++ b/tests/run-next-lines.sh @@ -0,0 +1,116 @@ +#! /bin/sh +# Variant of run-get-lines that uses dwarf_next_lines. +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +testfiles testfile testfile2 testfilenolines + +testrun_compare ${abs_builddir}/next-lines testfile testfile2 <<\EOF +off = 0 + 5 lines +804842c: /home/drepper/gnu/new-bu/build/ttt/m.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048432: /home/drepper/gnu/new-bu/build/ttt/m.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804844d: /home/drepper/gnu/new-bu/build/ttt/m.c:7:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048458: /home/drepper/gnu/new-bu/build/ttt/m.c:8:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804845a: /home/drepper/gnu/new-bu/build/ttt/m.c:8:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 75 + 4 lines +804845c: /home/drepper/gnu/new-bu/build/ttt/b.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804845f: /home/drepper/gnu/new-bu/build/ttt/b.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048464: /home/drepper/gnu/new-bu/build/ttt/b.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048466: /home/drepper/gnu/new-bu/build/ttt/b.c:6:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 480 + 4 lines +8048468: /home/drepper/gnu/new-bu/build/ttt/f.c:3:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804846b: /home/drepper/gnu/new-bu/build/ttt/f.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048470: /home/drepper/gnu/new-bu/build/ttt/f.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048472: /home/drepper/gnu/new-bu/build/ttt/f.c:5:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 0 + 4 lines +10000470: /shoggoth/drepper/b.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +1000047c: /shoggoth/drepper/b.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +10000480: /shoggoth/drepper/b.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +10000490: /shoggoth/drepper/b.c:6:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 418 + 4 lines +10000490: /shoggoth/drepper/f.c:3:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +1000049c: /shoggoth/drepper/f.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +100004a0: /shoggoth/drepper/f.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +100004b0: /shoggoth/drepper/f.c:5:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 485 + 5 lines +100004b0: /shoggoth/drepper/m.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +100004cc: /shoggoth/drepper/m.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +100004e8: /shoggoth/drepper/m.c:7:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +100004f4: /shoggoth/drepper/m.c:8:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +10000514: /shoggoth/drepper/m.c:8:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +EOF + +# - lines.c +# int ft; +# +# int +# main (int argc, char **argv) +# { +# return ft - 42; +# } +# +# - nolines.c +# int ft = 42; +# +# gcc -g -c lines.c +# gcc -g -c nolines.c +# gcc -g -o testfilenolines lines.o nolines.o + +testrun_compare ${abs_builddir}/next-lines testfilenolines <<\EOF +off = 0 + 4 lines +400474: /home/mark/src/tests/lines.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +40047f: /home/mark/src/tests/lines.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +400488: /home/mark/src/tests/lines.c:7:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +40048a: /home/mark/src/tests/lines.c:7:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 59 + 0 lines +EOF + +# See run-next-files. +# Note no, comp_dir, so all paths are relative. +testfiles testfile-only-debug-line +testrun_compare ${abs_builddir}/next-lines testfile-only-debug-line <<\EOF +off = 0 + 5 lines +804842c: m.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048432: m.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804844d: m.c:7:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048458: m.c:8:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804845a: m.c:8:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 75 + 4 lines +804845c: b.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804845f: b.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048464: b.c:6:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048466: b.c:6:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +off = 480 + 4 lines +8048468: f.c:3:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +804846b: f.c:4:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048470: f.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no +8048472: f.c:5:0: is_stmt:yes, end_seq:yes, bb:no, prologue:no, epilogue:no +EOF + +exit 0 diff --git a/tests/run-peel-type.sh b/tests/run-peel-type.sh new file mode 100755 index 00000000..668e3161 --- /dev/null +++ b/tests/run-peel-type.sh @@ -0,0 +1,63 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-aggregate-size.sh for how to generate testfiles. + +testfiles testfile-sizes1.o testfile-sizes2.o testfile-sizes3.o + +testrun_compare ${abs_builddir}/peel_type -e testfile-sizes1.o <<\EOF +c raw type base_type +i raw type base_type +l raw type base_type +v raw type pointer_type +s raw type structure_type +ca raw type array_type +ia raw type array_type +va raw type array_type +sa raw type array_type +EOF + +testrun_compare ${abs_builddir}/peel_type -e testfile-sizes2.o <<\EOF +c raw type base_type +i raw type base_type +l raw type base_type +v raw type pointer_type +s raw type structure_type +ca raw type array_type +ia raw type array_type +va raw type array_type +sa raw type array_type +EOF + +testrun_compare ${abs_builddir}/peel_type -e testfile-sizes3.o <<\EOF +c raw type base_type +i raw type base_type +l raw type base_type +v raw type pointer_type +s raw type structure_type +ca raw type array_type +ia raw type array_type +va raw type array_type +sa raw type array_type +d3d raw type array_type +f raw type base_type +b raw type base_type +EOF + +exit 0 diff --git a/tests/run-readelf-addr.sh b/tests/run-readelf-addr.sh new file mode 100755 index 00000000..ea723c27 --- /dev/null +++ b/tests/run-readelf-addr.sh @@ -0,0 +1,143 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See tests/testfile-dwarf-45.source +testfiles testfile-splitdwarf-4 testfile-splitdwarf-5 + +# DWARF4 GNU DebugFission No real table header. +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=addr testfile-splitdwarf-4<<\EOF + +DWARF section [33] '.debug_addr' at offset 0x3671: +Table at offset 0 for CU [ b]: + + Length: 152 + DWARF version: 4 + Address size: 8 + Segment size: 0 + + Addresses start at offset 0x0: + [ 0] 0x000000000040116a + [ 1] 0x0000000000401189 + [ 2] 0x000000000040118d + [ 3] 0x0000000000401194 + [ 4] 0x0000000000401181 + [ 5] 0x00000000004011af + [ 6] 0x00000000004011b1 + [ 7] 0x00000000004011a0 + [ 8] 0x0000000000401160 + [ 9] 0x00000000004011a0 + [10] 0x000000000040117b + [11] 0x000000000040117b + [12] 0x0000000000401181 + [13] 0x0000000000401181 + [14] 0x000000000040118d + [15] 0x0000000000401160 + [16] 0x0000000000401060
+ [17] 0x000000000040117b + [18] 0x0000000000404038 + +Table at offset 98 for CU [ 3f]: + + Length: 136 + DWARF version: 4 + Address size: 8 + Segment size: 0 + + Addresses start at offset 0x98: + [ 0] 0x00000000004011df + [ 1] 0x00000000004011e4 + [ 2] 0x0000000000401060
+ [ 3] 0x0000000000401071 + [ 4] 0x0000000000401074 + [ 5] 0x0000000000401079 + [ 6] 0x00000000004011d3 + [ 7] 0x0000000000401078 + [ 8] 0x00000000004011a0 + [ 9] 0x0000000000401040 + [10] 0x0000000000401080 <_start> + [11] 0x00000000004011c0 + [12] 0x0000000000401060
+ [13] 0x00000000004011c0 + [14] 0x00000000004011c8 + [15] 0x00000000004011d8 + [16] 0x00000000004011da + +EOF + +# DWARF5 Real table header. +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=addr testfile-splitdwarf-5<<\EOF + +DWARF section [32] '.debug_addr' at offset 0x365e: +Table at offset 0 for CU [ 14]: + + Length: 156 + DWARF version: 5 + Address size: 8 + Segment size: 0 + + Addresses start at offset 0x8: + [ 0] 0x000000000040116a + [ 1] 0x0000000000401189 + [ 2] 0x000000000040118d + [ 3] 0x0000000000401194 + [ 4] 0x0000000000401181 + [ 5] 0x00000000004011af + [ 6] 0x00000000004011b1 + [ 7] 0x00000000004011a0 + [ 8] 0x0000000000401160 + [ 9] 0x00000000004011a0 + [10] 0x000000000040117b + [11] 0x000000000040117b + [12] 0x0000000000401181 + [13] 0x0000000000401181 + [14] 0x000000000040118d + [15] 0x0000000000401160 + [16] 0x0000000000401060
+ [17] 0x000000000040117b + [18] 0x0000000000404038 + +Table at offset a0 for CU [ 49]: + + Length: 140 + DWARF version: 5 + Address size: 8 + Segment size: 0 + + Addresses start at offset 0xa8: + [ 0] 0x00000000004011df + [ 1] 0x00000000004011e4 + [ 2] 0x0000000000401060
+ [ 3] 0x0000000000401071 + [ 4] 0x0000000000401074 + [ 5] 0x0000000000401079 + [ 6] 0x00000000004011d3 + [ 7] 0x0000000000401078 + [ 8] 0x00000000004011a0 + [ 9] 0x0000000000401040 + [10] 0x0000000000401080 <_start> + [11] 0x00000000004011c0 + [12] 0x0000000000401060
+ [13] 0x00000000004011c0 + [14] 0x00000000004011c8 + [15] 0x00000000004011d8 + [16] 0x00000000004011da + +EOF + +exit 0 diff --git a/tests/run-readelf-const-values.sh b/tests/run-readelf-const-values.sh new file mode 100755 index 00000000..0a6356f1 --- /dev/null +++ b/tests/run-readelf-const-values.sh @@ -0,0 +1,230 @@ +#! /bin/sh +# Test for displaying DW_AT_const_types with the "correct" sign. +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# = s.c +# +# int s() +# { +# int i = -1; +# int j = -1; +# +# return i - j; +# } +# +# = m.c +# +# extern int s(); +# +# int +# main () +# { +# const signed char sc = -2; +# const unsigned char uc = 254; +# +# const signed short ss = -16; +# const unsigned short us = 65520; +# +# const signed int si = -3; +# const unsigned int ui = 4200000000; +# +# signed long sl = -1; +# unsigned long ul = 0xffffffffffffffffUL; +# +# return s (); +# } +# +# gcc -gdwarf-5 -O2 -c s.c +# gcc -gdwarf-4 -O2 -c m.c +# gcc -o testfile-const-values s.o m.o +# eu-strip -g -f testfile-const-values.debug testfile-const-values + +testfiles testfile-const-values.debug + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile-const-values.debug << EOF + +DWARF section [28] '.debug_info' at offset 0x2e0: + [Offset] + Compilation unit at offset 0: + Version: 5, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + Unit type: compile (1) + [ c] compile_unit abbrev: 2 + producer (strp) "GNU C11 7.3.1 20180303 (Red Hat 7.3.1-5) -mtune=generic -march=x86-64 -gdwarf-5 -O2" + language (data1) C11 (29) + name (string) "s.c" + comp_dir (strp) "/home/mark/build/elfutils-obj" + low_pc (addr) 0x00000000004004d0 + high_pc (data8) 3 (0x00000000004004d3) + stmt_list (sec_offset) 0 + [ 2e] subprogram abbrev: 3 + external (flag_present) yes + name (string) "s" + decl_file (data1) s.c (1) + decl_line (data1) 1 + type (ref4) [ 5e] + low_pc (addr) 0x00000000004004d0 + high_pc (data8) 3 (0x00000000004004d3) + frame_base (exprloc) + [ 0] call_frame_cfa + call_all_calls (flag_present) yes + sibling (ref4) [ 5e] + [ 4d] variable abbrev: 1 + name (string) "i" + decl_file (implicit_const) s.c (1) + decl_line (data1) 3 + type (ref4) [ 5e] + const_value (implicit_const) -1 + [ 55] variable abbrev: 1 + name (string) "j" + decl_file (implicit_const) s.c (1) + decl_line (data1) 4 + type (ref4) [ 5e] + const_value (implicit_const) -1 + [ 5e] base_type abbrev: 4 + byte_size (data1) 4 + encoding (data1) signed (5) + name (string) "int" + Compilation unit at offset 102: + Version: 4, Abbreviation section offset: 73, Address size: 8, Offset size: 4 + [ 71] compile_unit abbrev: 1 + producer (strp) "GNU C11 7.3.1 20180303 (Red Hat 7.3.1-5) -mtune=generic -march=x86-64 -gdwarf-4 -O2" + language (data1) C99 (12) + name (string) "m.c" + comp_dir (strp) "/home/mark/build/elfutils-obj" + ranges (sec_offset) range list [ 0] + low_pc (addr) 000000000000000000 + stmt_list (sec_offset) 54 + [ 8f] subprogram abbrev: 2 + external (flag_present) yes + name (strp) "main" + decl_file (data1) m.c (1) + decl_line (data1) 4 + type (ref4) [ 119] + low_pc (addr) 0x00000000004003e0 + high_pc (data8) 7 (0x00000000004003e7) + frame_base (exprloc) + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) yes + sibling (ref4) [ 119] + [ b0] variable abbrev: 3 + name (string) "sc" + decl_file (data1) m.c (1) + decl_line (data1) 6 + type (ref4) [ 12c] + const_value (sdata) -2 + [ bb] variable abbrev: 3 + name (string) "uc" + decl_file (data1) m.c (1) + decl_line (data1) 7 + type (ref4) [ 138] + const_value (sdata) 254 (-2) + [ c6] variable abbrev: 3 + name (string) "ss" + decl_file (data1) m.c (1) + decl_line (data1) 9 + type (ref4) [ 144] + const_value (sdata) -16 + [ d1] variable abbrev: 3 + name (string) "us" + decl_file (data1) m.c (1) + decl_line (data1) 10 + type (ref4) [ 150] + const_value (sdata) 65520 (-16) + [ dc] variable abbrev: 3 + name (string) "si" + decl_file (data1) m.c (1) + decl_line (data1) 12 + type (ref4) [ 120] + const_value (sdata) -3 + [ e7] variable abbrev: 3 + name (string) "ui" + decl_file (data1) m.c (1) + decl_line (data1) 13 + type (ref4) [ 15c] + const_value (sdata) 4200000000 (-94967296) + [ f5] variable abbrev: 3 + name (string) "sl" + decl_file (data1) m.c (1) + decl_line (data1) 15 + type (ref4) [ 161] + const_value (sdata) -1 + [ 100] variable abbrev: 3 + name (string) "ul" + decl_file (data1) m.c (1) + decl_line (data1) 16 + type (ref4) [ 168] + const_value (sdata) 18446744073709551615 (-1) + [ 10b] GNU_call_site abbrev: 4 + low_pc (addr) 0x00000000004003e7 + GNU_tail_call (flag_present) yes + abstract_origin (ref4) [ 16f] + [ 119] base_type abbrev: 5 + byte_size (data1) 4 + encoding (data1) signed (5) + name (string) "int" + [ 120] const_type abbrev: 6 + type (ref4) [ 119] + [ 125] base_type abbrev: 7 + byte_size (data1) 1 + encoding (data1) signed_char (6) + name (strp) "signed char" + [ 12c] const_type abbrev: 6 + type (ref4) [ 125] + [ 131] base_type abbrev: 7 + byte_size (data1) 1 + encoding (data1) unsigned_char (8) + name (strp) "unsigned char" + [ 138] const_type abbrev: 6 + type (ref4) [ 131] + [ 13d] base_type abbrev: 7 + byte_size (data1) 2 + encoding (data1) signed (5) + name (strp) "short int" + [ 144] const_type abbrev: 6 + type (ref4) [ 13d] + [ 149] base_type abbrev: 7 + byte_size (data1) 2 + encoding (data1) unsigned (7) + name (strp) "short unsigned int" + [ 150] const_type abbrev: 6 + type (ref4) [ 149] + [ 155] base_type abbrev: 7 + byte_size (data1) 4 + encoding (data1) unsigned (7) + name (strp) "unsigned int" + [ 15c] const_type abbrev: 6 + type (ref4) [ 155] + [ 161] base_type abbrev: 7 + byte_size (data1) 8 + encoding (data1) signed (5) + name (strp) "long int" + [ 168] base_type abbrev: 7 + byte_size (data1) 8 + encoding (data1) unsigned (7) + name (strp) "long unsigned int" + [ 16f] subprogram abbrev: 8 + external (flag_present) yes + declaration (flag_present) yes + linkage_name (string) "s" + name (string) "s" + decl_file (data1) m.c (1) + decl_line (data1) 1 +EOF + +exit 0 diff --git a/tests/run-readelf-dwz-multi.sh b/tests/run-readelf-dwz-multi.sh index 27e0f38c..4f317ac9 100755 --- a/tests/run-readelf-dwz-multi.sh +++ b/tests/run-readelf-dwz-multi.sh @@ -84,7 +84,7 @@ DWARF section [28] '.debug_info' at offset 0x1078: [Offset] Compilation unit at offset 0: Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 - [ b] compile_unit + [ b] compile_unit abbrev: 6 producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -mtune=generic -march=x86-64 -g" language (data1) C89 (1) name (strp) "main.c" @@ -92,46 +92,46 @@ DWARF section [28] '.debug_info' at offset 0x1078: low_pc (addr) 0x00000000004006ac
high_pc (udata) 44 (0x00000000004006d8) stmt_list (sec_offset) 0 - [ 26] imported_unit + [ 26] imported_unit abbrev: 5 import (GNU_ref_alt) [ b] - [ 2b] pointer_type + [ 2b] pointer_type abbrev: 1 byte_size (data1) 8 type (GNU_ref_alt) [ 53] - [ 31] subprogram - external (flag_present) + [ 31] subprogram abbrev: 3 + external (flag_present) yes name (strp) "main" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 - prototyped (flag_present) + prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] low_pc (addr) 0x00000000004006ac
high_pc (udata) 44 (0x00000000004006d8) frame_base (exprloc) - [ 0] call_frame_cfa - GNU_all_tail_call_sites (flag_present) + [ 0] call_frame_cfa + GNU_all_tail_call_sites (flag_present) yes sibling (ref_udata) [ 6e] - [ 48] formal_parameter + [ 48] formal_parameter abbrev: 8 name (strp) "argc" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 3e] location (exprloc) - [ 0] fbreg -36 - [ 56] formal_parameter + [ 0] fbreg -36 + [ 56] formal_parameter abbrev: 4 name (strp) "argv" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (ref_udata) [ 6e] location (exprloc) - [ 0] fbreg -48 - [ 61] variable + [ 0] fbreg -48 + [ 61] variable abbrev: 7 name (string) "b" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 5 type (GNU_ref_alt) [ 5a] location (exprloc) - [ 0] fbreg -32 - [ 6e] pointer_type + [ 0] fbreg -32 + [ 6e] pointer_type abbrev: 2 byte_size (data1) 8 type (ref_udata) [ 2b] EOF @@ -145,7 +145,7 @@ DWARF section [28] '.debug_info' at offset 0x1078: [Offset] Compilation unit at offset 0: Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 - [ b] compile_unit + [ b] compile_unit abbrev: 6 producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -mtune=generic -march=x86-64 -g" language (data1) C89 (1) name (strp) "main.c" @@ -153,46 +153,46 @@ DWARF section [28] '.debug_info' at offset 0x1078: low_pc (addr) 0x00000000004006ac
high_pc (udata) 44 (0x00000000004006d8) stmt_list (sec_offset) 0 - [ 26] imported_unit + [ 26] imported_unit abbrev: 5 import (GNU_ref_alt) [ b] - [ 2b] pointer_type + [ 2b] pointer_type abbrev: 1 byte_size (data1) 8 type (GNU_ref_alt) [ 53] - [ 31] subprogram - external (flag_present) + [ 31] subprogram abbrev: 3 + external (flag_present) yes name (strp) "main" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 - prototyped (flag_present) + prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] low_pc (addr) 0x00000000004006ac
high_pc (udata) 44 (0x00000000004006d8) frame_base (exprloc) - [ 0] call_frame_cfa - GNU_all_tail_call_sites (flag_present) + [ 0] call_frame_cfa + GNU_all_tail_call_sites (flag_present) yes sibling (ref_udata) [ 6e] - [ 48] formal_parameter + [ 48] formal_parameter abbrev: 8 name (strp) "argc" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 3e] location (exprloc) - [ 0] fbreg -36 - [ 56] formal_parameter + [ 0] fbreg -36 + [ 56] formal_parameter abbrev: 4 name (strp) "argv" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 3 type (ref_udata) [ 6e] location (exprloc) - [ 0] fbreg -48 - [ 61] variable + [ 0] fbreg -48 + [ 61] variable abbrev: 7 name (string) "b" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 5 type (GNU_ref_alt) [ 5a] location (exprloc) - [ 0] fbreg -32 - [ 6e] pointer_type + [ 0] fbreg -32 + [ 6e] pointer_type abbrev: 2 byte_size (data1) 8 type (ref_udata) [ 2b] EOF @@ -205,7 +205,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: [Offset] Compilation unit at offset 0: Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 - [ b] compile_unit + [ b] compile_unit abbrev: 3 producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -fpreprocessed -mtune=generic -march=x86-64 -g -fPIC" language (data1) C89 (1) name (strp) "shared.c" @@ -213,27 +213,27 @@ DWARF section [25] '.debug_info' at offset 0x106c: low_pc (addr) +0x0000000000000670 high_pc (udata) 23 (+0x0000000000000687) stmt_list (sec_offset) 0 - [ 26] imported_unit + [ 26] imported_unit abbrev: 2 import (GNU_ref_alt) [ b] - [ 2b] subprogram - external (flag_present) + [ 2b] subprogram abbrev: 1 + external (flag_present) yes name (strp) "call_foo" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 - prototyped (flag_present) + prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] low_pc (addr) +0x0000000000000670 high_pc (udata) 23 (+0x0000000000000687) frame_base (exprloc) - [ 0] call_frame_cfa - GNU_all_call_sites (flag_present) - [ 41] formal_parameter + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) yes + [ 41] formal_parameter abbrev: 4 name (string) "fb" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 76] location (exprloc) - [ 0] fbreg -24 + [ 0] fbreg -24 EOF # Same as above, but find alt debug file in a .dwz subdir. @@ -245,7 +245,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: [Offset] Compilation unit at offset 0: Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 - [ b] compile_unit + [ b] compile_unit abbrev: 3 producer (strp) "GNU C 4.7.0 20120507 (Red Hat 4.7.0-5) -fpreprocessed -mtune=generic -march=x86-64 -g -fPIC" language (data1) C89 (1) name (strp) "shared.c" @@ -253,27 +253,27 @@ DWARF section [25] '.debug_info' at offset 0x106c: low_pc (addr) +0x0000000000000670 high_pc (udata) 23 (+0x0000000000000687) stmt_list (sec_offset) 0 - [ 26] imported_unit + [ 26] imported_unit abbrev: 2 import (GNU_ref_alt) [ b] - [ 2b] subprogram - external (flag_present) + [ 2b] subprogram abbrev: 1 + external (flag_present) yes name (strp) "call_foo" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 - prototyped (flag_present) + prototyped (flag_present) yes type (GNU_ref_alt) [ 3e] low_pc (addr) +0x0000000000000670 high_pc (udata) 23 (+0x0000000000000687) frame_base (exprloc) - [ 0] call_frame_cfa - GNU_all_call_sites (flag_present) - [ 41] formal_parameter + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) yes + [ 41] formal_parameter abbrev: 4 name (string) "fb" - decl_file (data1) 1 + decl_file (data1) shared.c (1) decl_line (data1) 3 type (GNU_ref_alt) [ 76] location (exprloc) - [ 0] fbreg -24 + [ 0] fbreg -24 EOF mv .dwz/testfile_multi.dwz . rmdir .dwz @@ -284,7 +284,7 @@ DWARF section [28] '.debug_info' at offset 0x1088: [Offset] Compilation unit at offset 0: Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 - [ b] compile_unit + [ b] compile_unit abbrev: 5 producer (GNU_strp_alt) "GNU C 4.7.2 20121109 (Red Hat 4.7.2-8) -mtune=generic -march=x86-64 -g" language (data1) C89 (1) name (GNU_strp_alt) "main.c" @@ -292,41 +292,41 @@ DWARF section [28] '.debug_info' at offset 0x1088: low_pc (addr) 0x00000000004004ec
high_pc (udata) 18 (0x00000000004004fe) stmt_list (sec_offset) 0 - [ 26] imported_unit + [ 26] imported_unit abbrev: 2 import (GNU_ref_alt) [ b] - [ 2b] subprogram - external (flag_present) + [ 2b] subprogram abbrev: 4 + external (flag_present) yes name (GNU_strp_alt) "main" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 8 - prototyped (flag_present) + prototyped (flag_present) yes type (GNU_ref_alt) [ 30] low_pc (addr) 0x00000000004004ec
high_pc (udata) 18 (0x00000000004004fe) frame_base (exprloc) - [ 0] call_frame_cfa - GNU_all_call_sites (flag_present) - [ 41] formal_parameter + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) yes + [ 41] formal_parameter abbrev: 1 name (GNU_strp_alt) "argc" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 8 type (GNU_ref_alt) [ 30] location (exprloc) - [ 0] fbreg -36 - [ 4f] formal_parameter + [ 0] fbreg -36 + [ 4f] formal_parameter abbrev: 1 name (GNU_strp_alt) "argv" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 8 type (GNU_ref_alt) [ 41] location (exprloc) - [ 0] fbreg -48 - [ 5d] variable + [ 0] fbreg -48 + [ 5d] variable abbrev: 3 name (string) "fbb" - decl_file (data1) 1 + decl_file (data1) main.c (1) decl_line (data1) 10 type (GNU_ref_alt) [ 14] location (exprloc) - [ 0] fbreg -32 + [ 0] fbreg -32 EOF exit 0 diff --git a/tests/run-readelf-info-plus.sh b/tests/run-readelf-info-plus.sh new file mode 100755 index 00000000..ee1db021 --- /dev/null +++ b/tests/run-readelf-info-plus.sh @@ -0,0 +1,31 @@ +#! /bin/sh +# Test for --debug-dump=info+ and finding split unit (in wrong file). +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# see tests/testfile-dwarf-45.source +testfiles testfile-splitdwarf-5 +testfiles testfile-world5.dwo + +# note, wrong file, renamed as if this contains the correct dwo... +tempfiles testfile-hello5.dwo +cp testfile-world5.dwo testfile-hello5.dwo + +testrun ${abs_top_builddir}/src/readelf --debug-dump=info+ testfile-splitdwarf-5 + +exit 0 diff --git a/tests/run-readelf-line.sh b/tests/run-readelf-line.sh index 32bcf9d5..a95e6aa9 100755 --- a/tests/run-readelf-line.sh +++ b/tests/run-readelf-line.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2013 Red Hat, Inc. +# Copyright (C) 2013, 2018 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -28,15 +28,17 @@ DWARF section [30] '.debug_line' at offset 0x15f6: Table at offset 0: - Length: 83 - DWARF version: 2 - Prologue length: 43 - Minimum instruction length: 1 - Maximum operations per instruction: 1 - Initial value if 'is_stmt': 1 - Line base: -5 - Line range: 14 - Opcode base: 13 + Length: 83 + DWARF version: 2 + Prologue length: 43 + Address size: 4 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -5 + Line range: 14 + Opcode base: 13 Opcodes: [ 1] 0 arguments @@ -83,15 +85,17 @@ Line number statements: Table at offset 87: - Length: 72 - DWARF version: 2 - Prologue length: 28 - Minimum instruction length: 1 - Maximum operations per instruction: 1 - Initial value if 'is_stmt': 1 - Line base: -5 - Line range: 14 - Opcode base: 13 + Length: 72 + DWARF version: 2 + Prologue length: 28 + Address size: 4 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -5 + Line range: 14 + Opcode base: 13 Opcodes: [ 1] 0 arguments @@ -133,15 +137,17 @@ Line number statements: Table at offset 163: - Length: 106 - DWARF version: 2 - Prologue length: 43 - Minimum instruction length: 1 - Maximum operations per instruction: 1 - Initial value if 'is_stmt': 1 - Line base: -5 - Line range: 14 - Opcode base: 13 + Length: 106 + DWARF version: 2 + Prologue length: 43 + Address size: 4 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -5 + Line range: 14 + Opcode base: 13 Opcodes: [ 1] 0 arguments @@ -256,4 +262,888 @@ DWARF section [30] '.debug_line' at offset 0x15f6: EOF +# A .debug_line table with mininum instruction length > 1. +# +# = hello.c +# #include +# +# int +# main (int argc, char **argv) +# { +# printf ("Hello, %s\n", (argc > 0 +# ? argv[1]: "World")); +# return 0; +# } +# +# clang version 5.0.1 (tags/RELEASE_501/final) +# Target: powerpc64-unknown-linux-gnu +# clang -g -O2 -o testfile-ppc64-min-instr hello.c +testfiles testfile-ppc64-min-instr + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=line testfile-ppc64-min-instr <<\EOF + +DWARF section [29] '.debug_line' at offset 0xdf6: + +Table at offset 0: + + Length: 69 + DWARF version: 2 + Prologue length: 30 + Address size: 8 + Segment selector size: 0 + Min instruction length: 4 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -5 + Line range: 14 + Opcode base: 13 + +Opcodes: + [ 1] 0 arguments + [ 2] 1 argument + [ 3] 1 argument + [ 4] 1 argument + [ 5] 1 argument + [ 6] 0 arguments + [ 7] 0 arguments + [ 8] 0 arguments + [ 9] 1 argument + [10] 0 arguments + [11] 0 arguments + [12] 1 argument + +Directory table: + +File name table: + Entry Dir Time Size Name + 1 0 0 0 hello.c + +Line number statements: + [ 28] extended opcode 2: set address to 0x100005a4
+ [ 33] special opcode 22: address+0 = 0x100005a4
, line+4 = 5 + [ 34] set column to 27 + [ 36] set prologue end flag + [ 37] special opcode 19: address+0 = 0x100005a4
, line+1 = 6 + [ 38] set column to 8 + [ 3a] special opcode 47: address+8 = 0x100005ac , line+1 = 7 + [ 3b] set 'is_stmt' to 0 + [ 3c] advance line by constant -7 to 0 + [ 3e] special opcode 32: address+4 = 0x100005b0 , line+0 = 0 + [ 3f] set column to 3 + [ 41] set 'is_stmt' to 1 + [ 42] special opcode 108: address+24 = 0x100005c8 , line+6 = 6 + [ 43] special opcode 76: address+16 = 0x100005d8 , line+2 = 8 + [ 44] advance address by 32 to 0x100005f8 + [ 46] extended opcode 1: end of sequence +EOF + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=decodedline testfile-ppc64-min-instr <<\EOF + +DWARF section [29] '.debug_line' at offset 0xdf6: + + CU [b] hello.c + line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End) + /home/fedora/mjw/hello.c (mtime: 0, length: 0) + 5:0 S 0 0 0 0x00000000100005a4
+ 6:27 S P 0 0 0 0x00000000100005a4
+ 7:8 S 0 0 0 0x00000000100005ac + 0:8 0 0 0 0x00000000100005b0 + 6:3 S 0 0 0 0x00000000100005c8 + 8:3 S 0 0 0 0x00000000100005d8 + 8:3 S * 0 0 0 0x00000000100005f7 + +EOF + +# Two tests for the same code but encoded using DWARF4 or DWARF5. +# Output is identical except for the section offset and CU numbers. +# See tests/testfile-dwarf-45.source. + +testfiles testfile-dwarf-4 testfile-dwarf-5 + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=decodedline testfile-dwarf-4 << \EOF + +DWARF section [29] '.debug_line' at offset 0x1734: + + CU [b] hello.c + line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End) + /var/tmp/hello/hello.c (mtime: 0, length: 0) + 21:0 S 0 0 0 0x0000000000400510 + 22:1 S 0 0 0 0x0000000000400510 + 22:3 0 0 0 0x0000000000400510 + 25:6 0 0 0 0x0000000000400514 + 25:34 S 0 0 0 0x000000000040051a + 25:3 0 0 0 0x000000000040051a + 26:34 0 0 0 0x000000000040051e + 25:1 1 0 0 0x0000000000400528 + /var/tmp/hello/hello.h (mtime: 0, length: 0) + 7:18 S 0 0 0 0x000000000040052b + 9:3 S 0 0 0 0x000000000040052b + 9:3 0 0 0 0x000000000040052b + 10:6 S 0 0 0 0x000000000040052f + 10:5 0 0 0 0x000000000040052f + 12:7 S 0 0 0 0x0000000000400531 + /var/tmp/hello/hello.c (mtime: 0, length: 0) + 10:3 S 0 0 0 0x0000000000400531 + 12:3 S 0 0 0 0x0000000000400531 + 12:3 0 0 0 0x0000000000400531 + 13:6 S 0 0 0 0x0000000000400535 + 13:5 0 0 0 0x0000000000400535 + 15:7 S 0 0 0 0x0000000000400539 + 22:3 S 0 0 0 0x0000000000400539 + 22:3 0 0 0 0x0000000000400539 + 23:6 S 0 0 0 0x000000000040053d + 23:5 0 0 0 0x000000000040053d + 9:12 S 0 0 0 0x0000000000400550 + 10:1 S 0 0 0 0x0000000000400550 + 12:3 S 0 0 0 0x0000000000400550 + 12:3 0 0 0 0x0000000000400550 + 13:9 0 0 0 0x0000000000400556 + 15:7 S 0 0 0 0x000000000040055f + 15:3 0 0 0 0x000000000040055f + 15:7 * 0 0 0 0x0000000000400560 + + CU [21c] world.c + line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End) + /var/tmp/hello/world.c (mtime: 0, length: 0) + 15:0 S 0 0 0 0x0000000000400410
+ 16:1 S 0 0 0 0x0000000000400410
+ 17:3 S 0 0 0 0x0000000000400410
+ 15:3 0 0 0 0x0000000000400410
+ 17:1 0 0 0 0x0000000000400419 + 18:6 S 0 0 0 0x000000000040041e + 18:5 0 0 0 0x000000000040041e + 22:7 S 0 0 0 0x0000000000400421 + 22:3 S * 0 0 0 0x000000000040042f + + 6:0 S 0 0 0 0x0000000000400570 + 7:1 S 0 0 0 0x0000000000400570 + 7:3 0 0 0 0x0000000000400570 + 7:6 1 0 0 0x0000000000400575 + 7:24 0 0 0 0x0000000000400578 + 10:17 S 0 0 0 0x000000000040057d + 10:3 0 0 0 0x000000000040057d + /var/tmp/hello/hello.h (mtime: 0, length: 0) + 10:10 0 0 0 0x0000000000400583 + /var/tmp/hello/world.c (mtime: 0, length: 0) + 10:7 0 0 0 0x0000000000400585 + /var/tmp/hello/hello.h (mtime: 0, length: 0) + 7:10 S 0 0 0 0x0000000000400588 + 9:3 S 0 0 0 0x0000000000400588 + 10:3 0 0 0 0x0000000000400588 + 12:7 S 0 0 0 0x000000000040058f + 12:3 0 0 0 0x000000000040058f + /var/tmp/hello/world.c (mtime: 0, length: 0) + 11:10 0 0 0 0x0000000000400598 + 11:1 * 0 0 0 0x000000000040059a + +EOF + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=decodedline testfile-dwarf-5 << \EOF + +DWARF section [29] '.debug_line' at offset 0x171f: + + CU [c] hello.c + line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End) + /var/tmp/hello/hello.c (mtime: 0, length: 0) + 21:0 S 0 0 0 0x0000000000400510 + 22:1 S 0 0 0 0x0000000000400510 + 22:3 0 0 0 0x0000000000400510 + 25:6 0 0 0 0x0000000000400514 + 25:34 S 0 0 0 0x000000000040051a + 25:3 0 0 0 0x000000000040051a + 26:34 0 0 0 0x000000000040051e + 25:1 1 0 0 0x0000000000400528 + /var/tmp/hello/hello.h (mtime: 0, length: 0) + 7:18 S 0 0 0 0x000000000040052b + 9:3 S 0 0 0 0x000000000040052b + 9:3 0 0 0 0x000000000040052b + 10:6 S 0 0 0 0x000000000040052f + 10:5 0 0 0 0x000000000040052f + 12:7 S 0 0 0 0x0000000000400531 + /var/tmp/hello/hello.c (mtime: 0, length: 0) + 10:3 S 0 0 0 0x0000000000400531 + 12:3 S 0 0 0 0x0000000000400531 + 12:3 0 0 0 0x0000000000400531 + 13:6 S 0 0 0 0x0000000000400535 + 13:5 0 0 0 0x0000000000400535 + 15:7 S 0 0 0 0x0000000000400539 + 22:3 S 0 0 0 0x0000000000400539 + 22:3 0 0 0 0x0000000000400539 + 23:6 S 0 0 0 0x000000000040053d + 23:5 0 0 0 0x000000000040053d + 9:12 S 0 0 0 0x0000000000400550 + 10:1 S 0 0 0 0x0000000000400550 + 12:3 S 0 0 0 0x0000000000400550 + 12:3 0 0 0 0x0000000000400550 + 13:9 0 0 0 0x0000000000400556 + 15:7 S 0 0 0 0x000000000040055f + 15:3 0 0 0 0x000000000040055f + 15:7 * 0 0 0 0x0000000000400560 + + CU [218] world.c + line:col SBPE* disc isa op address (Statement Block Prologue Epilogue *End) + /var/tmp/hello/world.c (mtime: 0, length: 0) + 15:0 S 0 0 0 0x0000000000400410
+ 16:1 S 0 0 0 0x0000000000400410
+ 17:3 S 0 0 0 0x0000000000400410
+ 15:3 0 0 0 0x0000000000400410
+ 17:1 0 0 0 0x0000000000400419 + 18:6 S 0 0 0 0x000000000040041e + 18:5 0 0 0 0x000000000040041e + 22:7 S 0 0 0 0x0000000000400421 + 22:3 S * 0 0 0 0x000000000040042f + + 6:0 S 0 0 0 0x0000000000400570 + 7:1 S 0 0 0 0x0000000000400570 + 7:3 0 0 0 0x0000000000400570 + 7:6 1 0 0 0x0000000000400575 + 7:24 0 0 0 0x0000000000400578 + 10:17 S 0 0 0 0x000000000040057d + 10:3 0 0 0 0x000000000040057d + /var/tmp/hello/hello.h (mtime: 0, length: 0) + 10:10 0 0 0 0x0000000000400583 + /var/tmp/hello/world.c (mtime: 0, length: 0) + 10:7 0 0 0 0x0000000000400585 + /var/tmp/hello/hello.h (mtime: 0, length: 0) + 7:10 S 0 0 0 0x0000000000400588 + 9:3 S 0 0 0 0x0000000000400588 + 10:3 0 0 0 0x0000000000400588 + 12:7 S 0 0 0 0x000000000040058f + 12:3 0 0 0 0x000000000040058f + /var/tmp/hello/world.c (mtime: 0, length: 0) + 11:10 0 0 0 0x0000000000400598 + 11:1 * 0 0 0 0x000000000040059a + +EOF + +# After discarding the different offsets in the line number statements, +# the remaining difference between 4 and 5 is (besides the header/length) +# Just the representation of the directory and line tables: + +# Directory table: +# - /opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include +# + [path(line_strp)] +# + 0 /var/tmp/hello (90) +# + 1 /opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include (17) +# +# File name table: +# - Entry Dir Time Size Name +# - 1 0 0 0 hello.c +# - 2 0 0 0 hello.h +# - 3 1 0 0 stddef.h +# + [path(line_strp), directory_index(data1)] +# + 0 hello.c (9), 0 +# + 1 hello.c (9), 0 +# + 2 hello.h (82), 0 +# + 3 stddef.h (0), 1 +# +# Directory table: +# - /usr/include +# + [path(line_strp)] +# + 0 /var/tmp/hello (90) +# + 1 /usr/include (122) +# +# File name table: +# - Entry Dir Time Size Name +# - 1 0 0 0 world.c +# - 2 0 0 0 hello.h +# - 3 1 0 0 stdlib.h +# + [path(line_strp), directory_index(data1)] +# + 0 world.c (114), 0 +# + 1 world.c (114), 0 +# + 2 hello.h (82), 0 +# + 3 stdlib.h (105), 1 + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=line testfile-dwarf-4 << \EOF + +DWARF section [29] '.debug_line' at offset 0x1734: + +Table at offset 0: + + Length: 608 + DWARF version: 4 + Prologue length: 119 + Address size: 8 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -10 + Line range: 242 + Opcode base: 13 + +Opcodes: + [ 1] 0 arguments + [ 2] 1 argument + [ 3] 1 argument + [ 4] 1 argument + [ 5] 1 argument + [ 6] 0 arguments + [ 7] 0 arguments + [ 8] 0 arguments + [ 9] 1 argument + [10] 0 arguments + [11] 0 arguments + [12] 1 argument + +Directory table: + /opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include + +File name table: + Entry Dir Time Size Name + 1 0 0 0 hello.c + 2 0 0 0 hello.h + 3 1 0 0 stddef.h + +Line number statements: + [ 81] extended opcode 2: set address to 0x400510 + [ 8c] special opcode 43: address+0 = 0x400510 , line+20 = 21 + [ 8d] set column to 1 + [ 8f] extended opcode 2: set address to 0x400510 + [ 9a] special opcode 24: address+0 = 0x400510 , line+1 = 22 + [ 9b] set column to 3 + [ 9d] extended opcode 2: set address to 0x400510 + [ a8] set 'is_stmt' to 0 + [ a9] copy + [ aa] set column to 6 + [ ac] extended opcode 2: set address to 0x400514 + [ b7] special opcode 26: address+0 = 0x400514 , line+3 = 25 + [ b8] set column to 34 + [ ba] extended opcode 2: set address to 0x40051a + [ c5] set 'is_stmt' to 1 + [ c6] copy + [ c7] set column to 3 + [ c9] extended opcode 2: set address to 0x40051a + [ d4] set 'is_stmt' to 0 + [ d5] copy + [ d6] set column to 34 + [ d8] extended opcode 2: set address to 0x40051e + [ e3] special opcode 24: address+0 = 0x40051e , line+1 = 26 + [ e4] set column to 1 + [ e6] extended opcode 2: set address to 0x400528 + [ f1] extended opcode 4: set discriminator to 1 + [ f5] special opcode 22: address+0 = 0x400528 , line-1 = 25 + [ f6] set column to 18 + [ f8] extended opcode 2: set address to 0x40052b + [ 103] set file to 2 + [ 105] set 'is_stmt' to 1 + [ 106] advance line by constant -18 to 7 + [ 108] copy + [ 109] set column to 3 + [ 10b] extended opcode 2: set address to 0x40052b + [ 116] special opcode 25: address+0 = 0x40052b , line+2 = 9 + [ 117] set column to 3 + [ 119] extended opcode 2: set address to 0x40052b + [ 124] set 'is_stmt' to 0 + [ 125] copy + [ 126] set column to 6 + [ 128] extended opcode 2: set address to 0x40052f + [ 133] extended opcode 4: set discriminator to 0 + [ 137] set 'is_stmt' to 1 + [ 138] special opcode 24: address+0 = 0x40052f , line+1 = 10 + [ 139] set column to 5 + [ 13b] extended opcode 2: set address to 0x40052f + [ 146] set 'is_stmt' to 0 + [ 147] copy + [ 148] set column to 7 + [ 14a] extended opcode 2: set address to 0x400531 + [ 155] set 'is_stmt' to 1 + [ 156] special opcode 25: address+0 = 0x400531 , line+2 = 12 + [ 157] set column to 3 + [ 159] extended opcode 2: set address to 0x400531 + [ 164] set file to 1 + [ 166] special opcode 21: address+0 = 0x400531 , line-2 = 10 + [ 167] set column to 3 + [ 169] extended opcode 2: set address to 0x400531 + [ 174] special opcode 25: address+0 = 0x400531 , line+2 = 12 + [ 175] set column to 3 + [ 177] extended opcode 2: set address to 0x400531 + [ 182] set 'is_stmt' to 0 + [ 183] copy + [ 184] set column to 6 + [ 186] extended opcode 2: set address to 0x400535 + [ 191] set 'is_stmt' to 1 + [ 192] special opcode 24: address+0 = 0x400535 , line+1 = 13 + [ 193] set column to 5 + [ 195] extended opcode 2: set address to 0x400535 + [ 1a0] set 'is_stmt' to 0 + [ 1a1] copy + [ 1a2] set column to 7 + [ 1a4] extended opcode 2: set address to 0x400539 + [ 1af] set 'is_stmt' to 1 + [ 1b0] special opcode 25: address+0 = 0x400539 , line+2 = 15 + [ 1b1] set column to 3 + [ 1b3] extended opcode 2: set address to 0x400539 + [ 1be] special opcode 30: address+0 = 0x400539 , line+7 = 22 + [ 1bf] set column to 3 + [ 1c1] extended opcode 2: set address to 0x400539 + [ 1cc] set 'is_stmt' to 0 + [ 1cd] copy + [ 1ce] set column to 6 + [ 1d0] extended opcode 2: set address to 0x40053d + [ 1db] set 'is_stmt' to 1 + [ 1dc] special opcode 24: address+0 = 0x40053d , line+1 = 23 + [ 1dd] set column to 5 + [ 1df] extended opcode 2: set address to 0x40053d + [ 1ea] set 'is_stmt' to 0 + [ 1eb] copy + [ 1ec] set column to 12 + [ 1ee] extended opcode 2: set address to 0x400550 + [ 1f9] set 'is_stmt' to 1 + [ 1fa] advance line by constant -14 to 9 + [ 1fc] copy + [ 1fd] set column to 1 + [ 1ff] extended opcode 2: set address to 0x400550 + [ 20a] special opcode 24: address+0 = 0x400550 , line+1 = 10 + [ 20b] set column to 3 + [ 20d] extended opcode 2: set address to 0x400550 + [ 218] special opcode 25: address+0 = 0x400550 , line+2 = 12 + [ 219] set column to 3 + [ 21b] extended opcode 2: set address to 0x400550 + [ 226] set 'is_stmt' to 0 + [ 227] copy + [ 228] set column to 9 + [ 22a] extended opcode 2: set address to 0x400556 + [ 235] special opcode 24: address+0 = 0x400556 , line+1 = 13 + [ 236] set column to 7 + [ 238] extended opcode 2: set address to 0x40055f + [ 243] set 'is_stmt' to 1 + [ 244] special opcode 25: address+0 = 0x40055f , line+2 = 15 + [ 245] set column to 3 + [ 247] extended opcode 2: set address to 0x40055f + [ 252] set 'is_stmt' to 0 + [ 253] copy + [ 254] set column to 7 + [ 256] extended opcode 2: set address to 0x400561 + [ 261] extended opcode 1: end of sequence + +Table at offset 612: + + Length: 450 + DWARF version: 4 + Prologue length: 67 + Address size: 8 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -10 + Line range: 242 + Opcode base: 13 + +Opcodes: + [ 1] 0 arguments + [ 2] 1 argument + [ 3] 1 argument + [ 4] 1 argument + [ 5] 1 argument + [ 6] 0 arguments + [ 7] 0 arguments + [ 8] 0 arguments + [ 9] 1 argument + [10] 0 arguments + [11] 0 arguments + [12] 1 argument + +Directory table: + /usr/include + +File name table: + Entry Dir Time Size Name + 1 0 0 0 world.c + 2 0 0 0 hello.h + 3 1 0 0 stdlib.h + +Line number statements: + [ 2b1] extended opcode 2: set address to 0x400410
+ [ 2bc] special opcode 37: address+0 = 0x400410
, line+14 = 15 + [ 2bd] set column to 1 + [ 2bf] extended opcode 2: set address to 0x400410
+ [ 2ca] special opcode 24: address+0 = 0x400410
, line+1 = 16 + [ 2cb] set column to 3 + [ 2cd] extended opcode 2: set address to 0x400410
+ [ 2d8] special opcode 24: address+0 = 0x400410
, line+1 = 17 + [ 2d9] set column to 3 + [ 2db] extended opcode 2: set address to 0x400410
+ [ 2e6] set 'is_stmt' to 0 + [ 2e7] special opcode 21: address+0 = 0x400410
, line-2 = 15 + [ 2e8] set column to 1 + [ 2ea] extended opcode 2: set address to 0x400419 + [ 2f5] special opcode 25: address+0 = 0x400419 , line+2 = 17 + [ 2f6] set column to 6 + [ 2f8] extended opcode 2: set address to 0x40041e + [ 303] set 'is_stmt' to 1 + [ 304] special opcode 24: address+0 = 0x40041e , line+1 = 18 + [ 305] set column to 5 + [ 307] extended opcode 2: set address to 0x40041e + [ 312] set 'is_stmt' to 0 + [ 313] copy + [ 314] set column to 7 + [ 316] extended opcode 2: set address to 0x400421 + [ 321] set 'is_stmt' to 1 + [ 322] special opcode 27: address+0 = 0x400421 , line+4 = 22 + [ 323] set column to 3 + [ 325] extended opcode 2: set address to 0x400430 <_start> + [ 330] extended opcode 1: end of sequence + [ 333] extended opcode 2: set address to 0x400570 + [ 33e] special opcode 28: address+0 = 0x400570 , line+5 = 6 + [ 33f] set column to 1 + [ 341] extended opcode 2: set address to 0x400570 + [ 34c] special opcode 24: address+0 = 0x400570 , line+1 = 7 + [ 34d] set column to 3 + [ 34f] extended opcode 2: set address to 0x400570 + [ 35a] set 'is_stmt' to 0 + [ 35b] copy + [ 35c] set column to 6 + [ 35e] extended opcode 2: set address to 0x400575 + [ 369] extended opcode 4: set discriminator to 1 + [ 36d] copy + [ 36e] set column to 24 + [ 370] extended opcode 2: set address to 0x400578 + [ 37b] copy + [ 37c] set column to 17 + [ 37e] extended opcode 2: set address to 0x40057d + [ 389] extended opcode 4: set discriminator to 0 + [ 38d] set 'is_stmt' to 1 + [ 38e] special opcode 26: address+0 = 0x40057d , line+3 = 10 + [ 38f] set column to 3 + [ 391] extended opcode 2: set address to 0x40057d + [ 39c] set 'is_stmt' to 0 + [ 39d] copy + [ 39e] set column to 10 + [ 3a0] extended opcode 2: set address to 0x400583 + [ 3ab] set file to 2 + [ 3ad] copy + [ 3ae] set column to 7 + [ 3b0] extended opcode 2: set address to 0x400585 + [ 3bb] set file to 1 + [ 3bd] copy + [ 3be] set column to 10 + [ 3c0] extended opcode 2: set address to 0x400588 + [ 3cb] set file to 2 + [ 3cd] set 'is_stmt' to 1 + [ 3ce] special opcode 20: address+0 = 0x400588 , line-3 = 7 + [ 3cf] set column to 3 + [ 3d1] extended opcode 2: set address to 0x400588 + [ 3dc] special opcode 25: address+0 = 0x400588 , line+2 = 9 + [ 3dd] set column to 3 + [ 3df] extended opcode 2: set address to 0x400588 + [ 3ea] set 'is_stmt' to 0 + [ 3eb] special opcode 24: address+0 = 0x400588 , line+1 = 10 + [ 3ec] set column to 7 + [ 3ee] extended opcode 2: set address to 0x40058f + [ 3f9] set 'is_stmt' to 1 + [ 3fa] special opcode 25: address+0 = 0x40058f , line+2 = 12 + [ 3fb] set column to 3 + [ 3fd] extended opcode 2: set address to 0x40058f + [ 408] set 'is_stmt' to 0 + [ 409] copy + [ 40a] set column to 10 + [ 40c] extended opcode 2: set address to 0x400598 + [ 417] set file to 1 + [ 419] special opcode 22: address+0 = 0x400598 , line-1 = 11 + [ 41a] set column to 1 + [ 41c] extended opcode 2: set address to 0x40059b + [ 427] extended opcode 1: end of sequence +EOF + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=line testfile-dwarf-5 << \EOF + +DWARF section [29] '.debug_line' at offset 0x171f: + +Table at offset 0: + + Length: 547 + DWARF version: 5 + Prologue length: 56 + Address size: 8 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -10 + Line range: 242 + Opcode base: 13 + +Opcodes: + [ 1] 0 arguments + [ 2] 1 argument + [ 3] 1 argument + [ 4] 1 argument + [ 5] 1 argument + [ 6] 0 arguments + [ 7] 0 arguments + [ 8] 0 arguments + [ 9] 1 argument + [10] 0 arguments + [11] 0 arguments + [12] 1 argument + +Directory table: + [path(line_strp)] + 0 /var/tmp/hello (90) + 1 /opt/local/install/gcc/lib/gcc/x86_64-pc-linux-gnu/9.0.0/include (17) + +File name table: + [path(line_strp), directory_index(data1)] + 0 hello.c (9), 0 + 1 hello.c (9), 0 + 2 hello.h (82), 0 + 3 stddef.h (0), 1 + +Line number statements: + [ 44] extended opcode 2: set address to 0x400510 + [ 4f] special opcode 43: address+0 = 0x400510 , line+20 = 21 + [ 50] set column to 1 + [ 52] extended opcode 2: set address to 0x400510 + [ 5d] special opcode 24: address+0 = 0x400510 , line+1 = 22 + [ 5e] set column to 3 + [ 60] extended opcode 2: set address to 0x400510 + [ 6b] set 'is_stmt' to 0 + [ 6c] copy + [ 6d] set column to 6 + [ 6f] extended opcode 2: set address to 0x400514 + [ 7a] special opcode 26: address+0 = 0x400514 , line+3 = 25 + [ 7b] set column to 34 + [ 7d] extended opcode 2: set address to 0x40051a + [ 88] set 'is_stmt' to 1 + [ 89] copy + [ 8a] set column to 3 + [ 8c] extended opcode 2: set address to 0x40051a + [ 97] set 'is_stmt' to 0 + [ 98] copy + [ 99] set column to 34 + [ 9b] extended opcode 2: set address to 0x40051e + [ a6] special opcode 24: address+0 = 0x40051e , line+1 = 26 + [ a7] set column to 1 + [ a9] extended opcode 2: set address to 0x400528 + [ b4] extended opcode 4: set discriminator to 1 + [ b8] special opcode 22: address+0 = 0x400528 , line-1 = 25 + [ b9] set column to 18 + [ bb] extended opcode 2: set address to 0x40052b + [ c6] set file to 2 + [ c8] set 'is_stmt' to 1 + [ c9] advance line by constant -18 to 7 + [ cb] copy + [ cc] set column to 3 + [ ce] extended opcode 2: set address to 0x40052b + [ d9] special opcode 25: address+0 = 0x40052b , line+2 = 9 + [ da] set column to 3 + [ dc] extended opcode 2: set address to 0x40052b + [ e7] set 'is_stmt' to 0 + [ e8] copy + [ e9] set column to 6 + [ eb] extended opcode 2: set address to 0x40052f + [ f6] extended opcode 4: set discriminator to 0 + [ fa] set 'is_stmt' to 1 + [ fb] special opcode 24: address+0 = 0x40052f , line+1 = 10 + [ fc] set column to 5 + [ fe] extended opcode 2: set address to 0x40052f + [ 109] set 'is_stmt' to 0 + [ 10a] copy + [ 10b] set column to 7 + [ 10d] extended opcode 2: set address to 0x400531 + [ 118] set 'is_stmt' to 1 + [ 119] special opcode 25: address+0 = 0x400531 , line+2 = 12 + [ 11a] set column to 3 + [ 11c] extended opcode 2: set address to 0x400531 + [ 127] set file to 1 + [ 129] special opcode 21: address+0 = 0x400531 , line-2 = 10 + [ 12a] set column to 3 + [ 12c] extended opcode 2: set address to 0x400531 + [ 137] special opcode 25: address+0 = 0x400531 , line+2 = 12 + [ 138] set column to 3 + [ 13a] extended opcode 2: set address to 0x400531 + [ 145] set 'is_stmt' to 0 + [ 146] copy + [ 147] set column to 6 + [ 149] extended opcode 2: set address to 0x400535 + [ 154] set 'is_stmt' to 1 + [ 155] special opcode 24: address+0 = 0x400535 , line+1 = 13 + [ 156] set column to 5 + [ 158] extended opcode 2: set address to 0x400535 + [ 163] set 'is_stmt' to 0 + [ 164] copy + [ 165] set column to 7 + [ 167] extended opcode 2: set address to 0x400539 + [ 172] set 'is_stmt' to 1 + [ 173] special opcode 25: address+0 = 0x400539 , line+2 = 15 + [ 174] set column to 3 + [ 176] extended opcode 2: set address to 0x400539 + [ 181] special opcode 30: address+0 = 0x400539 , line+7 = 22 + [ 182] set column to 3 + [ 184] extended opcode 2: set address to 0x400539 + [ 18f] set 'is_stmt' to 0 + [ 190] copy + [ 191] set column to 6 + [ 193] extended opcode 2: set address to 0x40053d + [ 19e] set 'is_stmt' to 1 + [ 19f] special opcode 24: address+0 = 0x40053d , line+1 = 23 + [ 1a0] set column to 5 + [ 1a2] extended opcode 2: set address to 0x40053d + [ 1ad] set 'is_stmt' to 0 + [ 1ae] copy + [ 1af] set column to 12 + [ 1b1] extended opcode 2: set address to 0x400550 + [ 1bc] set 'is_stmt' to 1 + [ 1bd] advance line by constant -14 to 9 + [ 1bf] copy + [ 1c0] set column to 1 + [ 1c2] extended opcode 2: set address to 0x400550 + [ 1cd] special opcode 24: address+0 = 0x400550 , line+1 = 10 + [ 1ce] set column to 3 + [ 1d0] extended opcode 2: set address to 0x400550 + [ 1db] special opcode 25: address+0 = 0x400550 , line+2 = 12 + [ 1dc] set column to 3 + [ 1de] extended opcode 2: set address to 0x400550 + [ 1e9] set 'is_stmt' to 0 + [ 1ea] copy + [ 1eb] set column to 9 + [ 1ed] extended opcode 2: set address to 0x400556 + [ 1f8] special opcode 24: address+0 = 0x400556 , line+1 = 13 + [ 1f9] set column to 7 + [ 1fb] extended opcode 2: set address to 0x40055f + [ 206] set 'is_stmt' to 1 + [ 207] special opcode 25: address+0 = 0x40055f , line+2 = 15 + [ 208] set column to 3 + [ 20a] extended opcode 2: set address to 0x40055f + [ 215] set 'is_stmt' to 0 + [ 216] copy + [ 217] set column to 7 + [ 219] extended opcode 2: set address to 0x400561 + [ 224] extended opcode 1: end of sequence + +Table at offset 551: + + Length: 441 + DWARF version: 5 + Prologue length: 56 + Address size: 8 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -10 + Line range: 242 + Opcode base: 13 + +Opcodes: + [ 1] 0 arguments + [ 2] 1 argument + [ 3] 1 argument + [ 4] 1 argument + [ 5] 1 argument + [ 6] 0 arguments + [ 7] 0 arguments + [ 8] 0 arguments + [ 9] 1 argument + [10] 0 arguments + [11] 0 arguments + [12] 1 argument + +Directory table: + [path(line_strp)] + 0 /var/tmp/hello (90) + 1 /usr/include (122) + +File name table: + [path(line_strp), directory_index(data1)] + 0 world.c (114), 0 + 1 world.c (114), 0 + 2 hello.h (82), 0 + 3 stdlib.h (105), 1 + +Line number statements: + [ 26b] extended opcode 2: set address to 0x400410
+ [ 276] special opcode 37: address+0 = 0x400410
, line+14 = 15 + [ 277] set column to 1 + [ 279] extended opcode 2: set address to 0x400410
+ [ 284] special opcode 24: address+0 = 0x400410
, line+1 = 16 + [ 285] set column to 3 + [ 287] extended opcode 2: set address to 0x400410
+ [ 292] special opcode 24: address+0 = 0x400410
, line+1 = 17 + [ 293] set column to 3 + [ 295] extended opcode 2: set address to 0x400410
+ [ 2a0] set 'is_stmt' to 0 + [ 2a1] special opcode 21: address+0 = 0x400410
, line-2 = 15 + [ 2a2] set column to 1 + [ 2a4] extended opcode 2: set address to 0x400419 + [ 2af] special opcode 25: address+0 = 0x400419 , line+2 = 17 + [ 2b0] set column to 6 + [ 2b2] extended opcode 2: set address to 0x40041e + [ 2bd] set 'is_stmt' to 1 + [ 2be] special opcode 24: address+0 = 0x40041e , line+1 = 18 + [ 2bf] set column to 5 + [ 2c1] extended opcode 2: set address to 0x40041e + [ 2cc] set 'is_stmt' to 0 + [ 2cd] copy + [ 2ce] set column to 7 + [ 2d0] extended opcode 2: set address to 0x400421 + [ 2db] set 'is_stmt' to 1 + [ 2dc] special opcode 27: address+0 = 0x400421 , line+4 = 22 + [ 2dd] set column to 3 + [ 2df] extended opcode 2: set address to 0x400430 <_start> + [ 2ea] extended opcode 1: end of sequence + [ 2ed] extended opcode 2: set address to 0x400570 + [ 2f8] special opcode 28: address+0 = 0x400570 , line+5 = 6 + [ 2f9] set column to 1 + [ 2fb] extended opcode 2: set address to 0x400570 + [ 306] special opcode 24: address+0 = 0x400570 , line+1 = 7 + [ 307] set column to 3 + [ 309] extended opcode 2: set address to 0x400570 + [ 314] set 'is_stmt' to 0 + [ 315] copy + [ 316] set column to 6 + [ 318] extended opcode 2: set address to 0x400575 + [ 323] extended opcode 4: set discriminator to 1 + [ 327] copy + [ 328] set column to 24 + [ 32a] extended opcode 2: set address to 0x400578 + [ 335] copy + [ 336] set column to 17 + [ 338] extended opcode 2: set address to 0x40057d + [ 343] extended opcode 4: set discriminator to 0 + [ 347] set 'is_stmt' to 1 + [ 348] special opcode 26: address+0 = 0x40057d , line+3 = 10 + [ 349] set column to 3 + [ 34b] extended opcode 2: set address to 0x40057d + [ 356] set 'is_stmt' to 0 + [ 357] copy + [ 358] set column to 10 + [ 35a] extended opcode 2: set address to 0x400583 + [ 365] set file to 2 + [ 367] copy + [ 368] set column to 7 + [ 36a] extended opcode 2: set address to 0x400585 + [ 375] set file to 1 + [ 377] copy + [ 378] set column to 10 + [ 37a] extended opcode 2: set address to 0x400588 + [ 385] set file to 2 + [ 387] set 'is_stmt' to 1 + [ 388] special opcode 20: address+0 = 0x400588 , line-3 = 7 + [ 389] set column to 3 + [ 38b] extended opcode 2: set address to 0x400588 + [ 396] special opcode 25: address+0 = 0x400588 , line+2 = 9 + [ 397] set column to 3 + [ 399] extended opcode 2: set address to 0x400588 + [ 3a4] set 'is_stmt' to 0 + [ 3a5] special opcode 24: address+0 = 0x400588 , line+1 = 10 + [ 3a6] set column to 7 + [ 3a8] extended opcode 2: set address to 0x40058f + [ 3b3] set 'is_stmt' to 1 + [ 3b4] special opcode 25: address+0 = 0x40058f , line+2 = 12 + [ 3b5] set column to 3 + [ 3b7] extended opcode 2: set address to 0x40058f + [ 3c2] set 'is_stmt' to 0 + [ 3c3] copy + [ 3c4] set column to 10 + [ 3c6] extended opcode 2: set address to 0x400598 + [ 3d1] set file to 1 + [ 3d3] special opcode 22: address+0 = 0x400598 , line-1 = 11 + [ 3d4] set column to 1 + [ 3d6] extended opcode 2: set address to 0x40059b + [ 3e1] extended opcode 1: end of sequence +EOF + exit 0 diff --git a/tests/run-readelf-loc.sh b/tests/run-readelf-loc.sh index 98870fcf..8594b540 100755 --- a/tests/run-readelf-loc.sh +++ b/tests/run-readelf-loc.sh @@ -63,15 +63,40 @@ testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc --debug-dump=ra testfileloc<<\EOF DWARF section [33] '.debug_loc' at offset 0xd2a: - [ 0] 0x0000000000400480
..0x000000000040048d [ 0] reg5 - [ 23] 0x0000000000400485 ..0x000000000040048d [ 0] reg5 - [ 46] 0x00000000004004b2 ..0x00000000004004ba [ 0] breg5 0 + + CU [ b] base: 0x0000000000400480
+ [ 0] range 0, d + 0x0000000000400480
.. + 0x000000000040048c + [ 0] reg5 + [ 23] range 5, d + 0x0000000000400485 .. + 0x000000000040048c + [ 0] reg5 + + CU [ e0] base: 0x00000000004004a0 + [ 46] range 12, 1a + 0x00000000004004b2 .. + 0x00000000004004b9 + [ 0] breg5 0 DWARF section [34] '.debug_ranges' at offset 0xd94: - [ 0] 0x0000000000400480
..0x0000000000400482 - 0x0000000000400485 ..0x000000000040048d - [ 30] 0x00000000004004ad ..0x00000000004004af - 0x00000000004004b2 ..0x00000000004004ba + + CU [ b] base: 0x0000000000400480
+ [ 0] range 0, 2 + 0x0000000000400480
.. + 0x0000000000400481 + range 5, d + 0x0000000000400485 .. + 0x000000000040048c + + CU [ e0] base: 0x00000000004004a0 + [ 30] range d, f + 0x00000000004004ad .. + 0x00000000004004ae + range 12, 1a + 0x00000000004004b2 .. + 0x00000000004004b9 EOF # Don't resolve addresses to symbols. @@ -79,15 +104,40 @@ testrun_compare ${abs_top_builddir}/src/readelf -N --debug-dump=loc --debug-dump testfileloc<<\EOF DWARF section [33] '.debug_loc' at offset 0xd2a: - [ 0] 0x0000000000400480..0x000000000040048d [ 0] reg5 - [ 23] 0x0000000000400485..0x000000000040048d [ 0] reg5 - [ 46] 0x00000000004004b2..0x00000000004004ba [ 0] breg5 0 + + CU [ b] base: 0x0000000000400480 + [ 0] range 0, d + 0x0000000000400480.. + 0x000000000040048c + [ 0] reg5 + [ 23] range 5, d + 0x0000000000400485.. + 0x000000000040048c + [ 0] reg5 + + CU [ e0] base: 0x00000000004004a0 + [ 46] range 12, 1a + 0x00000000004004b2.. + 0x00000000004004b9 + [ 0] breg5 0 DWARF section [34] '.debug_ranges' at offset 0xd94: - [ 0] 0x0000000000400480..0x0000000000400482 - 0x0000000000400485..0x000000000040048d - [ 30] 0x00000000004004ad..0x00000000004004af - 0x00000000004004b2..0x00000000004004ba + + CU [ b] base: 0x0000000000400480 + [ 0] range 0, 2 + 0x0000000000400480.. + 0x0000000000400481 + range 5, d + 0x0000000000400485.. + 0x000000000040048c + + CU [ e0] base: 0x00000000004004a0 + [ 30] range d, f + 0x00000000004004ad.. + 0x00000000004004ae + range 12, 1a + 0x00000000004004b2.. + 0x00000000004004b9 EOF # Produce "raw" unprocessed content. @@ -95,15 +145,1016 @@ testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc --debug-dump testfileloc<<\EOF DWARF section [33] '.debug_loc' at offset 0xd2a: - [ 0] 000000000000000000..0x000000000000000d [ 0] reg5 - [ 23] 0x0000000000000005..0x000000000000000d [ 0] reg5 - [ 46] 0x0000000000000012..0x000000000000001a [ 0] breg5 0 + + CU [ b] base: 0x0000000000400480 + [ 0] range 0, d + [ 0] reg5 + [ 23] range 5, d + [ 0] reg5 + + CU [ e0] base: 0x00000000004004a0 + [ 46] range 12, 1a + [ 0] breg5 0 DWARF section [34] '.debug_ranges' at offset 0xd94: - [ 0] 000000000000000000..0x0000000000000002 - 0x0000000000000005..0x000000000000000d - [ 30] 0x000000000000000d..0x000000000000000f - 0x0000000000000012..0x000000000000001a + + CU [ b] base: 0x0000000000400480 + [ 0] range 0, 2 + range 5, d + + CU [ e0] base: 0x00000000004004a0 + [ 30] range d, f + range 12, 1a +EOF + +# .debug_rnglists (DWARF5), see tests/testfile-dwarf-45.source +testfiles testfile-dwarf-5 +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc testfile-dwarf-5<<\EOF + +DWARF section [31] '.debug_loclists' at offset 0x1c0c: +Table at Offset 0x0: + + Length: 96 + DWARF version: 5 + Address size: 8 + Segment size: 0 + Offset entries: 0 + CU [ c] base: 0x0000000000400510 + + Offset: c, Index: 0 + offset_pair 0, a + 0x0000000000400510 .. + 0x0000000000400519 + [ 0] reg5 + offset_pair a, 34 + 0x000000000040051a .. + 0x0000000000400543 + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: 1a, Index: e + offset_pair 1b, 2d + 0x000000000040052b .. + 0x000000000040053c + [ 0] addr 0x601038 + end_of_list + + Offset: 28, Index: 1c + offset_pair 1b, 21 + 0x000000000040052b .. + 0x0000000000400530 + [ 0] reg5 + end_of_list + + Offset: 2e, Index: 22 + offset_pair 1b, 27 + 0x000000000040052b .. + 0x0000000000400536 + [ 0] reg5 + offset_pair 29, 2d + 0x0000000000400539 .. + 0x000000000040053c + [ 0] reg5 + end_of_list + + Offset: 39, Index: 2d + offset_pair 21, 27 + 0x0000000000400531 .. + 0x0000000000400536 + [ 0] reg5 + offset_pair 29, 2d + 0x0000000000400539 .. + 0x000000000040053c + [ 0] reg5 + end_of_list + + Offset: 44, Index: 38 + offset_pair 21, 2d + 0x0000000000400531 .. + 0x000000000040053c + [ 0] reg5 + end_of_list + + Offset: 4a, Index: 3e + offset_pair 2d, 33 + 0x000000000040053d .. + 0x0000000000400542 + [ 0] reg5 + end_of_list + + Offset: 50, Index: 44 + offset_pair 40, 4f + 0x0000000000400550 .. + 0x000000000040055e + [ 0] reg5 + offset_pair 4f, 51 + 0x000000000040055f .. + 0x0000000000400560 + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: 5e, Index: 52 + offset_pair 40, 50 + 0x0000000000400550 .. + 0x000000000040055f + [ 0] reg5 + end_of_list + +Table at Offset 0x64: + + Length: 159 + DWARF version: 5 + Address size: 8 + Segment size: 0 + Offset entries: 0 + CU [ 218] base: 000000000000000000 + + Offset: 70, Index: 0 + base_address 0x400410 + 0x0000000000400410
+ offset_pair 0, 14 + 0x0000000000400410
.. + 0x0000000000400423 + [ 0] reg5 + offset_pair 14, 20 + 0x0000000000400424 .. + 0x000000000040042f + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: 87, Index: 17 + base_address 0x400410 + 0x0000000000400410
+ offset_pair 0, 18 + 0x0000000000400410
.. + 0x0000000000400427 + [ 0] reg4 + offset_pair 18, 20 + 0x0000000000400428 .. + 0x000000000040042f + [ 0] entry_value: + [ 0] reg4 + [ 3] stack_value + end_of_list + + Offset: 9e, Index: 2e + start_length 0x400421, 7 + 0x0000000000400421 .. + 0x0000000000400427 + [ 0] reg0 + end_of_list + + Offset: ab, Index: 3b + base_address 0x400570 + 0x0000000000400570 + offset_pair 0, 8 + 0x0000000000400570 .. + 0x0000000000400577 + [ 0] reg5 + offset_pair 8, 2b + 0x0000000000400578 .. + 0x000000000040059a + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: c2, Index: 52 + start_length 0x400588, b + 0x0000000000400588 .. + 0x0000000000400592 + [ 0] reg0 + end_of_list + + Offset: cf, Index: 5f + base_address 0x400588 + 0x0000000000400588 + offset_pair 0, 2 + 0x0000000000400588 .. + 0x0000000000400589 + [ 0] reg1 + offset_pair 2, 7 + 0x000000000040058a .. + 0x000000000040058e + [ 0] reg5 + offset_pair 7, b + 0x000000000040058f .. + 0x0000000000400592 + [ 0] entry_value: + [ 0] reg5 + [ 3] deref_size 1 + [ 5] const1u 56 + [ 7] shl + [ 8] const1u 56 + [10] shra + [11] stack_value + end_of_list + + Offset: f3, Index: 83 + base_address 0x400588 + 0x0000000000400588 + offset_pair 0, 2 + 0x0000000000400588 .. + 0x0000000000400589 + [ 0] reg1 + offset_pair 2, b + 0x000000000040058a .. + 0x0000000000400592 + [ 0] reg5 + end_of_list + +EOF + +# Same as above, but for DWARF4, note completely different encoding, but +# the information is the same (check with diff -uwb). +testfiles testfile-dwarf-4 +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc testfile-dwarf-4<<\EOF + +DWARF section [31] '.debug_loc' at offset 0x1c86: + + CU [ b] base: 0x0000000000400510 + [ 0] range 0, a + 0x0000000000400510 .. + 0x0000000000400519 + [ 0] reg5 + range a, 34 + 0x000000000040051a .. + 0x0000000000400543 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 39] range 1b, 2d + 0x000000000040052b .. + 0x000000000040053c + [ 0] addr 0x601038 + [ 64] range 1b, 21 + 0x000000000040052b .. + 0x0000000000400530 + [ 0] reg5 + [ 87] range 1b, 27 + 0x000000000040052b .. + 0x0000000000400536 + [ 0] reg5 + range 29, 2d + 0x0000000000400539 .. + 0x000000000040053c + [ 0] reg5 + [ bd] range 21, 27 + 0x0000000000400531 .. + 0x0000000000400536 + [ 0] reg5 + range 29, 2d + 0x0000000000400539 .. + 0x000000000040053c + [ 0] reg5 + [ f3] range 21, 2d + 0x0000000000400531 .. + 0x000000000040053c + [ 0] reg5 + [ 116] range 2d, 33 + 0x000000000040053d .. + 0x0000000000400542 + [ 0] reg5 + [ 139] range 40, 4f + 0x0000000000400550 .. + 0x000000000040055e + [ 0] reg5 + range 4f, 51 + 0x000000000040055f .. + 0x0000000000400560 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 172] range 40, 50 + 0x0000000000400550 .. + 0x000000000040055f + [ 0] reg5 + + CU [ 21c] base: 000000000000000000 + [ 195] range 400410, 400424 + 0x0000000000400410
.. + 0x0000000000400423 + [ 0] reg5 + range 400424, 400430 + 0x0000000000400424 .. + 0x000000000040042f + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 1ce] range 400410, 400428 + 0x0000000000400410
.. + 0x0000000000400427 + [ 0] reg4 + range 400428, 400430 + 0x0000000000400428 .. + 0x000000000040042f + [ 0] GNU_entry_value: + [ 0] reg4 + [ 3] stack_value + [ 207] range 400421, 400428 + 0x0000000000400421 .. + 0x0000000000400427 + [ 0] reg0 + [ 22a] range 400570, 400578 + 0x0000000000400570 .. + 0x0000000000400577 + [ 0] reg5 + range 400578, 40059b + 0x0000000000400578 .. + 0x000000000040059a + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 263] range 400588, 400593 + 0x0000000000400588 .. + 0x0000000000400592 + [ 0] reg0 + [ 286] range 400588, 40058a + 0x0000000000400588 .. + 0x0000000000400589 + [ 0] reg1 + range 40058a, 40058f + 0x000000000040058a .. + 0x000000000040058e + [ 0] reg5 + range 40058f, 400593 + 0x000000000040058f .. + 0x0000000000400592 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] deref_size 1 + [ 5] const1u 56 + [ 7] shl + [ 8] const1u 56 + [10] shra + [11] stack_value + [ 2da] range 400588, 40058a + 0x0000000000400588 .. + 0x0000000000400589 + [ 0] reg1 + range 40058a, 400593 + 0x000000000040058a .. + 0x0000000000400592 + [ 0] reg5 +EOF + +# Split DWARF5 variant. Note that the .debug_loclists moved to the .dwo file +# and now uses an index and addrx indirections. +testfiles testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc --dwarf-skeleton=testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo <<\EOF + +testfile-hello5.dwo: + + +DWARF section [ 3] '.debug_loclists.dwo' at offset 0x236: +Table at Offset 0x0: + + Length: 125 + DWARF version: 5 + Address size: 8 + Segment size: 0 + Offset entries: 9 + CU [ 14] base: 0x0000000000401160 + + Offsets starting at 0xc: + [ 0] 0x24 + [ 1] 0x32 + [ 2] 0x39 + [ 3] 0x3f + [ 4] 0x4a + [ 5] 0x55 + [ 6] 0x5b + [ 7] 0x61 + [ 8] 0x6f + + Offset: 30, Index: 24 + startx_length f, a + 0x0000000000401160 .. + 0x0000000000401169 + [ 0] reg5 + startx_length 0, 2a + 0x000000000040116a .. + 0x0000000000401193 + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: 3e, Index: 32 + startx_length 11, 12 + 0x000000000040117b .. + 0x000000000040118c + [ 0] addrx [18] 0x404038 + end_of_list + + Offset: 45, Index: 39 + startx_length 11, 6 + 0x000000000040117b .. + 0x0000000000401180 + [ 0] reg5 + end_of_list + + Offset: 4b, Index: 3f + startx_length 11, c + 0x000000000040117b .. + 0x0000000000401186 + [ 0] reg5 + startx_length 1, 4 + 0x0000000000401189 .. + 0x000000000040118c + [ 0] reg5 + end_of_list + + Offset: 56, Index: 4a + startx_length 4, 6 + 0x0000000000401181 .. + 0x0000000000401186 + [ 0] reg5 + startx_length 1, 4 + 0x0000000000401189 .. + 0x000000000040118c + [ 0] reg5 + end_of_list + + Offset: 61, Index: 55 + startx_length 4, c + 0x0000000000401181 .. + 0x000000000040118c + [ 0] reg5 + end_of_list + + Offset: 67, Index: 5b + startx_length 2, 6 + 0x000000000040118d .. + 0x0000000000401192 + [ 0] reg5 + end_of_list + + Offset: 6d, Index: 61 + startx_length 9, f + 0x00000000004011a0 .. + 0x00000000004011ae + [ 0] reg5 + startx_length 5, 2 + 0x00000000004011af .. + 0x00000000004011b0 + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: 7b, Index: 6f + startx_length 9, 10 + 0x00000000004011a0 .. + 0x00000000004011af + [ 0] reg5 + end_of_list + + +testfile-world5.dwo: + + +DWARF section [ 3] '.debug_loclists.dwo' at offset 0x217: +Table at Offset 0x0: + + Length: 128 + DWARF version: 5 + Address size: 8 + Segment size: 0 + Offset entries: 7 + CU [ 14] base: 000000000000000000 + + Offsets starting at 0xc: + [ 0] 0x1c + [ 1] 0x2a + [ 2] 0x38 + [ 3] 0x3e + [ 4] 0x4c + [ 5] 0x52 + [ 6] 0x6d + + Offset: 28, Index: 1c + startx_length 2, 14 + 0x0000000000401060
.. + 0x0000000000401073 + [ 0] reg5 + startx_length 4, c + 0x0000000000401074 .. + 0x000000000040107f + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: 36, Index: 2a + startx_length 2, 18 + 0x0000000000401060
.. + 0x0000000000401077 + [ 0] reg4 + startx_length 7, 6 + 0x0000000000401078 .. + 0x000000000040107d + [ 0] entry_value: + [ 0] reg4 + [ 3] stack_value + end_of_list + + Offset: 44, Index: 38 + startx_length 3, 7 + 0x0000000000401071 .. + 0x0000000000401077 + [ 0] reg0 + end_of_list + + Offset: 4a, Index: 3e + startx_length d, 8 + 0x00000000004011c0 .. + 0x00000000004011c7 + [ 0] reg5 + startx_length e, 23 + 0x00000000004011c8 .. + 0x00000000004011ea + [ 0] entry_value: + [ 0] reg5 + [ 3] stack_value + end_of_list + + Offset: 58, Index: 4c + startx_length f, b + 0x00000000004011d8 .. + 0x00000000004011e2 + [ 0] reg0 + end_of_list + + Offset: 5e, Index: 52 + startx_length f, 2 + 0x00000000004011d8 .. + 0x00000000004011d9 + [ 0] reg1 + startx_length 10, 5 + 0x00000000004011da .. + 0x00000000004011de + [ 0] reg5 + startx_length 0, 4 + 0x00000000004011df .. + 0x00000000004011e2 + [ 0] entry_value: + [ 0] reg5 + [ 3] deref_size 1 + [ 5] const1u 56 + [ 7] shl + [ 8] const1u 56 + [10] shra + [11] stack_value + end_of_list + + Offset: 79, Index: 6d + startx_length f, 2 + 0x00000000004011d8 .. + 0x00000000004011d9 + [ 0] reg1 + startx_length 10, 9 + 0x00000000004011da .. + 0x00000000004011e2 + [ 0] reg5 + end_of_list + +EOF + +# GNU DebugFission split-dwarf variant. Still uses .debug_loc, but now in +# .dwo file, with somewhat similar, but different encoding from DWARF5. +testfiles testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc --dwarf-skeleton=testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo <<\EOF + +testfile-hello4.dwo: + + +DWARF section [ 3] '.debug_loc.dwo' at offset 0x253: + + CU [ b] base: 0x0000000000401160 + [ 0] range 401160, 40116a + 0x0000000000401160 .. + 0x0000000000401169 + [ 0] reg5 + range 40116a, 401194 + 0x000000000040116a .. + 0x0000000000401193 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 16] range 40117b, 40118d + 0x000000000040117b .. + 0x000000000040118c + [ 0] GNU_addr_index [18] 0x404038 + [ 21] range 40117b, 401181 + 0x000000000040117b .. + 0x0000000000401180 + [ 0] reg5 + [ 2b] range 40117b, 401187 + 0x000000000040117b .. + 0x0000000000401186 + [ 0] reg5 + range 401189, 40118d + 0x0000000000401189 .. + 0x000000000040118c + [ 0] reg5 + [ 3e] range 401181, 401187 + 0x0000000000401181 .. + 0x0000000000401186 + [ 0] reg5 + range 401189, 40118d + 0x0000000000401189 .. + 0x000000000040118c + [ 0] reg5 + [ 51] range 401181, 40118d + 0x0000000000401181 .. + 0x000000000040118c + [ 0] reg5 + [ 5b] range 40118d, 401193 + 0x000000000040118d .. + 0x0000000000401192 + [ 0] reg5 + [ 65] range 4011a0, 4011af + 0x00000000004011a0 .. + 0x00000000004011ae + [ 0] reg5 + range 4011af, 4011b1 + 0x00000000004011af .. + 0x00000000004011b0 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 7b] range 4011a0, 4011b0 + 0x00000000004011a0 .. + 0x00000000004011af + [ 0] reg5 + +testfile-world4.dwo: + + +DWARF section [ 3] '.debug_loc.dwo' at offset 0x225: + + CU [ b] base: 000000000000000000 + [ 0] range 401060, 401074 + 0x0000000000401060
.. + 0x0000000000401073 + [ 0] reg5 + range 401074, 401080 + 0x0000000000401074 .. + 0x000000000040107f + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 16] range 401060, 401078 + 0x0000000000401060
.. + 0x0000000000401077 + [ 0] reg4 + range 401078, 40107e + 0x0000000000401078 .. + 0x000000000040107d + [ 0] GNU_entry_value: + [ 0] reg4 + [ 3] stack_value + [ 2c] range 401071, 401078 + 0x0000000000401071 .. + 0x0000000000401077 + [ 0] reg0 + [ 36] range 4011c0, 4011c8 + 0x00000000004011c0 .. + 0x00000000004011c7 + [ 0] reg5 + range 4011c8, 4011eb + 0x00000000004011c8 .. + 0x00000000004011ea + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + [ 4c] range 4011d8, 4011e3 + 0x00000000004011d8 .. + 0x00000000004011e2 + [ 0] reg0 + [ 56] range 4011d8, 4011da + 0x00000000004011d8 .. + 0x00000000004011d9 + [ 0] reg1 + range 4011da, 4011df + 0x00000000004011da .. + 0x00000000004011de + [ 0] reg5 + range 4011df, 4011e3 + 0x00000000004011df .. + 0x00000000004011e2 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] deref_size 1 + [ 5] const1u 56 + [ 7] shl + [ 8] const1u 56 + [10] shra + [11] stack_value + [ 7d] range 4011d8, 4011da + 0x00000000004011d8 .. + 0x00000000004011d9 + [ 0] reg1 + range 4011da, 4011e3 + 0x00000000004011da .. + 0x00000000004011e2 + [ 0] reg5 +EOF + +# Partial dwarf-4 and partial GNU DebugFission split-dwarf. +# +# = popcount.c = +# +# int popcount (unsigned char u) +# { +# int c = 0; +# while (u != 0) +# { +# if ((u & 1) == 1) +# c++; +# u >>= 1; +# } +# return c; +# } +# +# = splitdwarf4-not-split4.c = +# +# extern int popcount (unsigned char); +# +# int main (int argc, char **argv) +# { +# int i; +# int p = argc; +# for (i = 0; i < argc; ++i) +# p += popcount (argv[i][0]); +# i += p; +# return i; +# } +# +# gcc -gdwarf-4 -O2 -c popcount.c +# gcc -gdwarf-4 -gsplit-dwarf -O2 -c splitdwarf4-not-split4.c +# gcc -o testfile-splitdwarf4-not-split4 splitdwarf4-not-split4.o popcount.o +# eu-strip -f testfile-splitdwarf4-not-split4.debug \ +# testfile-splitdwarf4-not-split4 + +testfiles testfile-splitdwarf4-not-split4.debug +testfiles splitdwarf4-not-split4.dwo + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info+ --debug-dump=loc testfile-splitdwarf4-not-split4.debug <<\EOF + +DWARF section [28] '.debug_info' at offset 0x330: + [Offset] + Compilation unit at offset 0: + Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + Unit type: skeleton (4), Unit id: 0x3d909d7bd0e69c0b + [ b] compile_unit abbrev: 1 + ranges (sec_offset) range list [ 0] + low_pc (addr) 000000000000000000 + stmt_list (sec_offset) 0 + GNU_dwo_name (strp) "splitdwarf4-not-split4.dwo" + comp_dir (strp) "/tmp" + GNU_pubnames (flag_present) yes + GNU_addr_base (sec_offset) address base [ 0] + GNU_dwo_id (data8) 0x3d909d7bd0e69c0b + GNU_ranges_base (sec_offset) 0 + Split compilation unit at offset 0: + Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + Unit type: skeleton (4), Unit id: 0x3d909d7bd0e69c0b + { b} compile_unit abbrev: 1 + producer (GNU_str_index) "GNU C17 9.0.0 20180528 (experimental) -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -O2" + language (data1) C99 (12) + name (GNU_str_index) "splitdwarf4-not-split4.c" + comp_dir (GNU_str_index) "/tmp" + GNU_dwo_id (data8) 0x3d909d7bd0e69c0b + { 18} subprogram abbrev: 2 + external (flag_present) yes + name (GNU_str_index) "main" + decl_file (data1) splitdwarf4-not-split4.c (1) + decl_line (data1) 3 + decl_column (data1) 5 + prototyped (flag_present) yes + type (ref4) { 6d} + low_pc (GNU_addr_index) [4] 0x0000000000401050
+ high_pc (data8) 76 (0x000000000040109c <_start>) + frame_base (exprloc) + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) yes + sibling (ref4) { 6d} + { 30} formal_parameter abbrev: 3 + name (GNU_str_index) "argc" + decl_file (data1) splitdwarf4-not-split4.c (1) + decl_line (data1) 3 + decl_column (data1) 15 + type (ref4) { 6d} + location (sec_offset) location list [ 0] + { 3d} formal_parameter abbrev: 3 + name (GNU_str_index) "argv" + decl_file (data1) splitdwarf4-not-split4.c (1) + decl_line (data1) 3 + decl_column (data1) 28 + type (ref4) { 74} + location (sec_offset) location list [ 28] + { 4a} variable abbrev: 4 + name (string) "i" + decl_file (data1) splitdwarf4-not-split4.c (1) + decl_line (data1) 5 + decl_column (data1) 7 + type (ref4) { 6d} + location (sec_offset) location list [ 47] + { 58} variable abbrev: 4 + name (string) "p" + decl_file (data1) splitdwarf4-not-split4.c (1) + decl_line (data1) 6 + decl_column (data1) 7 + type (ref4) { 6d} + location (sec_offset) location list [ 73] + { 66} GNU_call_site abbrev: 5 + low_pc (GNU_addr_index) [1] 0x000000000040107f + abstract_origin (ref4) { 84} + { 6d} base_type abbrev: 6 + byte_size (data1) 4 + encoding (data1) signed (5) + name (string) "int" + { 74} pointer_type abbrev: 7 + byte_size (data1) 8 + type (ref4) { 7a} + { 7a} pointer_type abbrev: 7 + byte_size (data1) 8 + type (ref4) { 80} + { 80} base_type abbrev: 8 + byte_size (data1) 1 + encoding (data1) signed_char (6) + name (GNU_str_index) "char" + { 84} subprogram abbrev: 9 + external (flag_present) yes + declaration (flag_present) yes + linkage_name (GNU_str_index) "popcount" + name (GNU_str_index) "popcount" + decl_file (data1) splitdwarf4-not-split4.c (1) + decl_line (data1) 1 + decl_column (data1) 12 + Compilation unit at offset 52: + Version: 4, Abbreviation section offset: 29, Address size: 8, Offset size: 4 + [ 3f] compile_unit abbrev: 1 + producer (strp) "GNU C17 9.0.0 20180528 (experimental) -mtune=generic -march=x86-64 -gdwarf-4 -O2" + language (data1) C99 (12) + name (strp) "popcount.c" + comp_dir (strp) "/tmp" + low_pc (addr) 0x0000000000401180 + high_pc (data8) 33 (0x00000000004011a1) + stmt_list (sec_offset) 145 + [ 61] subprogram abbrev: 2 + external (flag_present) yes + name (strp) "popcount" + decl_file (data1) popcount.c (1) + decl_line (data1) 1 + decl_column (data1) 5 + prototyped (flag_present) yes + type (ref4) [ a0] + low_pc (addr) 0x0000000000401180 + high_pc (data8) 33 (0x00000000004011a1) + frame_base (exprloc) + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) yes + sibling (ref4) [ a0] + [ 83] formal_parameter abbrev: 3 + name (string) "u" + decl_file (data1) popcount.c (1) + decl_line (data1) 1 + decl_column (data1) 29 + type (ref4) [ a7] + location (sec_offset) location list [ 0] + [ 91] variable abbrev: 4 + name (string) "c" + decl_file (data1) popcount.c (1) + decl_line (data1) 3 + decl_column (data1) 7 + type (ref4) [ a0] + location (sec_offset) location list [ 60] + [ a0] base_type abbrev: 5 + byte_size (data1) 4 + encoding (data1) signed (5) + name (string) "int" + [ a7] base_type abbrev: 6 + byte_size (data1) 1 + encoding (data1) unsigned_char (8) + name (strp) "unsigned char" + +DWARF section [32] '.debug_loc' at offset 0x5ef: + + CU [ 3f] base: 0x0000000000401180 + [ 0] range 0, 9 + 0x0000000000401180 .. + 0x0000000000401188 + [ 0] reg5 + range 9, 1b + 0x0000000000401189 .. + 0x000000000040119a + [ 0] reg1 + range 1b, 1d + 0x000000000040119b .. + 0x000000000040119c + [ 0] breg1 0 + [ 2] lit1 + [ 3] shr + [ 4] stack_value + range 1d, 21 + 0x000000000040119d .. + 0x00000000004011a0 + [ 0] reg1 + [ 60] range 0, 9 + 0x0000000000401180 .. + 0x0000000000401188 + [ 0] lit0 + [ 1] stack_value + range 9, 20 + 0x0000000000401189 .. + 0x000000000040119f + [ 0] reg0 + range 20, 21 + 0x00000000004011a0 .. + 0x00000000004011a0 + [ 0] lit0 + [ 1] stack_value +EOF + +testrun_compare ${abs_top_builddir}/src/readelf --dwarf-skeleton=testfile-splitdwarf4-not-split4.debug --debug-dump=loc splitdwarf4-not-split4.dwo <<\EOF + +DWARF section [ 3] '.debug_loc.dwo' at offset 0x15b: + + CU [ b] base: 000000000000000000 + [ 0] range 401050, 40106e + 0x0000000000401050
.. + 0x000000000040106d + [ 0] reg5 + range 40106e, 401086 + 0x000000000040106e .. + 0x0000000000401085 + [ 0] reg12 + range 401086, 401095 + 0x0000000000401086 .. + 0x0000000000401094 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value + range 401095, 40109c + 0x0000000000401095 .. + 0x000000000040109b + [ 0] reg5 + [ 28] range 401050, 40106e + 0x0000000000401050
.. + 0x000000000040106d + [ 0] reg4 + range 40106e, 401095 + 0x000000000040106e .. + 0x0000000000401094 + [ 0] GNU_entry_value: + [ 0] reg4 + [ 3] stack_value + range 401095, 40109c + 0x0000000000401095 .. + 0x000000000040109b + [ 0] reg4 + [ 47] range 401050, 40106e + 0x0000000000401050
.. + 0x000000000040106d + [ 0] lit0 + [ 1] stack_value + range 401086, 40108e + 0x0000000000401086 .. + 0x000000000040108d + [ 0] breg12 0 + [ 2] breg6 0 + [ 4] plus + [ 5] stack_value + range 40108e, 401095 + 0x000000000040108e .. + 0x0000000000401094 + [ 0] reg0 + range 401095, 40109c + 0x0000000000401095 .. + 0x000000000040109b + [ 0] lit0 + [ 1] stack_value + [ 73] range 401050, 40106e + 0x0000000000401050
.. + 0x000000000040106d + [ 0] reg5 + range 40106e, 401090 + 0x000000000040106e .. + 0x000000000040108f + [ 0] reg6 + range 401095, 40109c + 0x0000000000401095 .. + 0x000000000040109b + [ 0] reg5 EOF exit 0 diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh index 86171c41..07cfc39c 100755 --- a/tests/run-readelf-mixed-corenote.sh +++ b/tests/run-readelf-mixed-corenote.sh @@ -646,4 +646,74 @@ Note segment of 1056 bytes at offset 0x1f4: fp6: 0x7fff0000ffffffffffffffff fp7: 0x7fff0000ffffffffffffffff EOF +# To reproduce this core dump, do this on a riscv64 machine: +# $ gcc -x c <(echo 'int main () { return *(int *)0x12345678; }') +# $ ./a.out +testfiles testfile-riscv64-core +testrun_compare ${abs_top_builddir}/src/readelf -n testfile-riscv64-core <<\EOF + +Note segment of 1408 bytes at offset 0x388: + Owner Data size Type + CORE 376 PRSTATUS + info.si_signo: 11, info.si_code: 0, info.si_errno: 0, cursig: 11 + sigpend: <> + sighold: <> + pid: 6801, ppid: 1155, pgrp: 6801, sid: 1155 + utime: 0.000000, stime: 0.110000, cutime: 0.000000, cstime: 0.000000 + fpvalid: 0 + ra: 0x9a00000000000104 sp: 0x400000002000051c + gp: 0x280000003fff9812 tp: 0xd000000000000128 + t0: 5764607523571106577 t1: -432345563690696255 + t2: -5764607522497362661 s0: 5764607523034235171 + s1: -6629298650415654894 a0: 72057594037928196 + a1: -6341068275337658368 a2: -5188146769657096173 + a3: 1073715219 a4: 8646911284551352320 + a5: 8646911285625067538 a6: 1729382256911463510 + a7: 536876397 s2: -1152921504606846976 + s3: 1152921505322686797 s4: 536871337 + s5: -3458764513820540928 s6: -9223372036138925403 + s7: 715843991 s8: -2594073385365405696 + s9: 4611686019143218592 s10: 715850259 + s11: 715850393 t3: -432345564227567616 + t4: 144115188075856379 t5: 216172782113783808 + t6: 1152921504606846976 + CORE 136 PRPSINFO + state: 0, sname: R, zomb: 0, nice: 0, flag: 0x0000000000400600 + uid: 0, gid: 0, pid: 6801, ppid: 1155, pgrp: 6801, sid: 1155 + fname: a.out, psargs: /tmp/a.out + CORE 128 SIGINFO + si_signo: 11, si_errno: 0, si_code: 1 + fault address: 0x12345678 + CORE 288 AUXV + SYSINFO_EHDR: 0x200001d000 + HWCAP: 0x1105 + PAGESZ: 4096 + CLKTCK: 100 + PHDR: 0x10040 + PHENT: 56 + PHNUM: 9 + BASE: 0x2000000000 + FLAGS: 0 + ENTRY: 0x103e0 + UID: 0 + EUID: 0 + GID: 0 + EGID: 0 + SECURE: 0 + RANDOM: 0x3fff9816d6 + EXECFN: 0x3fff981fed + NULL + CORE 379 FILE + 9 files: + 00010000-00011000 00000000 4096 /tmp/a.out + 00011000-00012000 00000000 4096 /tmp/a.out + 00012000-00013000 00001000 4096 /tmp/a.out + 2000000000-200001a000 00000000 106496 /lib64/ld-2.27.so + 200001a000-200001b000 00019000 4096 /lib64/ld-2.27.so + 200001b000-200001c000 0001a000 4096 /lib64/ld-2.27.so + 2000032000-2000151000 00000000 1175552 /lib64/libc-2.27.so + 2000151000-2000155000 0011e000 16384 /lib64/libc-2.27.so + 2000155000-2000157000 00122000 8192 /lib64/libc-2.27.so +EOF + exit 0 diff --git a/tests/run-readelf-ranges.sh b/tests/run-readelf-ranges.sh new file mode 100755 index 00000000..ca3e3024 --- /dev/null +++ b/tests/run-readelf-ranges.sh @@ -0,0 +1,236 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-readelf-loc.sh + +testfiles testfileloc + +# Process values as offsets from base addresses and resolve to symbols. +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=ranges testfileloc<<\EOF + +DWARF section [34] '.debug_ranges' at offset 0xd94: + + CU [ b] base: 0x0000000000400480
+ [ 0] range 0, 2 + 0x0000000000400480
.. + 0x0000000000400481 + range 5, d + 0x0000000000400485 .. + 0x000000000040048c + + CU [ e0] base: 0x00000000004004a0 + [ 30] range d, f + 0x00000000004004ad .. + 0x00000000004004ae + range 12, 1a + 0x00000000004004b2 .. + 0x00000000004004b9 +EOF + +# Don't resolve addresses to symbols. +testrun_compare ${abs_top_builddir}/src/readelf -N --debug-dump=ranges testfileloc<<\EOF + +DWARF section [34] '.debug_ranges' at offset 0xd94: + + CU [ b] base: 0x0000000000400480 + [ 0] range 0, 2 + 0x0000000000400480.. + 0x0000000000400481 + range 5, d + 0x0000000000400485.. + 0x000000000040048c + + CU [ e0] base: 0x00000000004004a0 + [ 30] range d, f + 0x00000000004004ad.. + 0x00000000004004ae + range 12, 1a + 0x00000000004004b2.. + 0x00000000004004b9 +EOF + +# Produce "raw" unprocessed content. +testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=ranges testfileloc<<\EOF + +DWARF section [34] '.debug_ranges' at offset 0xd94: + + CU [ b] base: 0x0000000000400480 + [ 0] range 0, 2 + range 5, d + + CU [ e0] base: 0x00000000004004a0 + [ 30] range d, f + range 12, 1a +EOF + +# .debug_rnglists (DWARF5), see tests/testfile-dwarf-45.source +testfiles testfile-dwarf-5 +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=ranges testfile-dwarf-5<<\EOF + +DWARF section [33] '.debug_rnglists' at offset 0x1d9a: +Table at Offset 0x0: + + Length: 45 + DWARF version: 5 + Address size: 8 + Segment size: 0 + Offset entries: 0 + CU [ 218] base: 000000000000000000 + + Offset: c, Index: 0 + base_address 0x400583 + 0x0000000000400583 + offset_pair 0, 2 + 0x0000000000400583 .. + 0x0000000000400584 + offset_pair 5, 15 + 0x0000000000400588 .. + 0x0000000000400597 + end_of_list + + Offset: 1c, Index: 10 + start_length 0x400570, 2b + 0x0000000000400570 .. + 0x000000000040059a + start_length 0x400410, 20 + 0x0000000000400410
.. + 0x000000000040042f + end_of_list + +EOF + +# Same as above, but for DWARF4, note no header, and base address is not +# given, but ranges are the same. +testfiles testfile-dwarf-4 +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=ranges testfile-dwarf-4<<\EOF + +DWARF section [32] '.debug_ranges' at offset 0x1f96: + + CU [ 21c] base: 000000000000000000 + [ 0] range 400583, 400585 + 0x0000000000400583 .. + 0x0000000000400584 + range 400588, 400598 + 0x0000000000400588 .. + 0x0000000000400597 + [ 30] range 400570, 40059b + 0x0000000000400570 .. + 0x000000000040059a + range 400410, 400430 + 0x0000000000400410
.. + 0x000000000040042f +EOF + +# Now with split dwarf. See tests/testfile-dwarf-45.source. +# Note that this will have an offsets table that the .dwo can refer to. +testfiles testfile-splitdwarf-5 testfile-hello5.dwo testfile-world5.dwo +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=ranges testfile-splitdwarf-5<<\EOF + +DWARF section [35] '.debug_rnglists' at offset 0x393a: +Table at Offset 0x0: + + Length: 53 + DWARF version: 5 + Address size: 8 + Segment size: 0 + Offset entries: 2 + CU [ 49] base: 000000000000000000 + + Offsets starting at 0xc: + [ 0] 0x8 + [ 1] 0x18 + + Offset: 14, Index: 8 + base_address 0x4011d3 + 0x00000000004011d3 + offset_pair 0, 2 + 0x00000000004011d3 .. + 0x00000000004011d4 + offset_pair 5, 15 + 0x00000000004011d8 .. + 0x00000000004011e7 + end_of_list + + Offset: 24, Index: 18 + start_length 0x4011c0, 2b + 0x00000000004011c0 .. + 0x00000000004011ea + start_length 0x401060, 20 + 0x0000000000401060
.. + 0x000000000040107f + end_of_list + +EOF + +# Note that the rnglist_base attribute of the second CU points to the offsets +# above 0xc [c]. +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile-splitdwarf-5<<\EOF + +DWARF section [28] '.debug_info' at offset 0x3102: + [Offset] + Compilation unit at offset 0: + Version: 5, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + Unit type: skeleton (4), Unit id: 0xc422aa5c31fec205 + [ 14] skeleton_unit abbrev: 1 + low_pc (addr) 0x0000000000401160 + high_pc (data8) 81 (0x00000000004011b1) + stmt_list (sec_offset) 0 + dwo_name (strp) "testfile-hello5.dwo" + comp_dir (strp) "/home/mark/src/elfutils/tests" + GNU_pubnames (flag_present) yes + addr_base (sec_offset) address base [ 8] + Compilation unit at offset 53: + Version: 5, Abbreviation section offset: 21, Address size: 8, Offset size: 4 + Unit type: skeleton (4), Unit id: 0xb6c8b9d97e6dfdfe + [ 49] skeleton_unit abbrev: 1 + ranges (sec_offset) range list [ 24] + low_pc (addr) 000000000000000000 + stmt_list (sec_offset) 655 + dwo_name (strp) "testfile-world5.dwo" + comp_dir (strp) "/home/mark/src/elfutils/tests" + GNU_pubnames (flag_present) yes + addr_base (sec_offset) address base [ a8] + rnglists_base (sec_offset) range list [ c] +EOF + +# Same for DWARF4 GNU DebugFission. But now we need to scan the .dwo +# explicitly to know it will use the first ranges. +testfiles testfile-splitdwarf-4 testfile-hello4.dwo testfile-world4.dwo +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=ranges testfile-splitdwarf-4<<\EOF + +DWARF section [32] '.debug_ranges' at offset 0x3611: + + CU [ b] base: 000000000000000000 + [ 0] range 4011d3, 4011d5 + 0x00000000004011d3 .. + 0x00000000004011d4 + range 4011d8, 4011e8 + 0x00000000004011d8 .. + 0x00000000004011e7 + + CU [ 3f] base: 000000000000000000 + [ 30] range 4011c0, 4011eb + 0x00000000004011c0 .. + 0x00000000004011ea + range 401060, 401080 + 0x0000000000401060
.. + 0x000000000040107f +EOF + +exit 0 diff --git a/tests/run-readelf-str.sh b/tests/run-readelf-str.sh new file mode 100755 index 00000000..8b894e8d --- /dev/null +++ b/tests/run-readelf-str.sh @@ -0,0 +1,211 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See tests/testfile-dwarf-45.source +testfiles testfile-splitdwarf-4 testfile-splitdwarf-5 +testfiles testfile-hello4.dwo testfile-hello5.dwo +testfiles testfile-world4.dwo testfile-world5.dwo + +# DWARF4 GNU DebugFission No real table header. +# We don't really need the skeleton, but we don't want any Warnings. +testrun_compare ${abs_top_builddir}/src/readelf --dwarf-skeleton testfile-splitdwarf-4 --debug-dump=str testfile-hello4.dwo testfile-world4.dwo<<\EOF + +testfile-hello4.dwo: + + +DWARF section [ 5] '.debug_str_offsets.dwo' at offset 0x335: +Table at offset 0 + Offsets start at 0x0: + [ 0] [ 0] "long long int" + [ 1] [ e] "frob" + [ 2] [ 13] "long unsigned int" + [ 3] [ 25] "/home/mark/src/elfutils/tests" + [ 4] [ 43] "wchar_t" + [ 5] [ 4b] "main" + [ 6] [ 50] "long int" + [ 7] [ 59] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [ 8] [ e9] "long double" + [ 9] [ f5] "hello.c" + + +DWARF section [ 6] '.debug_str.dwo' at offset 0x35d: + Offset String + [ 0] "long long int" + [ e] "frob" + [ 13] "long unsigned int" + [ 25] "/home/mark/src/elfutils/tests" + [ 43] "wchar_t" + [ 4b] "main" + [ 50] "long int" + [ 59] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [ e9] "long double" + [ f5] "hello.c" + +testfile-world4.dwo: + + +DWARF section [ 5] '.debug_str_offsets.dwo' at offset 0x2e7: +Table at offset 0 + Offsets start at 0x0: + [ 0] [ 0] "long long unsigned int" + [ 1] [ 17] "/home/mark/src/elfutils/tests" + [ 2] [ 35] "long long int" + [ 3] [ 43] "signed char" + [ 4] [ 4f] "long int" + [ 5] [ 58] "world.c" + [ 6] [ 60] "unsigned int" + [ 7] [ 6d] "long unsigned int" + [ 8] [ 7f] "short unsigned int" + [ 9] [ 92] "frob" + [10] [ 97] "calc" + [11] [ 9c] "unsigned char" + [12] [ aa] "short int" + [13] [ b4] "exit" + [14] [ b9] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [15] [ 149] "char" + [16] [ 14e] "word" + [17] [ 153] "argv" + [18] [ 158] "argc" + [19] [ 15d] "main" + + +DWARF section [ 6] '.debug_str.dwo' at offset 0x337: + Offset String + [ 0] "long long unsigned int" + [ 17] "/home/mark/src/elfutils/tests" + [ 35] "long long int" + [ 43] "signed char" + [ 4f] "long int" + [ 58] "world.c" + [ 60] "unsigned int" + [ 6d] "long unsigned int" + [ 7f] "short unsigned int" + [ 92] "frob" + [ 97] "calc" + [ 9c] "unsigned char" + [ aa] "short int" + [ b4] "exit" + [ b9] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-4 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [ 149] "char" + [ 14e] "word" + [ 153] "argv" + [ 158] "argc" + [ 15d] "main" +EOF + +# DWARF5 Real table header. +# We don't really need the skeleton, but we don't want any Warnings. +testrun_compare ${abs_top_builddir}/src/readelf --dwarf-skeleton testfile-splitdwarf-5 --debug-dump=str testfile-hello5.dwo testfile-world5.dwo<<\EOF + +testfile-hello5.dwo: + + +DWARF section [ 5] '.debug_str_offsets.dwo' at offset 0x353: +Table at offset 0 + + Length: 44 + Offset size: 4 + DWARF version: 5 + Padding: 0 + + Offsets start at 0x8: + [ 0] [ 0] "long long int" + [ 1] [ e] "frob" + [ 2] [ 13] "long unsigned int" + [ 3] [ 25] "/home/mark/src/elfutils/tests" + [ 4] [ 43] "wchar_t" + [ 5] [ 4b] "main" + [ 6] [ 50] "long int" + [ 7] [ 59] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [ 8] [ e9] "long double" + [ 9] [ f5] "hello.c" + + +DWARF section [ 6] '.debug_str.dwo' at offset 0x383: + Offset String + [ 0] "long long int" + [ e] "frob" + [ 13] "long unsigned int" + [ 25] "/home/mark/src/elfutils/tests" + [ 43] "wchar_t" + [ 4b] "main" + [ 50] "long int" + [ 59] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [ e9] "long double" + [ f5] "hello.c" + +testfile-world5.dwo: + + +DWARF section [ 5] '.debug_str_offsets.dwo' at offset 0x313: +Table at offset 0 + + Length: 84 + Offset size: 4 + DWARF version: 5 + Padding: 0 + + Offsets start at 0x8: + [ 0] [ 0] "long long unsigned int" + [ 1] [ 17] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [ 2] [ a7] "/home/mark/src/elfutils/tests" + [ 3] [ c5] "long long int" + [ 4] [ d3] "signed char" + [ 5] [ df] "long int" + [ 6] [ e8] "world.c" + [ 7] [ f0] "unsigned int" + [ 8] [ fd] "long unsigned int" + [ 9] [ 10f] "short unsigned int" + [10] [ 122] "frob" + [11] [ 127] "calc" + [12] [ 12c] "unsigned char" + [13] [ 13a] "short int" + [14] [ 144] "exit" + [15] [ 149] "char" + [16] [ 14e] "word" + [17] [ 153] "argv" + [18] [ 158] "argc" + [19] [ 15d] "main" + + +DWARF section [ 6] '.debug_str.dwo' at offset 0x36b: + Offset String + [ 0] "long long unsigned int" + [ 17] "GNU C17 9.0.0 20180515 (experimental) -mtune=generic -march=x86-64 -gdwarf-5 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2" + [ a7] "/home/mark/src/elfutils/tests" + [ c5] "long long int" + [ d3] "signed char" + [ df] "long int" + [ e8] "world.c" + [ f0] "unsigned int" + [ fd] "long unsigned int" + [ 10f] "short unsigned int" + [ 122] "frob" + [ 127] "calc" + [ 12c] "unsigned char" + [ 13a] "short int" + [ 144] "exit" + [ 149] "char" + [ 14e] "word" + [ 153] "argv" + [ 158] "argc" + [ 15d] "main" +EOF + +exit 0 diff --git a/tests/run-readelf-twofiles.sh b/tests/run-readelf-twofiles.sh index 46eec7b5..fc5f3e78 100755 --- a/tests/run-readelf-twofiles.sh +++ b/tests/run-readelf-twofiles.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2011 Red Hat, Inc. +# Copyright (C) 2011, 2018 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -21,4 +21,45 @@ testfiles testfile14 testrun >/dev/null ${abs_top_builddir}/src/readelf -w testfile14 testfile14 +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc testfile14 testfile14 << EOF + +testfile14: + + +DWARF section [33] '.debug_loc' at offset 0xca9: + + CU [ b] base: 0x0000000000400468 + [ 0] range 34, 35 + 0x000000000040049c
.. + 0x000000000040049c
+ [ 0] breg7 -8 + range 35, 46 + 0x000000000040049d .. + 0x00000000004004ad + [ 0] breg7 0 + range 46, 47 + 0x00000000004004ae .. + 0x00000000004004ae + [ 0] breg7 -8 + +testfile14: + + +DWARF section [33] '.debug_loc' at offset 0xca9: + + CU [ b] base: 0x0000000000400468 + [ 0] range 34, 35 + 0x000000000040049c
.. + 0x000000000040049c
+ [ 0] breg7 -8 + range 35, 46 + 0x000000000040049d .. + 0x00000000004004ad + [ 0] breg7 0 + range 46, 47 + 0x00000000004004ae .. + 0x00000000004004ae + [ 0] breg7 -8 +EOF + exit 0 diff --git a/tests/run-readelf-types.sh b/tests/run-readelf-types.sh new file mode 100755 index 00000000..a7af5734 --- /dev/null +++ b/tests/run-readelf-types.sh @@ -0,0 +1,122 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Make sure --debug-dump=info implies .debug_types, even when implicit. +# See run-typeiter.sh +testfiles testfile-debug-types + +testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=str --debug-dump=info testfile-debug-types<<\EOF + +DWARF section [28] '.debug_info' at offset 0x1089: + [Offset] + Compilation unit at offset 0: + Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + [ b] compile_unit abbrev: 8 + producer (strp) "GNU C++ 4.8.2 20140120 (Red Hat 4.8.2-16) -mtune=generic -march=x86-64 -g -fdebug-types-section" + language (data1) C_plus_plus (4) + comp_dir (strp) "/home/mark/src/elfutils/tests" + low_pc (addr) 0x00000000004005b0
+ high_pc (data8) 11 (0x00000000004005bb) + stmt_list (sec_offset) 0 + [ 29] subprogram abbrev: 9 + external (flag_present) yes + name (strp) "main" + decl_file (data1) (1) + decl_line (data1) 1 + type (ref4) [ 46] + low_pc (addr) 0x00000000004005b0
+ high_pc (data8) 11 (0x00000000004005bb) + frame_base (exprloc) + [ 0] call_frame_cfa + GNU_all_call_sites (flag_present) yes + [ 46] base_type abbrev: 10 + byte_size (data1) 4 + encoding (data1) signed (5) + name (string) "int" + [ 4d] variable abbrev: 11 + name (string) "a" + decl_file (data1) (1) + decl_line (data1) 1 + type (ref_sig8) {18763953736e2de0} + external (flag_present) yes + location (exprloc) + [ 0] addr 0x601030 + [ 64] variable abbrev: 11 + name (string) "b" + decl_file (data1) (1) + decl_line (data1) 1 + type (ref_sig8) {7cf9bbf793fcaf13} + external (flag_present) yes + location (exprloc) + [ 0] addr 0x601031 + +DWARF section [31] '.debug_str' at offset 0x11dd: + Offset String + [ 0] "/home/mark/src/elfutils/tests" + [ 1e] "GNU C++ 4.8.2 20140120 (Red Hat 4.8.2-16) -mtune=generic -march=x86-64 -g -fdebug-types-section" + [ 7e] "main" + +DWARF section [32] '.debug_types' at offset 0x1260: + [Offset] + Type unit at offset 0: + Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + Type signature: 0x7cf9bbf793fcaf13, Type offset: 0x38 [38] + [ 17] type_unit abbrev: 1 + language (data1) C_plus_plus (4) + GNU_odr_signature (data8) 4783233826607187165 + stmt_list (sec_offset) 0 + [ 25] structure_type abbrev: 2 + name (string) "A" + signature (ref_sig8) {18763953736e2de0} + declaration (flag_present) yes + sibling (ref4) [ 38] + [ 34] structure_type abbrev: 3 + name (string) "B" + declaration (flag_present) yes + [ 38] structure_type abbrev: 4 + name (string) "B" + byte_size (data1) 1 + decl_file (data1) (1) + decl_line (data1) 1 + specification (ref4) [ 34] + Type unit at offset 67: + Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4 + Type signature: 0x18763953736e2de0, Type offset: 0x25 [25] + [ 5a] type_unit abbrev: 1 + language (data1) C_plus_plus (4) + GNU_odr_signature (data8) 16005269134005989797 + stmt_list (sec_offset) 0 + [ 68] structure_type abbrev: 5 + name (string) "A" + byte_size (data1) 1 + decl_file (data1) (1) + decl_line (data1) 1 + [ 6e] structure_type abbrev: 6 + name (string) "B" + declaration (flag_present) yes + signature (ref_sig8) {7cf9bbf793fcaf13} + [ 79] member abbrev: 7 + name (string) "x" + decl_file (data1) (1) + decl_line (data1) 1 + type (ref4) [ 6e] + data_member_location (data1) 0 +EOF + +exit 0 diff --git a/tests/run-readelf-variant.sh b/tests/run-readelf-variant.sh new file mode 100755 index 00000000..dcc0d5e1 --- /dev/null +++ b/tests/run-readelf-variant.sh @@ -0,0 +1,89 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Tests exprloc for an Ada record variants byte_size. + +# = pck.ads +# +# with System; +# +# package Pck is +# +# type One_To_Five is range 1 .. 5; +# +# type Rec (Discr : One_To_Five) is +# record +# case Discr is +# when 1 => Field1 : Integer; +# when 4 => null; +# when 3 => Field3 : Boolean; +# when 5 => null; +# when others => null; +# end case; +# end record; +# +# procedure Do_Nothing (A : System.Address); +# +# end Pck; + +# = pck.adb +# +# package body Pck is +# +# procedure Do_Nothing (A : System.Address) is +# begin +# null; +# end Do_Nothing; +# +# end Pck; + +# = foo.adb +# +# with Pck; use Pck; +# +# procedure Foo is +# +# R : Rec (1); +# +# begin +# Do_Nothing (R'Address); +# end Foo; + +# gnatmake -g -fgnat-encodings=minimal foo.adb -cargs + +testfiles testfile-ada-variant + +tempfiles testfile.temp testfile2.temp + +testrun ${abs_top_builddir}/src/readelf --debug-dump=info \ + testfile-ada-variant > testfile.temp + +grep -A6 byte_size testfile.temp | grep -A6 exprloc > testfile2.temp + +diff -u testfile2.temp - < loc.out << \EOF DWARF section [ 7] '.debug_loc' at offset 0x185: - [ 0] 000000000000000000..0x0000000000000003 [ 0] reg5 - 0x0000000000000003..0x0000000000000010 [ 0] breg5 -42 - [ 2] stack_value - 0x0000000000000010..0x0000000000000018 [ 0] GNU_entry_value: - [ 0] reg5 - [ 3] stack_value + + CU [ b] base: 000000000000000000 + [ 0] range 0, 3 + [ 0] reg5 + range 3, 10 + [ 0] breg5 -42 + [ 2] stack_value + range 10, 18 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value EOF cat loc.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug-rel.o diff --git a/tests/run-readelf-zdebug.sh b/tests/run-readelf-zdebug.sh index 37cf7eaa..878e0ba8 100755 --- a/tests/run-readelf-zdebug.sh +++ b/tests/run-readelf-zdebug.sh @@ -46,12 +46,17 @@ tempfiles loc.out aranges.out ranges.out macro.out line.out frame.out cat > loc.out << \EOF DWARF section [30] '.debug_loc' at offset 0xa17: - [ 0] 0x00000000004003c0..0x00000000004003c3 [ 0] reg5 - 0x00000000004003c3..0x00000000004003d6 [ 0] breg5 -42 - [ 2] stack_value - 0x00000000004003d6..0x00000000004003d9 [ 0] GNU_entry_value: - [ 0] reg5 - [ 3] stack_value + + CU [ b] base: 000000000000000000 + [ 0] range 4003c0, 4003c3 + [ 0] reg5 + range 4003c3, 4003d6 + [ 0] breg5 -42 + [ 2] stack_value + range 4003d6, 4003d9 + [ 0] GNU_entry_value: + [ 0] reg5 + [ 3] stack_value EOF cat loc.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc testfile-debug @@ -80,7 +85,9 @@ cat aranges.out | sed -e "s/.debug_aranges' at offset 0xa65/.zdebug_aranges' at cat > ranges.out << \EOF DWARF section [32] '.debug_ranges' at offset 0xa95: - [ 0] 0x00000000004003c0..0x00000000004003d9 + + CU [ b] base: 000000000000000000 + [ 0] range 4003c0, 4003d9 EOF cat ranges.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=ranges testfile-debug @@ -354,15 +361,17 @@ DWARF section [34] '.debug_line' at offset 0x104c: Table at offset 0: - Length: 70 - DWARF version: 2 - Prologue length: 40 - Minimum instruction length: 1 - Maximum operations per instruction: 1 - Initial value if 'is_stmt': 1 - Line base: -5 - Line range: 14 - Opcode base: 13 + Length: 70 + DWARF version: 2 + Prologue length: 40 + Address size: 8 + Segment selector size: 0 + Min instruction length: 1 + Max operations per instruction: 1 + Initial value if 'is_stmt': 1 + Line base: -5 + Line range: 14 + Opcode base: 13 Opcodes: [ 1] 0 arguments @@ -476,15 +485,15 @@ Call frame information section [16] '.eh_frame' at offset 0x5b8: def_cfa_offset 24 advance_loc 10 to 0x3b0 def_cfa_expression 11 - [ 0] breg7 8 - [ 2] breg16 0 - [ 4] lit15 - [ 5] and - [ 6] lit11 - [ 7] ge - [ 8] lit3 - [ 9] shl - [ 10] plus + [ 0] breg7 8 + [ 2] breg16 0 + [ 4] lit15 + [ 5] and + [ 6] lit11 + [ 7] ge + [ 8] lit3 + [ 9] shl + [10] plus nop nop nop diff --git a/tests/run-reloc-bpf.sh b/tests/run-reloc-bpf.sh new file mode 100755 index 00000000..feb75575 --- /dev/null +++ b/tests/run-reloc-bpf.sh @@ -0,0 +1,33 @@ +#! /bin/sh +# Copyright (C) 2018 Facebook, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# This test file is created with +# $ cat t.c +# struct tt { +# int a; +# char b; +# }; +# int test(struct tt *t) { +# return t->a; +# } +# $ clang -O2 -g -emit-llvm -c t.c -o - | llc -march=bpf -filetype=obj -o t.o +# $ mv t.o testfile-bpf-reloc.o + +testfiles testfile-bpf-reloc.o testfile-bpf-reloc.expect +testrun_compare ${abs_top_builddir}/src/objdump -r testfile-bpf-reloc.o < testfile-bpf-reloc.expect diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh new file mode 100755 index 00000000..13038195 --- /dev/null +++ b/tests/run-strip-g.sh @@ -0,0 +1,102 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# When stripping just the debug sections/symbols we keep the symtab +# in the main ELF file. There should be no symbols pointing into the +# debug sections and so there should not be a copy in the debug file +# except for a NOBITS one. + +tempfiles a.out strip.out debug.out readelf.out + +echo Create debug a.out. +echo "int main() { return 1; }" | gcc -g -xc - + +echo strip -g to file with debug file +testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out || + { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; } + +status=0 +testrun ${abs_top_builddir}/src/readelf -S strip.out > readelf.out +grep SYMTAB readelf.out || status=$? +echo $status +if test $status -ne 0; then + echo no symtab found in strip.out + exit 1 +fi + +status=0 +testrun ${abs_top_builddir}/src/readelf -S debug.out > readelf.out +grep SYMTAB readelf.out || status=$? +echo $status +if test $status -ne 1; then + echo symtab found in debug.out + exit 1 +fi + +# arm (with data marker in .debug_frame). See tests/run-addrcfi.sh +testfiles testfilearm + +echo arm strip -g to file with debug file +testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out testfilearm || + { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; } + +status=0 +testrun ${abs_top_builddir}/src/readelf -S strip.out > readelf.out +grep SYMTAB readelf.out || status=$? +echo $status +if test $status -ne 0; then + echo no symtab found in strip.out + exit 1 +fi + +status=0 +testrun ${abs_top_builddir}/src/readelf -S debug.out > readelf.out +grep SYMTAB readelf.out || status=$? +echo $status +if test $status -ne 1; then + echo symtab found in debug.out + exit 1 +fi + +# aarch64 (with data marker in .debug_frame). See tests/run-addrcfi.sh +testfiles testfileaarch64 + +echo aarch64 strip -g to file with debug file +testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out testfileaarch64 || + { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; } + +status=0 +testrun ${abs_top_builddir}/src/readelf -S strip.out > readelf.out +grep SYMTAB readelf.out || status=$? +echo $status +if test $status -ne 0; then + echo no symtab found in strip.out + exit 1 +fi + +status=0 +testrun ${abs_top_builddir}/src/readelf -S debug.out > readelf.out +grep SYMTAB readelf.out || status=$? +echo $status +if test $status -ne 1; then + echo symtab found in debug.out + exit 1 +fi + +exit 0 diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh new file mode 100755 index 00000000..914fdfbf --- /dev/null +++ b/tests/run-strip-nothing.sh @@ -0,0 +1,62 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# If there is nothing to strip then -o output should be identical to input. +# And there should not be an (empty) -f debug file. + +tempfiles a.out strip.out debug.out + +# Create no-debug a.out. +echo "int main() { return 1; }" | gcc -s -xc - + +# strip to file +testrun ${abs_top_builddir}/src/strip -g -o strip.out || + { echo "*** failed to strip -g -o strip.out a.out"; exit -1; } + +testrun ${abs_top_builddir}/src/elfcmp a.out strip.out || + { echo "*** failed strip.out different from a.out"; exit -1; } + +# strip original +testrun ${abs_top_builddir}/src/strip -g || + { echo "*** failed to strip -g a.out"; exit -1; } + +testrun ${abs_top_builddir}/src/elfcmp strip.out a.out || + { echo "*** failed a.out different from strip.out"; exit -1; } + +# strip to file with debug file +testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out || + { echo "*** failed to strip -g -o strip.out -f debug.out a.out"; exit -1; } + +testrun ${abs_top_builddir}/src/elfcmp a.out strip.out || + { echo "*** failed strip.out different from a.out (with debug)"; exit -1; } + +test ! -f debug.out || + { echo "*** failed strip.out and debug.out exist"; exit -1; } + +# strip original with debug file +testrun ${abs_top_builddir}/src/strip -g -f debug.out || + { echo "*** failed to strip -g -f debug.out a.out"; exit -1; } + +testrun ${abs_top_builddir}/src/elfcmp strip.out a.out || + { echo "*** failed a.out different from strip.out (with debug)"; exit -1; } + +test ! -f debug.out || + { echo "*** failed a.out and debug.out exist"; exit -1; } + +exit 0 diff --git a/tests/run-strip-reloc.sh b/tests/run-strip-reloc.sh index e587eab3..bbc9f586 100755 --- a/tests/run-strip-reloc.sh +++ b/tests/run-strip-reloc.sh @@ -18,7 +18,7 @@ . $srcdir/test-subr.sh testfiles hello_i386.ko hello_x86_64.ko hello_ppc64.ko hello_s390.ko \ - hello_aarch64.ko hello_m68k.ko + hello_aarch64.ko hello_m68k.ko hello_riscv64.ko tempfiles readelf.out readelf.out1 readelf.out2 tempfiles out.stripped1 out.debug1 out.stripped2 out.debug2 @@ -32,6 +32,8 @@ runtest() { outfile2=out.stripped2 debugfile2=out.debug2 + rm -f $outfile1 $debugfile1 $outfile2 $debugfile2 + testrun ${abs_top_builddir}/src/strip -o $outfile1 -f $debugfile1 $infile || { echo "*** failure strip $infile"; status=1; } @@ -68,6 +70,7 @@ runtest() { } # Most simple hello world kernel module for various architectures. +# Make sure that it contains debuginfo with CONFIG_DEBUG_INFO=y. # :::::::::::::: # Makefile # :::::::::::::: @@ -75,7 +78,8 @@ runtest() { # hello-y := init.o exit.o # # all: -# make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules +# make -C /lib/modules/$(shell uname -r)/build M=$(PWD) \ +# CONFIG_DEBUG_INFO=y modules # :::::::::::::: # init.c # :::::::::::::: @@ -103,6 +107,7 @@ runtest hello_ppc64.ko 1 runtest hello_s390.ko 1 runtest hello_aarch64.ko 1 runtest hello_m68k.ko 1 +runtest hello_riscv64.ko 1 # self test, shouldn't impact non-ET_REL files at all. runtest ${abs_top_builddir}/src/strip 0 diff --git a/tests/run-strip-remove-keep.sh b/tests/run-strip-remove-keep.sh new file mode 100755 index 00000000..92647fa7 --- /dev/null +++ b/tests/run-strip-remove-keep.sh @@ -0,0 +1,688 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# strip -o output and -f debug files +tempfiles testfile.elf testfile.debug + +# A random 32bit testfile +testfiles testfile + +# Explicitly keep .strtab (but not .symtab, so .strtab will be in both). 32bit +echo strip --keep-section=.strtab testfile +testrun ${abs_top_builddir}/src/strip --keep-section=.strtab -o testfile.elf -f testfile.debug testfile +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 27 section headers, starting at offset 0xaf8: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp PROGBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 000108 000020 0 A 0 0 4 +[ 3] .hash HASH 08048128 000128 000030 4 A 4 0 4 +[ 4] .dynsym DYNSYM 08048158 000158 000070 16 A 5 1 4 +[ 5] .dynstr STRTAB 080481c8 0001c8 00008e 0 A 0 0 1 +[ 6] .gnu.version GNU_versym 08048256 000256 00000e 2 A 4 0 2 +[ 7] .gnu.version_r GNU_verneed 08048264 000264 000030 0 A 5 1 4 +[ 8] .rel.got REL 08048294 000294 000008 8 A 4 19 4 +[ 9] .rel.plt REL 0804829c 00029c 000020 8 A 4 11 4 +[10] .init PROGBITS 080482bc 0002bc 000018 0 AX 0 0 4 +[11] .plt PROGBITS 080482d4 0002d4 000050 4 AX 0 0 4 +[12] .text PROGBITS 08048330 000330 00018c 0 AX 0 0 16 +[13] .fini PROGBITS 080484bc 0004bc 00001e 0 AX 0 0 4 +[14] .rodata PROGBITS 080484dc 0004dc 000008 0 A 0 0 4 +[15] .data PROGBITS 080494e4 0004e4 000010 0 WA 0 0 4 +[16] .eh_frame PROGBITS 080494f4 0004f4 000004 0 WA 0 0 4 +[17] .ctors PROGBITS 080494f8 0004f8 000008 0 WA 0 0 4 +[18] .dtors PROGBITS 08049500 000500 000008 0 WA 0 0 4 +[19] .got PROGBITS 08049508 000508 000020 4 WA 0 0 4 +[20] .dynamic DYNAMIC 08049528 000528 0000a0 8 WA 5 0 4 +[21] .bss NOBITS 080495c8 0005c8 00001c 0 WA 0 0 4 +[22] .comment PROGBITS 00000000 0005c8 000170 0 0 0 1 +[23] .note NOTE 00000000 000738 0000a0 0 0 0 1 +[24] .strtab STRTAB 00000000 0007d8 000235 0 0 0 1 +[25] .gnu_debuglink PROGBITS 00000000 000a10 000014 0 0 0 4 +[26] .shstrtab STRTAB 00000000 000a24 0000d1 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 35 section headers, starting at offset 0x463c: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp NOBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 0000f4 000020 0 A 0 0 4 +[ 3] .hash NOBITS 08048128 000114 000030 4 A 4 0 4 +[ 4] .dynsym NOBITS 08048158 000114 000070 16 A 5 1 4 +[ 5] .dynstr NOBITS 080481c8 000114 00008e 0 A 0 0 1 +[ 6] .gnu.version NOBITS 08048256 000114 00000e 2 A 4 0 2 +[ 7] .gnu.version_r NOBITS 08048264 000114 000030 0 A 5 1 4 +[ 8] .rel.got NOBITS 08048294 000114 000008 8 A 4 19 4 +[ 9] .rel.plt NOBITS 0804829c 000114 000020 8 A 4 11 4 +[10] .init NOBITS 080482bc 000114 000018 0 AX 0 0 4 +[11] .plt NOBITS 080482d4 000114 000050 4 AX 0 0 4 +[12] .text NOBITS 08048330 000120 00018c 0 AX 0 0 16 +[13] .fini NOBITS 080484bc 000120 00001e 0 AX 0 0 4 +[14] .rodata NOBITS 080484dc 000120 000008 0 A 0 0 4 +[15] .data NOBITS 080494e4 000120 000010 0 WA 0 0 4 +[16] .eh_frame NOBITS 080494f4 000120 000004 0 WA 0 0 4 +[17] .ctors NOBITS 080494f8 000120 000008 0 WA 0 0 4 +[18] .dtors NOBITS 08049500 000120 000008 0 WA 0 0 4 +[19] .got NOBITS 08049508 000120 000020 4 WA 0 0 4 +[20] .dynamic NOBITS 08049528 000120 0000a0 8 WA 5 0 4 +[21] .sbss PROGBITS 080495c8 000120 000000 0 W 0 0 1 +[22] .bss NOBITS 080495c8 000120 00001c 0 WA 0 0 4 +[23] .stab PROGBITS 00000000 000120 000720 12 24 0 4 +[24] .stabstr STRTAB 00000000 000840 001934 0 0 0 1 +[25] .comment NOBITS 00000000 002174 000170 0 0 0 1 +[26] .debug_aranges PROGBITS 00000000 002174 000060 0 0 0 1 +[27] .debug_pubnames PROGBITS 00000000 0021d4 000055 0 0 0 1 +[28] .debug_info PROGBITS 00000000 002229 001678 0 0 0 1 +[29] .debug_abbrev PROGBITS 00000000 0038a1 0001d2 0 0 0 1 +[30] .debug_line PROGBITS 00000000 003a73 000223 0 0 0 1 +[31] .note NOTE 00000000 003c96 0000a0 0 0 0 1 +[32] .shstrtab STRTAB 00000000 003d36 00012e 0 0 0 1 +[33] .symtab SYMTAB 00000000 003e64 0005a0 16 34 68 4 +[34] .strtab STRTAB 00000000 004404 000235 0 0 0 1 + +EOF + +# Explicitly keep .symtab (pulls in .strtab, so they will both be in elf). 32bit +echo strip --keep-section=.symtab testfile +testrun ${abs_top_builddir}/src/strip --keep-section=.symtab -o testfile.elf -f testfile.debug testfile +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 28 section headers, starting at offset 0x1010: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp PROGBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 000108 000020 0 A 0 0 4 +[ 3] .hash HASH 08048128 000128 000030 4 A 4 0 4 +[ 4] .dynsym DYNSYM 08048158 000158 000070 16 A 5 1 4 +[ 5] .dynstr STRTAB 080481c8 0001c8 00008e 0 A 0 0 1 +[ 6] .gnu.version GNU_versym 08048256 000256 00000e 2 A 4 0 2 +[ 7] .gnu.version_r GNU_verneed 08048264 000264 000030 0 A 5 1 4 +[ 8] .rel.got REL 08048294 000294 000008 8 A 4 19 4 +[ 9] .rel.plt REL 0804829c 00029c 000020 8 A 4 11 4 +[10] .init PROGBITS 080482bc 0002bc 000018 0 AX 0 0 4 +[11] .plt PROGBITS 080482d4 0002d4 000050 4 AX 0 0 4 +[12] .text PROGBITS 08048330 000330 00018c 0 AX 0 0 16 +[13] .fini PROGBITS 080484bc 0004bc 00001e 0 AX 0 0 4 +[14] .rodata PROGBITS 080484dc 0004dc 000008 0 A 0 0 4 +[15] .data PROGBITS 080494e4 0004e4 000010 0 WA 0 0 4 +[16] .eh_frame PROGBITS 080494f4 0004f4 000004 0 WA 0 0 4 +[17] .ctors PROGBITS 080494f8 0004f8 000008 0 WA 0 0 4 +[18] .dtors PROGBITS 08049500 000500 000008 0 WA 0 0 4 +[19] .got PROGBITS 08049508 000508 000020 4 WA 0 0 4 +[20] .dynamic DYNAMIC 08049528 000528 0000a0 8 WA 5 0 4 +[21] .bss NOBITS 080495c8 0005c8 00001c 0 WA 0 0 4 +[22] .comment PROGBITS 00000000 0005c8 000170 0 0 0 1 +[23] .note NOTE 00000000 000738 0000a0 0 0 0 1 +[24] .symtab SYMTAB 00000000 0007d8 000510 16 25 59 4 +[25] .strtab STRTAB 00000000 000ce8 000235 0 0 0 1 +[26] .gnu_debuglink PROGBITS 00000000 000f20 000014 0 0 0 4 +[27] .shstrtab STRTAB 00000000 000f34 0000d9 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 35 section headers, starting at offset 0x3e64: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp NOBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 0000f4 000020 0 A 0 0 4 +[ 3] .hash NOBITS 08048128 000114 000030 4 A 4 0 4 +[ 4] .dynsym NOBITS 08048158 000114 000070 16 A 5 1 4 +[ 5] .dynstr NOBITS 080481c8 000114 00008e 0 A 0 0 1 +[ 6] .gnu.version NOBITS 08048256 000114 00000e 2 A 4 0 2 +[ 7] .gnu.version_r NOBITS 08048264 000114 000030 0 A 5 1 4 +[ 8] .rel.got NOBITS 08048294 000114 000008 8 A 4 19 4 +[ 9] .rel.plt NOBITS 0804829c 000114 000020 8 A 4 11 4 +[10] .init NOBITS 080482bc 000114 000018 0 AX 0 0 4 +[11] .plt NOBITS 080482d4 000114 000050 4 AX 0 0 4 +[12] .text NOBITS 08048330 000120 00018c 0 AX 0 0 16 +[13] .fini NOBITS 080484bc 000120 00001e 0 AX 0 0 4 +[14] .rodata NOBITS 080484dc 000120 000008 0 A 0 0 4 +[15] .data NOBITS 080494e4 000120 000010 0 WA 0 0 4 +[16] .eh_frame NOBITS 080494f4 000120 000004 0 WA 0 0 4 +[17] .ctors NOBITS 080494f8 000120 000008 0 WA 0 0 4 +[18] .dtors NOBITS 08049500 000120 000008 0 WA 0 0 4 +[19] .got NOBITS 08049508 000120 000020 4 WA 0 0 4 +[20] .dynamic NOBITS 08049528 000120 0000a0 8 WA 5 0 4 +[21] .sbss PROGBITS 080495c8 000120 000000 0 W 0 0 1 +[22] .bss NOBITS 080495c8 000120 00001c 0 WA 0 0 4 +[23] .stab PROGBITS 00000000 000120 000720 12 24 0 4 +[24] .stabstr STRTAB 00000000 000840 001934 0 0 0 1 +[25] .comment NOBITS 00000000 002174 000170 0 0 0 1 +[26] .debug_aranges PROGBITS 00000000 002174 000060 0 0 0 1 +[27] .debug_pubnames PROGBITS 00000000 0021d4 000055 0 0 0 1 +[28] .debug_info PROGBITS 00000000 002229 001678 0 0 0 1 +[29] .debug_abbrev PROGBITS 00000000 0038a1 0001d2 0 0 0 1 +[30] .debug_line PROGBITS 00000000 003a73 000223 0 0 0 1 +[31] .note NOTE 00000000 003c96 0000a0 0 0 0 1 +[32] .shstrtab STRTAB 00000000 003d36 00012e 0 0 0 1 +[33] .symtab NOBITS 00000000 003e64 0005a0 16 34 68 4 +[34] .strtab NOBITS 00000000 003e64 000235 0 0 0 1 + +EOF + +# A random 64bit testfile +testfiles testfile69.so +# Explicitly keep .strtab (but not .symtab, so .strtab will be in both). 64bit +echo strip --keep-section=.strtab testfile69.so +testrun ${abs_top_builddir}/src/strip --keep-section=.strtab -o testfile.elf -f testfile.debug testfile69.so +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 27 section headers, starting at offset 0xad8: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash GNU_HASH 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym DYNSYM 00000000000001f8 000001f8 00000108 24 A 4 2 8 +[ 4] .dynstr STRTAB 0000000000000300 00000300 00000077 0 A 0 0 1 +[ 5] .gnu.version GNU_versym 0000000000000378 00000378 00000016 2 A 3 0 2 +[ 6] .gnu.version_r GNU_verneed 0000000000000390 00000390 00000020 0 A 4 1 8 +[ 7] .rela.dyn RELA 00000000000003b0 000003b0 00000060 24 A 3 0 8 +[ 8] .rela.plt RELA 0000000000000410 00000410 00000018 24 A 3 10 8 +[ 9] .init PROGBITS 0000000000000428 00000428 00000018 0 AX 0 0 4 +[10] .plt PROGBITS 0000000000000440 00000440 00000020 16 AX 0 0 16 +[11] .text PROGBITS 0000000000000460 00000460 00000128 0 AX 0 0 16 +[12] .fini PROGBITS 0000000000000588 00000588 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr PROGBITS 0000000000000598 00000598 00000024 0 A 0 0 4 +[14] .eh_frame PROGBITS 00000000000005c0 000005c0 00000084 0 A 0 0 8 +[15] .ctors PROGBITS 0000000000200648 00000648 00000010 0 WA 0 0 8 +[16] .dtors PROGBITS 0000000000200658 00000658 00000010 0 WA 0 0 8 +[17] .jcr PROGBITS 0000000000200668 00000668 00000008 0 WA 0 0 8 +[18] .data.rel.ro PROGBITS 0000000000200670 00000670 00000008 0 WA 0 0 8 +[19] .dynamic DYNAMIC 0000000000200678 00000678 00000180 16 WA 4 0 8 +[20] .got PROGBITS 00000000002007f8 000007f8 00000018 8 WA 0 0 8 +[21] .got.plt PROGBITS 0000000000200810 00000810 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 00000830 00000010 0 WA 0 0 8 +[23] .comment PROGBITS 0000000000000000 00000830 0000002c 1 MS 0 0 1 +[24] .strtab STRTAB 0000000000000000 0000085c 00000175 0 0 0 1 +[25] .gnu_debuglink PROGBITS 0000000000000000 000009d4 00000014 0 0 0 4 +[26] .shstrtab STRTAB 0000000000000000 000009e8 000000ee 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 27 section headers, starting at offset 0x918: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash NOBITS 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym NOBITS 00000000000001f8 000001b8 00000108 24 A 4 2 8 +[ 4] .dynstr NOBITS 0000000000000300 000001b8 00000077 0 A 0 0 1 +[ 5] .gnu.version NOBITS 0000000000000378 000001b8 00000016 2 A 3 0 2 +[ 6] .gnu.version_r NOBITS 0000000000000390 000001b8 00000020 0 A 4 1 8 +[ 7] .rela.dyn NOBITS 00000000000003b0 000001b8 00000060 24 A 3 0 8 +[ 8] .rela.plt NOBITS 0000000000000410 000001b8 00000018 24 A 3 10 8 +[ 9] .init NOBITS 0000000000000428 000001b8 00000018 0 AX 0 0 4 +[10] .plt NOBITS 0000000000000440 000001c0 00000020 16 AX 0 0 16 +[11] .text NOBITS 0000000000000460 000001c0 00000128 0 AX 0 0 16 +[12] .fini NOBITS 0000000000000588 000001c0 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr NOBITS 0000000000000598 000001c0 00000024 0 A 0 0 4 +[14] .eh_frame NOBITS 00000000000005c0 000001c0 00000084 0 A 0 0 8 +[15] .ctors NOBITS 0000000000200648 000001c0 00000010 0 WA 0 0 8 +[16] .dtors NOBITS 0000000000200658 000001c0 00000010 0 WA 0 0 8 +[17] .jcr NOBITS 0000000000200668 000001c0 00000008 0 WA 0 0 8 +[18] .data.rel.ro NOBITS 0000000000200670 000001c0 00000008 0 WA 0 0 8 +[19] .dynamic NOBITS 0000000000200678 000001c0 00000180 16 WA 4 0 8 +[20] .got NOBITS 00000000002007f8 000001c0 00000018 8 WA 0 0 8 +[21] .got.plt NOBITS 0000000000200810 000001c0 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 000001c0 00000010 0 WA 0 0 8 +[23] .comment NOBITS 0000000000000000 000001c0 0000002c 1 MS 0 0 1 +[24] .shstrtab STRTAB 0000000000000000 000001c0 000000e7 0 0 0 1 +[25] .symtab SYMTAB 0000000000000000 000002a8 000004f8 24 26 44 8 +[26] .strtab STRTAB 0000000000000000 000007a0 00000175 0 0 0 1 + +EOF + +# Explicitly keep .symtab (pulls in .strtab, so they will both be in elf). 64bit +# Use --remove-comment to make sure testfile.debug isn't empty. +echo strip --keep-section=.symtab --remove-comment testfile69.so +testrun ${abs_top_builddir}/src/strip --keep-section=.symtab --remove-comment -o testfile.elf -f testfile.debug testfile69.so +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 27 section headers, starting at offset 0xf90: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash GNU_HASH 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym DYNSYM 00000000000001f8 000001f8 00000108 24 A 4 2 8 +[ 4] .dynstr STRTAB 0000000000000300 00000300 00000077 0 A 0 0 1 +[ 5] .gnu.version GNU_versym 0000000000000378 00000378 00000016 2 A 3 0 2 +[ 6] .gnu.version_r GNU_verneed 0000000000000390 00000390 00000020 0 A 4 1 8 +[ 7] .rela.dyn RELA 00000000000003b0 000003b0 00000060 24 A 3 0 8 +[ 8] .rela.plt RELA 0000000000000410 00000410 00000018 24 A 3 10 8 +[ 9] .init PROGBITS 0000000000000428 00000428 00000018 0 AX 0 0 4 +[10] .plt PROGBITS 0000000000000440 00000440 00000020 16 AX 0 0 16 +[11] .text PROGBITS 0000000000000460 00000460 00000128 0 AX 0 0 16 +[12] .fini PROGBITS 0000000000000588 00000588 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr PROGBITS 0000000000000598 00000598 00000024 0 A 0 0 4 +[14] .eh_frame PROGBITS 00000000000005c0 000005c0 00000084 0 A 0 0 8 +[15] .ctors PROGBITS 0000000000200648 00000648 00000010 0 WA 0 0 8 +[16] .dtors PROGBITS 0000000000200658 00000658 00000010 0 WA 0 0 8 +[17] .jcr PROGBITS 0000000000200668 00000668 00000008 0 WA 0 0 8 +[18] .data.rel.ro PROGBITS 0000000000200670 00000670 00000008 0 WA 0 0 8 +[19] .dynamic DYNAMIC 0000000000200678 00000678 00000180 16 WA 4 0 8 +[20] .got PROGBITS 00000000002007f8 000007f8 00000018 8 WA 0 0 8 +[21] .got.plt PROGBITS 0000000000200810 00000810 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 00000830 00000010 0 WA 0 0 8 +[23] .symtab SYMTAB 0000000000000000 00000830 000004e0 24 24 43 8 +[24] .strtab STRTAB 0000000000000000 00000d10 00000175 0 0 0 1 +[25] .gnu_debuglink PROGBITS 0000000000000000 00000e88 00000014 0 0 0 4 +[26] .shstrtab STRTAB 0000000000000000 00000e9c 000000ed 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 27 section headers, starting at offset 0x2d8: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash NOBITS 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym NOBITS 00000000000001f8 000001b8 00000108 24 A 4 2 8 +[ 4] .dynstr NOBITS 0000000000000300 000001b8 00000077 0 A 0 0 1 +[ 5] .gnu.version NOBITS 0000000000000378 000001b8 00000016 2 A 3 0 2 +[ 6] .gnu.version_r NOBITS 0000000000000390 000001b8 00000020 0 A 4 1 8 +[ 7] .rela.dyn NOBITS 00000000000003b0 000001b8 00000060 24 A 3 0 8 +[ 8] .rela.plt NOBITS 0000000000000410 000001b8 00000018 24 A 3 10 8 +[ 9] .init NOBITS 0000000000000428 000001b8 00000018 0 AX 0 0 4 +[10] .plt NOBITS 0000000000000440 000001c0 00000020 16 AX 0 0 16 +[11] .text NOBITS 0000000000000460 000001c0 00000128 0 AX 0 0 16 +[12] .fini NOBITS 0000000000000588 000001c0 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr NOBITS 0000000000000598 000001c0 00000024 0 A 0 0 4 +[14] .eh_frame NOBITS 00000000000005c0 000001c0 00000084 0 A 0 0 8 +[15] .ctors NOBITS 0000000000200648 000001c0 00000010 0 WA 0 0 8 +[16] .dtors NOBITS 0000000000200658 000001c0 00000010 0 WA 0 0 8 +[17] .jcr NOBITS 0000000000200668 000001c0 00000008 0 WA 0 0 8 +[18] .data.rel.ro NOBITS 0000000000200670 000001c0 00000008 0 WA 0 0 8 +[19] .dynamic NOBITS 0000000000200678 000001c0 00000180 16 WA 4 0 8 +[20] .got NOBITS 00000000002007f8 000001c0 00000018 8 WA 0 0 8 +[21] .got.plt NOBITS 0000000000200810 000001c0 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 000001c0 00000010 0 WA 0 0 8 +[23] .comment PROGBITS 0000000000000000 000001c0 0000002c 1 MS 0 0 1 +[24] .shstrtab STRTAB 0000000000000000 000001ec 000000e7 0 0 0 1 +[25] .symtab NOBITS 0000000000000000 000002d8 000004f8 24 26 44 8 +[26] .strtab NOBITS 0000000000000000 000002d8 00000175 0 0 0 1 + +EOF + +# Explicitly remove .symtab (but not .strtab, so it will be in both). 32bit +echo strip -g --remove-section=.symtab testfile +testrun ${abs_top_builddir}/src/strip -g --remove-section=.symtab -o testfile.elf -f testfile.debug testfile +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 28 section headers, starting at offset 0xafc: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp PROGBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 000108 000020 0 A 0 0 4 +[ 3] .hash HASH 08048128 000128 000030 4 A 4 0 4 +[ 4] .dynsym DYNSYM 08048158 000158 000070 16 A 5 1 4 +[ 5] .dynstr STRTAB 080481c8 0001c8 00008e 0 A 0 0 1 +[ 6] .gnu.version GNU_versym 08048256 000256 00000e 2 A 4 0 2 +[ 7] .gnu.version_r GNU_verneed 08048264 000264 000030 0 A 5 1 4 +[ 8] .rel.got REL 08048294 000294 000008 8 A 4 19 4 +[ 9] .rel.plt REL 0804829c 00029c 000020 8 A 4 11 4 +[10] .init PROGBITS 080482bc 0002bc 000018 0 AX 0 0 4 +[11] .plt PROGBITS 080482d4 0002d4 000050 4 AX 0 0 4 +[12] .text PROGBITS 08048330 000330 00018c 0 AX 0 0 16 +[13] .fini PROGBITS 080484bc 0004bc 00001e 0 AX 0 0 4 +[14] .rodata PROGBITS 080484dc 0004dc 000008 0 A 0 0 4 +[15] .data PROGBITS 080494e4 0004e4 000010 0 WA 0 0 4 +[16] .eh_frame PROGBITS 080494f4 0004f4 000004 0 WA 0 0 4 +[17] .ctors PROGBITS 080494f8 0004f8 000008 0 WA 0 0 4 +[18] .dtors PROGBITS 08049500 000500 000008 0 WA 0 0 4 +[19] .got PROGBITS 08049508 000508 000020 4 WA 0 0 4 +[20] .dynamic DYNAMIC 08049528 000528 0000a0 8 WA 5 0 4 +[21] .sbss PROGBITS 080495c8 0005c8 000000 0 W 0 0 1 +[22] .bss NOBITS 080495c8 0005c8 00001c 0 WA 0 0 4 +[23] .comment PROGBITS 00000000 0005c8 000170 0 0 0 1 +[24] .note NOTE 00000000 000738 0000a0 0 0 0 1 +[25] .strtab STRTAB 00000000 0007d8 000235 0 0 0 1 +[26] .gnu_debuglink PROGBITS 00000000 000a10 000014 0 0 0 4 +[27] .shstrtab STRTAB 00000000 000a24 0000d7 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 35 section headers, starting at offset 0x463c: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp NOBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 0000f4 000020 0 A 0 0 4 +[ 3] .hash NOBITS 08048128 000114 000030 4 A 4 0 4 +[ 4] .dynsym NOBITS 08048158 000114 000070 16 A 5 1 4 +[ 5] .dynstr NOBITS 080481c8 000114 00008e 0 A 0 0 1 +[ 6] .gnu.version NOBITS 08048256 000114 00000e 2 A 4 0 2 +[ 7] .gnu.version_r NOBITS 08048264 000114 000030 0 A 5 1 4 +[ 8] .rel.got NOBITS 08048294 000114 000008 8 A 4 19 4 +[ 9] .rel.plt NOBITS 0804829c 000114 000020 8 A 4 11 4 +[10] .init NOBITS 080482bc 000114 000018 0 AX 0 0 4 +[11] .plt NOBITS 080482d4 000114 000050 4 AX 0 0 4 +[12] .text NOBITS 08048330 000120 00018c 0 AX 0 0 16 +[13] .fini NOBITS 080484bc 000120 00001e 0 AX 0 0 4 +[14] .rodata NOBITS 080484dc 000120 000008 0 A 0 0 4 +[15] .data NOBITS 080494e4 000120 000010 0 WA 0 0 4 +[16] .eh_frame NOBITS 080494f4 000120 000004 0 WA 0 0 4 +[17] .ctors NOBITS 080494f8 000120 000008 0 WA 0 0 4 +[18] .dtors NOBITS 08049500 000120 000008 0 WA 0 0 4 +[19] .got NOBITS 08049508 000120 000020 4 WA 0 0 4 +[20] .dynamic NOBITS 08049528 000120 0000a0 8 WA 5 0 4 +[21] .sbss NOBITS 080495c8 000120 000000 0 W 0 0 1 +[22] .bss NOBITS 080495c8 000120 00001c 0 WA 0 0 4 +[23] .stab PROGBITS 00000000 000120 000720 12 24 0 4 +[24] .stabstr STRTAB 00000000 000840 001934 0 0 0 1 +[25] .comment NOBITS 00000000 002174 000170 0 0 0 1 +[26] .debug_aranges PROGBITS 00000000 002174 000060 0 0 0 1 +[27] .debug_pubnames PROGBITS 00000000 0021d4 000055 0 0 0 1 +[28] .debug_info PROGBITS 00000000 002229 001678 0 0 0 1 +[29] .debug_abbrev PROGBITS 00000000 0038a1 0001d2 0 0 0 1 +[30] .debug_line PROGBITS 00000000 003a73 000223 0 0 0 1 +[31] .note NOTE 00000000 003c96 0000a0 0 0 0 1 +[32] .shstrtab STRTAB 00000000 003d36 00012e 0 0 0 1 +[33] .symtab SYMTAB 00000000 003e64 0005a0 16 34 68 4 +[34] .strtab STRTAB 00000000 004404 000235 0 0 0 1 + +EOF + +# Explicitly remove both .symtab and .strtab. Keep .stab and .stabstr 32bit +echo strip -g --remove-section=".s[yt][mr]tab" --keep-section=".stab*" testfile +testrun ${abs_top_builddir}/src/strip -g --remove-section=".s[yt][mr]tab" --keep-section=".stab*" -o testfile.elf -f testfile.debug testfile +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 29 section headers, starting at offset 0x2920: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp PROGBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 000108 000020 0 A 0 0 4 +[ 3] .hash HASH 08048128 000128 000030 4 A 4 0 4 +[ 4] .dynsym DYNSYM 08048158 000158 000070 16 A 5 1 4 +[ 5] .dynstr STRTAB 080481c8 0001c8 00008e 0 A 0 0 1 +[ 6] .gnu.version GNU_versym 08048256 000256 00000e 2 A 4 0 2 +[ 7] .gnu.version_r GNU_verneed 08048264 000264 000030 0 A 5 1 4 +[ 8] .rel.got REL 08048294 000294 000008 8 A 4 19 4 +[ 9] .rel.plt REL 0804829c 00029c 000020 8 A 4 11 4 +[10] .init PROGBITS 080482bc 0002bc 000018 0 AX 0 0 4 +[11] .plt PROGBITS 080482d4 0002d4 000050 4 AX 0 0 4 +[12] .text PROGBITS 08048330 000330 00018c 0 AX 0 0 16 +[13] .fini PROGBITS 080484bc 0004bc 00001e 0 AX 0 0 4 +[14] .rodata PROGBITS 080484dc 0004dc 000008 0 A 0 0 4 +[15] .data PROGBITS 080494e4 0004e4 000010 0 WA 0 0 4 +[16] .eh_frame PROGBITS 080494f4 0004f4 000004 0 WA 0 0 4 +[17] .ctors PROGBITS 080494f8 0004f8 000008 0 WA 0 0 4 +[18] .dtors PROGBITS 08049500 000500 000008 0 WA 0 0 4 +[19] .got PROGBITS 08049508 000508 000020 4 WA 0 0 4 +[20] .dynamic DYNAMIC 08049528 000528 0000a0 8 WA 5 0 4 +[21] .sbss PROGBITS 080495c8 0005c8 000000 0 W 0 0 1 +[22] .bss NOBITS 080495c8 0005c8 00001c 0 WA 0 0 4 +[23] .stab PROGBITS 00000000 0005c8 000720 12 24 0 4 +[24] .stabstr STRTAB 00000000 000ce8 001934 0 0 0 1 +[25] .comment PROGBITS 00000000 00261c 000170 0 0 0 1 +[26] .note NOTE 00000000 00278c 0000a0 0 0 0 1 +[27] .gnu_debuglink PROGBITS 00000000 00282c 000014 0 0 0 4 +[28] .shstrtab STRTAB 00000000 002840 0000de 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 35 section headers, starting at offset 0x25e8: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 00000000 000000 000000 0 0 0 0 +[ 1] .interp NOBITS 080480f4 0000f4 000013 0 A 0 0 1 +[ 2] .note.ABI-tag NOTE 08048108 0000f4 000020 0 A 0 0 4 +[ 3] .hash NOBITS 08048128 000114 000030 4 A 4 0 4 +[ 4] .dynsym NOBITS 08048158 000114 000070 16 A 5 1 4 +[ 5] .dynstr NOBITS 080481c8 000114 00008e 0 A 0 0 1 +[ 6] .gnu.version NOBITS 08048256 000114 00000e 2 A 4 0 2 +[ 7] .gnu.version_r NOBITS 08048264 000114 000030 0 A 5 1 4 +[ 8] .rel.got NOBITS 08048294 000114 000008 8 A 4 19 4 +[ 9] .rel.plt NOBITS 0804829c 000114 000020 8 A 4 11 4 +[10] .init NOBITS 080482bc 000114 000018 0 AX 0 0 4 +[11] .plt NOBITS 080482d4 000114 000050 4 AX 0 0 4 +[12] .text NOBITS 08048330 000120 00018c 0 AX 0 0 16 +[13] .fini NOBITS 080484bc 000120 00001e 0 AX 0 0 4 +[14] .rodata NOBITS 080484dc 000120 000008 0 A 0 0 4 +[15] .data NOBITS 080494e4 000120 000010 0 WA 0 0 4 +[16] .eh_frame NOBITS 080494f4 000120 000004 0 WA 0 0 4 +[17] .ctors NOBITS 080494f8 000120 000008 0 WA 0 0 4 +[18] .dtors NOBITS 08049500 000120 000008 0 WA 0 0 4 +[19] .got NOBITS 08049508 000120 000020 4 WA 0 0 4 +[20] .dynamic NOBITS 08049528 000120 0000a0 8 WA 5 0 4 +[21] .sbss NOBITS 080495c8 000120 000000 0 W 0 0 1 +[22] .bss NOBITS 080495c8 000120 00001c 0 WA 0 0 4 +[23] .stab NOBITS 00000000 000120 000720 12 24 0 4 +[24] .stabstr NOBITS 00000000 000120 001934 0 0 0 1 +[25] .comment NOBITS 00000000 000120 000170 0 0 0 1 +[26] .debug_aranges PROGBITS 00000000 000120 000060 0 0 0 1 +[27] .debug_pubnames PROGBITS 00000000 000180 000055 0 0 0 1 +[28] .debug_info PROGBITS 00000000 0001d5 001678 0 0 0 1 +[29] .debug_abbrev PROGBITS 00000000 00184d 0001d2 0 0 0 1 +[30] .debug_line PROGBITS 00000000 001a1f 000223 0 0 0 1 +[31] .note NOTE 00000000 001c42 0000a0 0 0 0 1 +[32] .shstrtab STRTAB 00000000 001ce2 00012e 0 0 0 1 +[33] .symtab SYMTAB 00000000 001e10 0005a0 16 34 68 4 +[34] .strtab STRTAB 00000000 0023b0 000235 0 0 0 1 + +EOF + +# Explicitly remove .symtab (but not .strtab, so it will be in both). 64bit +echo strip -g --remove-section=.symtab testfile69.so +testrun ${abs_top_builddir}/src/strip -g --remove-section=.symtab -o testfile.elf -f testfile.debug testfile69.so +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 27 section headers, starting at offset 0xad8: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash GNU_HASH 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym DYNSYM 00000000000001f8 000001f8 00000108 24 A 4 2 8 +[ 4] .dynstr STRTAB 0000000000000300 00000300 00000077 0 A 0 0 1 +[ 5] .gnu.version GNU_versym 0000000000000378 00000378 00000016 2 A 3 0 2 +[ 6] .gnu.version_r GNU_verneed 0000000000000390 00000390 00000020 0 A 4 1 8 +[ 7] .rela.dyn RELA 00000000000003b0 000003b0 00000060 24 A 3 0 8 +[ 8] .rela.plt RELA 0000000000000410 00000410 00000018 24 A 3 10 8 +[ 9] .init PROGBITS 0000000000000428 00000428 00000018 0 AX 0 0 4 +[10] .plt PROGBITS 0000000000000440 00000440 00000020 16 AX 0 0 16 +[11] .text PROGBITS 0000000000000460 00000460 00000128 0 AX 0 0 16 +[12] .fini PROGBITS 0000000000000588 00000588 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr PROGBITS 0000000000000598 00000598 00000024 0 A 0 0 4 +[14] .eh_frame PROGBITS 00000000000005c0 000005c0 00000084 0 A 0 0 8 +[15] .ctors PROGBITS 0000000000200648 00000648 00000010 0 WA 0 0 8 +[16] .dtors PROGBITS 0000000000200658 00000658 00000010 0 WA 0 0 8 +[17] .jcr PROGBITS 0000000000200668 00000668 00000008 0 WA 0 0 8 +[18] .data.rel.ro PROGBITS 0000000000200670 00000670 00000008 0 WA 0 0 8 +[19] .dynamic DYNAMIC 0000000000200678 00000678 00000180 16 WA 4 0 8 +[20] .got PROGBITS 00000000002007f8 000007f8 00000018 8 WA 0 0 8 +[21] .got.plt PROGBITS 0000000000200810 00000810 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 00000830 00000010 0 WA 0 0 8 +[23] .comment PROGBITS 0000000000000000 00000830 0000002c 1 MS 0 0 1 +[24] .strtab STRTAB 0000000000000000 0000085c 00000175 0 0 0 1 +[25] .gnu_debuglink PROGBITS 0000000000000000 000009d4 00000014 0 0 0 4 +[26] .shstrtab STRTAB 0000000000000000 000009e8 000000ee 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 27 section headers, starting at offset 0x918: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash NOBITS 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym NOBITS 00000000000001f8 000001b8 00000108 24 A 4 2 8 +[ 4] .dynstr NOBITS 0000000000000300 000001b8 00000077 0 A 0 0 1 +[ 5] .gnu.version NOBITS 0000000000000378 000001b8 00000016 2 A 3 0 2 +[ 6] .gnu.version_r NOBITS 0000000000000390 000001b8 00000020 0 A 4 1 8 +[ 7] .rela.dyn NOBITS 00000000000003b0 000001b8 00000060 24 A 3 0 8 +[ 8] .rela.plt NOBITS 0000000000000410 000001b8 00000018 24 A 3 10 8 +[ 9] .init NOBITS 0000000000000428 000001b8 00000018 0 AX 0 0 4 +[10] .plt NOBITS 0000000000000440 000001c0 00000020 16 AX 0 0 16 +[11] .text NOBITS 0000000000000460 000001c0 00000128 0 AX 0 0 16 +[12] .fini NOBITS 0000000000000588 000001c0 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr NOBITS 0000000000000598 000001c0 00000024 0 A 0 0 4 +[14] .eh_frame NOBITS 00000000000005c0 000001c0 00000084 0 A 0 0 8 +[15] .ctors NOBITS 0000000000200648 000001c0 00000010 0 WA 0 0 8 +[16] .dtors NOBITS 0000000000200658 000001c0 00000010 0 WA 0 0 8 +[17] .jcr NOBITS 0000000000200668 000001c0 00000008 0 WA 0 0 8 +[18] .data.rel.ro NOBITS 0000000000200670 000001c0 00000008 0 WA 0 0 8 +[19] .dynamic NOBITS 0000000000200678 000001c0 00000180 16 WA 4 0 8 +[20] .got NOBITS 00000000002007f8 000001c0 00000018 8 WA 0 0 8 +[21] .got.plt NOBITS 0000000000200810 000001c0 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 000001c0 00000010 0 WA 0 0 8 +[23] .comment NOBITS 0000000000000000 000001c0 0000002c 1 MS 0 0 1 +[24] .shstrtab STRTAB 0000000000000000 000001c0 000000e7 0 0 0 1 +[25] .symtab SYMTAB 0000000000000000 000002a8 000004f8 24 26 44 8 +[26] .strtab STRTAB 0000000000000000 000007a0 00000175 0 0 0 1 + +EOF + +# Explicitly remove both .symtab and .strtab. Keep .comment section. 64bit +echo strip -g --remove-section=".s[yt][mr]tab" --keep-section=.comment testfile69.so +testrun ${abs_top_builddir}/src/strip -g --remove-section=".s[yt][mr]tab" --keep-section=.comment -o testfile.elf -f testfile.debug testfile69.so +echo elflint testfile.elf +testrun ${abs_top_builddir}/src/elflint --gnu testfile.elf +echo elflint testfile.debug +testrun ${abs_top_builddir}/src/elflint --gnu -d testfile.debug +echo readelf testfile.elf +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.elf <<\EOF +There are 26 section headers, starting at offset 0x958: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash GNU_HASH 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym DYNSYM 00000000000001f8 000001f8 00000108 24 A 4 2 8 +[ 4] .dynstr STRTAB 0000000000000300 00000300 00000077 0 A 0 0 1 +[ 5] .gnu.version GNU_versym 0000000000000378 00000378 00000016 2 A 3 0 2 +[ 6] .gnu.version_r GNU_verneed 0000000000000390 00000390 00000020 0 A 4 1 8 +[ 7] .rela.dyn RELA 00000000000003b0 000003b0 00000060 24 A 3 0 8 +[ 8] .rela.plt RELA 0000000000000410 00000410 00000018 24 A 3 10 8 +[ 9] .init PROGBITS 0000000000000428 00000428 00000018 0 AX 0 0 4 +[10] .plt PROGBITS 0000000000000440 00000440 00000020 16 AX 0 0 16 +[11] .text PROGBITS 0000000000000460 00000460 00000128 0 AX 0 0 16 +[12] .fini PROGBITS 0000000000000588 00000588 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr PROGBITS 0000000000000598 00000598 00000024 0 A 0 0 4 +[14] .eh_frame PROGBITS 00000000000005c0 000005c0 00000084 0 A 0 0 8 +[15] .ctors PROGBITS 0000000000200648 00000648 00000010 0 WA 0 0 8 +[16] .dtors PROGBITS 0000000000200658 00000658 00000010 0 WA 0 0 8 +[17] .jcr PROGBITS 0000000000200668 00000668 00000008 0 WA 0 0 8 +[18] .data.rel.ro PROGBITS 0000000000200670 00000670 00000008 0 WA 0 0 8 +[19] .dynamic DYNAMIC 0000000000200678 00000678 00000180 16 WA 4 0 8 +[20] .got PROGBITS 00000000002007f8 000007f8 00000018 8 WA 0 0 8 +[21] .got.plt PROGBITS 0000000000200810 00000810 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 00000830 00000010 0 WA 0 0 8 +[23] .comment PROGBITS 0000000000000000 00000830 0000002c 1 MS 0 0 1 +[24] .gnu_debuglink PROGBITS 0000000000000000 0000085c 00000014 0 0 0 4 +[25] .shstrtab STRTAB 0000000000000000 00000870 000000e6 0 0 0 1 + +EOF +echo readelf testfile.debug +testrun_compare ${abs_top_builddir}/src/readelf -S testfile.debug <<\EOF +There are 27 section headers, starting at offset 0x918: + +Section Headers: +[Nr] Name Type Addr Off Size ES Flags Lk Inf Al +[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0 +[ 1] .note.gnu.build-id NOTE 0000000000000190 00000190 00000024 0 A 0 0 4 +[ 2] .gnu.hash NOBITS 00000000000001b8 000001b8 0000003c 0 A 3 0 8 +[ 3] .dynsym NOBITS 00000000000001f8 000001b8 00000108 24 A 4 2 8 +[ 4] .dynstr NOBITS 0000000000000300 000001b8 00000077 0 A 0 0 1 +[ 5] .gnu.version NOBITS 0000000000000378 000001b8 00000016 2 A 3 0 2 +[ 6] .gnu.version_r NOBITS 0000000000000390 000001b8 00000020 0 A 4 1 8 +[ 7] .rela.dyn NOBITS 00000000000003b0 000001b8 00000060 24 A 3 0 8 +[ 8] .rela.plt NOBITS 0000000000000410 000001b8 00000018 24 A 3 10 8 +[ 9] .init NOBITS 0000000000000428 000001b8 00000018 0 AX 0 0 4 +[10] .plt NOBITS 0000000000000440 000001c0 00000020 16 AX 0 0 16 +[11] .text NOBITS 0000000000000460 000001c0 00000128 0 AX 0 0 16 +[12] .fini NOBITS 0000000000000588 000001c0 0000000e 0 AX 0 0 4 +[13] .eh_frame_hdr NOBITS 0000000000000598 000001c0 00000024 0 A 0 0 4 +[14] .eh_frame NOBITS 00000000000005c0 000001c0 00000084 0 A 0 0 8 +[15] .ctors NOBITS 0000000000200648 000001c0 00000010 0 WA 0 0 8 +[16] .dtors NOBITS 0000000000200658 000001c0 00000010 0 WA 0 0 8 +[17] .jcr NOBITS 0000000000200668 000001c0 00000008 0 WA 0 0 8 +[18] .data.rel.ro NOBITS 0000000000200670 000001c0 00000008 0 WA 0 0 8 +[19] .dynamic NOBITS 0000000000200678 000001c0 00000180 16 WA 4 0 8 +[20] .got NOBITS 00000000002007f8 000001c0 00000018 8 WA 0 0 8 +[21] .got.plt NOBITS 0000000000200810 000001c0 00000020 8 WA 0 0 8 +[22] .bss NOBITS 0000000000200830 000001c0 00000010 0 WA 0 0 8 +[23] .comment NOBITS 0000000000000000 000001c0 0000002c 1 MS 0 0 1 +[24] .shstrtab STRTAB 0000000000000000 000001c0 000000e7 0 0 0 1 +[25] .symtab SYMTAB 0000000000000000 000002a8 000004f8 24 26 44 8 +[26] .strtab STRTAB 0000000000000000 000007a0 00000175 0 0 0 1 + +EOF + +exit 0 diff --git a/tests/run-strip-test.sh b/tests/run-strip-test.sh index 42aa9888..280814e6 100755 --- a/tests/run-strip-test.sh +++ b/tests/run-strip-test.sh @@ -49,6 +49,14 @@ testrun ${abs_top_builddir}/src/unstrip -o testfile.unstrip testfile.temp testfi testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.unstrip } +# test strip -g +testrun ${abs_top_builddir}/src/strip -g -o testfile.temp $original + +# Buggy eu-strip created multiple .shstrtab sections +shstrtab_SECS=$(testrun ${abs_top_builddir}/src/readelf -S testfile.temp | grep '.shstrtab' | wc --lines) +test $shstrtab_SECS -eq 1 || + { echo "*** failure not just one '.shstrtab' testfile.temp ($shstrtab_SECS)"; status=1; } + # Now strip in-place and make sure it is smaller. SIZE_original=$(stat -c%s $original) testrun ${abs_top_builddir}/src/strip $original diff --git a/tests/run-strip-test12.sh b/tests/run-strip-test12.sh new file mode 100755 index 00000000..cb120985 --- /dev/null +++ b/tests/run-strip-test12.sh @@ -0,0 +1,4 @@ +original=testfile-riscv64 +stripped=testfile-riscv64-s + +. $srcdir/run-strip-test.sh diff --git a/tests/run-unit-info.sh b/tests/run-unit-info.sh new file mode 100755 index 00000000..328fe78b --- /dev/null +++ b/tests/run-unit-info.sh @@ -0,0 +1,81 @@ +#! /bin/sh +# Copyright (C) 2018 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# See run-typeiter.sh +testfiles testfile-debug-types + +testrun ${abs_builddir}/unit-info testfile-debug-types + +# see run-readelf-dwz-multi.sh +testfiles testfile_multi_main testfile_multi.dwz + +testrun ${abs_builddir}/unit-info testfile_multi_main + +# see tests/run-dwflsyms.sh +testfiles testfilebazdbgppc64.debug + +testrun ${abs_builddir}/unit-info testfilebazdbgppc64.debug + +# see tests/testfile-dwarf-45.source +testfiles testfile-dwarf-4 testfile-dwarf-5 +testfiles testfile-splitdwarf-4 testfile-splitdwarf-5 +testfiles testfile-hello4.dwo testfile-hello5.dwo +testfiles testfile-world4.dwo testfile-world5.dwo + +testrun ${abs_builddir}/unit-info testfile-dwarf-4 +testrun ${abs_builddir}/unit-info testfile-dwarf-5 + +# The consistency checks should find most issue, but make sure the +# output is also what we expect in case we break dwarf_get_units and +# dwarf_cu_info at the same time. +testrun_compare ${abs_builddir}/unit-info \ + testfile-splitdwarf-4 testfile-splitdwarf-5 <<\EOF +file: testfile-splitdwarf-4 +Iterate getting all info, compare with dwarf_cu_info. +0 cu dietag: 11, subtag: 11, version 4, unit_type 4 +0 subdietag: 11, subtag: 0, version 4, unit_type 5 +1 cu dietag: 11, subtag: 11, version 4, unit_type 4 +1 subdietag: 11, subtag: 0, version 4, unit_type 5 +rechecking: testfile-splitdwarf-4 +Iterate no info, compare recorded info with dwarf_cu_info. +0 re dietag: 11, subtag: 11, version 4, unit_type 4 +0 subdietag: 11, subtag: 0, version 4, unit_type 5 +1 re dietag: 11, subtag: 11, version 4, unit_type 4 +1 subdietag: 11, subtag: 0, version 4, unit_type 5 + +file: testfile-splitdwarf-5 +Iterate getting all info, compare with dwarf_cu_info. +0 cu dietag: 4a, subtag: 11, version 5, unit_type 4 +0 subdietag: 11, subtag: 0, version 5, unit_type 5 +1 cu dietag: 4a, subtag: 11, version 5, unit_type 4 +1 subdietag: 11, subtag: 0, version 5, unit_type 5 +rechecking: testfile-splitdwarf-5 +Iterate no info, compare recorded info with dwarf_cu_info. +0 re dietag: 4a, subtag: 11, version 5, unit_type 4 +0 subdietag: 11, subtag: 0, version 5, unit_type 5 +1 re dietag: 4a, subtag: 11, version 5, unit_type 4 +1 subdietag: 11, subtag: 0, version 5, unit_type 5 + +EOF + +# Self test (not on obj files, since those need relocation first). +testrun_on_self_exe ${abs_builddir}/unit-info +testrun_on_self_lib ${abs_builddir}/unit-info + +exit 0 diff --git a/tests/run-varlocs-self.sh b/tests/run-varlocs-self.sh new file mode 100755 index 00000000..54b6a8d7 --- /dev/null +++ b/tests/run-varlocs-self.sh @@ -0,0 +1,22 @@ +#! /bin/sh +# Copyright (C) 2017 Red Hat, Inc. +# This file is part of elfutils. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# elfutils is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. $srcdir/test-subr.sh + +# Make sure varlocs doesn't crash, doesn't trigger self-check/asserts +# or leaks running under valgrind. +testrun_on_self_quiet ${abs_top_builddir}/tests/varlocs -e diff --git a/tests/run-varlocs.sh b/tests/run-varlocs.sh index 9c4b313e..b2621776 100755 --- a/tests/run-varlocs.sh +++ b/tests/run-varlocs.sh @@ -124,5 +124,481 @@ module 'testfile_implicit_pointer' frame_base: {call_frame_cfa {bregx(7,8)}} EOF +# Multi CU DWARF5. See run-dwarf-ranges.sh. +testfiles testfileranges5.debug +testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfileranges5.debug <<\EOF +module 'testfileranges5.debug' +[c] CU 'hello.c'@0 + [2a] function 'no_say'@401160 + frame_base: {call_frame_cfa {...}} + [4a] parameter 'prefix' + [401160,401169) {reg5} + [401169,40116a) {entry_value(1) {reg5}, stack_value} + [40116a,401175) {reg5} + [401175,40117a) {entry_value(1) {reg5}, stack_value} + [59] variable 'world' + [401160,40117a) {addr(0x402004), stack_value} + [bd] function 'main'@401050 + frame_base: {call_frame_cfa {...}} + [dd] parameter 'argc' + [401050,401062) {reg5} + [401062,401067) {entry_value(1) {reg5}, stack_value} + [ec] parameter 'argv' + [401050,401066) {reg4} + [401066,401067) {entry_value(1) {reg4}, stack_value} + [fb] inlined function 'subject'@401053 + [117] parameter 'count' + [401053,40105f) {reg5} + [120] parameter 'word' + [401053,40105f) {reg0} + [168] function 'subject'@401150 + frame_base: {call_frame_cfa {...}} + [183] parameter 'word' + [401150,401160) {reg5} + [18a] parameter 'count' + [401150,401160) {reg4} +module 'testfileranges5.debug' +[1ab] CU 'world.c'@401180 + [1cd] function 'no_main'@4011d0 + frame_base: {call_frame_cfa {...}} + [1ef] parameter 'argc' + [4011d0,4011e2) {reg5} + [4011e2,4011e7) {entry_value(1) {reg5}, stack_value} + [1fe] parameter 'argv' + [4011d0,4011e6) {reg4} + [4011e6,4011e7) {entry_value(1) {reg4}, stack_value} + [20d] inlined function 'no_subject'@4011d3 + [229] parameter 'count' + [4011d3,4011df) {reg5} + [232] parameter 'word' + [4011d3,4011df) {reg0} + [28d] function 'say'@401180 + frame_base: {call_frame_cfa {...}} + [2af] parameter 'prefix' + [401180,40118e) {reg5} + [40118e,40119c) {reg3} + [40119c,4011a7) {entry_value(1) {reg5}, stack_value} + [4011a7,4011b5) {reg3} + [4011b5,4011c0) {entry_value(1) {reg5}, stack_value} + [2be] variable 'world' + [401193,40119b) {reg0} + [4011a7,4011b4) {reg0} + [2ce] inlined function 'happy'@40119b + [2e6] parameter 'w' + [4011a7,4011b4) {reg0} + [2ef] inlined function 'sad'@40119b + [303] parameter 'c' + [40119b,4011a6) {reg0} + [4011a6,4011a7) {entry_value(1) {reg5}} + [4011b4,4011bf) {reg0} + [36b] function 'no_subject'@4011c0 + frame_base: {call_frame_cfa {...}} + [386] parameter 'word' + [4011c0,4011d0) {reg5} + [38d] parameter 'count' + [4011c0,4011d0) {reg4} +EOF + +# Multi CU Split DWARF5. See run-dwarf-ranges.sh. +# Note that the DIE numbers change, but the actual location addresses are +# the same as above, even though the representation is totally different. +testfiles testfilesplitranges5.debug +testfiles testfile-ranges-hello5.dwo testfile-ranges-world5.dwo +testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfilesplitranges5.debug <<\EOF +module 'testfilesplitranges5.debug' +[14] CU 'hello.c' + [1d] function 'no_say'@401160 + frame_base: {call_frame_cfa {...}} + [33] parameter 'prefix' + [401160,401169) {reg5} + [401169,40116a) {entry_value(1) {reg5}, stack_value} + [40116a,401175) {reg5} + [401175,40117a) {entry_value(1) {reg5}, stack_value} + [3c] variable 'world' + [401160,40117a) {addr: 0x402004, stack_value} + [7e] function 'main'@401050 + frame_base: {call_frame_cfa {...}} + [94] parameter 'argc' + [401050,401062) {reg5} + [401062,401067) {entry_value(1) {reg5}, stack_value} + [9d] parameter 'argv' + [401050,401066) {reg4} + [401066,401067) {entry_value(1) {reg4}, stack_value} + [a6] inlined function 'subject'@401053 + [bb] parameter 'count' + [401053,40105f) {reg5} + [c1] parameter 'word' + [401053,40105f) {reg0} + [f6] function 'subject'@401150 + frame_base: {call_frame_cfa {...}} + [10a] parameter 'word' + [401150,401160) {reg5} + [111] parameter 'count' + [401150,401160) {reg4} +module 'testfilesplitranges5.debug' +[14] CU 'world.c' + [1d] function 'no_main'@4011d0 + frame_base: {call_frame_cfa {...}} + [35] parameter 'argc' + [4011d0,4011e2) {reg5} + [4011e2,4011e7) {entry_value(1) {reg5}, stack_value} + [3e] parameter 'argv' + [4011d0,4011e6) {reg4} + [4011e6,4011e7) {entry_value(1) {reg4}, stack_value} + [47] inlined function 'no_subject'@4011d3 + [5c] parameter 'count' + [4011d3,4011df) {reg5} + [62] parameter 'word' + [4011d3,4011df) {reg0} + [a7] function 'say'@401180 + frame_base: {call_frame_cfa {...}} + [c2] parameter 'prefix' + [401180,40118e) {reg5} + [40118e,40119c) {reg3} + [40119c,4011a7) {entry_value(1) {reg5}, stack_value} + [4011a7,4011b5) {reg3} + [4011b5,4011c0) {entry_value(1) {reg5}, stack_value} + [cb] variable 'world' + [401193,40119b) {reg0} + [4011a7,4011b4) {reg0} + [d5] inlined function 'happy'@40119b + [e3] parameter 'w' + [4011a7,4011b4) {reg0} + [e9] inlined function 'sad'@40119b + [f3] parameter 'c' + [40119b,4011a6) {reg0} + [4011a6,4011a7) {entry_value(1) {reg5}} + [4011b4,4011bf) {reg0} + [147] function 'no_subject'@4011c0 + frame_base: {call_frame_cfa {...}} + [15b] parameter 'word' + [4011c0,4011d0) {reg5} + [162] parameter 'count' + [4011c0,4011d0) {reg4} +EOF + +# GNU DebugFissuon Multi CU Split DWARF. See run-dwarf-ranges.sh. +testfiles testfilesplitranges4.debug +testfiles testfile-ranges-hello.dwo testfile-ranges-world.dwo +testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfilesplitranges4.debug <<\EOF +module 'testfilesplitranges4.debug' +[b] CU 'hello.c' + [18] function 'no_say'@4004f0 + frame_base: {call_frame_cfa {...}} + [2f] parameter 'prefix' + [4004f0,4004fa) {reg5} + [4004fa,4004ff) {GNU_entry_value(1) {reg5}, stack_value} + [3b] variable 'world' + + [60] function 'main'@4003e0 + frame_base: {call_frame_cfa {...}} + [77] parameter 'argc' + [4003e0,4003f2) {reg5} + [4003f2,4003f7) {GNU_entry_value(1) {reg5}, stack_value} + [83] parameter 'argv' + [4003e0,4003f6) {reg4} + [4003f6,1004003f5) {GNU_entry_value(1) {reg4}, stack_value} + [8f] inlined function 'subject'@4003e3 + [a3] parameter 'count' + [4003e3,4003ef) {reg5} + [ac] parameter 'word' + [4003e3,4003ef) {reg0} + [e7] function 'subject'@4004e0 + frame_base: {call_frame_cfa {...}} + [fb] parameter 'word' + [4004e0,4004f0) {reg5} + [102] parameter 'count' + [4004e0,4004f0) {reg4} +module 'testfilesplitranges4.debug' +[b] CU 'world.c' + [18] function 'no_main'@400550 + frame_base: {call_frame_cfa {...}} + [2f] parameter 'argc' + [400550,400562) {reg5} + [400562,400567) {GNU_entry_value(1) {reg5}, stack_value} + [3b] parameter 'argv' + [400550,400566) {reg4} + [400566,100400565) {GNU_entry_value(1) {reg4}, stack_value} + [47] inlined function 'no_subject'@400553 + [5b] parameter 'count' + [400553,40055f) {reg5} + [64] parameter 'word' + [400553,40055f) {reg0} + [af] function 'say'@400500 + frame_base: {call_frame_cfa {...}} + [c9] parameter 'prefix' + [400500,40050e) {reg5} + [40050e,40051c) {reg3} + [40051c,400527) {GNU_entry_value(1) {reg5}, stack_value} + [400527,400535) {reg3} + [400535,400540) {GNU_entry_value(1) {reg5}, stack_value} + [d5] variable 'world' + [400513,40051b) {reg0} + [400527,400534) {reg0} + [e1] inlined function 'happy'@40051c + [f1] parameter 'w' + [400527,400534) {reg0} + [fa] inlined function 'sad'@40051c + [106] parameter 'c' + [40051b,400526) {reg0} + [400526,400527) {GNU_entry_value(1) {reg5}} + [400534,40053f) {reg0} + [15c] function 'no_subject'@400540 + frame_base: {call_frame_cfa {...}} + [170] parameter 'word' + [400540,400550) {reg5} + [177] parameter 'count' + [400540,400550) {reg4} +EOF + +# DW_OP_addrx and DW_OP_constx testcases. +# +# int i, j, k; +# __thread int l, m, n; +# +# int main () +# { +# int r1 = i + j + k; +# int r2 = l + m + n; +# int res = r1 + r2; +# +# return res; +# } +# +# gcc -O2 -gdwarf-5 -gsplit-dwarf -o addrx_constx-5.o -c addrx_constx.c +# gcc -O2 -gdwarf-5 -gsplit-dwarf -o testfile-addrx_constx-5 addrx_constx-5.o +# gcc -O2 -gdwarf-4 -gsplit-dwarf -o addrx_constx-4.o -c addrx_constx.c +# gcc -O2 -gdwarf-4 -gsplit-dwarf -o testfile-addrx_constx-4 addrx_constx-4.o + +testfiles testfile-addrx_constx-5 addrx_constx-5.dwo +testrun_compare ${abs_top_builddir}/tests/varlocs --exprlocs -e testfile-addrx_constx-5 <<\EOF +module 'testfile-addrx_constx-5' +[14] CU 'addrx_constx.c' + producer (strx) + language (data1) + name (strx) + comp_dir (strx) + [19] variable "i" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {addr: 0x404038} + [25] base_type "int" + byte_size (data1) + encoding (data1) + name (string) + [2c] variable "j" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {addr: 0x404034} + [38] variable "k" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {addr: 0x40403c} + [44] variable "l" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {const: 0x403e10, form_tls_address} + [51] variable "m" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {const: 0x403e0c, form_tls_address} + [5e] variable "n" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {const: 0x403e08, form_tls_address} + [6b] subprogram "main" + external (flag_present) + name (strx) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + low_pc (addrx) + high_pc (data8) + frame_base (exprloc) {call_frame_cfa {bregx(7,8)}} + call_all_calls (flag_present) + [7f] variable "r1" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (implicit_const) + type (ref4) + location (exprloc) {addr: 0x404038, deref_size(4), addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value} + [98] variable "r2" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (implicit_const) + type (ref4) + location (exprloc) {form_tls_address, const: 0x403e10, deref_size(4), form_tls_address, const: 0x403e0c, deref_size(4), plus, form_tls_address, const: 0x403e08, deref_size(4), plus, stack_value} + [b4] variable "res" + name (string) + decl_file (implicit_const) + decl_line (data1) + decl_column (implicit_const) + type (ref4) + location (exprloc) {addr: 0x404038, deref_size(4), form_tls_address, const: 0x403e08, deref_size(4), plus, form_tls_address, const: 0x403e0c, deref_size(4), plus, form_tls_address, const: 0x403e10, deref_size(4), plus, addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value} +EOF + +testfiles testfile-addrx_constx-4 addrx_constx-4.dwo +testrun_compare ${abs_top_builddir}/tests/varlocs --exprlocs -e testfile-addrx_constx-4 <<\EOF +module 'testfile-addrx_constx-4' +[b] CU 'addrx_constx.c' + producer (GNU_str_index) + language (data1) + name (GNU_str_index) + comp_dir (GNU_str_index) + GNU_dwo_id (data8) + [18] variable "i" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {addr: 0x404038} + [25] base_type "int" + byte_size (data1) + encoding (data1) + name (string) + [2c] variable "j" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {addr: 0x404034} + [39] variable "k" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {addr: 0x40403c} + [46] variable "l" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {const: 0x403e10, GNU_push_tls_address} + [54] variable "m" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {const: 0x403e0c, GNU_push_tls_address} + [62] variable "n" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + external (flag_present) + location (exprloc) {const: 0x403e08, GNU_push_tls_address} + [70] subprogram "main" + external (flag_present) + name (GNU_str_index) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + low_pc (GNU_addr_index) + high_pc (data8) + frame_base (exprloc) {call_frame_cfa {bregx(7,8)}} + GNU_all_call_sites (flag_present) + [84] variable "r1" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + location (exprloc) {addr: 0x404038, deref_size(4), addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value} + [9f] variable "r2" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + location (exprloc) {GNU_push_tls_address, const: 0x403e10, deref_size(4), GNU_push_tls_address, const: 0x403e0c, deref_size(4), plus, GNU_push_tls_address, const: 0x403e08, deref_size(4), plus, stack_value} + [bd] variable "res" + name (string) + decl_file (data1) + decl_line (data1) + decl_column (data1) + type (ref4) + location (exprloc) {addr: 0x404038, deref_size(4), GNU_push_tls_address, const: 0x403e08, deref_size(4), plus, GNU_push_tls_address, const: 0x403e0c, deref_size(4), plus, GNU_push_tls_address, const: 0x403e10, deref_size(4), plus, addr: 0x404034, deref_size(4), plus, addr: 0x40403c, deref_size(4), plus, stack_value} +EOF + +# See run-readelf-loc.sh +testfiles testfile-splitdwarf4-not-split4.debug +testfiles splitdwarf4-not-split4.dwo + +testrun_compare ${abs_top_builddir}/tests/varlocs --debug -e testfile-splitdwarf4-not-split4.debug <<\EOF +module 'testfile-splitdwarf4-not-split4.debug' +[b] CU 'splitdwarf4-not-split4.c' + [18] function 'main'@401050 + frame_base: {call_frame_cfa {...}} + [30] parameter 'argc' + [401050,40106e) {reg5} + [40106e,401086) {reg12} + [401086,401095) {GNU_entry_value(1) {reg5}, stack_value} + [401095,40109c) {reg5} + [3d] parameter 'argv' + [401050,40106e) {reg4} + [40106e,401095) {GNU_entry_value(1) {reg4}, stack_value} + [401095,40109c) {reg4} + [4a] variable 'i' + [401050,40106e) {lit0, stack_value} + [401086,40108e) {breg12(0), breg6(0), plus, stack_value} + [40108e,401095) {reg0} + [401095,40109c) {lit0, stack_value} + [58] variable 'p' + [401050,40106e) {reg5} + [40106e,401090) {reg6} + [401095,40109c) {reg5} +module 'testfile-splitdwarf4-not-split4.debug' +[3f] CU 'popcount.c'@401180 + [61] function 'popcount'@401180 + frame_base: {call_frame_cfa {...}} + [83] parameter 'u' + [401180,401189) {reg5} + [401189,40119b) {reg1} + [40119b,40119d) {breg1(0), lit1, shr, stack_value} + [40119d,4011a1) {reg1} + [91] variable 'c' + [401180,401189) {lit0, stack_value} + [401189,4011a0) {reg0} + [4011a0,4011a1) {lit0, stack_value} +EOF exit 0 diff --git a/tests/saridx.c b/tests/saridx.c index 8a450d82..e7f0c566 100644 --- a/tests/saridx.c +++ b/tests/saridx.c @@ -17,7 +17,6 @@ #include -#include #include #include #include @@ -25,6 +24,7 @@ #include #include #include +#include "system.h" static const char *machines[] = diff --git a/tests/sectiondump.c b/tests/sectiondump.c index 3033fedc..f33484f9 100644 --- a/tests/sectiondump.c +++ b/tests/sectiondump.c @@ -18,13 +18,13 @@ #include #include -#include #include #include #include #include #include #include +#include "system.h" /* Prototypes for local functions. */ diff --git a/tests/show-abbrev.c b/tests/show-abbrev.c index b0af0297..002ae25e 100644 --- a/tests/show-abbrev.c +++ b/tests/show-abbrev.c @@ -51,6 +51,14 @@ main (int argc, char *argv[]) /* Something went wrong. */ break; + /* Test something obviously wrong. */ + Dwarf_Abbrev *a = dwarf_getabbrev (&die, (Dwarf_Off) -1, NULL); + if (a != NULL) + { + printf ("dwarf_getabbrev -1 succeeded?\n"); + break; + } + Dwarf_Off offset = 0; while (1) diff --git a/tests/splitdwarf4-not-split4.dwo.bz2 b/tests/splitdwarf4-not-split4.dwo.bz2 new file mode 100644 index 00000000..4346b2e6 Binary files /dev/null and b/tests/splitdwarf4-not-split4.dwo.bz2 differ diff --git a/tests/test-subr.sh b/tests/test-subr.sh index f397aed1..09f428d1 100644 --- a/tests/test-subr.sh +++ b/tests/test-subr.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005-2015 Red Hat, Inc. +# Copyright (C) 2005-2015, 2017 Red Hat, Inc. # This file is part of elfutils. # # This file is free software; you can redistribute it and/or modify @@ -115,16 +115,21 @@ program_transform() echo "$*" | sed "${program_transform_name}" } -self_test_files=`echo ${abs_top_builddir}/src/addr2line \ -${abs_top_builddir}/src/elfcmp ${abs_top_builddir}/src/elflint \ -${abs_top_builddir}/src/nm ${abs_top_builddir}/src/objdump \ -${abs_top_builddir}/src/readelf \ -${abs_top_builddir}/src/size.o ${abs_top_builddir}/src/strip.o \ -${abs_top_builddir}/libelf/libelf.so \ +self_test_files_exe=`echo ${abs_top_builddir}/src/addr2line \ +${abs_top_builddir}/src/elfcmp \ +${abs_top_builddir}/src/objdump \ +${abs_top_builddir}/src/readelf` + +self_test_files_lib=`echo ${abs_top_builddir}/libelf/libelf.so \ ${abs_top_builddir}/libdw/libdw.so \ ${abs_top_builddir}/backends/libebl_i386.so \ ${abs_top_builddir}/backends/libebl_x86_64.so` +self_test_files_obj=`echo ${abs_top_builddir}/src/size.o \ +${abs_top_builddir}/src/strip.o` + +self_test_files="$self_test_files_exe $self_test_files_lib $self_test_files_obj" + # Provide a command to run on all self-test files with testrun. testrun_on_self() { @@ -139,6 +144,50 @@ testrun_on_self() if test $exit_status != 0; then exit $exit_status; fi } +testrun_on_self_exe() +{ + exit_status=0 + + for file in $self_test_files_exe; do + testrun $* $file \ + || { echo "*** failure in $* $file"; exit_status=1; } + done + + # Only exit if something failed + if test $exit_status != 0; then exit $exit_status; fi +} + +testrun_on_self_lib() +{ + exit_status=0 + + for file in $self_test_files_lib; do + testrun $* $file \ + || { echo "*** failure in $* $file"; exit_status=1; } + done + + # Only exit if something failed + if test $exit_status != 0; then exit $exit_status; fi +} + +# Compress the files first. Compress both debug sections and symtab. +testrun_on_self_compressed() +{ + exit_status=0 + + for file in $self_test_files; do + tempfiles ${file}z + testrun ${abs_top_builddir}/src/elfcompress -f -q -o ${file}z ${file} + testrun ${abs_top_builddir}/src/elfcompress -f -q --name='.s??tab' ${file}z + + testrun $* ${file}z \ + || { echo "*** failure in $* ${file}z"; exit_status=1; } + done + + # Only exit if something failed + if test $exit_status != 0; then exit $exit_status; fi +} + # Same as above, but redirects stdout to /dev/null testrun_on_self_quiet() { diff --git a/tests/testfile-ada-variant.bz2 b/tests/testfile-ada-variant.bz2 new file mode 100644 index 00000000..459774d6 Binary files /dev/null and b/tests/testfile-ada-variant.bz2 differ diff --git a/tests/testfile-addrx_constx-4.bz2 b/tests/testfile-addrx_constx-4.bz2 new file mode 100755 index 00000000..cf10fbb1 Binary files /dev/null and b/tests/testfile-addrx_constx-4.bz2 differ diff --git a/tests/testfile-addrx_constx-5.bz2 b/tests/testfile-addrx_constx-5.bz2 new file mode 100755 index 00000000..eb2a1f17 Binary files /dev/null and b/tests/testfile-addrx_constx-5.bz2 differ diff --git a/tests/testfile-annobingroup-i386.o.bz2 b/tests/testfile-annobingroup-i386.o.bz2 new file mode 100644 index 00000000..798eefda Binary files /dev/null and b/tests/testfile-annobingroup-i386.o.bz2 differ diff --git a/tests/testfile-annobingroup.o.bz2 b/tests/testfile-annobingroup.o.bz2 new file mode 100644 index 00000000..b1ca7ea1 Binary files /dev/null and b/tests/testfile-annobingroup.o.bz2 differ diff --git a/tests/testfile-bpf-reloc.expect.bz2 b/tests/testfile-bpf-reloc.expect.bz2 new file mode 100644 index 00000000..0ff8cc4c Binary files /dev/null and b/tests/testfile-bpf-reloc.expect.bz2 differ diff --git a/tests/testfile-bpf-reloc.o.bz2 b/tests/testfile-bpf-reloc.o.bz2 new file mode 100644 index 00000000..295634f9 Binary files /dev/null and b/tests/testfile-bpf-reloc.o.bz2 differ diff --git a/tests/testfile-const-values.debug.bz2 b/tests/testfile-const-values.debug.bz2 new file mode 100755 index 00000000..167da166 Binary files /dev/null and b/tests/testfile-const-values.debug.bz2 differ diff --git a/tests/testfile-dwarf-4.bz2 b/tests/testfile-dwarf-4.bz2 new file mode 100755 index 00000000..fd3aaea5 Binary files /dev/null and b/tests/testfile-dwarf-4.bz2 differ diff --git a/tests/testfile-dwarf-45.source b/tests/testfile-dwarf-45.source new file mode 100644 index 00000000..584c8f7e --- /dev/null +++ b/tests/testfile-dwarf-45.source @@ -0,0 +1,89 @@ +# Nonsensical program used to generate an example DWARF4 and DWARF5 file. +# The generated code is the same, but the DWARF representation is different. + +# = hello.h = + +extern int m; +extern int baz (int x); + +static inline int +frob (int a, int b) +{ + int c = a; + + if (a > b) + c -= b; + + return baz (c); +} + +# = hello.c = + +#include +#include "hello.h" + +extern int main (int, char **); +int m = 2; + +wchar_t foo (wchar_t); +int baz (int x) +{ + int r = x; + + if (x > m) + r -= m; + + r = foo (r); + return r; +} + +wchar_t +foo (wchar_t f) +{ + if (f < 0) + return main (f, NULL); + + return f > 0 ? frob (f - 1, m) : 0; +} + +# = world.c = + +#include "hello.h" +#include + +int +calc (const char *word) +{ + if (word == 0 || word[0] == '\0') + return 0; + + return frob (word[0], m + 42); +} + +int +main (int argc, const char **argv) +{ + const char *n; + if (argc > 1) + n = argv[0]; + else + n = "world"; + + exit (calc (n)); +} + +$ gcc -gdwarf-4 -gno-as-loc-support -gno-variable-location-views -O2 -c world.c +$ gcc -gdwarf-4 -gno-as-loc-support -gno-variable-location-views -O2 -c hello.c +$ gcc -o testfile-dwarf-4 hello.o world.o + +$ gcc -gdwarf-5 -gno-as-loc-support -gno-variable-location-views -O2 -c world.c +$ gcc -gdwarf-5 -gno-as-loc-support -gno-variable-location-views -O2 -c hello.c +$ gcc -o testfile-dwarf-5 hello.o world.o + +$ gcc -gdwarf-4 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2 -o testfile-world4.o -c world.c +$ gcc -gdwarf-4 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2 -o testfile-hello4.o -c hello.c +$ gcc -o testfile-splitdwarf-4 testfile-hello4.o testfile-world4.o + +$ gcc -gdwarf-5 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2 -o testfile-world5.o -c world.c +$ gcc -gdwarf-5 -gsplit-dwarf -gno-as-loc-support -gno-variable-location-views -O2 -o testfile-hello5.o -c hello.c +$ gcc -o testfile-splitdwarf-5 testfile-hello5.o testfile-world5.o diff --git a/tests/testfile-dwarf-5.bz2 b/tests/testfile-dwarf-5.bz2 new file mode 100755 index 00000000..689fa4fc Binary files /dev/null and b/tests/testfile-dwarf-5.bz2 differ diff --git a/tests/testfile-hello4.dwo.bz2 b/tests/testfile-hello4.dwo.bz2 new file mode 100644 index 00000000..fe02d65c Binary files /dev/null and b/tests/testfile-hello4.dwo.bz2 differ diff --git a/tests/testfile-hello5.dwo.bz2 b/tests/testfile-hello5.dwo.bz2 new file mode 100644 index 00000000..e911375e Binary files /dev/null and b/tests/testfile-hello5.dwo.bz2 differ diff --git a/tests/testfile-only-debug-line.bz2 b/tests/testfile-only-debug-line.bz2 new file mode 100644 index 00000000..a931bcd4 Binary files /dev/null and b/tests/testfile-only-debug-line.bz2 differ diff --git a/tests/testfile-ppc64-min-instr.bz2 b/tests/testfile-ppc64-min-instr.bz2 new file mode 100755 index 00000000..85bef57b Binary files /dev/null and b/tests/testfile-ppc64-min-instr.bz2 differ diff --git a/tests/testfile-ranges-hello.dwo.bz2 b/tests/testfile-ranges-hello.dwo.bz2 new file mode 100644 index 00000000..fac24672 Binary files /dev/null and b/tests/testfile-ranges-hello.dwo.bz2 differ diff --git a/tests/testfile-ranges-hello5.dwo.bz2 b/tests/testfile-ranges-hello5.dwo.bz2 new file mode 100644 index 00000000..5e6e9e21 Binary files /dev/null and b/tests/testfile-ranges-hello5.dwo.bz2 differ diff --git a/tests/testfile-ranges-world.dwo.bz2 b/tests/testfile-ranges-world.dwo.bz2 new file mode 100644 index 00000000..27ad06d5 Binary files /dev/null and b/tests/testfile-ranges-world.dwo.bz2 differ diff --git a/tests/testfile-ranges-world5.dwo.bz2 b/tests/testfile-ranges-world5.dwo.bz2 new file mode 100644 index 00000000..6bde196b Binary files /dev/null and b/tests/testfile-ranges-world5.dwo.bz2 differ diff --git a/tests/testfile-riscv64-core.bz2 b/tests/testfile-riscv64-core.bz2 new file mode 100644 index 00000000..f5b472bb Binary files /dev/null and b/tests/testfile-riscv64-core.bz2 differ diff --git a/tests/testfile-riscv64-s.bz2 b/tests/testfile-riscv64-s.bz2 new file mode 100755 index 00000000..149ae416 Binary files /dev/null and b/tests/testfile-riscv64-s.bz2 differ diff --git a/tests/testfile-riscv64.bz2 b/tests/testfile-riscv64.bz2 new file mode 100755 index 00000000..cae4919d Binary files /dev/null and b/tests/testfile-riscv64.bz2 differ diff --git a/tests/testfile-sizes3.o.bz2 b/tests/testfile-sizes3.o.bz2 index 7fa6a8a5..86333826 100644 Binary files a/tests/testfile-sizes3.o.bz2 and b/tests/testfile-sizes3.o.bz2 differ diff --git a/tests/testfile-sizes4.o.bz2 b/tests/testfile-sizes4.o.bz2 new file mode 100644 index 00000000..046e0a23 Binary files /dev/null and b/tests/testfile-sizes4.o.bz2 differ diff --git a/tests/testfile-sizes4.s b/tests/testfile-sizes4.s new file mode 100644 index 00000000..a2430215 --- /dev/null +++ b/tests/testfile-sizes4.s @@ -0,0 +1,77 @@ + .section .debug_info +.Lcu1_begin: + .4byte .Lcu1_end - .Lcu1_start +.Lcu1_start: + .2byte 4 /* Version */ + .4byte .Labbrev1_begin /* Abbrevs */ + .byte 8 /* Pointer size */ + .uleb128 2 /* Abbrev (DW_TAG_compile_unit) */ + .uleb128 3 /* Abbrev (DW_TAG_variable) */ + .ascii "v\0" + .4byte .Llabel1 - .Lcu1_begin +.Llabel1: + .uleb128 4 /* Abbrev (DW_TAG_array_type) */ + .4byte .Llabel2 - .Lcu1_begin + .uleb128 5 /* Abbrev (DW_TAG_subrange_type) */ + .byte -1 + .2byte 255 + .byte 0x0 /* Terminate children */ +.Llabel2: + .uleb128 6 /* Abbrev (DW_TAG_base_type) */ + .byte 1 + .byte 0x0 /* Terminate children */ +.Lcu1_end: + .section .note.gnu.build-id, "a", %note + .4byte 4 + .4byte 8 + .4byte 3 + .ascii "GNU\0" + .byte 0x01 + .byte 0x02 + .byte 0x03 + .byte 0x04 + .byte 0x05 + .byte 0x06 + .byte 0x07 + .byte 0x08 + .section .debug_abbrev +.Labbrev1_begin: + .uleb128 2 /* Abbrev start */ + .uleb128 0x11 /* DW_TAG_compile_unit */ + .byte 1 /* has_children */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ + .uleb128 3 /* Abbrev start */ + .uleb128 0x34 /* DW_TAG_variable */ + .byte 0 /* has_children */ + .uleb128 0x03 /* DW_AT_name */ + .uleb128 0x08 /* DW_FORM_string */ + .uleb128 0x49 /* DW_AT_type */ + .uleb128 0x13 /* DW_FORM_ref4 */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ + .uleb128 4 /* Abbrev start */ + .uleb128 0x01 /* DW_TAG_array_type */ + .byte 1 /* has_children */ + .uleb128 0x49 /* DW_AT_type */ + .uleb128 0x13 /* DW_FORM_ref4 */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ + .uleb128 5 /* Abbrev start */ + .uleb128 0x21 /* DW_TAG_subrange_type */ + .byte 0 /* has_children */ + .uleb128 0x22 /* DW_AT_lower_bound */ + .uleb128 0x0b /* DW_FORM_data1 */ + .uleb128 0x2f /* DW_AT_upper_bound */ + .uleb128 0x05 /* DW_FORM_data2 */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ + .uleb128 6 /* Abbrev start */ + .uleb128 0x24 /* DW_TAG_base_type */ + .byte 0 /* has_children */ + .uleb128 0x0b /* DW_AT_byte_size */ + .uleb128 0x0b /* DW_FORM_data1 */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ + .byte 0x0 /* Terminator */ diff --git a/tests/testfile-splitdwarf-4.bz2 b/tests/testfile-splitdwarf-4.bz2 new file mode 100755 index 00000000..a1871e61 Binary files /dev/null and b/tests/testfile-splitdwarf-4.bz2 differ diff --git a/tests/testfile-splitdwarf-5.bz2 b/tests/testfile-splitdwarf-5.bz2 new file mode 100755 index 00000000..27ff3bd6 Binary files /dev/null and b/tests/testfile-splitdwarf-5.bz2 differ diff --git a/tests/testfile-splitdwarf4-not-split4.debug.bz2 b/tests/testfile-splitdwarf4-not-split4.debug.bz2 new file mode 100755 index 00000000..6f4d701a Binary files /dev/null and b/tests/testfile-splitdwarf4-not-split4.debug.bz2 differ diff --git a/tests/testfile-stridex.bz2 b/tests/testfile-stridex.bz2 new file mode 100755 index 00000000..ff909f4a Binary files /dev/null and b/tests/testfile-stridex.bz2 differ diff --git a/tests/testfile-world4.dwo.bz2 b/tests/testfile-world4.dwo.bz2 new file mode 100644 index 00000000..297fe5fa Binary files /dev/null and b/tests/testfile-world4.dwo.bz2 differ diff --git a/tests/testfile-world5.dwo.bz2 b/tests/testfile-world5.dwo.bz2 new file mode 100644 index 00000000..d5c852c3 Binary files /dev/null and b/tests/testfile-world5.dwo.bz2 differ diff --git a/tests/testfile11-debugframe.bz2 b/tests/testfile11-debugframe.bz2 new file mode 100644 index 00000000..5c07d16a Binary files /dev/null and b/tests/testfile11-debugframe.bz2 differ diff --git a/tests/testfile12-debugframe.bz2 b/tests/testfile12-debugframe.bz2 new file mode 100644 index 00000000..b8cc19c3 Binary files /dev/null and b/tests/testfile12-debugframe.bz2 differ diff --git a/tests/testfileaarch64-debugframe.bz2 b/tests/testfileaarch64-debugframe.bz2 new file mode 100755 index 00000000..e77494a1 Binary files /dev/null and b/tests/testfileaarch64-debugframe.bz2 differ diff --git a/tests/testfilearm-debugframe.bz2 b/tests/testfilearm-debugframe.bz2 new file mode 100755 index 00000000..51ce2d37 Binary files /dev/null and b/tests/testfilearm-debugframe.bz2 differ diff --git a/tests/testfileppc32-debugframe.bz2 b/tests/testfileppc32-debugframe.bz2 new file mode 100755 index 00000000..b6ae4ea6 Binary files /dev/null and b/tests/testfileppc32-debugframe.bz2 differ diff --git a/tests/testfileppc64-debugframe.bz2 b/tests/testfileppc64-debugframe.bz2 new file mode 100755 index 00000000..85c80ac6 Binary files /dev/null and b/tests/testfileppc64-debugframe.bz2 differ diff --git a/tests/testfileranges4.debug.bz2 b/tests/testfileranges4.debug.bz2 new file mode 100755 index 00000000..67ba573d Binary files /dev/null and b/tests/testfileranges4.debug.bz2 differ diff --git a/tests/testfileranges5.debug.bz2 b/tests/testfileranges5.debug.bz2 new file mode 100755 index 00000000..ef28efc1 Binary files /dev/null and b/tests/testfileranges5.debug.bz2 differ diff --git a/tests/testfilesplitranges4.debug.bz2 b/tests/testfilesplitranges4.debug.bz2 new file mode 100755 index 00000000..df8e3ac4 Binary files /dev/null and b/tests/testfilesplitranges4.debug.bz2 differ diff --git a/tests/testfilesplitranges5.debug.bz2 b/tests/testfilesplitranges5.debug.bz2 new file mode 100755 index 00000000..5796cbf0 Binary files /dev/null and b/tests/testfilesplitranges5.debug.bz2 differ diff --git a/tests/unit-info.c b/tests/unit-info.c new file mode 100644 index 00000000..4fb9a984 --- /dev/null +++ b/tests/unit-info.c @@ -0,0 +1,323 @@ +/* Test dwarf_cu_info properties. + Copyright (C) 2018 Red Hat, Inc. + This file is part of elfutils. + + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + elfutils is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include ELFUTILS_HEADER(dw) +#include +#include +#include +#include +#include +#include + +/* Yeah, lazy, 16K CUs should be enough for everybody... */ +#define MAX_UNITS 16384 +struct info +{ + int dietag; + int subtag; + Dwarf_Half version; + uint8_t unit_type; + uint64_t id; + uint8_t addr_size; + uint8_t off_size; +}; +static struct info unit_info[MAX_UNITS]; + +int +main (int argc, char *argv[]) +{ + for (int i = 1; i < argc; i++) + { + printf ("file: %s\n", argv[i]); + int fd = open (argv[i], O_RDONLY); + Dwarf *dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + { + printf ("%s not usable: %s\n", argv[i], dwarf_errmsg (-1)); + return -1; + } + + Dwarf_CU *cu = NULL; + Dwarf_Half version; + Dwarf_Die cudie, subdie; + uint8_t unit_type; + size_t u, units; + u = units = 0; + printf ("Iterate getting all info, compare with dwarf_cu_info.\n"); + while (dwarf_get_units (dbg, cu, &cu, &version, + &unit_type, &cudie, &subdie) == 0) + { + int dietag = dwarf_tag (&cudie); + int subtag = dwarf_tag (&subdie); + + unit_info[u].dietag = dietag; + unit_info[u].subtag = subtag; + unit_info[u].version = version; + unit_info[u].unit_type = unit_type; + + printf ("%zu cu dietag: %x, subtag: %x, version %" PRIx32 + ", unit_type %" PRIx8 "\n", + u, dietag, subtag, version, unit_type); + + uint64_t unit_id; + uint8_t addr_size, off_size; + if (dwarf_cu_info (cu, + &version, &unit_type, &cudie, &subdie, + &unit_id, &addr_size, &off_size) != 0) + { + printf ("Invalid dwarf_cu_info: %s\n", dwarf_errmsg (-1)); + return -1; + } + + dietag = dwarf_tag (&cudie); + subtag = dwarf_tag (&subdie); + + if (unit_info[u].dietag != dietag) + { + printf("Unequal dietags\n"); + return -1; + } + + if (unit_info[u].subtag != subtag) + { + printf("Unequal subtags\n"); + return -1; + } + + if (unit_info[u].version != version) + { + printf("Unequal versions\n"); + return -1; + } + + if (unit_info[u].unit_type != unit_type) + { + printf("Unequal unit_types\n"); + return -1; + } + + unit_info[u].id = unit_id; + unit_info[u].addr_size = addr_size; + unit_info[u].off_size = off_size; + + if (unit_type == DW_UT_skeleton) + { + if (dwarf_cu_info (subdie.cu, + &version, &unit_type, &cudie, &subdie, + &unit_id, &addr_size, &off_size) != 0) + { + printf ("Invalid subdie dwarf_cu_info: %s\n", + dwarf_errmsg (-1)); + return -1; + } + + dietag = dwarf_tag (&cudie); + subtag = dwarf_tag (&subdie); + + printf ("%zu subdietag: %x, subtag: %x, version %" PRIx32 + ", unit_type %" PRIx8 "\n", + u, dietag, subtag, version, unit_type); + + /* subdie is now cudie. */ + if (unit_info[u].subtag != dietag) + { + printf ("Inconsistent subdie tag\n"); + return -1; + } + + if (unit_info[u].id != unit_id) + { + printf ("Unequal subdie ids\n"); + return -1; + } + + if (unit_info[u].addr_size != addr_size) + { + printf ("Unequal subdie addr_size\n"); + return -1; + } + + if (unit_info[u].off_size != off_size) + { + printf ("Unequal subdie off_size\n"); + return -1; + } + } + + if (u >= MAX_UNITS) + { + printf ("Oops, more than 16K units...\n"); + return -1; + } + u = ++units; + } + + dwarf_end (dbg); + close (fd); + + /* And again... */ + printf ("rechecking: %s\n", argv[i]); + fd = open (argv[i], O_RDONLY); + dbg = dwarf_begin (fd, DWARF_C_READ); + if (dbg == NULL) + { + printf ("%s not usable: %s\n", argv[i], dwarf_errmsg (-1)); + return -1; + } + + cu = NULL; + u = 0; + printf ("Iterate no info, compare recorded info with dwarf_cu_info.\n"); + while (dwarf_get_units (dbg, cu, &cu, NULL, NULL, NULL, NULL) == 0) + { + if (u > units) + { + printf ("Got too many units???\n"); + return -1; + } + + uint64_t unit_id; + uint8_t addr_size, off_size; + if (dwarf_cu_info (cu, + &version, &unit_type, &cudie, &subdie, + &unit_id, &addr_size, &off_size) != 0) + { + printf ("Invalid dwarf_cu_info: %s\n", dwarf_errmsg (-1)); + return -1; + } + + int dietag = dwarf_tag (&cudie); + int subtag = dwarf_tag (&subdie); + + printf ("%zu re dietag: %x, subtag: %x, version %" PRIx32 + ", unit_type %" PRIx8 "\n", + u, dietag, subtag, version, unit_type); + + if (unit_info[u].dietag != dietag) + { + printf("Unequal dietags %x != %x\n", unit_info[u].dietag, dietag); + return -1; + } + + if (unit_info[u].subtag != subtag) + { + printf("Unequal subtags\n"); + return -1; + } + + if (unit_info[u].version != version) + { + printf("Unequal versions\n"); + return -1; + } + + if (unit_info[u].unit_type != unit_type) + { + printf("Unequal unit_types\n"); + return -1; + } + + if (unit_info[u].id != unit_id) + { + printf ("Unequal subdie ids\n"); + return -1; + } + + if (unit_info[u].addr_size != addr_size) + { + printf ("Unequal subdie addr_size\n"); + return -1; + } + + if (unit_info[u].off_size != off_size) + { + printf ("Unequal subdie off_size\n"); + return -1; + } + + if (unit_type == DW_UT_skeleton) + { + if (dwarf_cu_info (subdie.cu, + &version, &unit_type, &cudie, &subdie, + &unit_id, &addr_size, &off_size) != 0) + { + printf ("Invalid subdie dwarf_cu_info: %s\n", + dwarf_errmsg (-1)); + return -1; + } + + dietag = dwarf_tag (&cudie); + subtag = dwarf_tag (&subdie); + + printf ("%zu subdietag: %x, subtag: %x, version %" PRIx32 + ", unit_type %" PRIx8 "\n", + u, dietag, subtag, version, unit_type); + + /* subdie is now cudie. */ + subtag = dwarf_tag (&cudie); + if (unit_info[u].subtag != subtag) + { + printf ("Inconsistent subdie tag\n"); + return -1; + } + + if (unit_info[u].id != unit_id) + { + printf ("Unequal subdie ids\n"); + return -1; + } + + if (unit_info[u].addr_size != addr_size) + { + printf ("Unequal subdie addr_size\n"); + return -1; + } + + if (unit_info[u].off_size != off_size) + { + printf ("Unequal subdie off_size\n"); + return -1; + } + } + + if (u >= MAX_UNITS) + { + printf ("Oops, more than 16K units...\n"); + return -1; + } + u++; + } + + if (u != units) + { + printf ("Got not enough units???\n"); + return -1; + } + + dwarf_end (dbg); + close (fd); + + printf ("\n"); + } + + return 0; +} diff --git a/tests/varlocs.c b/tests/varlocs.c index c3fba89e..40505196 100644 --- a/tests/varlocs.c +++ b/tests/varlocs.c @@ -1,5 +1,5 @@ /* Test program for dwarf location functions. - Copyright (C) 2013, 2015 Red Hat, Inc. + Copyright (C) 2013, 2015, 2017, 2018 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -25,13 +25,13 @@ #include #include #include -#include #include #include #include #include #include +#include "system.h" #include "../libdw/known-dwarf.h" // The Dwarf, Dwarf_CFIs and address bias of @@ -39,9 +39,13 @@ // Needed for DW_OP_call_frame_cfa. static Dwarf *dw; Dwarf_CFI *cfi_debug; +Dwarf_Addr cfi_debug_bias; Dwarf_CFI *cfi_eh; Dwarf_Addr cfi_eh_bias; +bool is_ET_REL; +bool is_debug; + // Whether the current function has a DW_AT_frame_base defined. // Needed for DW_OP_fbreg. bool has_frame_base; @@ -75,11 +79,51 @@ dwarf_encoding_string (unsigned int code) return NULL; } +static const char * +dwarf_tag_string (unsigned int tag) +{ + switch (tag) + { +#define DWARF_ONE_KNOWN_DW_TAG(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_TAG +#undef DWARF_ONE_KNOWN_DW_TAG + default: + return NULL; + } +} + +static const char * +dwarf_attr_string (unsigned int attrnum) +{ + switch (attrnum) + { +#define DWARF_ONE_KNOWN_DW_AT(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_AT +#undef DWARF_ONE_KNOWN_DW_AT + default: + return NULL; + } +} + +static const char * +dwarf_form_string (unsigned int form) +{ + switch (form) + { +#define DWARF_ONE_KNOWN_DW_FORM(NAME, CODE) case CODE: return #NAME; + DWARF_ALL_KNOWN_DW_FORM +#undef DWARF_ONE_KNOWN_DW_FORM + default: + return NULL; + } +} + /* BASE must be a base type DIE referenced by a typed DWARF expression op. */ static void print_base_type (Dwarf_Die *base) { - assert (dwarf_tag (base) == DW_TAG_base_type); + if (dwarf_tag (base) != DW_TAG_base_type) + error (EXIT_FAILURE, 0, "not a base type"); Dwarf_Attribute encoding; Dwarf_Word enctype = 0; @@ -120,16 +164,16 @@ dwarf_opcode_string (unsigned int code) } // Forward reference for print_expr_block. -static void print_expr (Dwarf_Attribute *, Dwarf_Op *, Dwarf_Addr); +static void print_expr (Dwarf_Attribute *, Dwarf_Op *, Dwarf_Addr, int); static void print_expr_block (Dwarf_Attribute *attr, Dwarf_Op *exprs, int len, - Dwarf_Addr addr) + Dwarf_Addr addr, int depth) { printf ("{"); for (int i = 0; i < len; i++) { - print_expr (attr, &exprs[i], addr); + print_expr (attr, &exprs[i], addr, depth); printf ("%s", (i + 1 < len ? ", " : "")); } printf ("}"); @@ -141,13 +185,17 @@ print_expr_block_addrs (Dwarf_Attribute *attr, Dwarf_Op *exprs, int len) { printf (" [%" PRIx64 ",%" PRIx64 ") ", begin, end); - print_expr_block (attr, exprs, len, begin); + print_expr_block (attr, exprs, len, begin, 0); printf ("\n"); } static void -print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) +print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr, int depth) { +#define MAX_DEPTH 64 + if (depth++ > MAX_DEPTH) + error (EXIT_FAILURE, 0, "print_expr recursion depth exceeded"); + uint8_t atom = expr->atom; const char *opname = dwarf_opcode_string (atom); assert (opname != NULL); @@ -215,24 +263,33 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) error (EXIT_FAILURE, 0, "%s used in CFI", opname); printf ("%s ", opname); - if (cfi_eh == NULL && cfi_debug == NULL) + if (cfi_eh == NULL && cfi_debug == NULL && !is_debug) error (EXIT_FAILURE, 0, "DW_OP_call_frame_cfa used but no cfi found."); Dwarf_Frame *frame; - if (dwarf_cfi_addrframe (cfi_eh, addr + cfi_eh_bias, &frame) != 0 - && dwarf_cfi_addrframe (cfi_debug, addr, &frame) != 0) + if (dwarf_cfi_addrframe (cfi_eh, addr + cfi_eh_bias, &frame) == 0 + || dwarf_cfi_addrframe (cfi_debug, addr + cfi_debug_bias, + &frame) == 0) + { + Dwarf_Op *cfa_ops; + size_t cfa_nops; + if (dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops) != 0) + error (EXIT_FAILURE, 0, "dwarf_frame_cfa 0x%" PRIx64 ": %s", + addr, dwarf_errmsg (-1)); + if (cfa_nops < 1) + error (EXIT_FAILURE, 0, "dwarf_frame_cfa no ops"); + print_expr_block (NULL, cfa_ops, cfa_nops, 0, depth); + free (frame); + } + else if (is_ET_REL || is_debug) + { + /* XXX In ET_REL files there might be an .eh_frame with relocations + we don't handle (e.g. X86_64_PC32). Maybe we should? */ + printf ("{...}"); + } + else error (EXIT_FAILURE, 0, "dwarf_cfi_addrframe 0x%" PRIx64 ": %s", addr, dwarf_errmsg (-1)); - - Dwarf_Op *cfa_ops; - size_t cfa_nops; - if (dwarf_frame_cfa (frame, &cfa_ops, &cfa_nops) != 0) - error (EXIT_FAILURE, 0, "dwarf_frame_cfa 0x%" PRIx64 ": %s", - addr, dwarf_errmsg (-1)); - if (cfa_nops < 1) - error (EXIT_FAILURE, 0, "dwarf_frame_cfa no ops"); - print_expr_block (NULL, cfa_ops, cfa_nops, 0); - free (frame); break; case DW_OP_push_object_address: @@ -290,7 +347,7 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) dwarf_errmsg (-1)); printf ("%s([%" PRIx64 "]) ", opname, dwarf_dieoffset (&call_die)); - print_expr_block (&call_attr, call_ops, call_len, addr); + print_expr_block (&call_attr, call_ops, call_len, addr, depth); } break; @@ -360,6 +417,7 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) } break; + case DW_OP_implicit_pointer: case DW_OP_GNU_implicit_pointer: /* Special, DIE offset, signed offset. Referenced DIE has a location or const_value attribute. */ @@ -386,7 +444,7 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) Dwarf_Die impl_die; if (dwarf_getlocation_die (attr, expr, &impl_die) != 0) - error (EXIT_FAILURE, 0, "dwarf_getlocation_due: %s", + error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s", dwarf_errmsg (-1)); printf ("%s([%" PRIx64 "],%" PRId64 ") ", opname, @@ -404,7 +462,7 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) if (locs == 0) printf (""); // This means "optimized out". else if (locs == 1) - print_expr_block (&attrval, exprval, exprval_len, addr); + print_expr_block (&attrval, exprval, exprval_len, addr, depth); else error (EXIT_FAILURE, 0, "dwarf_getlocation_addr attrval at addr 0x%" PRIx64 @@ -413,6 +471,47 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) } break; + case DW_OP_GNU_variable_value: + /* Special, DIE offset. Referenced DIE has a location or const_value + attribute. */ + { + if (attr == NULL) + error (EXIT_FAILURE, 0, "%s used in CFI", opname); + + Dwarf_Attribute attrval; + if (dwarf_getlocation_attr (attr, expr, &attrval) != 0) + error (EXIT_FAILURE, 0, "dwarf_getlocation_attr: %s", + dwarf_errmsg (-1)); + + Dwarf_Die impl_die; + if (dwarf_getlocation_die (attr, expr, &impl_die) != 0) + error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s", + dwarf_errmsg (-1)); + + printf ("%s([%" PRIx64 "]) ", opname, dwarf_dieoffset (&impl_die)); + + if (dwarf_whatattr (&attrval) == DW_AT_const_value) + printf (""); // Lookup type... + else + { + // Lookup the location description at the current address. + Dwarf_Op *exprval; + size_t exprval_len; + int locs = dwarf_getlocation_addr (&attrval, addr, + &exprval, &exprval_len, 1); + if (locs == 0) + printf (""); // This means "optimized out". + else if (locs == 1) + print_expr_block (&attrval, exprval, exprval_len, addr, depth); + else + error (EXIT_FAILURE, 0, + "dwarf_getlocation_addr attrval at addr 0x%" PRIx64 + ", locs (%d): %s", addr, locs, dwarf_errmsg (-1)); + } + } + break; + + case DW_OP_entry_value: case DW_OP_GNU_entry_value: /* Special, unsigned size plus expression block. All registers inside the block should be interpreted as they had on @@ -432,7 +531,7 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) dwarf_errmsg (-1)); printf ("%s(%zd) ", opname, entry_len); - print_expr_block (attr, entry_ops, entry_len, addr); + print_expr_block (attr, entry_ops, entry_len, addr, depth); } break; @@ -451,11 +550,14 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) // XXX actually lookup DW_TAG_GNU_call_site_parameter printf ("%s[%" PRIx64 "]", opname, dwarf_dieoffset (¶m)); assert (expr->number == dwarf_cuoffset (¶m)); - assert (dwarf_tag (¶m) == DW_TAG_formal_parameter); + if (dwarf_tag (¶m) != DW_TAG_formal_parameter) + error (EXIT_FAILURE, 0, "Not a formal parameter"); } break; + case DW_OP_convert: case DW_OP_GNU_convert: + case DW_OP_reinterpret: case DW_OP_GNU_reinterpret: /* Special, unsigned CU relative DIE offset pointing to a DW_TAG_base_type. Pops a value, converts or reinterprets the @@ -480,6 +582,7 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) } break; + case DW_OP_regval_type: case DW_OP_GNU_regval_type: /* Special, unsigned register number plus unsigned CU relative DIE offset pointing to a DW_TAG_base_type. */ @@ -495,9 +598,10 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) } break; + case DW_OP_deref_type: case DW_OP_GNU_deref_type: /* Special, unsigned size plus unsigned CU relative DIE offset - pointing to a DW_TAG_base_type. */ + pointing to a DW_TAG_base_type. */ { Dwarf_Die type; if (dwarf_getlocation_die (attr, expr, &type) != 0) @@ -510,6 +614,21 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) } break; + case DW_OP_xderef_type: + /* Special, unsigned size plus unsigned DIE offset + pointing to a DW_TAG_base_type. */ + { + Dwarf_Die type; + if (dwarf_getlocation_die (attr, expr, &type) != 0) + error (EXIT_FAILURE, 0, "dwarf_getlocation_die: %s", + dwarf_errmsg (-1)); + // XXX check size against base_type size? + printf ("%s(%" PRIu64 ")", opname, expr->number); + print_base_type (&type); + } + break; + + case DW_OP_const_type: case DW_OP_GNU_const_type: /* Special, unsigned CU relative DIE offset pointing to a DW_TAG_base_type, an unsigned size length plus a block with @@ -540,6 +659,42 @@ print_expr (Dwarf_Attribute *attr, Dwarf_Op *expr, Dwarf_Addr addr) } break; + case DW_OP_GNU_addr_index: + case DW_OP_addrx: + /* Address from the .debug_addr section (indexed based on CU). */ + { + Dwarf_Attribute addr_attr; + if (dwarf_getlocation_attr (attr, expr, &addr_attr) != 0) + error (EXIT_FAILURE, 0, "dwarf_getlocation_attr for addr: %s", + dwarf_errmsg (-1)); + + Dwarf_Addr address; + if (dwarf_formaddr (&addr_attr, &address) != 0) + error (EXIT_FAILURE, 0, "dwarf_formaddr address failed: %s", + dwarf_errmsg (-1)); + + printf ("addr: 0x%" PRIx64, address); + } + break; + + case DW_OP_GNU_const_index: + case DW_OP_constx: + /* Constant from the .debug_addr section (indexed based on CU). */ + { + Dwarf_Attribute addr_attr; + if (dwarf_getlocation_attr (attr, expr, &addr_attr) != 0) + error (EXIT_FAILURE, 0, "dwarf_getlocation_attr for addr: %s", + dwarf_errmsg (-1)); + + Dwarf_Word constant; + if (dwarf_formudata (&addr_attr, &constant) != 0) + error (EXIT_FAILURE, 0, "dwarf_formudata constant failed: %s", + dwarf_errmsg (-1)); + + printf ("const: 0x%" PRIx64, constant); + } + break; + default: error (EXIT_FAILURE, 0, "unhandled opcode: DW_OP_%s (0x%x)", opname, atom); @@ -572,7 +727,7 @@ print_varlocs (Dwarf_Die *funcdie) if (entrypc == 0) printf ("XXX zero address"); // XXX bad DWARF? else - print_expr_block (&fb_attr, fb_expr, fb_exprlen, entrypc); + print_expr_block (&fb_attr, fb_expr, fb_exprlen, entrypc, 0); printf ("\n"); } else @@ -585,7 +740,7 @@ print_varlocs (Dwarf_Die *funcdie) &fb_expr, &fb_exprlen)) > 0) { printf (" (%" PRIx64 ",%" PRIx64 ") ", start, end); - print_expr_block (&fb_attr, fb_expr, fb_exprlen, start); + print_expr_block (&fb_attr, fb_expr, fb_exprlen, start, 0); printf ("\n"); } @@ -759,9 +914,162 @@ handle_function (Dwarf_Die *funcdie, void *arg __attribute__((unused))) return DWARF_CB_OK; } +struct attr_arg +{ + int depth; + Dwarf_Addr entrypc; +}; + +static int +handle_attr (Dwarf_Attribute *attr, void *arg) +{ + int depth = ((struct attr_arg *) arg)->depth; + Dwarf_Addr entrypc = ((struct attr_arg *) arg)->entrypc; + + unsigned int code = dwarf_whatattr (attr); + unsigned int form = dwarf_whatform (attr); + + printf ("%*s%s (%s)", depth * 2, "", + dwarf_attr_string (code), dwarf_form_string (form)); + + /* If we can get an DWARF expression (or location lists) from this + attribute we'll print it, otherwise we'll ignore it. But if + there is an error while the attribute has the "correct" form then + we'll report an error (we can only really check DW_FORM_exprloc + other forms can be ambiguous). */ + Dwarf_Op *expr; + size_t exprlen; + bool printed = false; + int res = dwarf_getlocation (attr, &expr, &exprlen); + if (res == 0) + { + printf (" "); + print_expr_block (attr, expr, exprlen, entrypc, 0); + printf ("\n"); + printed = true; + } + else if (form == DW_FORM_exprloc) + { + error (0, 0, "%s dwarf_getlocation failed: %s", + dwarf_attr_string (code), dwarf_errmsg (-1)); + return DWARF_CB_ABORT; + } + else + { + Dwarf_Addr base, begin, end; + ptrdiff_t offset = 0; + while ((offset = dwarf_getlocations (attr, offset, + &base, &begin, &end, + &expr, &exprlen)) > 0) + { + if (! printed) + printf ("\n"); + printf ("%*s", depth * 2, ""); + print_expr_block_addrs (attr, begin, end, expr, exprlen); + printed = true; + } + } + + if (! printed) + printf ("\n"); + + return DWARF_CB_OK; +} + +static void +handle_die (Dwarf_Die *die, int depth, bool outer_has_frame_base, + Dwarf_Addr outer_entrypc) +{ + /* CU DIE already printed. */ + if (depth > 0) + { + const char *name = dwarf_diename (die); + if (name != NULL) + printf ("%*s[%" PRIx64 "] %s \"%s\"\n", depth * 2, "", + dwarf_dieoffset (die), dwarf_tag_string (dwarf_tag (die)), + name); + else + printf ("%*s[%" PRIx64 "] %s\n", depth * 2, "", + dwarf_dieoffset (die), dwarf_tag_string (dwarf_tag (die))); + } + + struct attr_arg arg; + arg.depth = depth + 1; + + /* The (lowest) address to use for (looking up) operands that depend + on address. */ + Dwarf_Addr die_entrypc; + if (dwarf_entrypc (die, &die_entrypc) != 0 || die_entrypc == 0) + { + /* Try to get the lowest address of the first range covered. */ + Dwarf_Addr base, start, end; + if (dwarf_ranges (die, 0, &base, &start, &end) <= 0 || start == 0) + die_entrypc = outer_entrypc; + else + die_entrypc = start; + } + arg.entrypc = die_entrypc; + + /* Whether this or the any outer DIE has a frame base. Used as + sanity check when printing experssions that use DW_OP_fbreg. */ + bool die_has_frame_base = dwarf_hasattr (die, DW_AT_frame_base); + die_has_frame_base |= outer_has_frame_base; + has_frame_base = die_has_frame_base; + + /* Look through all attributes to find those that contain DWARF + expressions and print those. We expect to handle all attributes, + anything else is an error. */ + if (dwarf_getattrs (die, handle_attr, &arg, 0) != 1) + error (EXIT_FAILURE, 0, "Couldn't get all attributes: %s", + dwarf_errmsg (-1)); + + /* Handle children and siblings recursively depth first. */ + Dwarf_Die child; + if (dwarf_haschildren (die) != 0 && dwarf_child (die, &child) == 0) + handle_die (&child, depth + 1, die_has_frame_base, die_entrypc); + + Dwarf_Die sibling; + if (dwarf_siblingof (die, &sibling) == 0) + handle_die (&sibling, depth, outer_has_frame_base, outer_entrypc); +} + int main (int argc, char *argv[]) { + /* With --exprlocs we process all DIEs looking for any attribute + which contains an DWARF expression (but not location lists) and + print those. Otherwise we process all function DIEs and print + all DWARF expressions and location lists associated with + parameters and variables). It must be the first argument, + or the second, after --debug. */ + bool exprlocs = false; + + /* With --debug we ignore not being able to find .eh_frame. + It must come as first argument. */ + is_debug = false; + if (argc > 1) + { + if (strcmp ("--exprlocs", argv[1]) == 0) + { + exprlocs = true; + argv[1] = ""; + } + else if (strcmp ("--debug", argv[1]) == 0) + { + is_debug = true; + argv[1] = ""; + } + } + + if (argc > 2) + { + if (strcmp ("--exprlocs", argv[2]) == 0) + { + exprlocs = true; + argv[2] = ""; + } + } + int remaining; Dwfl *dwfl; (void) argp_parse (dwfl_standard_argp (), argc, argv, 0, &remaining, @@ -770,14 +1078,27 @@ main (int argc, char *argv[]) Dwarf_Die *cu = NULL; Dwarf_Addr dwbias; + bool found_cu = false; while ((cu = dwfl_nextcu (dwfl, cu, &dwbias)) != NULL) { /* Only walk actual compile units (not partial units) that - contain code. */ + contain code if we are only interested in the function variable + locations. */ + Dwarf_Die cudie; + Dwarf_Die subdie; + uint8_t unit_type; + if (dwarf_cu_info (cu->cu, NULL, &unit_type, &cudie, &subdie, + NULL, NULL, NULL) != 0) + error (EXIT_FAILURE, 0, "dwarf_cu_info: %s", dwarf_errmsg (-1)); + if (unit_type == DW_UT_skeleton) + cudie = subdie; + Dwarf_Addr cubase; - if (dwarf_tag (cu) == DW_TAG_compile_unit - && dwarf_lowpc (cu, &cubase) == 0) + if (dwarf_tag (&cudie) == DW_TAG_compile_unit + && (exprlocs || dwarf_lowpc (&cudie, &cubase) == 0)) { + found_cu = true; + Dwfl_Module *mod = dwfl_cumodule (cu); Dwarf_Addr modbias; dw = dwfl_module_getdwarf (mod, &modbias); @@ -796,29 +1117,46 @@ main (int argc, char *argv[]) ? modname : basename (mainfile)); printf ("module '%s'\n", name); - print_die (cu, "CU", 0); + print_die (&cudie, "CU", 0); Dwarf_Addr elfbias; Elf *elf = dwfl_module_getelf (mod, &elfbias); // CFI. We need both since sometimes neither is complete. - cfi_debug = dwarf_getcfi (dw); // No bias needed, same file. - cfi_eh = dwarf_getcfi_elf (elf); - cfi_eh_bias = dwbias - elfbias; - - // Get the actual CU DIE and walk all functions inside it. - Dwarf_Die cudie; - uint8_t offsize; - uint8_t addrsize; - if (dwarf_diecu (cu, &cudie, &addrsize, &offsize) == NULL) - error (EXIT_FAILURE, 0, "dwarf_diecu %s", dwarf_errmsg (-1)); - - if (dwarf_getfuncs (cu, handle_function, NULL, 0) != 0) + cfi_debug = dwfl_module_dwarf_cfi (mod, &cfi_debug_bias); + cfi_eh = dwfl_module_eh_cfi (mod, &cfi_eh_bias); + + // No bias needed, same file. + assert (cfi_debug == NULL || cfi_debug_bias == 0); + + // We are a bit forgiving for object files. There might be + // relocations we don't handle that are needed in some + // places... + GElf_Ehdr ehdr_mem, *ehdr = gelf_getehdr (elf, &ehdr_mem); + is_ET_REL = ehdr->e_type == ET_REL; + + if (exprlocs) + { + Dwarf_Addr entrypc; + if (dwarf_entrypc (&cudie, &entrypc) != 0) + entrypc = 0; + + /* XXX - Passing true for has_frame_base is not really true. + We do it because we want to resolve all DIEs and all + attributes. Technically we should check that the DIE + (types) are referenced from variables that are defined in + a context (function) that has a frame base. */ + handle_die (&cudie, 0, true /* Should be false */, entrypc); + } + else if (dwarf_getfuncs (&cudie, handle_function, NULL, 0) != 0) error (EXIT_FAILURE, 0, "dwarf_getfuncs %s", dwarf_errmsg (-1)); } } + if (! found_cu) + error (EXIT_FAILURE, 0, "No DWARF CU found?"); + dwfl_end (dwfl); return 0; } diff --git a/tests/vdsosyms.c b/tests/vdsosyms.c index b876c10b..7bfa7381 100644 --- a/tests/vdsosyms.c +++ b/tests/vdsosyms.c @@ -18,13 +18,13 @@ #include #include #include -#include #include #include #include #include #include #include ELFUTILS_HEADER(dwfl) +#include "system.h" #ifndef __linux__ int