summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2018-07-04 00:31:46 +0200
committerMark Wielaard <mark@klomp.org>2018-07-04 00:31:46 +0200
commit94c975eefdfbfa9319b7bab69600c76fe6be7910 (patch)
treee29e208499440fdbaac2a867bcd7029f12e89a7a
parent766df1e15c1e8f8bc9890e7538eb2ef15a6516dc (diff)
parentaa36de0335e3ce12898954985a208f6336731289 (diff)
Merge tag 'elfutils-0.173' into mjw/RH-DTSdts-0.173
elfutils 0.173 release Removed riscv backend for now. Removed new arm32 tests. Added various new files to libdw_static_pic.a to support split dwarf.
-rw-r--r--.gitignore1
-rw-r--r--ChangeLog45
-rw-r--r--NEWS65
-rw-r--r--README9
-rw-r--r--backends/ChangeLog73
-rw-r--r--backends/Makefile.am23
-rw-r--r--backends/aarch64_cfi.c7
-rw-r--r--backends/aarch64_retval.c2
-rw-r--r--backends/alpha_retval.c4
-rw-r--r--backends/arm_regs.c2
-rw-r--r--backends/arm_retval.c2
-rw-r--r--backends/bpf_init.c1
-rw-r--r--backends/bpf_reloc.def3
-rw-r--r--backends/bpf_symbol.c54
-rw-r--r--backends/i386_regs.c2
-rw-r--r--backends/i386_retval.c4
-rw-r--r--backends/ia64_retval.c2
-rw-r--r--backends/linux-core-note.c4
-rw-r--r--backends/m68k_retval.c4
-rw-r--r--backends/ppc64_retval.c6
-rw-r--r--backends/ppc_initreg.c5
-rw-r--r--backends/ppc_regs.c2
-rw-r--r--backends/ppc_retval.c4
-rw-r--r--backends/riscv_cfi.c75
-rw-r--r--backends/riscv_init.c62
-rw-r--r--backends/riscv_regs.c177
-rw-r--r--backends/riscv_reloc.def83
-rw-r--r--backends/riscv_symbol.c94
-rw-r--r--backends/s390_retval.c4
-rw-r--r--backends/sh_retval.c2
-rw-r--r--backends/sparc_retval.c2
-rw-r--r--backends/tilegx_retval.c4
-rw-r--r--backends/x86_64_regs.c2
-rw-r--r--backends/x86_64_retval.c2
-rw-r--r--config/ChangeLog25
-rw-r--r--config/elfutils.spec.in40
-rw-r--r--config/eu.am9
-rw-r--r--configure.ac114
-rw-r--r--lib/ChangeLog29
-rw-r--r--lib/Makefile.am6
-rw-r--r--lib/eu-config.h19
-rw-r--r--lib/md5.c438
-rw-r--r--lib/md5.h110
-rw-r--r--lib/printversion.c4
-rw-r--r--lib/sha1.c380
-rw-r--r--lib/sha1.h93
-rw-r--r--libasm/ChangeLog4
-rw-r--r--libasm/Makefile.am4
-rw-r--r--libcpu/ChangeLog13
-rw-r--r--libcpu/Makefile.am2
-rw-r--r--libcpu/i386_disasm.c2
-rw-r--r--libcpu/memory-access.h2
-rw-r--r--libdw/ChangeLog724
-rw-r--r--libdw/Makefile.am21
-rw-r--r--libdw/cfi.c4
-rw-r--r--libdw/dwarf.h114
-rw-r--r--libdw/dwarf_aggregate_size.c76
-rw-r--r--libdw/dwarf_attr_integrate.c19
-rw-r--r--libdw/dwarf_begin_elf.c142
-rw-r--r--libdw/dwarf_child.c33
-rw-r--r--libdw/dwarf_cu_die.c12
-rw-r--r--libdw/dwarf_cu_info.c103
-rw-r--r--libdw/dwarf_cuoffset.c2
-rw-r--r--libdw/dwarf_die_addr_die.c70
-rw-r--r--libdw/dwarf_dieoffset.c4
-rw-r--r--libdw/dwarf_end.c36
-rw-r--r--libdw/dwarf_error.c14
-rw-r--r--libdw/dwarf_formaddr.c107
-rw-r--r--libdw/dwarf_formblock.c12
-rw-r--r--libdw/dwarf_formref.c2
-rw-r--r--libdw/dwarf_formref_die.c64
-rw-r--r--libdw/dwarf_formsdata.c15
-rw-r--r--libdw/dwarf_formstring.c131
-rw-r--r--libdw/dwarf_formudata.c160
-rw-r--r--libdw/dwarf_frame_register.c2
-rw-r--r--libdw/dwarf_get_units.c131
-rw-r--r--libdw/dwarf_getabbrev.c34
-rw-r--r--libdw/dwarf_getabbrevattr.c32
-rw-r--r--libdw/dwarf_getalt.c146
-rw-r--r--libdw/dwarf_getaranges.c21
-rw-r--r--libdw/dwarf_getattrcnt.c19
-rw-r--r--libdw/dwarf_getattrs.c31
-rw-r--r--libdw/dwarf_getlocation.c323
-rw-r--r--libdw/dwarf_getlocation_attr.c49
-rw-r--r--libdw/dwarf_getlocation_die.c23
-rw-r--r--libdw/dwarf_getlocation_implicit_pointer.c7
-rw-r--r--libdw/dwarf_getmacros.c43
-rw-r--r--libdw/dwarf_getscopes.c4
-rw-r--r--libdw/dwarf_getsrcfiles.c50
-rw-r--r--libdw/dwarf_getsrclines.c495
-rw-r--r--libdw/dwarf_hasattr.c28
-rw-r--r--libdw/dwarf_hasattr_integrate.c20
-rw-r--r--libdw/dwarf_highpc.c28
-rw-r--r--libdw/dwarf_lowpc.c15
-rw-r--r--libdw/dwarf_next_cfi.c8
-rw-r--r--libdw/dwarf_next_lines.c197
-rw-r--r--libdw/dwarf_nextcu.c196
-rw-r--r--libdw/dwarf_offdie.c4
-rw-r--r--libdw/dwarf_peel_type.c23
-rw-r--r--libdw/dwarf_ranges.c516
-rw-r--r--libdw/dwarf_setalt.c11
-rw-r--r--libdw/dwarf_siblingof.c5
-rw-r--r--libdw/libdw.h97
-rw-r--r--libdw/libdw.map14
-rw-r--r--libdw/libdwP.h648
-rw-r--r--libdw/libdw_alloc.c2
-rw-r--r--libdw/libdw_find_split_unit.c147
-rw-r--r--libdw/libdw_findcu.c189
-rw-r--r--libdw/libdw_form.c8
-rw-r--r--libdw/memory-access.h94
-rw-r--r--libdwfl/ChangeLog76
-rw-r--r--libdwfl/argp-std.c2
-rw-r--r--libdwfl/cu.c14
-rw-r--r--libdwfl/dwfl_build_id_find_elf.c2
-rw-r--r--libdwfl/dwfl_module.c1
-rw-r--r--libdwfl/dwfl_module_addrsym.c9
-rw-r--r--libdwfl/dwfl_module_getdwarf.c23
-rw-r--r--libdwfl/dwfl_report_elf.c2
-rw-r--r--libdwfl/find-debuginfo.c2
-rw-r--r--libdwfl/frame_unwind.c48
-rw-r--r--libdwfl/libdwflP.h25
-rw-r--r--libdwfl/link_map.c38
-rw-r--r--libdwfl/linux-pid-attach.c86
-rw-r--r--libdwfl/offline.c3
-rw-r--r--libdwfl/relocate.c2
-rw-r--r--libebl/ChangeLog30
-rw-r--r--libebl/Makefile.am2
-rw-r--r--libebl/eblcheckreloctargettype.c1
-rw-r--r--libebl/ebldynamictagname.c4
-rw-r--r--libebl/eblobjnote.c2
-rw-r--r--libebl/eblopenbackend.c9
-rw-r--r--libelf/ChangeLog60
-rw-r--r--libelf/Makefile.am6
-rw-r--r--libelf/elf.h242
-rw-r--r--libelf/elf32_updatenull.c2
-rw-r--r--libelf/elf_begin.c69
-rw-r--r--libelf/elf_cntl.c2
-rw-r--r--libelf/elf_error.c7
-rw-r--r--libelf/elf_getdata.c5
-rw-r--r--libelf/elf_getdata_rawchunk.c3
-rw-r--r--libelf/elf_getshdrstrndx.c20
-rw-r--r--libelf/gelf_xlate.c2
-rw-r--r--libelf/libelfP.h7
-rw-r--r--po/ChangeLog12
-rw-r--r--po/de.po1456
-rw-r--r--po/es.po1511
-rw-r--r--po/fr.po2
-rw-r--r--po/it.po2
-rw-r--r--po/ja.po1492
-rw-r--r--po/nl.po2
-rw-r--r--po/pl.po1542
-rw-r--r--po/ru.po2
-rw-r--r--po/uk.po1544
-rw-r--r--po/zh_CN.po2
-rw-r--r--src/ChangeLog534
-rw-r--r--src/addr2line.c3
-rw-r--r--src/ar.c66
-rw-r--r--src/elfcompress.c2
-rw-r--r--src/elflint.c16
-rw-r--r--src/objdump.c2
-rw-r--r--src/readelf.c3956
-rw-r--r--src/stack.c35
-rw-r--r--src/strings.c2
-rw-r--r--src/unstrip.c3
-rw-r--r--tests/ChangeLog486
-rw-r--r--tests/Makefile.am104
-rw-r--r--tests/addrx_constx-4.dwo.bz2bin0 -> 809 bytes
-rw-r--r--tests/addrx_constx-5.dwo.bz2bin0 -> 824 bytes
-rw-r--r--tests/all-dwarf-ranges.c90
-rw-r--r--tests/allfcts.c5
-rw-r--r--tests/attr-integrate-skel.c109
-rw-r--r--tests/backtrace-child.c2
-rw-r--r--tests/backtrace-dwarf.c4
-rw-r--r--tests/backtrace-subr.sh40
-rw-r--r--tests/backtrace.c2
-rw-r--r--tests/dwarf-die-addr-die.c186
-rw-r--r--tests/dwarfcfi.c175
-rw-r--r--tests/elfstrmerge.c7
-rw-r--r--tests/get-units-invalid.c121
-rw-r--r--tests/get-units-split.c101
-rw-r--r--tests/hello_riscv64.ko.bz2bin0 -> 1166 bytes
-rw-r--r--tests/low_high_pc.c28
-rw-r--r--tests/md5-sha1-test.c93
-rw-r--r--tests/msg_tst.c1
-rw-r--r--tests/next-files.c93
-rw-r--r--tests/next-lines.c144
-rw-r--r--tests/next_cfi.c131
-rwxr-xr-xtests/run-addrcfi.sh2
-rwxr-xr-xtests/run-aggregate-size.sh10
-rwxr-xr-xtests/run-all-dwarf-ranges.sh129
-rwxr-xr-xtests/run-allfcts-multi.sh16
-rwxr-xr-xtests/run-ar.sh40
-rwxr-xr-xtests/run-attr-integrate-skel.sh52
-rwxr-xr-xtests/run-dwarf-die-addr-die.sh52
-rwxr-xr-xtests/run-dwarf-ranges.sh101
-rwxr-xr-xtests/run-dwarfcfi.sh116
-rwxr-xr-xtests/run-exprlocs-self.sh22
-rwxr-xr-xtests/run-exprlocs.sh180
-rwxr-xr-xtests/run-get-files.sh66
-rwxr-xr-xtests/run-get-units-invalid.sh44
-rwxr-xr-xtests/run-get-units-split.sh66
-rwxr-xr-xtests/run-low_high_pc.sh15
-rwxr-xr-xtests/run-next-cfi-self.sh21
-rwxr-xr-xtests/run-next-cfi.sh108
-rwxr-xr-xtests/run-next-files.sh165
-rwxr-xr-xtests/run-next-lines.sh116
-rwxr-xr-xtests/run-peel-type.sh1
-rwxr-xr-xtests/run-readelf-addr.sh143
-rwxr-xr-xtests/run-readelf-const-values.sh230
-rwxr-xr-xtests/run-readelf-dwz-multi.sh124
-rwxr-xr-xtests/run-readelf-info-plus.sh31
-rwxr-xr-xtests/run-readelf-line.sh946
-rwxr-xr-xtests/run-readelf-loc.sh1093
-rwxr-xr-xtests/run-readelf-ranges.sh236
-rwxr-xr-xtests/run-readelf-str.sh211
-rwxr-xr-xtests/run-readelf-twofiles.sh43
-rwxr-xr-xtests/run-readelf-types.sh122
-rwxr-xr-xtests/run-readelf-variant.sh89
-rwxr-xr-xtests/run-readelf-zdebug-rel.sh57
-rwxr-xr-xtests/run-readelf-zdebug.sh59
-rwxr-xr-xtests/run-reloc-bpf.sh33
-rwxr-xr-xtests/run-strip-nothing.sh2
-rwxr-xr-xtests/run-unit-info.sh81
-rwxr-xr-xtests/run-varlocs-self.sh22
-rwxr-xr-xtests/run-varlocs.sh476
-rw-r--r--tests/show-abbrev.c8
-rw-r--r--tests/splitdwarf4-not-split4.dwo.bz2bin0 -> 931 bytes
-rw-r--r--tests/test-subr.sh43
-rw-r--r--tests/testfile-ada-variant.bz2bin0 -> 1305 bytes
-rwxr-xr-xtests/testfile-addrx_constx-4.bz2bin0 -> 2851 bytes
-rwxr-xr-xtests/testfile-addrx_constx-5.bz2bin0 -> 2847 bytes
-rw-r--r--tests/testfile-bpf-reloc.expect.bz2bin0 -> 300 bytes
-rw-r--r--tests/testfile-bpf-reloc.o.bz2bin0 -> 933 bytes
-rwxr-xr-xtests/testfile-const-values.debug.bz2bin0 -> 1540 bytes
-rwxr-xr-xtests/testfile-dwarf-4.bz2bin0 -> 4304 bytes
-rw-r--r--tests/testfile-dwarf-45.source89
-rwxr-xr-xtests/testfile-dwarf-5.bz2bin0 -> 4318 bytes
-rw-r--r--tests/testfile-hello4.dwo.bz2bin0 -> 1453 bytes
-rw-r--r--tests/testfile-hello5.dwo.bz2bin0 -> 1520 bytes
-rw-r--r--tests/testfile-only-debug-line.bz2bin0 -> 2514 bytes
-rwxr-xr-xtests/testfile-ppc64-min-instr.bz2bin0 -> 3106 bytes
-rw-r--r--tests/testfile-ranges-hello.dwo.bz2bin0 -> 948 bytes
-rw-r--r--tests/testfile-ranges-hello5.dwo.bz2bin0 -> 1256 bytes
-rw-r--r--tests/testfile-ranges-world.dwo.bz2bin0 -> 1176 bytes
-rw-r--r--tests/testfile-ranges-world5.dwo.bz2bin0 -> 1514 bytes
-rw-r--r--tests/testfile-sizes3.o.bz2bin1147 -> 1208 bytes
-rw-r--r--tests/testfile-sizes4.o.bz2bin0 -> 387 bytes
-rw-r--r--tests/testfile-sizes4.s77
-rwxr-xr-xtests/testfile-splitdwarf-4.bz2bin0 -> 3591 bytes
-rwxr-xr-xtests/testfile-splitdwarf-5.bz2bin0 -> 3611 bytes
-rwxr-xr-xtests/testfile-splitdwarf4-not-split4.debug.bz2bin0 -> 2230 bytes
-rwxr-xr-xtests/testfile-stridex.bz2bin0 -> 4009 bytes
-rw-r--r--tests/testfile-world4.dwo.bz2bin0 -> 1444 bytes
-rw-r--r--tests/testfile-world5.dwo.bz2bin0 -> 1498 bytes
-rw-r--r--tests/testfile11-debugframe.bz2bin0 -> 2202 bytes
-rw-r--r--tests/testfile12-debugframe.bz2bin0 -> 1385 bytes
-rwxr-xr-xtests/testfileaarch64-debugframe.bz2bin0 -> 1820 bytes
-rwxr-xr-xtests/testfilearm-debugframe.bz2bin0 -> 1987 bytes
-rwxr-xr-xtests/testfileppc32-debugframe.bz2bin0 -> 1526 bytes
-rwxr-xr-xtests/testfileppc64-debugframe.bz2bin0 -> 1555 bytes
-rwxr-xr-xtests/testfileranges4.debug.bz2bin0 -> 3038 bytes
-rwxr-xr-xtests/testfileranges5.debug.bz2bin0 -> 3009 bytes
-rwxr-xr-xtests/testfilesplitranges4.debug.bz2bin0 -> 2154 bytes
-rwxr-xr-xtests/testfilesplitranges5.debug.bz2bin0 -> 2229 bytes
-rw-r--r--tests/unit-info.c323
-rw-r--r--tests/varlocs.c426
266 files changed, 22836 insertions, 6014 deletions
diff --git a/.gitignore b/.gitignore
index 43a8d6ee..e8201dcc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -135,7 +135,6 @@ Makefile.in
/tests/hash
/tests/line2addr
/tests/low_high_pc
-/tests/md5-sha1-test
/tests/msg_tst
/tests/newdata
/tests/newfile
diff --git a/ChangeLog b/ChangeLog
index 9253c0a3..696f31e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,48 @@
+2018-06-11 Mark Wielaard <mark@klomp.org>
+
+ * configure.ac: Set version to 0.172.
+ * NEWS: Mention bug fixes.
+
+2018-06-01 Mark Wielaard <mark@klomp.org>
+
+ * configure.ac: Set version to 0.171.
+ * NEWS: Mention DWARF5, split-dwarf and GNU DebugFission support.
+
+2018-03-17 Mark Wielaard <mark@klomp.org>
+
+ * configure.ac (CHECK_FUNCS): Check for process_vm_readv.
+
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * configure.ac (HAVE_FALLTHROUGH): New define.
+
+2017-10-16 Mark Wielaard <mark@klomp.org>
+
+ * .gitignore: Remove tests/md5-sha1-test.
+
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * configure.ac: Check if the compiler supports
+ __attribute__((gcc_struct)).
+
+2017-09-19 Mark Wielaard <mark@klomp.org>
+
+ * README: Add basic build instructions.
+
+2017-05-03 Ulf Hermann <ulf.hermann@qt.io>
+
+ * configure.ac: Test if symbol versioning is supported.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * configure.ac: Check if the compiler supports
+ __attribute__((visibility(...))).
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * configure.ac: Check if -fPIC, -fPIE, -Wl,-z,defs,
+ and -Wl,-z,relro are supported by the compiler.
+
2017-08-02 Mark Wielaard <mark@klomp.org>
* configure.ac: Set version to 0.170.
diff --git a/NEWS b/NEWS
index 72e5118d..065e995c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,68 @@
+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,
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 a66e923e..3fa0f198 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,76 @@
+2018-06-16 Yonghong Song <yhs@fb.com>
+
+ * 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 <mark@klomp.org>
+
+ * bpf_reloc.def: Remove MAP_FD.
+
+2018-06-13 Andreas Schwab <schwab@suse.de>
+
+ * 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 <schwab@suse.de>
+
+ * riscv_init.c (riscv_init): Hook check_special_symbol.
+ * riscv_symbol.c (riscv_check_special_symbol): New function.
+
+2018-04-19 Andreas Schwab <schwab@suse.de>
+
+ * 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 <mark@klomp.org>
+
+ * aarch64_cfi.c (aarch64_abi_cfi): Add rule for restoring SP from
+ CFA address.
+
+2018-02-15 Mark Wielaard <mark@klomp.org>
+
+ * ppc_initreg.c: Include ptrace.h before system.h and sys/user.h.
+
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * 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 <mark@klomp.org>
+
+ * Makefile.am (m68k_corenote_no_Wpacked_not_aligned): New variable.
+
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * linux-core-note.c: Use attribute_packed.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use dso_LDFLAGS.
+
2017-07-27 Mark Wielaard <mark@klomp.org>
* sparc_reloc.def: GOTDATA_OP_HIX22, GOTDATA_OP_LOX10 and
diff --git a/backends/Makefile.am b/backends/Makefile.am
index 03b9d201..dcf65394 100644
--- a/backends/Makefile.am
+++ b/backends/Makefile.am
@@ -33,12 +33,12 @@ 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)
lib_LIBRARIES = libebl_static_pic.a
@@ -68,7 +68,7 @@ static_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \
ppc64_resolve_sym.c ppc64_unwind.c \
s390_init.c s390_symbol.c s390_regs.c s390_retval.c \
s390_corenote.c s390x_corenote.c s390_cfi.c s390_initreg.c \
- s390_unwind.c bpf_init.c bpf_regs.c
+ s390_unwind.c bpf_init.c bpf_regs.c bpf_symbol.c
libebl_static_pic_a_SOURCES = $(static_SRCS)
am_libebl_static_pic_a_OBJECTS = $(static_SRCS:.c=.os)
@@ -145,20 +145,31 @@ m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.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
+# 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
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
+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) $(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),--no-undefined \
- -Wl,-z,defs,-z,relro -Wl,--as-needed $(libelf) $(libdw) $(libeu)
+ -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_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/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_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/bpf_init.c b/backends/bpf_init.c
index 8ea1bc1a..a046e069 100644
--- a/backends/bpf_init.c
+++ b/backends/bpf_init.c
@@ -53,6 +53,7 @@ bpf_init (Elf *elf __attribute__ ((unused)),
bpf_init_reloc (eh);
HOOK (eh, register_info);
HOOK (eh, disasm);
+ HOOK (eh, reloc_simple_type);
return MODVERSION;
}
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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include <elf.h>
+#include <stddef.h>
+#include <string.h>
+
+#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_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/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_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_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/ppc_initreg.c b/backends/ppc_initreg.c
index 69d623b9..3e4432f6 100644
--- a/backends/ppc_initreg.c
+++ b/backends/ppc_initreg.c
@@ -30,13 +30,14 @@
# include <config.h>
#endif
-#include "system.h"
#include <stdlib.h>
#if defined(__powerpc__) && defined(__linux__)
-# include <sys/user.h>
# include <sys/ptrace.h>
+# include <sys/user.h>
#endif
+#include "system.h"
+
#define BACKEND ppc_
#include "libebl_CPU.h"
diff --git a/backends/ppc_regs.c b/backends/ppc_regs.c
index c2d50118..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';
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/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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <dwarf.h>
+
+#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_init.c b/backends/riscv_init.c
new file mode 100644
index 00000000..5588a6b7
--- /dev/null
+++ b/backends/riscv_init.c
@@ -0,0 +1,62 @@
+/* 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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#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);
+
+ return MODVERSION;
+}
diff --git a/backends/riscv_regs.c b/backends/riscv_regs.c
new file mode 100644
index 00000000..7b577ca0
--- /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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#include <dwarf.h>
+
+#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[1] = 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 <http://www.gnu.org/licenses/>. */
+
+/* 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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <assert.h>
+#include <elf.h>
+#include <stddef.h>
+#include <string.h>
+
+#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_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_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_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/config/ChangeLog b/config/ChangeLog
index 02cf76f9..0e9cc28c 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,28 @@
+2018-06-11 Mark Wielaard <mark@klomp.org>
+
+ * elfutils.spec.in: Update for 0.172.
+
+2018-06-01 Mark Wielaard <mark@klomp.org>
+
+ * elfutils.spec.in: Update for 0.171.
+
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * eu.am (IMPLICIT_FALLTHROUGH_WARNING): Set to 5.
+
+2017-11-02 Mark Wielaard <mark@klomp.org>
+
+ * elfutils.spec.in: Config files under /usr/lib/sysctl.d (_sysctldir)
+ aren't %config.
+
+2017-10-24 Mark Wielaard <mark@klomp.org>
+
+ * eu.am (AM_CFLAGS): Handle -Wno-packed-not-aligned.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * eu.am: Use fpic_CFLAGS.
+
2016-08-02 Mark Wielaard <mark@klomp.org>
* elfutils.spec.in: Update for 0.170.
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index 439fcb73..b64cc287 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -224,10 +224,46 @@ 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
-* Wed Aug 2 2017 Mark Wielaard <mark@gmail.com> 0.170-1
+* Fri Jun 29 2018 Mark Wielaard,,, <mark@klomp.org> 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 <mark@klomp.org> 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 <mark@klomp.org> 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 <mark@klomp.org> 0.170-1
- libdw: Added new DWARF5 attribute, tag, character encoding,
language code, calling convention, defaulted member function
and macro constants to dwarf.h.
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/configure.ac b/configure.ac
index 0ca9ae24..d6108cde 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-2017 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 <http://www.gnu.org/licenses/>.
-AC_INIT([elfutils],[0.170],[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],
@@ -47,7 +47,7 @@ fi
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_FILES([config/Makefile])
-AC_COPYRIGHT([Copyright (C) 1996-2017 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.
@@ -133,13 +133,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 <stdlib.h>
#undef __thread
@@ -295,6 +376,8 @@ AC_CHECK_DECLS([mempcpy],[],[],
[#define _GNU_SOURCE
#include <string.h>])
+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")
@@ -311,6 +394,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.])
@@ -366,6 +464,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(
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 1f162286..fbe34a82 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,32 @@
+2018-06-01 Mark Wielaard <mark@klomp.org>
+
+ * printversion.c (print_version): Update copyright year.
+
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * eu-config.h (FALLTHROUGH): New macro.
+
+2017-10-16 Mark Wielaard <mark@klomp.org>
+
+ * 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 <ulf.hermann@qt.io>
+
+ * eu-config.h: Define attribute_packed to either
+ __attribute__((packed)) or __attribute__((packed, gcc_struct)).
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * eu-config.h: Define attribute_hidden to be empty if the compiler
+ doesn't support it.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use fpic_CFLAGS.
+
2017-07-18 Mark Wielaard <mark@klomp.org>
* bpf.h: New file.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index ada2030d..36d21a07 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -28,17 +28,17 @@
## not, see <http://www.gnu.org/licenses/>.
##
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 bpf.h
+ eu-config.h color.h printversion.h bpf.h
EXTRA_DIST = dynamicsizehash.c
if !GPROF
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 <drepper@redhat.com>, 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 <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-#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 <drepper@redhat.com>, 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 <http://www.gnu.org/licenses/>. */
-
-#ifndef _MD5_H
-#define _MD5_H 1
-
-#include <limits.h>
-#include <stdint.h>
-#include <stdio.h>
-
-#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 263c1060..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, 2017 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\
-"), "2017", 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 <drepper@redhat.com>, 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 <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-#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 <drepper@redhat.com>, 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 <http://www.gnu.org/licenses/>. */
-
-#ifndef _SHA1_H
-#define _SHA1_H 1
-
-#include <limits.h>
-#include <stdint.h>
-#include <stdio.h>
-
-#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/libasm/ChangeLog b/libasm/ChangeLog
index 262d2a92..fffcced0 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,7 @@
+2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use dso_LDFLAGS.
+
2017-02-17 Ulf Hermann <ulf.hermann@qt.io>
* Makefile.am: Add libasm_so_DEPS to specify external libraries
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
index 0e101504..fcc7ffc9 100644
--- a/libasm/Makefile.am
+++ b/libasm/Makefile.am
@@ -65,8 +65,8 @@ endif
libasm_so_LIBS = libasm_pic.a
libasm_so_SOURCES =
libasm.so$(EXEEXT): $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
- $(AM_V_CCLD)$(LINK) -shared -o $@ \
- -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro \
+ $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
+ -Wl,--soname,$@.$(VERSION) \
-Wl,--version-script,$<,--no-undefined \
-Wl,--whole-archive $(libasm_so_LIBS) -Wl,--no-whole-archive \
$(libasm_so_LDLIBS)
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index 28b220fc..86d29478 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,3 +1,16 @@
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * i386_disasm.c (i386_disasm): Use FALLTHOUGH macro instead of
+ comment.
+
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * memory-access.h: Use attribute_packed.
+
+2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use fpic_CFLAGS.
+
2017-07-18 Mark Wielaard <mark@klomp.org>
* Makefile.am: Don't check HAVE_LINUX_BPF_H, just define libcpu_bpf.
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
index d16ba69b..f0a1cb83 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$(<F:lex.l=)
LEX_OUTPUT_ROOT = lex.$(<F:lex.l=)
AM_YFLAGS = -p$(<F:parse.y=)
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/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 6533eb50..da7ed9d0 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,727 @@
+2018-06-28 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_next_cfi.c (dwarf_next_cfi): Check whether length is zero.
+
+2018-06-27 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_begin_elf.c (check_section): Allow a single .debug_frame
+ section.
+
+2018-06-26 Mark Wielaard <mark@klomp.org>
+
+ * libdw.h (dwarf_getscn_info): Remove.
+ * libdw.map (ELFUTILS_0.122): Remove dwarf_getscn_info.
+
+2018-06-25 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_nextcu.c (__libdw_next_unit): Set next_off to -1 when it would
+ wrap around.
+
+2018-06-18 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_peel_type.c (dwarf_peel_type): Limit modifier chain to 64.
+
+2018-06-18 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_aggregate_size.c (aggregate_size): Check die is not NULL.
+
+2018-06-17 Luiz Angelo Daros de Luca <luizluca@gmail.com>
+
+ * dwarf_getsrclines.c (read_srclines): Intialize filelist early.
+
+2018-06-15 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * memory-access.h (read_3ubyte_unaligned_inc): New define.
+
+2018-06-12 Mark Wielaard <mark@klomp.org>
+
+ * libdw.h (__libdw_dieabbrev): Set die->abbrev to DWARF_END_ABBREV
+ on failure.
+
+2018-06-10 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_getabbrev.c (dwarf_getabbrev): Check die and offset.
+
+2018-06-08 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_get_units.c (dwarf_get_units): Handle existing error, no
+ dwarf.
+
+2018-06-08 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_getsrclines.c (read_srclines): Sanity check ndirs and nfiles.
+
+2018-06-08 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * libdwP.h (__libdw_dieabbrev): Check DIE addr falls in cu.
+
+2018-06-06 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_getlocation_die.c (dwarf_getlocation_die): Check offset
+ falls inside cu data.
+
+2018-06-05 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_getsrclines.c (read_srclines): Explicitly set diridx to -1
+ in case dwarf_formudata fails.
+
+2018-06-05 Mark Wielaard <mark@klomp.org>
+
+ * dwarf_getaranges (dwarf_getaranges): Free new_arange if
+ __libdw_findcu fails.
+
+2018-06-05 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_getalt.c (find_debug_altlink): id_path array should be 2
+ larger to contain MAX_BUILD_ID_BYTES.
+
+2018-05-31 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_dieoffset.c: Check die->cu != NULL. Return -1, not ~0ul
+ on failure.
+
+2018-05-29 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_getlocation_attr.c (__libdw_cu_addr_base): Cast offset to
+ uintptr_t before returning as pointer.
+
+2018-05-22 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_ranges.c (dwarf_ranges): Check for NULL cu.
+ * libdw_findcu.c (__libdw_intern_next_unit): Initialize ranges_base.
+
+2018-05-18 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * libdwP.h (__libdw_find_split_unit): Mark as internal_function.
+
+2018-05-15 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_begin_elf.c (check_section): Also recognize .dwo section
+ name variants.
+
+2018-05-11 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * libdw_findcu.c (__libdw_intern_next_unit): Initialize Dwarf_CU
+ addr_base and str_off_base.
+
+2018-03-23 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * libdw.h (dwarf_decl_file): Extend documentation.
+ (dwarf_linesrc): Likewise.
+ (dwarf_filesrc): Likewise.
+
+2018-03-06 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_formblock.c (dwarf_formblock): Handle DW_FORM_data16 as a
+ 16 byte block.
+
+2018-02-09 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <JPEWhacker@gmail.com>
+
+ * cfi.c (execute_cfi): Use FALLTHROUGH macro instead of comment.
+ * dwarf_frame_register.c (dwarf_frame_register): Likewise.
+
+2018-01-22 Mark Wielaard <mark@klomp.org>
+
+ * 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 <pmachata@gmail.com>
+
+ * dwarf_formsdata.c (dwarf_formsdata):
+ <DW_FORM_data1>: Cast to signed char.
+ <DW_FORM_data2,4,8>: Use read_*sbyte_unaligned instead of
+ read_*ubyte_unaligned.
+
+2017-12-26 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_offdie.c (__libdw_offdie): Check sectiondata exists.
+
+2017-05-09 Ulf Hermann <ulf.hermann@qt.io>
+ Mark Wielaard <mark@klomp.org>
+
+ * libdwP.h (__libdw_in_section): Fix check for the upper border of
+ the range.
+ (__libdw_offset_in_section): Likewise.
+
+2017-12-20 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <dima@secretsauce.net>
+
+ * dwarf_aggregate_size.c (array_size): Handle multi-dimensional
+ arrays properly.
+
+2017-11-03 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * dwarf_getlocation.c (attr_ok): Always accept DW_FORM_exprloc.
+ Update list of acceptable attribute codes based on DWARF5.
+
+2017-11-03 Mark Wielaard <mark@klomp.org>
+
+ * dwarf.h: Add DW_OP_GNU_variable_value.
+
+2017-10-03 Mark Wielaard <mark@klomp.org>
+
+ * libdw.h: Define LIBDW_CIE_ID and use it in dwarf_cfi_cie_p.
+
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * memory-access.h: Use attribute_packed.
+
+2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * libdwP.h: Use attribute_hidden.
+ * libdw_alloc.c: Likewise.
+
+2017-02-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
+
2017-07-26 Mark Wielaard <mark@klomp.org>
* dwarf.h: Add DW_MACRO_* and compat defines for DW_MACRO_GNU_*.
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index b3e781d8..166e37cf 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, 2016 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
@@ -90,7 +90,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_default_lower_bound.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
# Minimal library with symbols needed by those libebl backends that we
# ship statically. This is so that e.g. strip doesn't end up bringing
@@ -105,7 +108,11 @@ libdw_static_pic_a_SOURCES = libdw_form.c dwarf_child.c dwarf_attr.c \
dwarf_aggregate_size.c dwarf_siblingof.c dwarf_formsdata.c \
dwarf_srclang.c dwarf_formflag.c dwarf_diecu.c \
dwarf_bytesize.c dwarf_bitsize.c dwarf_peel_type.c \
- dwarf_default_lower_bound.c
+ dwarf_default_lower_bound.c libdw_find_split_unit.c \
+ dwarf_getalt.c dwarf_haschildren.c \
+ dwarf_begin.c dwarf_begin_elf.c dwarf_end.c frame-cache.c \
+ dwarf_get_units.c dwarf_formstring.c \
+ ../libdwelf/dwelf_dwarf_gnu_debugaltlink.c
if MAINTAINER_MODE
BUILT_SOURCES = $(srcdir)/known-dwarf.h
@@ -129,8 +136,8 @@ libdw_so_SOURCES =
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,-z,relro \
+ $(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
+ -Wl,--soname,$@.$(VERSION) \
-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
-Wl,--version-script,$<,--no-undefined \
-Wl,--whole-archive $(libdw_so_LIBS) -Wl,--no-whole-archive \
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 902d2617..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, 2017 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
{
@@ -325,8 +339,17 @@ 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
};
@@ -368,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. */
@@ -533,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,
@@ -546,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. */
};
@@ -737,6 +799,17 @@ enum
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
@@ -813,6 +886,45 @@ enum
#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_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
+ };
+
+
/* DWARF call frame instruction encodings. */
enum
{
diff --git a/libdw/dwarf_aggregate_size.c b/libdw/dwarf_aggregate_size.c
index 838468dd..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;
@@ -134,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. */
@@ -198,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 afa15cef..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 <drepper@redhat.com>, 2002.
This file is free software; you can redistribute it and/or modify
it under the terms of either
@@ -43,24 +42,30 @@
#include <fcntl.h>
#include <endian.h>
+#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]))
@@ -113,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. */
@@ -139,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;
}
}
@@ -170,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 (<MAXINT>) = 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)
@@ -177,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);
@@ -189,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));
@@ -201,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;
@@ -210,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;
}
@@ -325,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 <drepper@redhat.com>, 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 <http://www.gnu.org/licenses/>. */
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+#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_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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#include <dwarf.h>
+#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 <drepper@redhat.com>, 2002.
@@ -35,6 +35,7 @@
#include <stdlib.h>
#include <assert.h>
#include <string.h>
+#include <unistd.h>
#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 939ec047..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 <drepper@redhat.com>, 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,11 +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_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 <drepper@redhat.com>, 2003.
This file is free software; you can redistribute it and/or modify
it under the terms of either
@@ -36,20 +35,112 @@
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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 2003.
@@ -34,15 +34,26 @@
#include <dwarf.h>
#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 <http://www.gnu.org/licenses/>. */
+
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#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..988d12c2 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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 <inttypes.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+
+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..bff9c860 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 <drepper@redhat.com>, 2000.
@@ -195,16 +195,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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 db6582b6..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 <drepper@redhat.com>, 2002.
This file is free software; you can redistribute it and/or modify
it under the terms of either
@@ -192,6 +191,8 @@ 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);
@@ -205,10 +206,11 @@ get_table_for_offset (Dwarf *dbg, Dwarf_Word macoff,
[DW_MACRO_start_file - 1] = p_udata_udata,
[DW_MACRO_end_file - 1] = p_none,
[DW_MACRO_import - 1] = p_secoffset,
- /* When adding support for DWARF5 supplementary object files and
- indirect string tables also add support for DW_MACRO_define_sup,
- DW_MACRO_undef_sup, DW_MACRO_import_sup, DW_MACRO_define_strx
- and DW_MACRO_undef_strx. */
+ [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)
@@ -357,11 +359,18 @@ 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 pretend it is the same version as the actual table.
- Version 4 for the old GNU extension, version 5 for DWARF5. */
+ 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,
+ .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,
};
@@ -384,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))
{
@@ -561,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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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..90053b13 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 <drepper@redhat.com>, 2003.
@@ -45,32 +45,20 @@ 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)
@@ -78,6 +66,12 @@ dwarf_hasattr (Dwarf_Die *die, unsigned int search_name)
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 <drepper@redhat.com>, 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_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 <drepper@redhat.com>, 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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <libdwP.h>
+
+
+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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 6bbfd424..59fc6f15 100644
--- a/libdw/dwarf_peel_type.c
+++ b/libdw/dwarf_peel_type.c
@@ -46,14 +46,19 @@ 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
- || tag == DW_TAG_immutable_type
- || tag == DW_TAG_packed_type
- || tag == DW_TAG_shared_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) (result, DW_AT_type,
@@ -67,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 <unistd.h>
+
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 63a38ff9..e20961be 100644
--- a/libdw/libdw.h
+++ b/libdw/libdw.h
@@ -1,5 +1,5 @@
/* Interfaces for libdw.
- Copyright (C) 2002-2010, 2013, 2014, 2016 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
@@ -211,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;
@@ -248,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
@@ -256,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,
@@ -283,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;
@@ -344,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
@@ -561,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,
@@ -640,11 +688,15 @@ 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);
@@ -661,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,
@@ -816,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 14307056..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;
@@ -344,3 +343,16 @@ ELFUTILS_0.170 {
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 6ad322c1..eebb7d12 100644
--- a/libdw/libdwP.h
+++ b/libdw/libdwP.h
@@ -1,7 +1,6 @@
-/* Internal definitions for libdwarf.
- Copyright (C) 2002-2011, 2013-2016 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 <drepper@redhat.com>, 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,11 +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,
};
@@ -142,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;
@@ -154,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
@@ -174,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;
@@ -187,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
@@ -212,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"
@@ -293,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;
@@ -313,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
@@ -328,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. */
@@ -399,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"
@@ -434,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)
@@ -444,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)
@@ -467,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;
@@ -484,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,
@@ -495,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. */
@@ -626,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;
@@ -643,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;
@@ -714,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.
@@ -728,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. */
@@ -757,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)
@@ -777,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..d6af23a2 100644
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
@@ -70,7 +70,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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "libdwP.h"
+#include "libelfP.h"
+
+#include <limits.h>
+#include <search.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+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 <drepper@redhat.com>, 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 <drepper@redhat.com>, 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 <byteswap.h>
+#include <endian.h>
#include <limits.h>
#include <stdint.h>
@@ -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 2008c6a1..acb4236a 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,79 @@
+2018-06-04 Mark Wielaard <mark@klomp.org>
+
+ * libdwflP.h (__libdwfl_addrsym): Remove function declaration.
+ * dwfl_module_addrsym.c (__libdwfl_addrsym): Make a static function.
+
+2018-05-27 Mark Wielaard <mark@klomp.org>
+
+ * relocate.c (__libdwfl_relocate): Always call relocate_section with
+ partial true.
+
+2018-05-17 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * linux-pid-attach.c: Include sys/wait.h after sys/ptrace.h.
+
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * argp-std.c (parse_opt): For -k call argp_failure not failure to
+ keep dwfl around.
+
2017-07-26 Yunlian Jiang <yunlian@google.com>
* argp-std.c (failure): Move to file scope.
diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c
index 498ace21..8ee91587 100644
--- a/libdwfl/argp-std.c
+++ b/libdwfl/argp-std.c
@@ -238,7 +238,7 @@ parse_opt (int key, char *arg, struct argp_state *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"), state);
+ argp_failure (state, 0, result, _("cannot find kernel modules"));
opt->dwfl = dwfl;
}
else
diff --git a/libdwfl/cu.c b/libdwfl/cu.c
index 7aa23b50..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
@@ -155,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
@@ -198,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/dwfl_build_id_find_elf.c b/libdwfl/dwfl_build_id_find_elf.c
index ee0c1646..cc6c3f62 100644
--- a/libdwfl/dwfl_build_id_find_elf.c
+++ b/libdwfl/dwfl_build_id_find_elf.c
@@ -99,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_module.c b/libdwfl/dwfl_module.c
index 510bd691..e7dfdace 100644
--- a/libdwfl/dwfl_module.c
+++ b/libdwfl/dwfl_module.c
@@ -120,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_addrsym.c b/libdwfl/dwfl_module_addrsym.c
index db302e63..2336b602 100644
--- a/libdwfl/dwfl_module_addrsym.c
+++ b/libdwfl/dwfl_module_addrsym.c
@@ -235,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_getdwarf.c b/libdwfl/dwfl_module_getdwarf.c
index 9775aced..af6838a6 100644
--- a/libdwfl/dwfl_module_getdwarf.c
+++ b/libdwfl/dwfl_module_getdwarf.c
@@ -1335,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)
{
@@ -1349,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_report_elf.c b/libdwfl/dwfl_report_elf.c
index 6950a37b..3fc9384a 100644
--- a/libdwfl/dwfl_report_elf.c
+++ b/libdwfl/dwfl_report_elf.c
@@ -174,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/find-debuginfo.c b/libdwfl/find-debuginfo.c
index 6d5a42a6..9267788d 100644
--- a/libdwfl/find-debuginfo.c
+++ b/libdwfl/find-debuginfo.c
@@ -389,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 4dc9c432..8da691ee 100644
--- a/libdwfl/frame_unwind.c
+++ b/libdwfl/frame_unwind.c
@@ -442,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,
@@ -632,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/libdwflP.h b/libdwfl/libdwflP.h
index 7d5f795c..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
@@ -190,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. */
@@ -401,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
@@ -411,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. */
@@ -449,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/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-pid-attach.c b/libdwfl/linux-pid-attach.c
index e6a5c419..1133db6c 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
@@ -34,8 +34,8 @@
#include "libdwflP.h"
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/uio.h>
#include <fcntl.h>
-#include <sys/wait.h>
#include <dirent.h>
#include <unistd.h>
@@ -43,6 +43,7 @@
#include <sys/ptrace.h>
#include <sys/syscall.h>
+#include <sys/wait.h>
static bool
linux_proc_pid_is_stopped (pid_t pid)
@@ -115,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)
{
@@ -253,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);
@@ -278,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);
}
@@ -379,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/offline.c b/libdwfl/offline.c
index 80c80a16..d8697cf2 100644
--- a/libdwfl/offline.c
+++ b/libdwfl/offline.c
@@ -150,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/relocate.c b/libdwfl/relocate.c
index 17682433..9afcdebe 100644
--- a/libdwfl/relocate.c
+++ b/libdwfl/relocate.c
@@ -751,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/libebl/ChangeLog b/libebl/ChangeLog
index 334bf224..aa82e3a1 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,33 @@
+2018-04-25 Mark Wielaard <mark@klomp.org>
+
+ * 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 <schwab@suse.de>
+
+ * eblopenbackend.c (machines): Add entries for RISC-V.
+
+2018-03-16 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * eblcheckreloctargettype.c (ebl_check_reloc_target_type): Accept
+ SHT_NOTE.
+
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * eblobjnote.c (ebl_object_note): Use FALLTHROUGH macro instead of
+ comment.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use fpic_CFLAGS.
+
2017-07-19 Gustavo Romero <gromero@linux.vnet.ibm.com>
* eblcorenotetypename.c: Add ppc64 HTM SPRs note as known type.
diff --git a/libebl/Makefile.am b/libebl/Makefile.am
index 6d5b07f6..ecebdd06 100644
--- a/libebl/Makefile.am
+++ b/libebl/Makefile.am
@@ -28,7 +28,7 @@
## not, see <http://www.gnu.org/licenses/>.
##
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@
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/ebldynamictagname.c b/libebl/ebldynamictagname.c
index 3aaccd0d..5622fc31 100644
--- a/libebl/ebldynamictagname.c
+++ b/libebl/ebldynamictagname.c
@@ -34,6 +34,7 @@
#include <inttypes.h>
#include <stdio.h>
#include <libeblP.h>
+#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 1728115c..e13456e3 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -142,6 +142,8 @@ static const struct
{ NULL, "elf_xtensa", "xtensa", 6, EM_XTENSA, 0, 0 },
{ aarch64_init, "elf_aarch64", "aarch64", 7, EM_AARCH64, ELFCLASS64, 0 },
{ bpf_init, "elf_bpf", "bpf", 3, EM_BPF, 0, 0 },
+ { NULL, "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS64, ELFDATA2LSB },
+ { NULL, "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS32, ELFDATA2LSB },
};
#define nmachines (sizeof (machines) / sizeof (machines[0]))
@@ -614,6 +616,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",
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index b17e1c5e..91d9b472 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,63 @@
+2018-06-19 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * elf.h: Update from glibc.
+
+2018-04-19 Andreas Schwab <schwab@suse.de>
+
+ * elf.h: Update from glibc.
+
+2018-02-16 Mark Wielaard <mark@klomp.org>
+
+ * elf.h: Update from glibc.
+
+2018-02-09 Joshua Watt <JPEWhacker@gmail.com>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <ulf.hermann@qt.io>
+
+ * gelf_xlate.c: Use attribute_packed.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * libelfP.h: Use attribute_hidden.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use fpic_CFLAGS and dso_LDFLAGS.
+
+2017-08-15 Mark Wielaard <mark@klomp.org>
+
+ * elf.h: Update from glibc. Add new powerpc note descriptors.
+
2017-07-19 Gustavo Romero <gromero@linux.vnet.ibm.com>
* elf.h: Add known type in notes segment descriptor for HTM SPRs.
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index f873ed0e..ba4e3ebf 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
@@ -105,8 +105,8 @@ endif
libelf_so_LIBS = libelf_pic.a
libelf_so_SOURCES =
libelf.so$(EXEEXT): $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
- $(AM_V_CCLD)$(LINK) -shared -o $@ \
- -Wl,--soname,$@.$(VERSION),-z,defs,-z,relro \
+ $(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)
diff --git a/libelf/elf.h b/libelf/elf.h
index fa35203d..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,8 +764,25 @@ 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_PPC_TM_SPR 0x10c /* PowerPC HW Transactional Memory SPRs */
#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
#define NT_S390_HIGH_GPRS 0x300 /* s390 upper register halves */
@@ -775,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. */
@@ -844,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 */
@@ -952,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
@@ -1171,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. */
@@ -1236,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
@@ -2533,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
@@ -3269,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. */
@@ -3678,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_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 6f850382..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;
@@ -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_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_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/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/libelfP.h b/libelf/libelfP.h
index 7ee6625a..ed216c8c 100644
--- a/libelf/libelfP.h
+++ b/libelf/libelfP.h
@@ -102,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,
@@ -442,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
@@ -578,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 465ae165..8f318aa7 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,15 @@
+2018-06-11 Mark Wielaard <mark@klomp.org>
+
+ * *.po: Update for 0.172.
+
+2018-06-01 Mark Wielaard <mark@klomp.org>
+
+ * *.po: Update for 0.171.
+
+2017-09-01 Mark Wielaard <mark@klomp.org>
+
+ * *.po: Regenerated. Replace \v with \n\n.
+
2017-08-02 Mark Wielaard <mark@klomp.org>
* *.po: Update for 0.170.
diff --git a/po/de.po b/po/de.po
index 3b3e042b..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: 2017-08-02 18:29+0200\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 <micm@fedoraproject.org>\n"
"Language-Team: German\n"
@@ -54,18 +54,18 @@ msgstr ""
"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:3296
-#: src/readelf.c:3687 src/readelf.c:8526 src/unstrip.c:2227 src/unstrip.c:2432
+#: 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:50
+#: 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:52
+#: 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"
@@ -102,167 +102,203 @@ 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:51
+#: 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:71
+#: 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:72
+#: 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 ""
-#: libdw/dwarf_error.c:98
+#: libdw/dwarf_error.c:103
#, fuzzy
msgid "unknown language code"
msgstr "unbekannter Typ"
-#: libdwfl/argp-std.c:50 src/stack.c:636 src/unstrip.c:2374
+#: 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:"
@@ -292,7 +328,7 @@ msgstr "Finde Adressen im laufenden Kernel"
msgid "Kernel with all modules"
msgstr "Kernel mit allen Modulen"
-#: libdwfl/argp-std.c:63 src/stack.c:643
+#: libdwfl/argp-std.c:63 src/stack.c:646
msgid "Search path for separate debuginfo files"
msgstr "Dateisuchpfad für separate Debug-Informationen"
@@ -371,7 +407,7 @@ msgstr ""
msgid "r_offset is bogus"
msgstr ""
-#: libdwfl/libdwflP.h:64 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"
@@ -501,7 +537,7 @@ msgstr "Kein Backend"
msgid "<unknown>"
msgstr "<Unbekannt>"
-#: libebl/ebldynamictagname.c:101
+#: libebl/ebldynamictagname.c:103
#, c-format
msgid "<unknown>: %#<PRIx64>"
msgstr "<Unbekannt>: %#<PRIx64>"
@@ -591,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:5139
+#: libelf/elf_error.c:87 src/readelf.c:6107
#, c-format
msgid "invalid encoding"
msgstr "ungültige Kodierung"
@@ -601,151 +637,156 @@ 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:7389 src/readelf.c:7900
-#: src/readelf.c:8001 src/readelf.c:8182
+#: 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"
@@ -822,22 +863,22 @@ msgstr ""
msgid "[ADDR...]"
msgstr ""
-#: src/addr2line.c:519
+#: 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:542
+#: src/addr2line.c:543
#, c-format
msgid "offset %#<PRIxMAX> lies outside section '%s'"
msgstr ""
-#: src/addr2line.c:632
+#: src/addr2line.c:633
#, c-format
msgid "cannot find symbol '%s'"
msgstr "Konnte Symbol '%s' nicht finden"
-#: src/addr2line.c:637
+#: src/addr2line.c:638
#, c-format
msgid "offset %#<PRIxMAX> lies outside contents of '%s'"
msgstr ""
@@ -1007,12 +1048,12 @@ msgstr ""
msgid "no entry %s in archive\n"
msgstr "Kein Eintrag %s in Archiv\n"
-#: src/ar.c:473 src/ar.c:918 src/ar.c:1118
+#: 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:480 src/ar.c:925 src/ar.c:1127
+#: 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"
@@ -1052,46 +1093,71 @@ msgstr "Konnte Bearbeitungszeit von %s nicht ändern"
msgid "cannot rename temporary file to %.*s"
msgstr "Konnte temporäre Datei nicht in %.*s umbenennen"
-#: src/ar.c:759 src/ar.c:1010 src/ar.c:1409 src/ranlib.c:223
+#: 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:1209
+#: src/ar.c:1213
#, c-format
msgid "position member %s not found"
msgstr ""
-#: src/ar.c:1219
+#: 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:1248 src/objdump.c:242
+#: src/ar.c:1252 src/objdump.c:242
#, c-format
msgid "cannot open %s"
msgstr "Konnte %s nicht öffnen"
-#: src/ar.c:1253
+#: src/ar.c:1257
#, c-format
msgid "cannot stat %s"
msgstr ""
-#: src/ar.c:1259
+#: src/ar.c:1263
#, c-format
msgid "%s is no regular file"
msgstr "%s ist keine reguläre Datei"
-#: src/ar.c:1272
+#: src/ar.c:1276
#, c-format
msgid "cannot get ELF descriptor for %s: %s\n"
msgstr ""
-#: src/ar.c:1292
+#: 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 ""
@@ -1390,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:78 src/readelf.c:128
+#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154
msgid "FILE..."
msgstr "DATEI..."
@@ -1421,7 +1487,7 @@ msgstr ""
msgid "Pedantic checking of ELF files compliance with gABI/psABI spec."
msgstr ""
-#: src/elflint.c:155 src/readelf.c:303
+#: src/elflint.c:155 src/readelf.c:347
#, c-format
msgid "cannot open input file"
msgstr "Kann Eingabedatei nicht öffnen"
@@ -1440,7 +1506,7 @@ msgstr "Fehler beim Schliessen des Elf-Desktriptor: %s\n"
msgid "No errors"
msgstr "Keine Fehler"
-#: src/elflint.c:220 src/readelf.c:480
+#: src/elflint.c:220 src/readelf.c:546
msgid "Missing file name.\n"
msgstr "Dateiname fehlt.\n"
@@ -1477,7 +1543,7 @@ msgstr ""
#: 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:386
@@ -3393,13 +3459,13 @@ msgstr "%s%s%s: Dateiformat nicht erkannt"
msgid "cannot create search tree"
msgstr "Kann Suchbaum nicht erstellen"
-#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:537
-#: src/readelf.c:1115 src/readelf.c:1315 src/readelf.c:1463 src/readelf.c:1664
-#: src/readelf.c:1870 src/readelf.c:2060 src/readelf.c:2238 src/readelf.c:2314
-#: src/readelf.c:2572 src/readelf.c:2648 src/readelf.c:2735 src/readelf.c:3315
-#: src/readelf.c:3365 src/readelf.c:3428 src/readelf.c:8430 src/readelf.c:9530
-#: src/readelf.c:9733 src/readelf.c:9801 src/size.c:397 src/size.c:466
-#: src/strip.c:572
+#: 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 ""
@@ -3482,7 +3548,7 @@ msgstr ""
msgid "Show information from FILEs (a.out by default)."
msgstr ""
-#: src/objdump.c:219 src/readelf.c:485
+#: src/objdump.c:219 src/readelf.c:551
msgid "No operation specified.\n"
msgstr "Keine Operation angegeben.\n"
@@ -3491,11 +3557,11 @@ msgstr "Keine Operation angegeben.\n"
msgid "while close `%s'"
msgstr ""
-#: src/objdump.c:364 src/readelf.c:1965 src/readelf.c:2157
+#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238
msgid "INVALID SYMBOL"
msgstr ""
-#: src/objdump.c:379 src/readelf.c:1999 src/readelf.c:2193
+#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274
msgid "INVALID SECTION"
msgstr ""
@@ -3546,146 +3612,166 @@ msgstr "'%s' ist kein Archiv"
msgid "error while freeing sub-ELF descriptor: %s"
msgstr ""
-#: src/readelf.c:73
+#: src/readelf.c:95
#, fuzzy
msgid "ELF input selection:"
msgstr "Eingabeauswahloptionen:"
-#: src/readelf.c:75
+#: src/readelf.c:97
msgid ""
"Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data"
msgstr ""
-#: src/readelf.c:77
+#: 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:79
+#: src/readelf.c:104
msgid "All these plus -p .strtab -p .dynstr -p .comment"
msgstr ""
-#: src/readelf.c:80
+#: src/readelf.c:105
msgid "Display the dynamic segment"
msgstr ""
-#: src/readelf.c:81
+#: src/readelf.c:106
msgid "Display the ELF file header"
msgstr ""
-#: src/readelf.c:83
+#: src/readelf.c:108
msgid "Display histogram of bucket list lengths"
msgstr ""
-#: src/readelf.c:84
+#: src/readelf.c:109
msgid "Display the program headers"
msgstr "Programm-Köpfe anzeigen"
-#: src/readelf.c:86
+#: src/readelf.c:111
msgid "Display relocations"
msgstr "Relocations anzeigen"
-#: src/readelf.c:87
+#: 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:90
+#: src/readelf.c:116
#, fuzzy
msgid "Display the symbol table sections"
msgstr "Symboltabelle anzeigen"
-#: src/readelf.c:91
+#: src/readelf.c:117
msgid "Display versioning information"
msgstr "Versionierungsinformationen anzeigen"
-#: src/readelf.c:92
+#: src/readelf.c:118
#, fuzzy
msgid "Display the ELF notes"
msgstr "Kernnotizen anzeigen"
-#: src/readelf.c:94
+#: src/readelf.c:120
#, fuzzy
msgid "Display architecture specific information, if any"
msgstr "Architekturspezifische Informationen anzeigen (falls vorhanden)"
-#: src/readelf.c:96
+#: src/readelf.c:122
msgid "Display sections for exception handling"
msgstr "Abschnitte für Ausnahmebehandlung anzeigen"
-#: src/readelf.c:98
+#: src/readelf.c:124
msgid "Additional output selection:"
msgstr ""
-#: src/readelf.c:100
+#: 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:104
+#: src/readelf.c:130
msgid "Dump the uninterpreted contents of SECTION, by number or name"
msgstr ""
-#: src/readelf.c:106
+#: src/readelf.c:132
msgid "Print string contents of sections"
msgstr ""
-#: src/readelf.c:109
+#: src/readelf.c:135
msgid "Display the symbol index of an archive"
msgstr "Symbolindex des Archivs anzeigen"
-#: src/readelf.c:111
+#: src/readelf.c:137
msgid "Output control:"
msgstr "Ausgabekontrolle:"
-#: src/readelf.c:113
+#: 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:115
+#: 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:117
+#: src/readelf.c:143
msgid "Ignored for compatibility (lines always wide)"
msgstr ""
-#: src/readelf.c:119
+#: 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:124
+#: 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:453
+#. 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:521 src/readelf.c:632
+#: 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:528 src/readelf.c:844 src/strip.c:641
+#: 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:546 src/readelf.c:1137 src/readelf.c:1339
+#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420
#, c-format
msgid "cannot get section: %s"
msgstr ""
-#: src/readelf.c:555 src/readelf.c:1144 src/readelf.c:1347 src/readelf.c:9753
+#: 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:1109
#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650
@@ -3694,320 +3780,320 @@ msgstr ""
msgid "cannot get section header: %s"
msgstr ""
-#: src/readelf.c:563
+#: src/readelf.c:632
#, fuzzy, c-format
msgid "cannot get section name"
msgstr "konnte Abschnittsdaten nicht holen: %s"
-#: src/readelf.c:572 src/readelf.c:5548 src/readelf.c:7888 src/readelf.c:7990
-#: src/readelf.c:8167
+#: 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:588
+#: src/readelf.c:657
#, fuzzy, c-format
msgid "cannot create temp file '%s'"
msgstr "neue Datei konnte nicht angelegt werden"
-#: src/readelf.c:597
+#: src/readelf.c:666
#, fuzzy, c-format
msgid "cannot write section data"
msgstr "konnte Abschnittsdaten nicht holen: %s"
-#: src/readelf.c:603 src/readelf.c:620 src/readelf.c:649
+#: 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:610
+#: 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:644
+#: src/readelf.c:713
#, c-format
msgid "'%s' is not an archive, cannot print archive index"
msgstr ""
-#: src/readelf.c:743
-#, fuzzy, c-format
-msgid "No such section '%s' in '%s'"
-msgstr "konnte Abschnittsdaten nicht holen: %s"
-
-#: src/readelf.c:770
+#: src/readelf.c:817
#, c-format
msgid "cannot stat input file"
msgstr ""
-#: src/readelf.c:772
+#: src/readelf.c:819
#, c-format
msgid "input file is empty"
msgstr ""
-#: src/readelf.c:774
+#: src/readelf.c:821
#, c-format
msgid "failed reading '%s': %s"
msgstr "Konnte '%s' nicht lesen: %s"
-#: src/readelf.c:829
+#: 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:837
+#: src/readelf.c:918
#, c-format
msgid "cannot create EBL handle"
msgstr ""
-#: src/readelf.c:850
+#: 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:940
+#: src/readelf.c:1021
msgid "NONE (None)"
msgstr ""
-#: src/readelf.c:941
+#: src/readelf.c:1022
msgid "REL (Relocatable file)"
msgstr ""
-#: src/readelf.c:942
+#: src/readelf.c:1023
msgid "EXEC (Executable file)"
msgstr ""
-#: src/readelf.c:943
+#: src/readelf.c:1024
msgid "DYN (Shared object file)"
msgstr ""
-#: src/readelf.c:944
+#: src/readelf.c:1025
msgid "CORE (Core file)"
msgstr ""
-#: src/readelf.c:949
+#: src/readelf.c:1030
#, c-format
msgid "OS Specific: (%x)\n"
msgstr ""
#. && e_type <= ET_HIPROC always true
-#: src/readelf.c:951
+#: src/readelf.c:1032
#, c-format
msgid "Processor Specific: (%x)\n"
msgstr ""
-#: src/readelf.c:961
+#: src/readelf.c:1042
msgid ""
"ELF Header:\n"
" Magic: "
msgstr ""
-#: src/readelf.c:965
+#: src/readelf.c:1046
#, c-format
msgid ""
"\n"
" Class: %s\n"
msgstr ""
-#: src/readelf.c:970
+#: src/readelf.c:1051
#, fuzzy, c-format
msgid " Data: %s\n"
msgstr " Daten: %s\n"
-#: src/readelf.c:976
+#: src/readelf.c:1057
#, c-format
msgid " Ident Version: %hhd %s\n"
msgstr ""
-#: src/readelf.c:978 src/readelf.c:995
+#: src/readelf.c:1059 src/readelf.c:1076
msgid "(current)"
msgstr "(aktuell)"
-#: src/readelf.c:982
+#: src/readelf.c:1063
#, c-format
msgid " OS/ABI: %s\n"
msgstr ""
-#: src/readelf.c:985
+#: src/readelf.c:1066
#, c-format
msgid " ABI Version: %hhd\n"
msgstr ""
-#: src/readelf.c:988
+#: src/readelf.c:1069
msgid " Type: "
msgstr " Typ: "
-#: src/readelf.c:991
+#: src/readelf.c:1072
#, c-format
msgid " Machine: %s\n"
msgstr ""
-#: src/readelf.c:993
+#: src/readelf.c:1074
#, c-format
msgid " Version: %d %s\n"
msgstr ""
-#: src/readelf.c:997
+#: src/readelf.c:1078
#, c-format
msgid " Entry point address: %#<PRIx64>\n"
msgstr ""
-#: src/readelf.c:1000
+#: src/readelf.c:1081
#, c-format
msgid " Start of program headers: %<PRId64> %s\n"
msgstr ""
-#: src/readelf.c:1001 src/readelf.c:1004
+#: src/readelf.c:1082 src/readelf.c:1085
msgid "(bytes into file)"
msgstr ""
-#: src/readelf.c:1003
+#: src/readelf.c:1084
#, c-format
msgid " Start of section headers: %<PRId64> %s\n"
msgstr ""
-#: src/readelf.c:1006
+#: src/readelf.c:1087
#, c-format
msgid " Flags: %s\n"
msgstr ""
-#: src/readelf.c:1009
+#: src/readelf.c:1090
#, c-format
msgid " Size of this header: %<PRId16> %s\n"
msgstr ""
-#: src/readelf.c:1010 src/readelf.c:1013 src/readelf.c:1030
+#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111
msgid "(bytes)"
msgstr "(Bytes)"
-#: src/readelf.c:1012
+#: src/readelf.c:1093
#, c-format
msgid " Size of program header entries: %<PRId16> %s\n"
msgstr ""
-#: src/readelf.c:1015
+#: src/readelf.c:1096
#, c-format
msgid " Number of program headers entries: %<PRId16>"
msgstr ""
-#: src/readelf.c:1022
+#: src/readelf.c:1103
#, c-format
msgid " (%<PRIu32> in [0].sh_info)"
msgstr ""
-#: src/readelf.c:1025 src/readelf.c:1042 src/readelf.c:1056
+#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137
msgid " ([0] not available)"
msgstr ""
-#: src/readelf.c:1029
+#: src/readelf.c:1110
#, c-format
msgid " Size of section header entries: %<PRId16> %s\n"
msgstr ""
-#: src/readelf.c:1032
+#: src/readelf.c:1113
#, c-format
msgid " Number of section headers entries: %<PRId16>"
msgstr ""
-#: src/readelf.c:1039
+#: src/readelf.c:1120
#, c-format
msgid " (%<PRIu32> in [0].sh_size)"
msgstr ""
#. We managed to get the zeroth section.
-#: src/readelf.c:1052
+#: src/readelf.c:1133
#, c-format
msgid " (%<PRIu32> in [0].sh_link)"
msgstr ""
-#: src/readelf.c:1060
+#: src/readelf.c:1141
#, c-format
msgid ""
" Section header string table index: XINDEX%s\n"
"\n"
msgstr ""
-#: src/readelf.c:1064
+#: src/readelf.c:1145
#, c-format
msgid ""
" Section header string table index: %<PRId16>\n"
"\n"
msgstr ""
-#: src/readelf.c:1107
+#: src/readelf.c:1188
#, c-format
msgid ""
"There are %d section headers, starting at offset %#<PRIx64>:\n"
"\n"
msgstr ""
-#: src/readelf.c:1117
+#: src/readelf.c:1198
msgid "Section Headers:"
msgstr ""
-#: src/readelf.c:1120
+#: src/readelf.c:1201
msgid ""
"[Nr] Name Type Addr Off Size ES Flags Lk "
"Inf Al"
msgstr ""
-#: src/readelf.c:1122
+#: src/readelf.c:1203
msgid ""
"[Nr] Name Type Addr Off Size ES "
"Flags Lk Inf Al"
msgstr ""
-#: src/readelf.c:1127
+#: src/readelf.c:1208
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1129
+#: src/readelf.c:1210
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1205
+#: src/readelf.c:1286
#, c-format
msgid "bad compression header for section %zd: %s"
msgstr ""
-#: src/readelf.c:1216
+#: src/readelf.c:1297
#, c-format
msgid "bad gnu compressed size for section %zd: %s"
msgstr ""
-#: src/readelf.c:1234
+#: src/readelf.c:1315
msgid "Program Headers:"
msgstr "Programm-Köpfe:"
-#: src/readelf.c:1236
+#: src/readelf.c:1317
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align"
msgstr ""
-#: src/readelf.c:1239
+#: src/readelf.c:1320
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align"
msgstr ""
-#: src/readelf.c:1296
+#: src/readelf.c:1377
#, c-format
msgid "\t[Requesting program interpreter: %s]\n"
msgstr ""
-#: src/readelf.c:1317
+#: src/readelf.c:1398
msgid ""
"\n"
" Section to Segment mapping:\n"
" Segment Sections..."
msgstr ""
-#: src/readelf.c:1328 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993
+#: 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:1471
+#: src/readelf.c:1552
#, c-format
msgid ""
"\n"
@@ -4018,7 +4104,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:1476
+#: src/readelf.c:1557
#, c-format
msgid ""
"\n"
@@ -4029,31 +4115,31 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:1484
+#: src/readelf.c:1565
msgid "<INVALID SYMBOL>"
msgstr ""
-#: src/readelf.c:1498
+#: src/readelf.c:1579
msgid "<INVALID SECTION>"
msgstr ""
-#: src/readelf.c:1521 src/readelf.c:2248 src/readelf.c:3331 src/readelf.c:9624
-#: src/readelf.c:9631 src/readelf.c:9675 src/readelf.c:9682
+#: 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:1526 src/readelf.c:2253 src/readelf.c:3336
+#: 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:1670 src/readelf.c:2320 src/readelf.c:2578 src/readelf.c:2654
-#: src/readelf.c:2958 src/readelf.c:3032 src/readelf.c:4759
+#: 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:1673
+#: src/readelf.c:1754
#, c-format
msgid ""
"\n"
@@ -4066,43 +4152,43 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:1683
+#: src/readelf.c:1764
msgid " Type Value\n"
msgstr ""
-#: src/readelf.c:1707
+#: src/readelf.c:1788
#, c-format
msgid "Shared library: [%s]\n"
msgstr ""
-#: src/readelf.c:1712
+#: src/readelf.c:1793
#, c-format
msgid "Library soname: [%s]\n"
msgstr ""
-#: src/readelf.c:1717
+#: src/readelf.c:1798
#, c-format
msgid "Library rpath: [%s]\n"
msgstr ""
-#: src/readelf.c:1722
+#: src/readelf.c:1803
#, c-format
msgid "Library runpath: [%s]\n"
msgstr ""
-#: src/readelf.c:1742
+#: src/readelf.c:1823
#, c-format
msgid "%<PRId64> (bytes)\n"
msgstr ""
-#: src/readelf.c:1855 src/readelf.c:2045
+#: src/readelf.c:1936 src/readelf.c:2126
#, c-format
msgid ""
"\n"
"Invalid symbol table at offset %#0<PRIx64>\n"
msgstr ""
-#: src/readelf.c:1873 src/readelf.c:2063
+#: src/readelf.c:1954 src/readelf.c:2144
#, c-format
msgid ""
"\n"
@@ -4121,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:1888 src/readelf.c:2078
+#: src/readelf.c:1969 src/readelf.c:2159
#, c-format
msgid ""
"\n"
@@ -4132,29 +4218,29 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:1898
+#: src/readelf.c:1979
msgid " Offset Type Value Name\n"
msgstr ""
-#: src/readelf.c:1900
+#: src/readelf.c:1981
msgid " Offset Type Value Name\n"
msgstr ""
-#: src/readelf.c:1953 src/readelf.c:1964 src/readelf.c:1977 src/readelf.c:1998
-#: src/readelf.c:2010 src/readelf.c:2144 src/readelf.c:2156 src/readelf.c:2170
-#: src/readelf.c:2192 src/readelf.c:2205
+#: 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 "<INVALID RELOC>"
msgstr ""
-#: src/readelf.c:2088
+#: src/readelf.c:2169
msgid " Offset Type Value Addend Name\n"
msgstr ""
-#: src/readelf.c:2090
+#: src/readelf.c:2171
msgid " Offset Type Value Addend Name\n"
msgstr ""
-#: src/readelf.c:2328
+#: src/readelf.c:2409
#, c-format
msgid ""
"\n"
@@ -4165,40 +4251,40 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:2333
+#: 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:2341
+#: src/readelf.c:2422
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: src/readelf.c:2343
+#: src/readelf.c:2424
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: src/readelf.c:2363
+#: src/readelf.c:2444
#, c-format
msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
msgstr ""
-#: src/readelf.c:2451
+#: src/readelf.c:2532
#, c-format
msgid "bad dynamic symbol"
msgstr ""
-#: src/readelf.c:2533
+#: src/readelf.c:2614
msgid "none"
msgstr "keine"
-#: src/readelf.c:2550
+#: src/readelf.c:2631
msgid "| <unknown>"
msgstr "| <unbekannt>"
-#: src/readelf.c:2581
+#: src/readelf.c:2662
#, c-format
msgid ""
"\n"
@@ -4211,17 +4297,17 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:2602
+#: 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:2615
+#: 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:2658
+#: src/readelf.c:2739
#, c-format
msgid ""
"\n"
@@ -4234,18 +4320,18 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:2686
+#: src/readelf.c:2767
#, c-format
msgid " %#06x: Version: %hd Flags: %s Index: %hd Cnt: %hd Name: %s\n"
msgstr ""
-#: src/readelf.c:2701
+#: src/readelf.c:2782
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr ""
#. Print the header.
-#: src/readelf.c:2962
+#: src/readelf.c:3043
#, c-format
msgid ""
"\n"
@@ -4258,15 +4344,15 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:2990
+#: src/readelf.c:3071
msgid " 0 *local* "
msgstr " 0 *lokal* "
-#: src/readelf.c:2995
+#: src/readelf.c:3076
msgid " 1 *global* "
msgstr " 1 *global* "
-#: src/readelf.c:3037
+#: src/readelf.c:3118
#, c-format
msgid ""
"\n"
@@ -4281,56 +4367,66 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:3059
+#: src/readelf.c:3140
#, no-c-format
msgid " Length Number % of total Coverage\n"
msgstr ""
-#: src/readelf.c:3061
+#: src/readelf.c:3142
#, c-format
msgid " 0 %6<PRIu32> %5.1f%%\n"
msgstr " 0 %6<PRIu32> %5.1f%%\n"
-#: src/readelf.c:3068
+#: src/readelf.c:3149
#, c-format
msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
-#: src/readelf.c:3081
+#: 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:3099 src/readelf.c:3154 src/readelf.c:3211
+#: 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:3107
+#: src/readelf.c:3188
#, fuzzy, c-format
msgid "invalid data in sysv.hash section %d"
msgstr "ungültige .debug_line Sektion"
-#: src/readelf.c:3162
+#: 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:3220
+#: 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:3287
+#: src/readelf.c:3386
#, c-format
msgid ""
" Symbol Bias: %u\n"
" Bitmask Size: %zu bytes %<PRIuFAST32>%% bits set 2nd hash shift: %u\n"
msgstr ""
-#: src/readelf.c:3376
+#: src/readelf.c:3475
#, c-format
msgid ""
"\n"
@@ -4341,13 +4437,13 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:3390
+#: src/readelf.c:3489
msgid ""
" Library Time Stamp Checksum Version "
"Flags"
msgstr ""
-#: src/readelf.c:3440
+#: src/readelf.c:3539
#, c-format
msgid ""
"\n"
@@ -4355,142 +4451,102 @@ msgid ""
"%#0<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:3457
+#: src/readelf.c:3556
msgid " Owner Size\n"
msgstr ""
-#: src/readelf.c:3486
+#: src/readelf.c:3585
#, c-format
msgid " %-13s %4<PRIu32>\n"
msgstr " %-13s %4<PRIu32>\n"
#. Unknown subsection, print and skip.
-#: src/readelf.c:3525
+#: src/readelf.c:3624
#, c-format
msgid " %-4u %12<PRIu32>\n"
msgstr " %-4u %12<PRIu32>\n"
#. Tag_File
-#: src/readelf.c:3530
+#: src/readelf.c:3629
#, c-format
msgid " File: %11<PRIu32>\n"
msgstr " File: %11<PRIu32>\n"
-#: src/readelf.c:3579
+#: src/readelf.c:3678
#, c-format
msgid " %s: %<PRId64>, %s\n"
msgstr " %s: %<PRId64>, %s\n"
-#: src/readelf.c:3582
+#: src/readelf.c:3681
#, c-format
msgid " %s: %<PRId64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:3585
+#: src/readelf.c:3684
#, c-format
msgid " %s: %s\n"
msgstr " %s: %s\n"
-#: src/readelf.c:3595
+#: src/readelf.c:3694
#, c-format
msgid " %u: %<PRId64>\n"
msgstr " %u: %<PRId64>\n"
-#: src/readelf.c:3598
+#: src/readelf.c:3697
#, c-format
msgid " %u: %s\n"
msgstr " %u: %s\n"
-#: src/readelf.c:3643
-#, c-format
-msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3646
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3651
-#, c-format
-msgid "%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3654
-#, c-format
-msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3660
-#, c-format
-msgid "%s+%#<PRIx64> <%s>"
-msgstr "%s+%#<PRIx64> <%s>"
-
-#: src/readelf.c:3663
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s>"
-msgstr "%s+%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3667
-#, c-format
-msgid "%#<PRIx64> <%s>"
-msgstr "%#<PRIx64> <%s>"
-
-#: src/readelf.c:3670
-#, c-format
-msgid "%#0*<PRIx64> <%s>"
-msgstr "%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3675
-#, c-format
-msgid "%s+%#<PRIx64>"
-msgstr "%s+%#<PRIx64>"
-
-#: src/readelf.c:3678
-#, c-format
-msgid "%s+%#0*<PRIx64>"
-msgstr "%s+%#0*<PRIx64>"
+#: src/readelf.c:3767
+#, fuzzy, c-format
+msgid "sprintf failure"
+msgstr "mprotect fehlgeschlagen"
-#: src/readelf.c:4081
+#: src/readelf.c:4249
msgid "empty block"
msgstr ""
-#: src/readelf.c:4084
+#: src/readelf.c:4252
#, c-format
msgid "%zu byte block:"
msgstr ""
-#: src/readelf.c:4481
+#: src/readelf.c:4730
#, c-format
-msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n"
+msgid "%*s[%2<PRIuMAX>] %s <TRUNCATED>\n"
msgstr ""
-#: src/readelf.c:4538
+#: src/readelf.c:4794
#, c-format
msgid "%s %#<PRIx64> used with different address sizes"
msgstr ""
-#: src/readelf.c:4545
+#: src/readelf.c:4801
#, c-format
msgid "%s %#<PRIx64> used with different offset sizes"
msgstr ""
-#: src/readelf.c:4552
+#: src/readelf.c:4808
#, c-format
msgid "%s %#<PRIx64> used with different base addresses"
msgstr ""
-#: src/readelf.c:4641
+#: src/readelf.c:4815
+#, c-format
+msgid "%s %#<PRIx64> used with different attribute %s and %s"
+msgstr ""
+
+#: src/readelf.c:4912
#, c-format
msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n"
msgstr ""
-#: src/readelf.c:4649
+#: src/readelf.c:4920
#, c-format
msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n"
msgstr ""
-#: src/readelf.c:4675
+#: src/readelf.c:4998
#, c-format
msgid ""
"\n"
@@ -4498,37 +4554,79 @@ msgid ""
" [ Code]\n"
msgstr ""
-#: src/readelf.c:4683
+#: src/readelf.c:5006
#, c-format
msgid ""
"\n"
"Abbreviation section at offset %<PRIu64>:\n"
msgstr ""
-#: src/readelf.c:4696
+#: src/readelf.c:5019
#, c-format
msgid " *** error while reading abbreviation: %s\n"
msgstr ""
-#: src/readelf.c:4712
+#: src/readelf.c:5035
#, c-format
msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n"
msgstr ""
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:6172 src/readelf.c:7745
-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 %#<PRIx64>:\n"
+msgstr ""
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:7745
-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<PRIu64>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905
+#, fuzzy, c-format
+msgid " Address size: %8<PRIu64>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915
+#, fuzzy, c-format
+msgid " Segment size: %8<PRIu64>\n"
+msgstr " %s: %<PRId64>\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:4749 src/readelf.c:4822
+#: 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:5298 src/readelf.c:5372
#, c-format
msgid "cannot get .debug_aranges content: %s"
msgstr ""
-#: src/readelf.c:4764
+#: src/readelf.c:5313
#, c-format
msgid ""
"\n"
@@ -4539,195 +4637,241 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:4795
+#: src/readelf.c:5344
#, c-format
msgid " [%*zu] ???\n"
msgstr " [%*zu] ???\n"
-#: src/readelf.c:4797
+#: src/readelf.c:5346
#, c-format
msgid ""
" [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n"
msgstr ""
-#: src/readelf.c:4827 src/readelf.c:4981 src/readelf.c:5558 src/readelf.c:6515
-#: src/readelf.c:7047 src/readelf.c:7167 src/readelf.c:7331 src/readelf.c:7819
-#, c-format
-msgid ""
-"\n"
-"DWARF section [%2zu] '%s' at offset %#<PRIx64>:\n"
-msgstr ""
-
-#: src/readelf.c:4840 src/readelf.c:6541
+#: src/readelf.c:5390 src/readelf.c:8195
#, c-format
msgid ""
"\n"
"Table at offset %zu:\n"
msgstr ""
-#: src/readelf.c:4844 src/readelf.c:5582 src/readelf.c:6552
+#: 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:4860
+#: src/readelf.c:5410
#, fuzzy, c-format
msgid ""
"\n"
" Length: %6<PRIu64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:4872
+#: src/readelf.c:5422
#, fuzzy, c-format
msgid " DWARF version: %6<PRIuFAST16>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:4876
+#: src/readelf.c:5426
#, c-format
msgid "unsupported aranges version"
msgstr ""
-#: src/readelf.c:4887
+#: src/readelf.c:5437
#, fuzzy, c-format
msgid " CU offset: %6<PRIx64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:4893
+#: src/readelf.c:5443
#, c-format
msgid " Address size: %6<PRIu64>\n"
msgstr ""
-#: src/readelf.c:4897
-#, fuzzy, c-format
-msgid "unsupported address size"
-msgstr "Kein Adress-Wert"
-
-#: src/readelf.c:4902
+#: src/readelf.c:5452
#, c-format
msgid ""
" Segment size: %6<PRIu64>\n"
"\n"
msgstr ""
-#: src/readelf.c:4906
+#: src/readelf.c:5507
#, c-format
-msgid "unsupported segment size"
+msgid " %zu padding bytes\n"
msgstr ""
-#: src/readelf.c:4946
+#: src/readelf.c:5550
#, fuzzy, c-format
-msgid " %s..%s (%<PRIx64>)\n"
+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 ""
+"Table at Offset 0x%<PRIx64>:\n"
+"\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:4949
+#: src/readelf.c:5628 src/readelf.c:8925
#, fuzzy, c-format
-msgid " %s..%s\n"
-msgstr " [%6tx] %s..%s\n"
+msgid " Offset entries: %8<PRIu64>\n"
+msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:4958
+#: src/readelf.c:5644 src/readelf.c:8941
#, c-format
-msgid " %zu padding bytes\n"
+msgid " Unknown CU base: "
msgstr ""
-#: src/readelf.c:4976
+#: src/readelf.c:5646 src/readelf.c:8943
#, c-format
-msgid "cannot get .debug_ranges content: %s"
+msgid " CU [%6<PRIx64>] base: "
msgstr ""
-#: src/readelf.c:5006 src/readelf.c:7074
+#: src/readelf.c:5652 src/readelf.c:8949
#, c-format
-msgid " [%6tx] <INVALID DATA>\n"
+msgid " Not associated with a CU.\n"
msgstr ""
-#: src/readelf.c:5028 src/readelf.c:7096
+#: 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:5035 src/readelf.c:7103
+#: 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%<PRIx64>:\n"
+msgstr " %s: %<PRId64>\n"
-#. We have an address range entry.
-#. First address range entry in a list.
-#: src/readelf.c:5046
+#: 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:5048
+#: src/readelf.c:5921
#, c-format
-msgid " %s..%s\n"
-msgstr " %s..%s\n"
+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<PRIx64>] base: "
+msgstr ""
+
+#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361
+#, c-format
+msgid " [%6tx] <INVALID DATA>\n"
+msgstr ""
+
+#: src/readelf.c:5989 src/readelf.c:9441
+#, c-format
+msgid ""
+" [%6tx] base address\n"
+" "
+msgstr ""
-#: src/readelf.c:5284
+#: src/readelf.c:5997 src/readelf.c:9449
+#, fuzzy, c-format
+msgid " [%6tx] empty list\n"
+msgstr " [%6tx] %s..%s\n"
+
+#: src/readelf.c:6252
msgid " <INVALID DATA>\n"
msgstr ""
-#: src/readelf.c:5537
+#: src/readelf.c:6505
#, fuzzy, c-format
msgid "cannot get ELF: %s"
msgstr "ELF Kopf konnte nicht ausgelesen werden"
-#: src/readelf.c:5554
+#: src/readelf.c:6523
#, c-format
msgid ""
"\n"
"Call frame information section [%2zu] '%s' at offset %#<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:5604
+#: src/readelf.c:6573
#, c-format
msgid ""
"\n"
" [%6tx] Zero terminator\n"
msgstr ""
-#: src/readelf.c:5697 src/readelf.c:5852
+#: src/readelf.c:6666 src/readelf.c:6820
#, fuzzy, c-format
msgid "invalid augmentation length"
msgstr "ungültige Abschnittsausrichtung"
-#: src/readelf.c:5712
+#: src/readelf.c:6681
msgid "FDE address encoding: "
msgstr ""
-#: src/readelf.c:5718
+#: src/readelf.c:6687
msgid "LSDA pointer encoding: "
msgstr ""
-#: src/readelf.c:5829
+#: src/readelf.c:6797
#, c-format
msgid " (offset: %#<PRIx64>)"
msgstr ""
-#: src/readelf.c:5836
+#: src/readelf.c:6804
#, c-format
msgid " (end offset: %#<PRIx64>)"
msgstr ""
-#: src/readelf.c:5873
+#: src/readelf.c:6841
#, c-format
msgid " %-26sLSDA pointer: %#<PRIx64>\n"
msgstr ""
-#: src/readelf.c:5928
+#: src/readelf.c:6926
#, c-format
-msgid "cannot get attribute code: %s"
+msgid "DIE [%<PRIx64>] cannot get attribute code: %s"
msgstr ""
-#: src/readelf.c:5937
+#: src/readelf.c:6936
#, c-format
-msgid "cannot get attribute form: %s"
+msgid "DIE [%<PRIx64>] cannot get attribute form: %s"
msgstr ""
-#: src/readelf.c:5952
+#: src/readelf.c:6958
#, c-format
-msgid "cannot get attribute value: %s"
+msgid "DIE [%<PRIx64>] cannot get attribute '%s' (%s) value: %s"
msgstr ""
-#: src/readelf.c:6254
+#: src/readelf.c:7291
+#, fuzzy, c-format
+msgid "invalid file (%<PRId64>): %s"
+msgstr "Ungültige Datei"
+
+#: src/readelf.c:7295
+#, fuzzy, c-format
+msgid "no srcfiles for CU [%<PRIx64>]"
+msgstr "unbekannte Form %<PRIx64>"
+
+#: 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"
@@ -4735,16 +4879,21 @@ msgid ""
" [Offset]\n"
msgstr ""
-#: src/readelf.c:6286
+#: 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 %<PRIu64>:\n"
" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
"%<PRIu8>, Offset size: %<PRIu8>\n"
-" Type signature: %#<PRIx64>, Type offset: %#<PRIx64>\n"
+" Type signature: %#<PRIx64>, Type offset: %#<PRIx64> [%<PRIx64>]\n"
msgstr ""
-#: src/readelf.c:6295
+#: src/readelf.c:7603
#, c-format
msgid ""
" Compilation unit at offset %<PRIu64>:\n"
@@ -4752,32 +4901,45 @@ msgid ""
"%<PRIu8>, Offset size: %<PRIu8>\n"
msgstr ""
-#: src/readelf.c:6320
+#: src/readelf.c:7613 src/readelf.c:7776
#, c-format
-msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s"
+msgid " Unit type: %s (%<PRIu8>)"
msgstr ""
-#: src/readelf.c:6334
+#: src/readelf.c:7640
#, c-format
-msgid "cannot get DIE offset: %s"
+msgid "unknown version (%d) or unit type (%d)"
msgstr ""
-#: src/readelf.c:6343
+#: src/readelf.c:7669
#, c-format
-msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s"
+msgid "cannot get DIE offset: %s"
msgstr ""
-#: src/readelf.c:6375
+#: src/readelf.c:7678
+#, fuzzy, c-format
+msgid "cannot get tag of DIE at offset [%<PRIx64>] 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:6383
+#: src/readelf.c:7724
#, c-format
msgid "cannot get next DIE: %s"
msgstr ""
-#: src/readelf.c:6419
+#: src/readelf.c:7768
+#, c-format
+msgid ""
+" Split compilation unit at offset %<PRIu64>:\n"
+" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
+"%<PRIu8>, Offset size: %<PRIu8>\n"
+msgstr ""
+
+#: src/readelf.c:7819
#, c-format
msgid ""
"\n"
@@ -4785,171 +4947,201 @@ msgid ""
"\n"
msgstr ""
-#: src/readelf.c:6528
+#: src/readelf.c:8151
+#, fuzzy, c-format
+msgid "unknown form: %s"
+msgstr "unbekannte Form %<PRIx64>"
+
+#: src/readelf.c:8182
#, c-format
msgid "cannot get line data section data: %s"
msgstr ""
#. Print what we got so far.
-#: src/readelf.c:6598
+#: src/readelf.c:8284
#, c-format
msgid ""
"\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"
msgstr ""
-#: src/readelf.c:6619
+#: 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:6634
+#: src/readelf.c:8347
#, c-format
msgid " [%*<PRIuFAST8>] %hhu argument\n"
msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n"
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:6642
+#: src/readelf.c:8358
msgid ""
"\n"
"Directory table:"
msgstr ""
-#: src/readelf.c:6658
+#: 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:6693
+#: src/readelf.c:8494
+msgid " Entry Dir Time Size Name"
+msgstr ""
+
+#: src/readelf.c:8529
msgid ""
"\n"
"Line number statements:"
msgstr ""
-#: src/readelf.c:6744
+#: src/readelf.c:8552
#, c-format
msgid "invalid maximum operations per instruction is zero"
msgstr ""
-#: src/readelf.c:6780
+#: src/readelf.c:8586
+#, c-format
+msgid " special opcode %u: address+%u = "
+msgstr ""
+
+#: src/readelf.c:8590
#, c-format
-msgid " special opcode %u: address+%u = %s, op_index = %u, line%+d = %zu\n"
+msgid ", op_index = %u, line%+d = %zu\n"
msgstr ""
-#: src/readelf.c:6785
+#: src/readelf.c:8593
#, c-format
-msgid " special opcode %u: address+%u = %s, line%+d = %zu\n"
+msgid ", line%+d = %zu\n"
msgstr ""
-#: src/readelf.c:6805
+#: src/readelf.c:8611
#, c-format
msgid " extended opcode %u: "
msgstr ""
-#: src/readelf.c:6810
+#: src/readelf.c:8616
msgid " end of sequence"
msgstr ""
-#: src/readelf.c:6829
-#, 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:6856
+#: src/readelf.c:8662
#, c-format
msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n"
msgstr ""
-#: src/readelf.c:6869
+#: src/readelf.c:8675
#, c-format
msgid " set discriminator to %u\n"
msgstr ""
#. Unknown, ignore it.
-#: src/readelf.c:6874
+#: src/readelf.c:8680
#, fuzzy
msgid " unknown opcode"
msgstr "unbekannter Typ"
#. Takes no argument.
-#: src/readelf.c:6886
+#: src/readelf.c:8692
msgid " copy"
msgstr ""
-#: src/readelf.c:6897
+#: 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:6901
+#: 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:6912
+#: src/readelf.c:8715
#, c-format
msgid " advance line by constant %d to %<PRId64>\n"
msgstr ""
-#: src/readelf.c:6920
+#: src/readelf.c:8723
#, c-format
msgid " set file to %<PRIu64>\n"
msgstr ""
-#: src/readelf.c:6930
+#: src/readelf.c:8733
#, c-format
msgid " set column to %<PRIu64>\n"
msgstr ""
-#: src/readelf.c:6937
+#: src/readelf.c:8740
#, c-format
msgid " set '%s' to %<PRIuFAST8>\n"
msgstr ""
#. Takes no argument.
-#: src/readelf.c:6943
+#: src/readelf.c:8746
msgid " set basic block flag"
msgstr ""
-#: src/readelf.c:6956
+#: src/readelf.c:8757
#, c-format
-msgid " advance address by constant %u to %s, op_index to %u\n"
+msgid " advance address by constant %u to "
msgstr ""
-#: src/readelf.c:6960
+#: src/readelf.c:8776
#, c-format
-msgid " advance address by constant %u to %s\n"
-msgstr ""
-
-#: src/readelf.c:6978
-#, 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:6987
+#: src/readelf.c:8786
msgid " set prologue end flag"
msgstr ""
#. Takes no argument.
-#: src/readelf.c:6992
+#: src/readelf.c:8791
msgid " set epilogue begin flag"
msgstr ""
-#: src/readelf.c:7001
+#: src/readelf.c:8800
#, c-format
msgid " set isa to %u\n"
msgstr ""
@@ -4957,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:7010
+#: src/readelf.c:8809
#, c-format
msgid " unknown opcode with %<PRIu8> parameter:"
msgid_plural " unknown opcode with %<PRIu8> parameters:"
msgstr[0] ""
msgstr[1] ""
-#: src/readelf.c:7042
-#, 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:7117
-#, 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:7119
+#: src/readelf.c:9269
#, c-format
-msgid " %s..%s"
-msgstr " %s..%s"
+msgid "cannot get .debug_loc content: %s"
+msgstr ""
-#: src/readelf.c:7126 src/readelf.c:8077
+#: src/readelf.c:9476 src/readelf.c:10490
msgid " <INVALID DATA>\n"
msgstr ""
-#: src/readelf.c:7178 src/readelf.c:7340
+#: src/readelf.c:9530 src/readelf.c:9693
#, c-format
msgid "cannot get macro information section data: %s"
msgstr ""
-#: src/readelf.c:7258
+#: src/readelf.c:9610
#, c-format
msgid "%*s*** non-terminated string at end of section"
msgstr ""
-#: src/readelf.c:7281
+#: src/readelf.c:9633
#, c-format
msgid "%*s*** missing DW_MACINFO_start_file argument at end of section"
msgstr ""
-#: src/readelf.c:7381
+#: src/readelf.c:9734
#, fuzzy, c-format
msgid " Offset: 0x%<PRIx64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:7393
+#: src/readelf.c:9746
#, fuzzy, c-format
msgid " Version: %<PRIu16>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:7399 src/readelf.c:8196
+#: src/readelf.c:9752 src/readelf.c:10609
#, c-format
msgid " unknown version, cannot parse section\n"
msgstr ""
-#: src/readelf.c:7406
+#: src/readelf.c:9759
#, fuzzy, c-format
msgid " Flag: 0x%<PRIx8>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:7409
+#: src/readelf.c:9762
#, c-format
msgid " Offset length: %<PRIu8>\n"
msgstr ""
-#: src/readelf.c:7417
+#: src/readelf.c:9770
#, c-format
msgid " .debug_line offset: 0x%<PRIx64>\n"
msgstr ""
-#: src/readelf.c:7430
+#: src/readelf.c:9795
#, c-format
msgid " extension opcode table, %<PRIu8> items:\n"
msgstr ""
-#: src/readelf.c:7437
+#: src/readelf.c:9802
#, c-format
msgid " [%<PRIx8>]"
msgstr ""
-#: src/readelf.c:7449
+#: src/readelf.c:9814
#, c-format
msgid " %<PRIu8> arguments:"
msgstr ""
-#: src/readelf.c:7477
+#: src/readelf.c:9829
#, c-format
msgid " no arguments."
msgstr ""
-#: src/readelf.c:7777
-#, c-format
-msgid "vendor opcode not verified?"
-msgstr ""
-
-#: src/readelf.c:7805
+#: src/readelf.c:10030
#, c-format
msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n"
msgstr ""
-#: src/readelf.c:7846
+#: src/readelf.c:10072
#, c-format
msgid ""
"\n"
@@ -5067,47 +5253,72 @@ msgid ""
" %*s String\n"
msgstr ""
-#: src/readelf.c:7860
+#: src/readelf.c:10087
#, c-format
-msgid " *** error while reading strings: %s\n"
+msgid " *** error, missing string terminator\n"
msgstr ""
-#: src/readelf.c:7880
+#: 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<PRIu64>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:10216
+#, fuzzy, c-format
+msgid " Offset size: %8<PRIu8>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:10230
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:10239
+#, fuzzy, c-format
+msgid " Padding: %8<PRIx16>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:10293
#, c-format
msgid ""
"\n"
"Call frame search table section [%2zu] '.eh_frame_hdr':\n"
msgstr ""
-#: src/readelf.c:7982
+#: src/readelf.c:10395
#, c-format
msgid ""
"\n"
"Exception handling table section [%2zu] '.gcc_except_table':\n"
msgstr ""
-#: src/readelf.c:8005
+#: src/readelf.c:10418
#, c-format
msgid " LPStart encoding: %#x "
msgstr ""
-#: src/readelf.c:8017
+#: src/readelf.c:10430
#, c-format
msgid " TType encoding: %#x "
msgstr ""
-#: src/readelf.c:8032
+#: src/readelf.c:10445
#, c-format
msgid " Call site encoding: %#x "
msgstr ""
-#: src/readelf.c:8045
+#: src/readelf.c:10458
msgid ""
"\n"
" Call site table:"
msgstr ""
-#: src/readelf.c:8059
+#: src/readelf.c:10472
#, c-format
msgid ""
" [%4u] Call site start: %#<PRIx64>\n"
@@ -5116,141 +5327,142 @@ msgid ""
" Action: %u\n"
msgstr ""
-#: src/readelf.c:8132
+#: src/readelf.c:10545
#, c-format
msgid "invalid TType encoding"
msgstr ""
-#: src/readelf.c:8158
+#: src/readelf.c:10571
#, c-format
msgid ""
"\n"
"GDB section [%2zu] '%s' at offset %#<PRIx64> contains %<PRId64> bytes :\n"
msgstr ""
-#: src/readelf.c:8187
+#: src/readelf.c:10600
#, fuzzy, c-format
msgid " Version: %<PRId32>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:8205
+#: src/readelf.c:10618
#, c-format
msgid " CU offset: %#<PRIx32>\n"
msgstr ""
-#: src/readelf.c:8212
+#: src/readelf.c:10625
#, c-format
msgid " TU offset: %#<PRIx32>\n"
msgstr ""
-#: src/readelf.c:8219
+#: src/readelf.c:10632
#, c-format
msgid " address offset: %#<PRIx32>\n"
msgstr ""
-#: src/readelf.c:8226
+#: src/readelf.c:10639
#, c-format
msgid " symbol offset: %#<PRIx32>\n"
msgstr ""
-#: src/readelf.c:8233
+#: src/readelf.c:10646
#, c-format
msgid " constant offset: %#<PRIx32>\n"
msgstr ""
-#: src/readelf.c:8247
+#: src/readelf.c:10660
#, c-format
msgid ""
"\n"
" CU list at offset %#<PRIx32> contains %zu entries:\n"
msgstr ""
-#: src/readelf.c:8272
+#: src/readelf.c:10685
#, c-format
msgid ""
"\n"
" TU list at offset %#<PRIx32> contains %zu entries:\n"
msgstr ""
-#: src/readelf.c:8301
+#: src/readelf.c:10714
#, c-format
msgid ""
"\n"
" Address list at offset %#<PRIx32> contains %zu entries:\n"
msgstr ""
-#: src/readelf.c:8334
+#: src/readelf.c:10746
#, c-format
msgid ""
"\n"
" Symbol table at offset %#<PRIx32> contains %zu slots:\n"
msgstr ""
-#: src/readelf.c:8421
+#: src/readelf.c:10884
#, c-format
msgid "cannot get debug context descriptor: %s"
msgstr ""
-#: src/readelf.c:8577 src/readelf.c:9199 src/readelf.c:9310 src/readelf.c:9368
+#: 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:8940
+#: src/readelf.c:11610
#, c-format
msgid ""
"\n"
"%*s... <repeats %u more times> ..."
msgstr ""
-#: src/readelf.c:9447
+#: src/readelf.c:12117
msgid " Owner Data size Type\n"
msgstr ""
-#: src/readelf.c:9465
+#: src/readelf.c:12135
#, c-format
msgid " %-13.*s %9<PRId32> %s\n"
msgstr ""
-#: src/readelf.c:9515
-#, 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:9542
+#: src/readelf.c:12212
#, c-format
msgid ""
"\n"
"Note section [%2zu] '%s' of %<PRIu64> bytes at offset %#0<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:9565
+#: src/readelf.c:12235
#, c-format
msgid ""
"\n"
"Note segment of %<PRIu64> bytes at offset %#0<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:9611
+#: 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:9638 src/readelf.c:9689
+#: 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:9643
+#: src/readelf.c:12313
#, c-format
msgid ""
"\n"
"Hex dump of section [%zu] '%s', %<PRIu64> bytes at offset %#0<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:9648
+#: src/readelf.c:12318
#, c-format
msgid ""
"\n"
@@ -5258,21 +5470,21 @@ msgid ""
"%#0<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:9662
+#: 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:9694
+#: src/readelf.c:12364
#, c-format
msgid ""
"\n"
"String section [%zu] '%s' contains %<PRIu64> bytes at offset %#0<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:9699
+#: src/readelf.c:12369
#, c-format
msgid ""
"\n"
@@ -5280,45 +5492,45 @@ msgid ""
"offset %#0<PRIx64>:\n"
msgstr ""
-#: src/readelf.c:9748
+#: src/readelf.c:12418
#, c-format
msgid ""
"\n"
"section [%lu] does not exist"
msgstr ""
-#: src/readelf.c:9777
+#: src/readelf.c:12447
#, c-format
msgid ""
"\n"
"section '%s' does not exist"
msgstr ""
-#: src/readelf.c:9834
+#: src/readelf.c:12504
#, c-format
msgid "cannot get symbol index of archive '%s': %s"
msgstr ""
-#: src/readelf.c:9837
+#: src/readelf.c:12507
#, c-format
msgid ""
"\n"
"Archive '%s' has no symbol index\n"
msgstr ""
-#: src/readelf.c:9841
+#: src/readelf.c:12511
#, c-format
msgid ""
"\n"
"Index of archive '%s' has %zu entries:\n"
msgstr ""
-#: src/readelf.c:9859
+#: 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:9864
+#: src/readelf.c:12534
#, c-format
msgid "Archive member '%s' contains:\n"
msgstr ""
@@ -5390,118 +5602,119 @@ msgstr ""
msgid "(TOTALS)\n"
msgstr ""
-#: src/stack.c:482
+#: src/stack.c:483
#, c-format
msgid "-p PID should be a positive process id."
msgstr ""
-#: src/stack.c:488
+#: src/stack.c:489
#, fuzzy, c-format
msgid "Cannot open core file '%s'"
msgstr "Konnte Archiv '%s' nicht öffnen"
-#: src/stack.c:548
+#: src/stack.c:549
#, c-format
msgid "-n MAXFRAMES should be 0 or higher."
msgstr ""
-#: src/stack.c:560
+#: src/stack.c:561
#, c-format
msgid "-e EXEC needs a core given by --core."
msgstr ""
-#: src/stack.c:564
+#: src/stack.c:565
#, c-format
msgid "-1 needs a thread id given by -p."
msgstr ""
-#: src/stack.c:568
+#: src/stack.c:569
#, c-format
msgid "One of -p PID or --core COREFILE should be given."
msgstr ""
-#: src/stack.c:638
+#: src/stack.c:641
#, fuzzy
msgid "Show stack of process PID"
msgstr "Kann Suchbaum nicht erstellen"
-#: src/stack.c:640
+#: src/stack.c:643
msgid "Show stack found in COREFILE"
msgstr ""
-#: src/stack.c:641
+#: src/stack.c:644
msgid "(optional) EXECUTABLE that produced COREFILE"
msgstr ""
-#: src/stack.c:645
+#: src/stack.c:648
#, fuzzy
msgid "Output selection options:"
msgstr "Eingabeauswahloptionen:"
-#: src/stack.c:647
+#: src/stack.c:650
msgid "Additionally show frame activation"
msgstr ""
-#: src/stack.c:649
+#: src/stack.c:652
msgid "Additionally try to lookup DWARF debuginfo name for frame address"
msgstr ""
-#: src/stack.c:652
+#: src/stack.c:655
msgid ""
"Additionally show inlined function frames using DWARF debuginfo if available "
"(implies -d)"
msgstr ""
-#: src/stack.c:654
+#: src/stack.c:657
msgid "Additionally show module file information"
msgstr ""
-#: src/stack.c:656
+#: src/stack.c:659
msgid "Additionally show source file information"
msgstr ""
-#: src/stack.c:658
+#: src/stack.c:661
msgid ""
"Show all additional information (activation, debugname, inlines, module and "
"source)"
msgstr ""
-#: src/stack.c:660
+#: src/stack.c:663
msgid "Do not resolve address to function symbol name"
msgstr ""
-#: src/stack.c:662
+#: src/stack.c:665
msgid "Show raw function symbol names, do not try to demangle names"
msgstr ""
-#: src/stack.c:664
+#: src/stack.c:667
msgid "Show module build-id, load address and pc offset"
msgstr ""
-#: src/stack.c:666
+#: src/stack.c:669
msgid "Show the backtrace of only one thread"
msgstr ""
-#: src/stack.c:668
+#: src/stack.c:671
msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)"
msgstr ""
-#: src/stack.c:670
+#: src/stack.c:673
msgid "Show module memory map with build-id, elf and debug files detected"
msgstr ""
-#: src/stack.c:678
+#: 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:751
+#: src/stack.c:756
#, c-format
msgid "Couldn't show any frames."
msgstr ""
@@ -6114,8 +6327,9 @@ msgstr ""
#: 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 "
@@ -6151,6 +6365,56 @@ msgstr ""
msgid "Show instances of inlined functions"
msgstr ""
+#~ msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#<PRIx64> <%s>"
+#~ msgstr "%s+%#<PRIx64> <%s>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s>"
+#~ msgstr "%s+%#0*<PRIx64> <%s>"
+
+#~ msgid "%#<PRIx64> <%s>"
+#~ msgstr "%#<PRIx64> <%s>"
+
+#~ msgid "%#0*<PRIx64> <%s>"
+#~ msgstr "%#0*<PRIx64> <%s>"
+
+#~ msgid "%s+%#<PRIx64>"
+#~ msgstr "%s+%#<PRIx64>"
+
+#~ msgid "%s+%#0*<PRIx64>"
+#~ msgstr "%s+%#0*<PRIx64>"
+
+#, fuzzy
+#~ msgid " %s..%s (%<PRIx64>)\n"
+#~ msgstr " %s: %<PRId64>\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"
@@ -6224,10 +6488,6 @@ msgstr ""
#~ msgid "unknown user attribute %hx"
#~ msgstr "unbekanntes Benutzer-Attribut %hx"
-#, fuzzy
-#~ msgid "unknown form %#<PRIx64>"
-#~ msgstr "unbekannte Form %<PRIx64>"
-
#~ msgid ""
#~ "\n"
#~ "\n"
diff --git a/po/es.po b/po/es.po
index 5a68dfd1..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: 2017-08-02 18:29+0200\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 <claudiorodrigo@pereyradiaz."
"com.ar>\n"
@@ -57,18 +57,18 @@ msgstr ""
"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:3296
-#: src/readelf.c:3687 src/readelf.c:8526 src/unstrip.c:2227 src/unstrip.c:2432
+#: 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:50
+#: 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:52
+#: 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"
@@ -105,166 +105,202 @@ 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:51
+#: 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:71
+#: 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:72
+#: 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 ""
-#: libdw/dwarf_error.c:98
+#: libdw/dwarf_error.c:103
#, fuzzy
msgid "unknown language code"
msgstr "código operativo desconocido "
-#: libdwfl/argp-std.c:50 src/stack.c:636 src/unstrip.c:2374
+#: 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:"
@@ -296,7 +332,7 @@ msgstr "Busca direcciones en el kernel que está ejecutándose"
msgid "Kernel with all modules"
msgstr "Kernel con todos los módulos"
-#: libdwfl/argp-std.c:63 src/stack.c:643
+#: 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"
@@ -375,7 +411,7 @@ msgstr "Tipo de reubicación no soportada"
msgid "r_offset is bogus"
msgstr "r_offset se encuentra inutilizable"
-#: libdwfl/libdwflP.h:64 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"
@@ -499,7 +535,7 @@ msgstr "No hay segundo plano (Backend)"
msgid "<unknown>"
msgstr "<desconocido>"
-#: libebl/ebldynamictagname.c:101
+#: libebl/ebldynamictagname.c:103
#, c-format
msgid "<unknown>: %#<PRIx64>"
msgstr "<desconocido>: %#<PRIx64>"
@@ -589,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:5139
+#: libelf/elf_error.c:87 src/readelf.c:6107
#, c-format
msgid "invalid encoding"
msgstr "codificación inválida"
@@ -599,152 +635,157 @@ 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:7389 src/readelf.c:7900
-#: src/readelf.c:8001 src/readelf.c:8182
+#: 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"
@@ -826,22 +867,22 @@ msgstr ""
msgid "[ADDR...]"
msgstr "[DIREC...]"
-#: src/addr2line.c:519
+#: 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:542
+#: src/addr2line.c:543
#, c-format
msgid "offset %#<PRIxMAX> lies outside section '%s'"
msgstr "Compensación %#<PRIxMAX> se encuentra fuera de sección '%s'"
-#: src/addr2line.c:632
+#: src/addr2line.c:633
#, c-format
msgid "cannot find symbol '%s'"
msgstr "no se puede encontrar símbolo '%s'"
-#: src/addr2line.c:637
+#: src/addr2line.c:638
#, c-format
msgid "offset %#<PRIxMAX> lies outside contents of '%s'"
msgstr "compensación %#<PRIxMAX> se encuentra fuera de contenido de '%s'"
@@ -1010,12 +1051,12 @@ msgstr "no sepuede stat el archivo '%s'"
msgid "no entry %s in archive\n"
msgstr "no hay entrada %s en archivo\n"
-#: src/ar.c:473 src/ar.c:918 src/ar.c:1118
+#: 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:480 src/ar.c:925 src/ar.c:1127
+#: 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"
@@ -1055,46 +1096,71 @@ msgstr "No puede cambiar tiempo de modificación de %s"
msgid "cannot rename temporary file to %.*s"
msgstr "no sepuede renombrar fichero temporal para %.*s"
-#: src/ar.c:759 src/ar.c:1010 src/ar.c:1409 src/ranlib.c:223
+#: 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:1209
+#: src/ar.c:1213
#, c-format
msgid "position member %s not found"
msgstr "no se encuentra miembro de posición %s "
-#: src/ar.c:1219
+#: 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:1248 src/objdump.c:242
+#: src/ar.c:1252 src/objdump.c:242
#, c-format
msgid "cannot open %s"
msgstr "no sepuede abrir %s"
-#: src/ar.c:1253
+#: src/ar.c:1257
#, c-format
msgid "cannot stat %s"
msgstr "no sepuede efectuar stat %s"
-#: src/ar.c:1259
+#: src/ar.c:1263
#, c-format
msgid "%s is no regular file"
msgstr " %s no es un fichero ordinario "
-#: src/ar.c:1272
+#: 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:1292
+#: 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 ""
@@ -1399,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:78 src/readelf.c:128
+#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154
msgid "FILE..."
msgstr "FICHERO..."
@@ -1432,7 +1498,7 @@ msgstr ""
msgid "Pedantic checking of ELF files compliance with gABI/psABI spec."
msgstr "Chequeo minucioso de ficheros ELF de acuerdo con gABI/psABI "
-#: src/elflint.c:155 src/readelf.c:303
+#: src/elflint.c:155 src/readelf.c:347
#, c-format
msgid "cannot open input file"
msgstr "no se puede abrir el fichero de entrada"
@@ -1451,7 +1517,7 @@ msgstr "error al cerrar el descriptor ELF: %s\n"
msgid "No errors"
msgstr "No hay errores"
-#: src/elflint.c:220 src/readelf.c:480
+#: src/elflint.c:220 src/readelf.c:546
msgid "Missing file name.\n"
msgstr "Falta el nombre de archivo.\n"
@@ -1488,8 +1554,8 @@ msgid "unsupported OS ABI e_ident[%d] == '%s'\n"
msgstr "Sistema operativo OS ABI e_ident[%d] == '%s' incompatible\n"
#: src/elflint.c:381
-#, c-format
-msgid "unsupport ABI version e_ident[%d] == %d\n"
+#, 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:386
@@ -3693,13 +3759,13 @@ msgstr "%s%s%s: no se reconoció el formato de fichero"
msgid "cannot create search tree"
msgstr "No se puede crear el árbol de búsqueda"
-#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:537
-#: src/readelf.c:1115 src/readelf.c:1315 src/readelf.c:1463 src/readelf.c:1664
-#: src/readelf.c:1870 src/readelf.c:2060 src/readelf.c:2238 src/readelf.c:2314
-#: src/readelf.c:2572 src/readelf.c:2648 src/readelf.c:2735 src/readelf.c:3315
-#: src/readelf.c:3365 src/readelf.c:3428 src/readelf.c:8430 src/readelf.c:9530
-#: src/readelf.c:9733 src/readelf.c:9801 src/size.c:397 src/size.c:466
-#: src/strip.c:572
+#: 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"
@@ -3786,7 +3852,7 @@ msgstr "Sólo muestra información para NOMBRE de sección."
msgid "Show information from FILEs (a.out by default)."
msgstr "Muestra información de FICHEROS (a.out por defecto)."
-#: src/objdump.c:219 src/readelf.c:485
+#: src/objdump.c:219 src/readelf.c:551
msgid "No operation specified.\n"
msgstr "No se especificó una operación.\n"
@@ -3795,11 +3861,11 @@ msgstr "No se especificó una operación.\n"
msgid "while close `%s'"
msgstr "mientras cierra `%s'"
-#: src/objdump.c:364 src/readelf.c:1965 src/readelf.c:2157
+#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238
msgid "INVALID SYMBOL"
msgstr "SÃMBOLO INVÃLIDO"
-#: src/objdump.c:379 src/readelf.c:1999 src/readelf.c:2193
+#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274
msgid "INVALID SECTION"
msgstr "SECCIÓN INVÃLIDA"
@@ -3853,150 +3919,170 @@ msgstr "%s: no es un archivo"
msgid "error while freeing sub-ELF descriptor: %s"
msgstr "error al liberar descriptor sub-ELF: %s"
-#: src/readelf.c:73
+#: src/readelf.c:95
#, fuzzy
msgid "ELF input selection:"
msgstr "Selección de salida de ELF:"
-#: src/readelf.c:75
+#: src/readelf.c:97
msgid ""
"Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data"
msgstr ""
-#: src/readelf.c:77
+#: 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:79
+#: 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:80
+#: src/readelf.c:105
msgid "Display the dynamic segment"
msgstr "Mostrar el segmento dinámico"
-#: src/readelf.c:81
+#: src/readelf.c:106
msgid "Display the ELF file header"
msgstr "Mostrar el encabezamiento del fichero ELF"
-#: src/readelf.c:83
+#: 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:84
+#: src/readelf.c:109
msgid "Display the program headers"
msgstr "Mostrar encabezamientos de programa"
-#: src/readelf.c:86
+#: src/readelf.c:111
msgid "Display relocations"
msgstr "Mostrar reubicaciones"
-#: src/readelf.c:87
+#: 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:90
+#: src/readelf.c:116
#, fuzzy
msgid "Display the symbol table sections"
msgstr "Mostrar la tabla de símbolos"
-#: src/readelf.c:91
+#: src/readelf.c:117
msgid "Display versioning information"
msgstr "Mostrar información de versión"
-#: src/readelf.c:92
+#: src/readelf.c:118
msgid "Display the ELF notes"
msgstr "Mostrar las notas ELF"
-#: src/readelf.c:94
+#: 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:96
+#: src/readelf.c:122
msgid "Display sections for exception handling"
msgstr "Muestra secciones para manejo de excepciones"
-#: src/readelf.c:98
+#: src/readelf.c:124
msgid "Additional output selection:"
msgstr "Selección de salida adicional:"
-#: src/readelf.c:100
+#: 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:104
+#: 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:106
+#: src/readelf.c:132
msgid "Print string contents of sections"
msgstr "Imprime contenido de cadena de secciones"
-#: src/readelf.c:109
+#: 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:111
+#: src/readelf.c:137
msgid "Output control:"
msgstr "Control de salida:"
-#: src/readelf.c:113
+#: 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:115
+#: 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:117
+#: src/readelf.c:143
msgid "Ignored for compatibility (lines always wide)"
msgstr ""
-#: src/readelf.c:119
+#: 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:124
+#: 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:453
+#. 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:521 src/readelf.c:632
+#: 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:528 src/readelf.c:844 src/strip.c:641
+#: 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:546 src/readelf.c:1137 src/readelf.c:1339
+#: 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:555 src/readelf.c:1144 src/readelf.c:1347 src/readelf.c:9753
+#: 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:1109
#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650
@@ -4005,109 +4091,109 @@ msgstr "No se puede encontrar la sección: %s"
msgid "cannot get section header: %s"
msgstr "No se puede obtener encabezamiento de sección: %s"
-#: src/readelf.c:563
+#: 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:572 src/readelf.c:5548 src/readelf.c:7888 src/readelf.c:7990
-#: src/readelf.c:8167
+#: 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:588
+#: 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:597
+#: 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:603 src/readelf.c:620 src/readelf.c:649
+#: 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:610
+#: src/readelf.c:679
#, fuzzy, c-format
msgid "error while rewinding file descriptor"
msgstr "error al cerrar el descriptor ELF: %s"
-#: src/readelf.c:644
+#: 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:743
-#, 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:770
+#: src/readelf.c:817
#, c-format
msgid "cannot stat input file"
msgstr "no sepudo stat archivo de entrada"
-#: src/readelf.c:772
+#: src/readelf.c:819
#, c-format
msgid "input file is empty"
msgstr "archivo de entrada vacío"
-#: src/readelf.c:774
+#: src/readelf.c:821
#, c-format
msgid "failed reading '%s': %s"
msgstr "Falló lectura de '%s': %s"
-#: src/readelf.c:829
+#: 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:837
+#: src/readelf.c:918
#, c-format
msgid "cannot create EBL handle"
msgstr "no se puede crear EBL"
-#: src/readelf.c:850
+#: 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:940
+#: src/readelf.c:1021
msgid "NONE (None)"
msgstr "NONE (Ninguno)"
-#: src/readelf.c:941
+#: src/readelf.c:1022
msgid "REL (Relocatable file)"
msgstr "REL (Fichero reubicable)"
-#: src/readelf.c:942
+#: src/readelf.c:1023
msgid "EXEC (Executable file)"
msgstr "EXEC (Fichero ejecutable)"
-#: src/readelf.c:943
+#: src/readelf.c:1024
msgid "DYN (Shared object file)"
msgstr "DYN (Fichero objeto compartido)"
-#: src/readelf.c:944
+#: src/readelf.c:1025
msgid "CORE (Core file)"
msgstr "CORE (Fichero núcleo)"
-#: src/readelf.c:949
+#: 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:951
+#: src/readelf.c:1032
#, c-format
msgid "Processor Specific: (%x)\n"
msgstr "Específico del procesador: (%x)\n"
-#: src/readelf.c:961
+#: src/readelf.c:1042
msgid ""
"ELF Header:\n"
" Magic: "
@@ -4115,7 +4201,7 @@ msgstr ""
"Encabezamiento ELF:\n"
" Mágico: "
-#: src/readelf.c:965
+#: src/readelf.c:1046
#, c-format
msgid ""
"\n"
@@ -4124,120 +4210,120 @@ msgstr ""
"\n"
" Clase: %s\n"
-#: src/readelf.c:970
+#: src/readelf.c:1051
#, c-format
msgid " Data: %s\n"
msgstr " Datos: %s\n"
-#: src/readelf.c:976
+#: src/readelf.c:1057
#, c-format
msgid " Ident Version: %hhd %s\n"
msgstr " Versión ident: %hhd %s\n"
-#: src/readelf.c:978 src/readelf.c:995
+#: src/readelf.c:1059 src/readelf.c:1076
msgid "(current)"
msgstr "(actual)"
-#: src/readelf.c:982
+#: src/readelf.c:1063
#, c-format
msgid " OS/ABI: %s\n"
msgstr " OS/ABI: %s\n"
-#: src/readelf.c:985
+#: src/readelf.c:1066
#, c-format
msgid " ABI Version: %hhd\n"
msgstr " Versión ABI: %hhd\n"
-#: src/readelf.c:988
+#: src/readelf.c:1069
msgid " Type: "
msgstr " Tipo: "
-#: src/readelf.c:991
+#: src/readelf.c:1072
#, c-format
msgid " Machine: %s\n"
msgstr " Máquina: %s\n"
-#: src/readelf.c:993
+#: src/readelf.c:1074
#, c-format
msgid " Version: %d %s\n"
msgstr " Versión: %d %s\n"
-#: src/readelf.c:997
+#: src/readelf.c:1078
#, c-format
msgid " Entry point address: %#<PRIx64>\n"
msgstr " Dirección de punto de entrada: %#<PRIx64>\n"
-#: src/readelf.c:1000
+#: src/readelf.c:1081
#, c-format
msgid " Start of program headers: %<PRId64> %s\n"
msgstr " Inicio de encabezamientos de programa: %<PRId64> %s\n"
-#: src/readelf.c:1001 src/readelf.c:1004
+#: src/readelf.c:1082 src/readelf.c:1085
msgid "(bytes into file)"
msgstr " (bytes en el archivo)"
-#: src/readelf.c:1003
+#: src/readelf.c:1084
#, c-format
msgid " Start of section headers: %<PRId64> %s\n"
msgstr " Inicio de encabezamientos de sección: %<PRId64> %s\n"
-#: src/readelf.c:1006
+#: src/readelf.c:1087
#, c-format
msgid " Flags: %s\n"
msgstr " Indicadores: %s\n"
-#: src/readelf.c:1009
+#: src/readelf.c:1090
#, c-format
msgid " Size of this header: %<PRId16> %s\n"
msgstr " Tamaño de este encabezamiento: %<PRId16> %s\n"
-#: src/readelf.c:1010 src/readelf.c:1013 src/readelf.c:1030
+#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111
msgid "(bytes)"
msgstr "(bytes)"
-#: src/readelf.c:1012
+#: src/readelf.c:1093
#, c-format
msgid " Size of program header entries: %<PRId16> %s\n"
msgstr ""
" Tamaño de las entradas en encabezamiento del programa: %<PRId16> %s\n"
-#: src/readelf.c:1015
+#: src/readelf.c:1096
#, c-format
msgid " Number of program headers entries: %<PRId16>"
msgstr " Cantidad de entradas de encabezados de programa: %<PRId16>"
-#: src/readelf.c:1022
+#: src/readelf.c:1103
#, c-format
msgid " (%<PRIu32> in [0].sh_info)"
msgstr " (%<PRIu32> in [0].sh_info)"
-#: src/readelf.c:1025 src/readelf.c:1042 src/readelf.c:1056
+#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137
msgid " ([0] not available)"
msgstr " ([0] no disponible)"
-#: src/readelf.c:1029
+#: src/readelf.c:1110
#, c-format
msgid " Size of section header entries: %<PRId16> %s\n"
msgstr ""
" Tamaño de las entradas en el encabezamiento de sección: %<PRId16> %s\n"
-#: src/readelf.c:1032
+#: src/readelf.c:1113
#, c-format
msgid " Number of section headers entries: %<PRId16>"
msgstr " Cantidad de entradas en los encabezamientos de sección: %<PRId16>"
-#: src/readelf.c:1039
+#: src/readelf.c:1120
#, c-format
msgid " (%<PRIu32> in [0].sh_size)"
msgstr " (%<PRIu32> en [0].sh_size)"
#. We managed to get the zeroth section.
-#: src/readelf.c:1052
+#: src/readelf.c:1133
#, c-format
msgid " (%<PRIu32> in [0].sh_link)"
msgstr " (%<PRIu32> en [0].sh_link)"
-#: src/readelf.c:1060
+#: src/readelf.c:1141
#, c-format
msgid ""
" Section header string table index: XINDEX%s\n"
@@ -4246,14 +4332,14 @@ msgstr ""
" Ãndice de tabla de cadenas de sección de encabezamiento de : XINDEX%s\n"
"\n"
-#: src/readelf.c:1064
+#: src/readelf.c:1145
#, c-format
msgid ""
" Section header string table index: %<PRId16>\n"
"\n"
msgstr " Ãndice de tabla de cadenas de sección de encabezamiento: %<PRId16>\n"
-#: src/readelf.c:1107
+#: src/readelf.c:1188
#, c-format
msgid ""
"There are %d section headers, starting at offset %#<PRIx64>:\n"
@@ -4262,11 +4348,11 @@ msgstr ""
"Hay %d encabezamientos de sección, comenzando en compensación %#<PRIx64>:\n"
"\n"
-#: src/readelf.c:1117
+#: src/readelf.c:1198
msgid "Section Headers:"
msgstr "encabezamientos de sección:"
-#: src/readelf.c:1120
+#: src/readelf.c:1201
msgid ""
"[Nr] Name Type Addr Off Size ES Flags Lk "
"Inf Al"
@@ -4274,7 +4360,7 @@ msgstr ""
"[Nr] Nombre Tipo Dirección Off Tamaño Inf Al "
"Enlace banderas ES"
-#: src/readelf.c:1122
+#: src/readelf.c:1203
msgid ""
"[Nr] Name Type Addr Off Size ES "
"Flags Lk Inf Al"
@@ -4282,36 +4368,36 @@ msgstr ""
"[Nr] Name Type Addr Off Size ES "
"Flags Lk Inf Al"
-#: src/readelf.c:1127
+#: src/readelf.c:1208
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1129
+#: src/readelf.c:1210
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1205
+#: 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:1216
+#: 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:1234
+#: src/readelf.c:1315
msgid "Program Headers:"
msgstr "encabezamientos de programa:"
-#: src/readelf.c:1236
+#: 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:1239
+#: src/readelf.c:1320
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align"
@@ -4319,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:1296
+#: 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:1317
+#: src/readelf.c:1398
msgid ""
"\n"
" Section to Segment mapping:\n"
@@ -4334,12 +4420,12 @@ msgstr ""
" Sección para asignación de segmento:\n"
" Secciones de segmento..."
-#: src/readelf.c:1328 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993
+#: 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:1471
+#: src/readelf.c:1552
#, c-format
msgid ""
"\n"
@@ -4354,7 +4440,7 @@ msgstr[1] ""
"\n"
"Grupo de sección COMDAT [%2zu] '%s' con firma '%s' contiene entradas %zu:\n"
-#: src/readelf.c:1476
+#: src/readelf.c:1557
#, c-format
msgid ""
"\n"
@@ -4369,31 +4455,31 @@ msgstr[1] ""
"\n"
"Grupo de sección [%2zu] '%s' con firma '%s' contiene entradas %zu:\n"
-#: src/readelf.c:1484
+#: src/readelf.c:1565
msgid "<INVALID SYMBOL>"
msgstr "<SÃMBOLO INVÃLIDO>"
-#: src/readelf.c:1498
+#: src/readelf.c:1579
msgid "<INVALID SECTION>"
msgstr "<SECCIÓN INVÃLIDA>"
-#: src/readelf.c:1521 src/readelf.c:2248 src/readelf.c:3331 src/readelf.c:9624
-#: src/readelf.c:9631 src/readelf.c:9675 src/readelf.c:9682
+#: 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:1526 src/readelf.c:2253 src/readelf.c:3336
+#: 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:1670 src/readelf.c:2320 src/readelf.c:2578 src/readelf.c:2654
-#: src/readelf.c:2958 src/readelf.c:3032 src/readelf.c:4759
+#: 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:1673
+#: src/readelf.c:1754
#, c-format
msgid ""
"\n"
@@ -4414,36 +4500,36 @@ msgstr[1] ""
" Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: "
"[%2u] '%s'\n"
-#: src/readelf.c:1683
+#: src/readelf.c:1764
msgid " Type Value\n"
msgstr " Tipo Valor\n"
-#: src/readelf.c:1707
+#: src/readelf.c:1788
#, c-format
msgid "Shared library: [%s]\n"
msgstr "Biblioteca compartida: [%s]\n"
-#: src/readelf.c:1712
+#: src/readelf.c:1793
#, c-format
msgid "Library soname: [%s]\n"
msgstr "Nombre-so de la biblioteca: [%s]\n"
-#: src/readelf.c:1717
+#: src/readelf.c:1798
#, c-format
msgid "Library rpath: [%s]\n"
msgstr "Rpath de la biblioteca: [%s]\n"
-#: src/readelf.c:1722
+#: src/readelf.c:1803
#, c-format
msgid "Library runpath: [%s]\n"
msgstr "Ruta de ejecución de la biblioteca: [%s]\n"
-#: src/readelf.c:1742
+#: src/readelf.c:1823
#, c-format
msgid "%<PRId64> (bytes)\n"
msgstr "%<PRId64> (bytes)\n"
-#: src/readelf.c:1855 src/readelf.c:2045
+#: src/readelf.c:1936 src/readelf.c:2126
#, c-format
msgid ""
"\n"
@@ -4452,7 +4538,7 @@ msgstr ""
"\n"
"Tabla de símbolos inválida en compensación %#0<PRIx64>\n"
-#: src/readelf.c:1873 src/readelf.c:2063
+#: src/readelf.c:1954 src/readelf.c:2144
#, c-format
msgid ""
"\n"
@@ -4477,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:1888 src/readelf.c:2078
+#: src/readelf.c:1969 src/readelf.c:2159
#, c-format
msgid ""
"\n"
@@ -4494,29 +4580,29 @@ msgstr[1] ""
"Sección de reubicación [%2u] '%s' en compensación %#0<PRIx64> contiene "
"entradas %d:\n"
-#: src/readelf.c:1898
+#: src/readelf.c:1979
msgid " Offset Type Value Name\n"
msgstr " Compensación Tipo Valor Nombre\n"
-#: src/readelf.c:1900
+#: src/readelf.c:1981
msgid " Offset Type Value Name\n"
msgstr " Compensación Tipo Valor Nombre\n"
-#: src/readelf.c:1953 src/readelf.c:1964 src/readelf.c:1977 src/readelf.c:1998
-#: src/readelf.c:2010 src/readelf.c:2144 src/readelf.c:2156 src/readelf.c:2170
-#: src/readelf.c:2192 src/readelf.c:2205
+#: 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 "<INVALID RELOC>"
msgstr "<REUBIC INVÃLIDA>"
-#: src/readelf.c:2088
+#: src/readelf.c:2169
msgid " Offset Type Value Addend Name\n"
msgstr " Compensación Tipo Valor Nombre Adend\n"
-#: src/readelf.c:2090
+#: src/readelf.c:2171
msgid " Offset Type Value Addend Name\n"
msgstr " Compensación Tipo Valor Nombre Adend\n"
-#: src/readelf.c:2328
+#: src/readelf.c:2409
#, c-format
msgid ""
"\n"
@@ -4531,40 +4617,40 @@ msgstr[1] ""
"\n"
"La tabla de símbolos [%2u] '%s' contiene entradas %u:\n"
-#: src/readelf.c:2333
+#: 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:2341
+#: 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:2343
+#: 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:2363
+#: src/readelf.c:2444
#, c-format
msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
-#: src/readelf.c:2451
+#: src/readelf.c:2532
#, c-format
msgid "bad dynamic symbol"
msgstr "símbolo dinámico erróneo"
-#: src/readelf.c:2533
+#: src/readelf.c:2614
msgid "none"
msgstr "nada"
-#: src/readelf.c:2550
+#: src/readelf.c:2631
msgid "| <unknown>"
msgstr "| <desconocido>"
-#: src/readelf.c:2581
+#: src/readelf.c:2662
#, c-format
msgid ""
"\n"
@@ -4585,17 +4671,17 @@ msgstr[1] ""
" Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: "
"[%2u] '%s'\n"
-#: src/readelf.c:2602
+#: 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:2615
+#: 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:2658
+#: src/readelf.c:2739
#, c-format
msgid ""
"\n"
@@ -4616,19 +4702,19 @@ msgstr[1] ""
" Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: "
"[%2u] '%s'\n"
-#: src/readelf.c:2686
+#: 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:2701
+#: src/readelf.c:2782
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr " %#06x: Principal %d: %s\n"
#. Print the header.
-#: src/readelf.c:2962
+#: src/readelf.c:3043
#, c-format
msgid ""
"\n"
@@ -4649,15 +4735,15 @@ msgstr[1] ""
" Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: "
"[%2u] '%s'"
-#: src/readelf.c:2990
+#: src/readelf.c:3071
msgid " 0 *local* "
msgstr " 0 *local* "
-#: src/readelf.c:2995
+#: src/readelf.c:3076
msgid " 1 *global* "
msgstr " 1 *global* "
-#: src/readelf.c:3037
+#: src/readelf.c:3118
#, c-format
msgid ""
"\n"
@@ -4682,22 +4768,22 @@ msgstr[1] ""
" Dirección: %#0*<PRIx64> Compensación: %#08<PRIx64> Enlace a sección: "
"[%2u] '%s'\n"
-#: src/readelf.c:3059
+#: 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:3061
+#: src/readelf.c:3142
#, c-format
msgid " 0 %6<PRIu32> %5.1f%%\n"
msgstr " 0 %6<PRIu32> %5.1f%%\n"
-#: src/readelf.c:3068
+#: src/readelf.c:3149
#, c-format
msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
-#: src/readelf.c:3081
+#: src/readelf.c:3162
#, c-format
msgid ""
" Average number of tests: successful lookup: %f\n"
@@ -4706,27 +4792,37 @@ msgstr ""
" Número promedio de pruebas: búsqueda exitosa: %f\n"
" búsqueda sin éxito: %f\n"
-#: src/readelf.c:3099 src/readelf.c:3154 src/readelf.c:3211
+#: 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:3107
+#: 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:3162
+#: 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:3220
+#: 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:3287
+#: src/readelf.c:3386
#, c-format
msgid ""
" Symbol Bias: %u\n"
@@ -4736,7 +4832,7 @@ msgstr ""
" Tamaño de Bitmask: %zu bytes %<PRIuFAST32>%% bits establecen segundo "
"cambio de dispersión: %u\n"
-#: src/readelf.c:3376
+#: src/readelf.c:3475
#, c-format
msgid ""
"\n"
@@ -4753,7 +4849,7 @@ msgstr[1] ""
"Sección de lista de biblioteca [%2zu] '%s' en compensación %#0<PRIx64> "
"contiene entradas %d:\n"
-#: src/readelf.c:3390
+#: src/readelf.c:3489
msgid ""
" Library Time Stamp Checksum Version "
"Flags"
@@ -4761,7 +4857,7 @@ msgstr ""
" Biblioteca Marca de tiempo Indicadores "
"de versión de suma de verificación"
-#: src/readelf.c:3440
+#: src/readelf.c:3539
#, c-format
msgid ""
"\n"
@@ -4772,142 +4868,102 @@ msgstr ""
"Sección de atributos de objeto [%2zu] '%s' de %<PRIu64> bytes con "
"desplazamiento %#0<PRIx64>:\n"
-#: src/readelf.c:3457
+#: src/readelf.c:3556
msgid " Owner Size\n"
msgstr " Propietario Tamaño\n"
-#: src/readelf.c:3486
+#: src/readelf.c:3585
#, c-format
msgid " %-13s %4<PRIu32>\n"
msgstr " %-13s %4<PRIu32>\n"
#. Unknown subsection, print and skip.
-#: src/readelf.c:3525
+#: src/readelf.c:3624
#, c-format
msgid " %-4u %12<PRIu32>\n"
msgstr " %-4u %12<PRIu32>\n"
#. Tag_File
-#: src/readelf.c:3530
+#: src/readelf.c:3629
#, c-format
msgid " File: %11<PRIu32>\n"
msgstr " File: %11<PRIu32>\n"
-#: src/readelf.c:3579
+#: src/readelf.c:3678
#, c-format
msgid " %s: %<PRId64>, %s\n"
msgstr " %s: %<PRId64>, %s\n"
-#: src/readelf.c:3582
+#: src/readelf.c:3681
#, c-format
msgid " %s: %<PRId64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:3585
+#: src/readelf.c:3684
#, c-format
msgid " %s: %s\n"
msgstr " %s: %s\n"
-#: src/readelf.c:3595
+#: src/readelf.c:3694
#, c-format
msgid " %u: %<PRId64>\n"
msgstr " %u: %<PRId64>\n"
-#: src/readelf.c:3598
+#: src/readelf.c:3697
#, c-format
msgid " %u: %s\n"
msgstr " %u: %s\n"
-#: src/readelf.c:3643
-#, c-format
-msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3646
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3651
-#, c-format
-msgid "%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3654
-#, c-format
-msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3660
-#, c-format
-msgid "%s+%#<PRIx64> <%s>"
-msgstr "%s+%#<PRIx64> <%s>"
-
-#: src/readelf.c:3663
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s>"
-msgstr "%s+%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3667
-#, c-format
-msgid "%#<PRIx64> <%s>"
-msgstr "%#<PRIx64> <%s>"
-
-#: src/readelf.c:3670
-#, c-format
-msgid "%#0*<PRIx64> <%s>"
-msgstr "%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3675
-#, c-format
-msgid "%s+%#<PRIx64>"
-msgstr "%s+%#<PRIx64>"
-
-#: src/readelf.c:3678
-#, c-format
-msgid "%s+%#0*<PRIx64>"
-msgstr "%s+%#0*<PRIx64>"
+#: src/readelf.c:3767
+#, fuzzy, c-format
+msgid "sprintf failure"
+msgstr "mprotect falló"
-#: src/readelf.c:4081
+#: src/readelf.c:4249
msgid "empty block"
msgstr "bloque vacío"
-#: src/readelf.c:4084
+#: src/readelf.c:4252
#, c-format
msgid "%zu byte block:"
msgstr "bloque de byte %zu:"
-#: src/readelf.c:4481
-#, c-format
-msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n"
+#: src/readelf.c:4730
+#, fuzzy, c-format
+msgid "%*s[%2<PRIuMAX>] %s <TRUNCATED>\n"
msgstr "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n"
-#: src/readelf.c:4538
+#: src/readelf.c:4794
#, c-format
msgid "%s %#<PRIx64> used with different address sizes"
msgstr "%s %#<PRIx64> utilizado con direcciones de diferente tamaño"
-#: src/readelf.c:4545
+#: src/readelf.c:4801
#, c-format
msgid "%s %#<PRIx64> used with different offset sizes"
msgstr "%s %#<PRIx64> utilizado con offsetr de diferente tamaño"
-#: src/readelf.c:4552
+#: src/readelf.c:4808
#, fuzzy, c-format
msgid "%s %#<PRIx64> used with different base addresses"
msgstr "%s %#<PRIx64> utilizado con direcciones de diferente tamaño"
-#: src/readelf.c:4641
+#: src/readelf.c:4815
+#, fuzzy, c-format
+msgid "%s %#<PRIx64> used with different attribute %s and %s"
+msgstr "%s %#<PRIx64> utilizado con direcciones de diferente tamaño"
+
+#: src/readelf.c:4912
#, c-format
msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n"
msgstr " [%6tx] <MATERIAL INUTIL SIN UTILIZAR EN EL RESTO DE LA SECCION>\n"
-#: src/readelf.c:4649
+#: src/readelf.c:4920
#, c-format
msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n"
msgstr " [%6tx] <MATERIAL INUTIL NO UTILIZADO> ... %<PRIu64> bytes ...\n"
-#: src/readelf.c:4675
+#: src/readelf.c:4998
#, c-format
msgid ""
"\n"
@@ -4918,7 +4974,7 @@ msgstr ""
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n"
" [ Código]\n"
-#: src/readelf.c:4683
+#: src/readelf.c:5006
#, c-format
msgid ""
"\n"
@@ -4927,30 +4983,74 @@ msgstr ""
"\n"
"Sección de abreviatura en compensación %<PRIu64>:\n"
-#: src/readelf.c:4696
+#: src/readelf.c:5019
#, c-format
msgid " *** error while reading abbreviation: %s\n"
msgstr " *** error en lectura de abreviatura: %s\n"
-#: src/readelf.c:4712
+#: src/readelf.c:5035
#, c-format
msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n"
msgstr " [%5u] compensación: %<PRId64>, hijos: %s, etiqueta: %s\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:6172 src/readelf.c:7745
-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 %#<PRIx64>:\n"
+msgstr ""
+"\n"
+"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:7745
-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:4749 src/readelf.c:4822
+#: src/readelf.c:5181 src/readelf.c:5205 src/readelf.c:5586 src/readelf.c:8883
+#, fuzzy, c-format
+msgid " Length: %8<PRIu64>\n"
+msgstr " (compensación: %#<PRIx64>)"
+
+#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905
+#, fuzzy, c-format
+msgid " Address size: %8<PRIu64>\n"
+msgstr " (fin de compensación: %#<PRIx64>)"
+
+#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915
+#, fuzzy, c-format
+msgid " Segment size: %8<PRIu64>\n"
+msgstr " establecer archivo a %<PRIu64>\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: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:4764
+#: src/readelf.c:5313
#, c-format
msgid ""
"\n"
@@ -4965,12 +5065,12 @@ msgstr[1] ""
"\n"
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entradas %zu:\n"
-#: src/readelf.c:4795
+#: src/readelf.c:5344
#, c-format
msgid " [%*zu] ???\n"
msgstr " [%*zu] ???\n"
-#: src/readelf.c:4797
+#: src/readelf.c:5346
#, c-format
msgid ""
" [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n"
@@ -4978,17 +5078,7 @@ msgstr ""
" Inicio [%*zu]: %0#*<PRIx64>, longitud: %5<PRIu64>, compensación CU DIE: "
"%6<PRId64>\n"
-#: src/readelf.c:4827 src/readelf.c:4981 src/readelf.c:5558 src/readelf.c:6515
-#: src/readelf.c:7047 src/readelf.c:7167 src/readelf.c:7331 src/readelf.c:7819
-#, c-format
-msgid ""
-"\n"
-"DWARF section [%2zu] '%s' at offset %#<PRIx64>:\n"
-msgstr ""
-"\n"
-"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n"
-
-#: src/readelf.c:4840 src/readelf.c:6541
+#: src/readelf.c:5390 src/readelf.c:8195
#, fuzzy, c-format
msgid ""
"\n"
@@ -4997,113 +5087,152 @@ msgstr ""
"\n"
"Tabla en compensación %Zu:\n"
-#: src/readelf.c:4844 src/readelf.c:5582 src/readelf.c:6552
+#: 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:4860
+#: src/readelf.c:5410
#, fuzzy, c-format
msgid ""
"\n"
" Length: %6<PRIu64>\n"
msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:4872
+#: src/readelf.c:5422
#, fuzzy, c-format
msgid " DWARF version: %6<PRIuFAST16>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:4876
+#: src/readelf.c:5426
#, c-format
msgid "unsupported aranges version"
msgstr ""
-#: src/readelf.c:4887
+#: src/readelf.c:5437
#, fuzzy, c-format
msgid " CU offset: %6<PRIx64>\n"
msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:4893
+#: src/readelf.c:5443
#, fuzzy, c-format
msgid " Address size: %6<PRIu64>\n"
msgstr " (fin de compensación: %#<PRIx64>)"
-#: src/readelf.c:4897
-#, fuzzy, c-format
-msgid "unsupported address size"
-msgstr "no hay valor de dirección"
-
-#: src/readelf.c:4902
+#: src/readelf.c:5452
#, fuzzy, c-format
msgid ""
" Segment size: %6<PRIu64>\n"
"\n"
msgstr " establecer archivo a %<PRIu64>\n"
-#: src/readelf.c:4906
+#: src/readelf.c:5507
#, c-format
-msgid "unsupported segment size"
+msgid " %zu padding bytes\n"
msgstr ""
-#: src/readelf.c:4946
+#: src/readelf.c:5550
#, fuzzy, c-format
-msgid " %s..%s (%<PRIx64>)\n"
-msgstr " %s: %<PRId64>\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%<PRIx64>:\n"
+"\n"
+msgstr " (fin de compensación: %#<PRIx64>)"
-#: src/readelf.c:4949
+#: src/readelf.c:5628 src/readelf.c:8925
#, fuzzy, c-format
-msgid " %s..%s\n"
-msgstr " [%6tx] %s..%s\n"
+msgid " Offset entries: %8<PRIu64>\n"
+msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:4958
+#: src/readelf.c:5644 src/readelf.c:8941
#, c-format
-msgid " %zu padding bytes\n"
+msgid " Unknown CU base: "
msgstr ""
-#: src/readelf.c:4976
+#: 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<PRIx64>] base: "
+msgstr ""
-#: src/readelf.c:5006 src/readelf.c:7074
+#: src/readelf.c:5652 src/readelf.c:8949
#, c-format
-msgid " [%6tx] <INVALID DATA>\n"
-msgstr " [%6tx] <DATOS INVÃLIDOS>\n"
+msgid " Not associated with a CU.\n"
+msgstr ""
-#: src/readelf.c:5028 src/readelf.c:7096
+#: 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:5035 src/readelf.c:7103
+#: src/readelf.c:5667 src/readelf.c:8964
+#, fuzzy, c-format
+msgid " Offsets starting at 0x%<PRIx64>:\n"
+msgstr " Propietario Tamaño\n"
+
+#: 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:5046
+#: src/readelf.c:5921
#, c-format
-msgid " [%6tx] %s..%s\n"
-msgstr " [%6tx] %s..%s\n"
+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 ""
+"\n"
+" Unknown CU base: "
+msgstr ""
+
+#: src/readelf.c:5959 src/readelf.c:9309
+#, c-format
+msgid ""
+"\n"
+" CU [%6<PRIx64>] base: "
+msgstr ""
-#: src/readelf.c:5048
+#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361
#, c-format
-msgid " %s..%s\n"
-msgstr " %s..%s\n"
+msgid " [%6tx] <INVALID DATA>\n"
+msgstr " [%6tx] <DATOS INVÃLIDOS>\n"
-#: src/readelf.c:5284
+#: 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:6252
#, fuzzy
msgid " <INVALID DATA>\n"
msgstr " <DATOS INVÃLIDOS>\n"
-#: src/readelf.c:5537
+#: src/readelf.c:6505
#, fuzzy, c-format
msgid "cannot get ELF: %s"
msgstr "no se puede leer encabezamiento ELF: %s"
-#: src/readelf.c:5554
+#: src/readelf.c:6523
#, c-format
msgid ""
"\n"
@@ -5113,7 +5242,7 @@ msgstr ""
"Sección de información de marco de llamada [%2zu] '%s' en compensación "
"%#<PRIx64>:\n"
-#: src/readelf.c:5604
+#: src/readelf.c:6573
#, c-format
msgid ""
"\n"
@@ -5122,50 +5251,65 @@ msgstr ""
"\n"
" [%6tx] Terminator cero\n"
-#: src/readelf.c:5697 src/readelf.c:5852
+#: src/readelf.c:6666 src/readelf.c:6820
#, c-format
msgid "invalid augmentation length"
msgstr "longitud de aumento inválida"
-#: src/readelf.c:5712
+#: src/readelf.c:6681
msgid "FDE address encoding: "
msgstr "Codificación de dirección FDE:"
-#: src/readelf.c:5718
+#: src/readelf.c:6687
msgid "LSDA pointer encoding: "
msgstr "Codificación de puntero LSDA:"
-#: src/readelf.c:5829
+#: src/readelf.c:6797
#, c-format
msgid " (offset: %#<PRIx64>)"
msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:5836
+#: src/readelf.c:6804
#, c-format
msgid " (end offset: %#<PRIx64>)"
msgstr " (fin de compensación: %#<PRIx64>)"
-#: src/readelf.c:5873
+#: src/readelf.c:6841
#, c-format
msgid " %-26sLSDA pointer: %#<PRIx64>\n"
msgstr "Puntero %-26sLSDA: %#<PRIx64>\n"
-#: src/readelf.c:5928
-#, c-format
-msgid "cannot get attribute code: %s"
+#: src/readelf.c:6926
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute code: %s"
msgstr "No se puede obtener código de atributo: %s"
-#: src/readelf.c:5937
-#, c-format
-msgid "cannot get attribute form: %s"
+#: src/readelf.c:6936
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute form: %s"
msgstr "No se puede obtener forma de atributo: %s"
-#: src/readelf.c:5952
-#, c-format
-msgid "cannot get attribute value: %s"
+#: src/readelf.c:6958
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute '%s' (%s) value: %s"
msgstr "No se puede obtener valor: %s"
-#: src/readelf.c:6254
+#: src/readelf.c:7291
+#, fuzzy, c-format
+msgid "invalid file (%<PRId64>): %s"
+msgstr "Archivo inválido"
+
+#: src/readelf.c:7295
+#, fuzzy, c-format
+msgid "no srcfiles for CU [%<PRIx64>]"
+msgstr " establecer archivo a %<PRIu64>\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"
@@ -5176,20 +5320,25 @@ msgstr ""
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n"
" [Offset]\n"
-#: src/readelf.c:6286
-#, 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 %<PRIu64>:\n"
" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
"%<PRIu8>, Offset size: %<PRIu8>\n"
-" Type signature: %#<PRIx64>, Type offset: %#<PRIx64>\n"
+" Type signature: %#<PRIx64>, Type offset: %#<PRIx64> [%<PRIx64>]\n"
msgstr ""
"Tipo de unidad al compensar %<PRIu64>:\n"
" Versión: %<PRIu16>, Abreviación de sección de compensación: %<PRIu64>, "
"Tamaño de dirección: %<PRIu8>, Tamaño de compensación: %<PRIu8>\n"
" Tipo de firma: %#<PRIx64>, Tipo de compensación: %#<PRIx64>\n"
-#: src/readelf.c:6295
+#: src/readelf.c:7603
#, c-format
msgid ""
" Compilation unit at offset %<PRIu64>:\n"
@@ -5200,34 +5349,50 @@ msgstr ""
" Versión: %<PRIu16>, Compensación de sección de abreviatura: %<PRIu64>, "
"Tamaño de dirección: %<PRIu8>, Tamaño de compensación: %<PRIu8>\n"
-#: src/readelf.c:6320
+#: src/readelf.c:7613 src/readelf.c:7776
#, c-format
-msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s"
-msgstr "no se puede obtener DIE en compensación %<PRIu64> en sección '%s': %s"
+msgid " Unit type: %s (%<PRIu8>)"
+msgstr ""
-#: src/readelf.c:6334
+#: src/readelf.c:7640
+#, c-format
+msgid "unknown version (%d) or unit type (%d)"
+msgstr ""
+
+#: 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:6343
-#, c-format
-msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s"
+#: src/readelf.c:7678
+#, fuzzy, c-format
+msgid "cannot get tag of DIE at offset [%<PRIx64>] in section '%s': %s"
msgstr ""
"no se ha podido obtener etiqueta de DIE en compensación%<PRIu64> en sección "
"'%s': %s"
-#: src/readelf.c:6375
+#: 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:6383
+#: src/readelf.c:7724
#, c-format
msgid "cannot get next DIE: %s"
msgstr "No se puede obtener próximo DIE: %s"
-#: src/readelf.c:6419
+#: src/readelf.c:7768
+#, fuzzy, c-format
+msgid ""
+" Split compilation unit at offset %<PRIu64>:\n"
+" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
+"%<PRIu8>, Offset size: %<PRIu8>\n"
+msgstr ""
+"Unidad de compilación en compensación %<PRIu64>:\n"
+" Versión: %<PRIu16>, Compensación de sección de abreviatura: %<PRIu64>, "
+"Tamaño de dirección: %<PRIu8>, Tamaño de compensación: %<PRIu8>\n"
+
+#: src/readelf.c:7819
#, fuzzy, c-format
msgid ""
"\n"
@@ -5237,25 +5402,32 @@ msgstr ""
"\n"
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n"
-#: src/readelf.c:6528
+#: src/readelf.c:8151
+#, fuzzy, c-format
+msgid "unknown form: %s"
+msgstr "Forma %<PRIx64> 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:6598
-#, c-format
+#: src/readelf.c:8284
+#, fuzzy, c-format
msgid ""
"\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"
msgstr ""
@@ -5272,19 +5444,34 @@ msgstr ""
"\n"
"Códigos operativos:\n"
-#: src/readelf.c:6619
+#: 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:6634
+#: src/readelf.c:8347
#, c-format
msgid " [%*<PRIuFAST8>] %hhu argument\n"
msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n"
msgstr[0] " [%*<PRIuFAST8>] argumento %hhu \n"
msgstr[1] " [%*<PRIuFAST8>] argumento %hhu\n"
-#: src/readelf.c:6642
+#: src/readelf.c:8358
msgid ""
"\n"
"Directory table:"
@@ -5292,17 +5479,29 @@ msgstr ""
"\n"
"Tabla de Directorio:"
-#: src/readelf.c:6658
+#: 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:6693
+#: src/readelf.c:8529
msgid ""
"\n"
"Line number statements:"
@@ -5310,121 +5509,121 @@ msgstr ""
"\n"
" Declaraciones de número de Línea:"
-#: src/readelf.c:6744
+#: 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:6780
-#, 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:6785
+#: 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:6805
+#: src/readelf.c:8611
#, c-format
msgid " extended opcode %u: "
msgstr " Código operativo extendido %u: "
-#: src/readelf.c:6810
+#: src/readelf.c:8616
#, fuzzy
msgid " end of sequence"
msgstr "Fin de secuencia"
-#: src/readelf.c:6829
+#: 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:6856
+#: src/readelf.c:8662
#, fuzzy, c-format
msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n"
msgstr ""
"definir nuevo archivo: dir=%u, mtime=%<PRIu64>, longitud=%<PRIu64>, nombre="
"%s\n"
-#: src/readelf.c:6869
+#: src/readelf.c:8675
#, c-format
msgid " set discriminator to %u\n"
msgstr " establecer discriminador a %u\n"
#. Unknown, ignore it.
-#: src/readelf.c:6874
+#: src/readelf.c:8680
#, fuzzy
msgid " unknown opcode"
msgstr "código operativo desconocido "
#. Takes no argument.
-#: src/readelf.c:6886
+#: src/readelf.c:8692
msgid " copy"
msgstr "Copiar"
-#: src/readelf.c:6897
-#, 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:6901
+#: 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:6912
+#: 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 %<PRId64>\n"
msgstr " línea de avance por la constante %d a %<PRId64>\n"
-#: src/readelf.c:6920
+#: src/readelf.c:8723
#, c-format
msgid " set file to %<PRIu64>\n"
msgstr " establecer archivo a %<PRIu64>\n"
-#: src/readelf.c:6930
+#: src/readelf.c:8733
#, c-format
msgid " set column to %<PRIu64>\n"
msgstr " Establecer columna a %<PRIu64>\n"
-#: src/readelf.c:6937
+#: src/readelf.c:8740
#, c-format
msgid " set '%s' to %<PRIuFAST8>\n"
msgstr "Establecer '%s' a %<PRIuFAST8>\n"
#. Takes no argument.
-#: src/readelf.c:6943
+#: src/readelf.c:8746
msgid " set basic block flag"
msgstr "Establecer bandera de bloque básico"
-#: src/readelf.c:6956
+#: src/readelf.c:8757
#, 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:6960
-#, 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:6978
+#: 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:6987
+#: src/readelf.c:8786
msgid " set prologue end flag"
msgstr " Establecer bandera prologue_end"
#. Takes no argument.
-#: src/readelf.c:6992
+#: src/readelf.c:8791
msgid " set epilogue begin flag"
msgstr " Establecer bandera epilogue_begin"
-#: src/readelf.c:7001
+#: src/readelf.c:8800
#, c-format
msgid " set isa to %u\n"
msgstr " establecer isa para %u\n"
@@ -5432,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:7010
+#: src/readelf.c:8809
#, c-format
msgid " unknown opcode with %<PRIu8> parameter:"
msgid_plural " unknown opcode with %<PRIu8> parameters:"
msgstr[0] " opcódigo con parámetro %<PRIu8> desconocido:"
msgstr[1] " opcódigo con parámetros %<PRIu8> desconocido:"
-#: src/readelf.c:7042
-#, 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:7117
-#, 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:7119
+#: 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:7126 src/readelf.c:8077
+#: src/readelf.c:9476 src/readelf.c:10490
msgid " <INVALID DATA>\n"
msgstr " <DATOS INVÃLIDOS>\n"
-#: src/readelf.c:7178 src/readelf.c:7340
+#: 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:7258
+#: 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:7281
+#: 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:7381
+#: src/readelf.c:9734
#, fuzzy, c-format
msgid " Offset: 0x%<PRIx64>\n"
msgstr " Propietario Tamaño\n"
-#: src/readelf.c:7393
+#: src/readelf.c:9746
#, fuzzy, c-format
msgid " Version: %<PRIu16>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:7399 src/readelf.c:8196
+#: src/readelf.c:9752 src/readelf.c:10609
#, c-format
msgid " unknown version, cannot parse section\n"
msgstr ""
-#: src/readelf.c:7406
+#: src/readelf.c:9759
#, fuzzy, c-format
msgid " Flag: 0x%<PRIx8>\n"
msgstr " Dirección de punto de entrada: %#<PRIx64>\n"
-#: src/readelf.c:7409
+#: src/readelf.c:9762
#, fuzzy, c-format
msgid " Offset length: %<PRIu8>\n"
msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:7417
+#: src/readelf.c:9770
#, fuzzy, c-format
msgid " .debug_line offset: 0x%<PRIx64>\n"
msgstr " (fin de compensación: %#<PRIx64>)"
-#: src/readelf.c:7430
+#: src/readelf.c:9795
#, fuzzy, c-format
msgid " extension opcode table, %<PRIu8> items:\n"
msgstr " opcódigo con parámetro %<PRIu8> desconocido:"
-#: src/readelf.c:7437
+#: src/readelf.c:9802
#, c-format
msgid " [%<PRIx8>]"
msgstr ""
-#: src/readelf.c:7449
+#: src/readelf.c:9814
#, fuzzy, c-format
msgid " %<PRIu8> arguments:"
msgstr " [%*<PRIuFAST8>] argumento %hhu \n"
-#: src/readelf.c:7477
+#: src/readelf.c:9829
#, c-format
msgid " no arguments."
msgstr ""
-#: src/readelf.c:7777
-#, c-format
-msgid "vendor opcode not verified?"
-msgstr ""
-
-#: src/readelf.c:7805
+#: src/readelf.c:10030
#, c-format
msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n"
msgstr ""
" Compensación [%5d] DIE: %6<PRId64>, Compensación CU DIE: %6<PRId64>, "
"nombre: %s\n"
-#: src/readelf.c:7846
+#: src/readelf.c:10072
#, c-format
msgid ""
"\n"
@@ -5547,12 +5740,37 @@ msgstr ""
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64>:\n"
" %*s String\n"
-#: src/readelf.c:7860
-#, 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:7880
+#: 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<PRIu64>\n"
+msgstr " (compensación: %#<PRIx64>)"
+
+#: src/readelf.c:10216
+#, fuzzy, c-format
+msgid " Offset size: %8<PRIu8>\n"
+msgstr " (compensación: %#<PRIx64>)"
+
+#: src/readelf.c:10230
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:10239
+#, fuzzy, c-format
+msgid " Padding: %8<PRIx16>\n"
+msgstr " (compensación: %#<PRIx64>)"
+
+#: src/readelf.c:10293
#, c-format
msgid ""
"\n"
@@ -5561,7 +5779,7 @@ msgstr ""
"\n"
"Sección de tabla de búsqueda de marco de llamada [%2zu] '.eh_frame_hdr':\n"
-#: src/readelf.c:7982
+#: src/readelf.c:10395
#, c-format
msgid ""
"\n"
@@ -5570,22 +5788,22 @@ msgstr ""
"\n"
"Excepción en el manejo de la sección de tabla [%2zu] '.gcc_except_table':\n"
-#: src/readelf.c:8005
+#: src/readelf.c:10418
#, c-format
msgid " LPStart encoding: %#x "
msgstr "Codificación LPStart: %#x "
-#: src/readelf.c:8017
+#: src/readelf.c:10430
#, c-format
msgid " TType encoding: %#x "
msgstr "Codificación TType: %#x "
-#: src/readelf.c:8032
+#: src/readelf.c:10445
#, c-format
msgid " Call site encoding: %#x "
msgstr "Codificación de sitio de llamada: %#x "
-#: src/readelf.c:8045
+#: src/readelf.c:10458
msgid ""
"\n"
" Call site table:"
@@ -5593,7 +5811,7 @@ msgstr ""
"\n"
" Tabla de sitio de llamada:"
-#: src/readelf.c:8059
+#: src/readelf.c:10472
#, c-format
msgid ""
" [%4u] Call site start: %#<PRIx64>\n"
@@ -5606,12 +5824,12 @@ msgstr ""
" Landing pad: %#<PRIx64>\n"
" Action: %u\n"
-#: src/readelf.c:8132
+#: src/readelf.c:10545
#, c-format
msgid "invalid TType encoding"
msgstr "Codificación TType inválida"
-#: src/readelf.c:8158
+#: src/readelf.c:10571
#, fuzzy, c-format
msgid ""
"\n"
@@ -5620,37 +5838,37 @@ msgstr ""
"\n"
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n"
-#: src/readelf.c:8187
+#: src/readelf.c:10600
#, fuzzy, c-format
msgid " Version: %<PRId32>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:8205
+#: src/readelf.c:10618
#, fuzzy, c-format
msgid " CU offset: %#<PRIx32>\n"
msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:8212
+#: src/readelf.c:10625
#, fuzzy, c-format
msgid " TU offset: %#<PRIx32>\n"
msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:8219
+#: src/readelf.c:10632
#, fuzzy, c-format
msgid " address offset: %#<PRIx32>\n"
msgstr " (fin de compensación: %#<PRIx64>)"
-#: src/readelf.c:8226
+#: src/readelf.c:10639
#, fuzzy, c-format
msgid " symbol offset: %#<PRIx32>\n"
msgstr " (compensación: %#<PRIx64>)"
-#: src/readelf.c:8233
+#: src/readelf.c:10646
#, fuzzy, c-format
msgid " constant offset: %#<PRIx32>\n"
msgstr " (fin de compensación: %#<PRIx64>)"
-#: src/readelf.c:8247
+#: src/readelf.c:10660
#, fuzzy, c-format
msgid ""
"\n"
@@ -5659,7 +5877,7 @@ msgstr ""
"\n"
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n"
-#: src/readelf.c:8272
+#: src/readelf.c:10685
#, fuzzy, c-format
msgid ""
"\n"
@@ -5668,7 +5886,7 @@ msgstr ""
"\n"
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n"
-#: src/readelf.c:8301
+#: src/readelf.c:10714
#, fuzzy, c-format
msgid ""
"\n"
@@ -5677,7 +5895,7 @@ msgstr ""
"\n"
"Sección DWARF [%2zu] '%s' en compensación %#<PRIx64> contiene entrada %zu:\n"
-#: src/readelf.c:8334
+#: src/readelf.c:10746
#, fuzzy, c-format
msgid ""
"\n"
@@ -5686,17 +5904,18 @@ msgstr ""
"\n"
"Tabla de símbolos inválida en compensación %#0<PRIx64>\n"
-#: src/readelf.c:8421
+#: 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:8577 src/readelf.c:9199 src/readelf.c:9310 src/readelf.c:9368
+#: 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:8940
+#: src/readelf.c:11610
#, c-format
msgid ""
"\n"
@@ -5705,21 +5924,21 @@ msgstr ""
"\n"
"%*s... <repeats %u more times> ..."
-#: src/readelf.c:9447
+#: src/readelf.c:12117
msgid " Owner Data size Type\n"
msgstr " Owner Data size Type\n"
-#: src/readelf.c:9465
+#: src/readelf.c:12135
#, c-format
msgid " %-13.*s %9<PRId32> %s\n"
msgstr " %-13.*s %9<PRId32> %s\n"
-#: src/readelf.c:9515
-#, 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:9542
+#: src/readelf.c:12212
#, c-format
msgid ""
"\n"
@@ -5728,7 +5947,7 @@ msgstr ""
"\n"
"Sección de nota [%2zu] '%s' de %<PRIu64> bytes en compensación %#0<PRIx64>:\n"
-#: src/readelf.c:9565
+#: src/readelf.c:12235
#, c-format
msgid ""
"\n"
@@ -5737,7 +5956,7 @@ msgstr ""
"\n"
"Segmento de nota de %<PRIu64> bytes en compensación %#0<PRIx64>:\n"
-#: src/readelf.c:9611
+#: src/readelf.c:12281
#, fuzzy, c-format
msgid ""
"\n"
@@ -5746,12 +5965,12 @@ msgstr ""
"\n"
"Sección [%Zu] '%s' no tiene datos para volcar.\n"
-#: src/readelf.c:9638 src/readelf.c:9689
+#: 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:9643
+#: src/readelf.c:12313
#, fuzzy, c-format
msgid ""
"\n"
@@ -5761,7 +5980,7 @@ msgstr ""
"Volcado Hex de sección [%Zu] '%s', %<PRIu64> bytes en compensación "
"%#0<PRIx64>:\n"
-#: src/readelf.c:9648
+#: src/readelf.c:12318
#, fuzzy, c-format
msgid ""
"\n"
@@ -5772,7 +5991,7 @@ msgstr ""
"Volcado Hex de sección [%Zu] '%s', %<PRIu64> bytes en compensación "
"%#0<PRIx64>:\n"
-#: src/readelf.c:9662
+#: src/readelf.c:12332
#, fuzzy, c-format
msgid ""
"\n"
@@ -5781,7 +6000,7 @@ msgstr ""
"\n"
"Sección [%Zu] '%s' no tiene datos para volcar.\n"
-#: src/readelf.c:9694
+#: src/readelf.c:12364
#, fuzzy, c-format
msgid ""
"\n"
@@ -5791,7 +6010,7 @@ msgstr ""
"Sección de cadena [%Zu] '%s' contiene %<PRIu64> bytes en compensación "
"%#0<PRIx64>:\n"
-#: src/readelf.c:9699
+#: src/readelf.c:12369
#, fuzzy, c-format
msgid ""
"\n"
@@ -5802,7 +6021,7 @@ msgstr ""
"Sección de cadena [%Zu] '%s' contiene %<PRIu64> bytes en compensación "
"%#0<PRIx64>:\n"
-#: src/readelf.c:9748
+#: src/readelf.c:12418
#, c-format
msgid ""
"\n"
@@ -5811,7 +6030,7 @@ msgstr ""
"\n"
"sección [%lu] no existe"
-#: src/readelf.c:9777
+#: src/readelf.c:12447
#, c-format
msgid ""
"\n"
@@ -5820,12 +6039,12 @@ msgstr ""
"\n"
"sección '%s' no existe"
-#: src/readelf.c:9834
+#: 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:9837
+#: src/readelf.c:12507
#, c-format
msgid ""
"\n"
@@ -5834,7 +6053,7 @@ msgstr ""
"\n"
"Archivo '%s' no tiene índice de símbolo\n"
-#: src/readelf.c:9841
+#: src/readelf.c:12511
#, fuzzy, c-format
msgid ""
"\n"
@@ -5843,12 +6062,12 @@ msgstr ""
"\n"
"Ãndice de archivo '%s' tiene %Zu entradas:\n"
-#: src/readelf.c:9859
+#: 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:9864
+#: src/readelf.c:12534
#, c-format
msgid "Archive member '%s' contains:\n"
msgstr "Miembro de archivo contiene '%s':\n"
@@ -5924,119 +6143,120 @@ msgstr " (ex %s)"
msgid "(TOTALS)\n"
msgstr "(TOTALES)\n"
-#: src/stack.c:482
+#: src/stack.c:483
#, c-format
msgid "-p PID should be a positive process id."
msgstr ""
-#: src/stack.c:488
+#: src/stack.c:489
#, fuzzy, c-format
msgid "Cannot open core file '%s'"
msgstr "Imposible abrir el archivo '%s'"
-#: src/stack.c:548
+#: src/stack.c:549
#, c-format
msgid "-n MAXFRAMES should be 0 or higher."
msgstr ""
-#: src/stack.c:560
+#: src/stack.c:561
#, c-format
msgid "-e EXEC needs a core given by --core."
msgstr ""
-#: src/stack.c:564
+#: src/stack.c:565
#, c-format
msgid "-1 needs a thread id given by -p."
msgstr ""
-#: src/stack.c:568
+#: src/stack.c:569
#, c-format
msgid "One of -p PID or --core COREFILE should be given."
msgstr ""
-#: src/stack.c:638
+#: src/stack.c:641
#, fuzzy
msgid "Show stack of process PID"
msgstr "No se puede crear el árbol de búsqueda"
-#: src/stack.c:640
+#: src/stack.c:643
msgid "Show stack found in COREFILE"
msgstr ""
-#: src/stack.c:641
+#: src/stack.c:644
msgid "(optional) EXECUTABLE that produced COREFILE"
msgstr ""
-#: src/stack.c:645
+#: src/stack.c:648
msgid "Output selection options:"
msgstr "Opciones de selección de salida:"
-#: src/stack.c:647
+#: src/stack.c:650
#, fuzzy
msgid "Additionally show frame activation"
msgstr "Selección de salida adicional:"
-#: src/stack.c:649
+#: src/stack.c:652
msgid "Additionally try to lookup DWARF debuginfo name for frame address"
msgstr ""
-#: src/stack.c:652
+#: src/stack.c:655
msgid ""
"Additionally show inlined function frames using DWARF debuginfo if available "
"(implies -d)"
msgstr ""
-#: src/stack.c:654
+#: src/stack.c:657
msgid "Additionally show module file information"
msgstr ""
-#: src/stack.c:656
+#: src/stack.c:659
#, fuzzy
msgid "Additionally show source file information"
msgstr "Selección de salida adicional:"
-#: src/stack.c:658
+#: src/stack.c:661
msgid ""
"Show all additional information (activation, debugname, inlines, module and "
"source)"
msgstr ""
-#: src/stack.c:660
+#: src/stack.c:663
msgid "Do not resolve address to function symbol name"
msgstr ""
-#: src/stack.c:662
+#: src/stack.c:665
msgid "Show raw function symbol names, do not try to demangle names"
msgstr ""
-#: src/stack.c:664
+#: src/stack.c:667
msgid "Show module build-id, load address and pc offset"
msgstr ""
-#: src/stack.c:666
+#: src/stack.c:669
msgid "Show the backtrace of only one thread"
msgstr ""
-#: src/stack.c:668
+#: src/stack.c:671
msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)"
msgstr ""
-#: src/stack.c:670
+#: src/stack.c:673
msgid "Show module memory map with build-id, elf and debug files detected"
msgstr ""
-#: src/stack.c:678
+#: 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:751
+#: src/stack.c:756
#, c-format
msgid "Couldn't show any frames."
msgstr ""
@@ -6665,9 +6885,11 @@ msgstr ""
"[MODULE...]"
#: 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 "
@@ -6690,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 "
@@ -6727,6 +6950,68 @@ msgstr "También mostrar nombres de función"
msgid "Show instances of inlined functions"
msgstr ""
+#~ msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#<PRIx64> <%s>"
+#~ msgstr "%s+%#<PRIx64> <%s>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s>"
+#~ msgstr "%s+%#0*<PRIx64> <%s>"
+
+#~ msgid "%#<PRIx64> <%s>"
+#~ msgstr "%#<PRIx64> <%s>"
+
+#~ msgid "%#0*<PRIx64> <%s>"
+#~ msgstr "%#0*<PRIx64> <%s>"
+
+#~ msgid "%s+%#<PRIx64>"
+#~ msgstr "%s+%#<PRIx64>"
+
+#~ msgid "%s+%#0*<PRIx64>"
+#~ msgstr "%s+%#0*<PRIx64>"
+
+#, fuzzy
+#~ msgid " %s..%s (%<PRIx64>)\n"
+#~ msgstr " %s: %<PRId64>\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 %<PRIu64> in section '%s': %s"
+#~ msgstr ""
+#~ "no se puede obtener DIE en compensación %<PRIu64> 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"
@@ -7257,10 +7542,6 @@ msgstr ""
#~ msgid "unknown user attribute %hx"
#~ msgstr "Atributo de usuario desconocido %hx"
-#, fuzzy
-#~ msgid "unknown form %#<PRIx64>"
-#~ msgstr "Forma %<PRIx64> 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 6ab09aa3..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: 2017-08-02 18:29+0200\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 <hyu_gabaru@yahoo.co.jp>\n"
"Language-Team: Japanese <jp@li.org>\n"
@@ -50,18 +50,18 @@ msgstr ""
"This is free software; see the source for copying conditions. There is NO\n"
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
-#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3296
-#: src/readelf.c:3687 src/readelf.c:8526 src/unstrip.c:2227 src/unstrip.c:2432
+#: 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:50
+#: 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:52
+#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:52
#: libelf/elf_error.c:91
msgid "out of memory"
msgstr "メモリーä¸è¶³"
@@ -98,166 +98,202 @@ msgstr "データã®å‡ºåŠ›ä¸­ã«ã‚¨ãƒ©ãƒ¼"
msgid "no backend support available"
msgstr "ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ã‚µãƒãƒ¼ãƒˆãŒåˆ©ç”¨ã§ãã¾ã›ã‚“"
-#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:51
+#: 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:71
+#: 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:72
+#: 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 ""
-#: libdw/dwarf_error.c:98
+#: libdw/dwarf_error.c:103
#, fuzzy
msgid "unknown language code"
msgstr "ä¸æ˜Žãªå‘½ä»¤ã‚³ãƒ¼ãƒ‰"
-#: libdwfl/argp-std.c:50 src/stack.c:636 src/unstrip.c:2374
+#: 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 "é¸æŠžã‚ªãƒ—ションを入力ã—ã¦ãã ã•ã„:"
@@ -289,7 +325,7 @@ msgstr "実行中ã®ã‚«ãƒ¼ãƒãƒ«ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’探ã™"
msgid "Kernel with all modules"
msgstr "å…¨ã¦ã®ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ä»˜ãã®ã‚«ãƒ¼ãƒãƒ«"
-#: libdwfl/argp-std.c:63 src/stack.c:643
+#: libdwfl/argp-std.c:63 src/stack.c:646
msgid "Search path for separate debuginfo files"
msgstr "分離ã—㟠debuginfo ファイルã¹ãパスを探ã™"
@@ -368,7 +404,7 @@ msgstr ""
msgid "r_offset is bogus"
msgstr ""
-#: libdwfl/libdwflP.h:64 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 "オフセットãŒç¯„囲を越ãˆã¦ã„ã‚‹"
@@ -498,7 +534,7 @@ msgstr "ãƒãƒƒã‚¯ã‚¨ãƒ³ãƒ‰ãŒã‚ã‚Šã¾ã›ã‚“"
msgid "<unknown>"
msgstr "<ä¸æ˜Ž>"
-#: libebl/ebldynamictagname.c:101
+#: libebl/ebldynamictagname.c:103
#, c-format
msgid "<unknown>: %#<PRIx64>"
msgstr "<ä¸æ˜Ž>: %#<PRIx64>"
@@ -588,7 +624,7 @@ msgstr "ソース演算å­ã®å¤§ãã•ãŒç„¡åŠ¹"
msgid "invalid size of destination operand"
msgstr "宛先演算å­ã®å¤§ãã•ãŒç„¡åŠ¹"
-#: libelf/elf_error.c:87 src/readelf.c:5139
+#: libelf/elf_error.c:87 src/readelf.c:6107
#, c-format
msgid "invalid encoding"
msgstr "無効ãªã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰"
@@ -598,153 +634,158 @@ 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:7389 src/readelf.c:7900
-#: src/readelf.c:8001 src/readelf.c:8182
+#: 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"
@@ -821,22 +862,22 @@ msgstr ""
msgid "[ADDR...]"
msgstr ""
-#: src/addr2line.c:519
+#: src/addr2line.c:520
#, c-format
msgid "Section syntax requires exactly one module"
msgstr ""
-#: src/addr2line.c:542
+#: src/addr2line.c:543
#, c-format
msgid "offset %#<PRIxMAX> lies outside section '%s'"
msgstr ""
-#: src/addr2line.c:632
+#: src/addr2line.c:633
#, c-format
msgid "cannot find symbol '%s'"
msgstr ""
-#: src/addr2line.c:637
+#: src/addr2line.c:638
#, c-format
msgid "offset %#<PRIxMAX> lies outside contents of '%s'"
msgstr ""
@@ -1005,12 +1046,12 @@ msgstr "アーカイブ㫠stat ã§ãã¾ã›ã‚“: '%s'"
msgid "no entry %s in archive\n"
msgstr "アーカイブã«é …ç›® %s ãŒã‚ã‚Šã¾ã›ã‚“\n"
-#: src/ar.c:473 src/ar.c:918 src/ar.c:1118
+#: src/ar.c:473 src/ar.c:918 src/ar.c:1122
#, c-format
msgid "cannot create hash table"
msgstr "ãƒãƒƒã‚·ãƒ¥ãƒ†ãƒ¼ãƒ–ルを生æˆã§ãã¾ã›ã‚“"
-#: src/ar.c:480 src/ar.c:925 src/ar.c:1127
+#: src/ar.c:480 src/ar.c:925 src/ar.c:1131
#, c-format
msgid "cannot insert into hash table"
msgstr "ãƒãƒƒã‚·ãƒ¥ã«æŒ¿å…¥ã§ãã¾ã›ã‚“"
@@ -1050,46 +1091,71 @@ msgstr "%s ã®æ›´æ–°æ™‚間を変更ã§ãã¾ã›ã‚“"
msgid "cannot rename temporary file to %.*s"
msgstr "一時ファイルを %.*s ã«åå‰å¤‰æ›´ã§ãã¾ã›ã‚“"
-#: src/ar.c:759 src/ar.c:1010 src/ar.c:1409 src/ranlib.c:223
+#: 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:1209
+#: src/ar.c:1213
#, c-format
msgid "position member %s not found"
msgstr "ä½ç½®ãƒ¡ãƒ³ãƒãƒ¼ %s ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
-#: src/ar.c:1219
+#: src/ar.c:1223
#, c-format
msgid "%s: no entry %s in archive!\n"
msgstr "%s: é …ç›® %s ãŒã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã«ã‚ã‚Šã¾ã›ã‚“!\n"
-#: src/ar.c:1248 src/objdump.c:242
+#: src/ar.c:1252 src/objdump.c:242
#, c-format
msgid "cannot open %s"
msgstr "%s ã‚’é–‹ã‘ã¾ã›ã‚“"
-#: src/ar.c:1253
+#: src/ar.c:1257
#, c-format
msgid "cannot stat %s"
msgstr "%s ã‚’ stat ã§ãã¾ã›ã‚“"
-#: src/ar.c:1259
+#: src/ar.c:1263
#, c-format
msgid "%s is no regular file"
msgstr "%s ã¯ä¸€èˆ¬ãƒ•ã‚¡ã‚¤ãƒ«ã§ã¯ã‚ã‚Šã¾ã›ã‚“"
-#: src/ar.c:1272
+#: src/ar.c:1276
#, c-format
msgid "cannot get ELF descriptor for %s: %s\n"
msgstr "%s ã® ELF 記述å­ã‚’得られã¾ã›ã‚“: %s\n"
-#: src/ar.c:1292
+#: 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 ""
@@ -1390,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:78 src/readelf.c:128
+#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154
msgid "FILE..."
msgstr "ãµãã„ã‚‹..."
@@ -1422,7 +1488,7 @@ msgstr ""
msgid "Pedantic checking of ELF files compliance with gABI/psABI spec."
msgstr "ELF ファイル㌠gABI/psABI 仕様ã¸æº–æ‹ ã—ã¦ã„ã‚‹ã‹ã®åŽ³å¯†ãªãƒã‚§ãƒƒã‚¯ã€‚"
-#: src/elflint.c:155 src/readelf.c:303
+#: src/elflint.c:155 src/readelf.c:347
#, c-format
msgid "cannot open input file"
msgstr "入力ファイルを開ã‘ã¾ã›ã‚“"
@@ -1441,7 +1507,7 @@ msgstr "Elf 記述å­ã‚’é–‰ã˜ã¦ã„る時ã«ã‚¨ãƒ©ãƒ¼: %s\n"
msgid "No errors"
msgstr "エラーã¯ã‚ã‚Šã¾ã›ã‚“"
-#: src/elflint.c:220 src/readelf.c:480
+#: src/elflint.c:220 src/readelf.c:546
msgid "Missing file name.\n"
msgstr "ファイルåãŒã‚ã‚Šã¾ã›ã‚“。\n"
@@ -1477,8 +1543,8 @@ msgid "unsupported OS ABI e_ident[%d] == '%s'\n"
msgstr "ä¸æ˜Žãª OS ABI e_ident[%d] == '%s'\n"
#: src/elflint.c:381
-#, c-format
-msgid "unsupport ABI version e_ident[%d] == %d\n"
+#, fuzzy, c-format
+msgid "unsupported ABI version e_ident[%d] == %d\n"
msgstr "ä¸æ˜Žãª ABI ãƒãƒ¼ã‚¸ãƒ§ãƒ³ e_ident[%d] == %d\n"
#: src/elflint.c:386
@@ -3472,13 +3538,13 @@ msgstr "%s%s%s: ファイル形å¼ã‚’èªè­˜ã§ãã¾ã›ã‚“"
msgid "cannot create search tree"
msgstr "検索ツリーを生æˆã§ãã¾ã›ã‚“"
-#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:537
-#: src/readelf.c:1115 src/readelf.c:1315 src/readelf.c:1463 src/readelf.c:1664
-#: src/readelf.c:1870 src/readelf.c:2060 src/readelf.c:2238 src/readelf.c:2314
-#: src/readelf.c:2572 src/readelf.c:2648 src/readelf.c:2735 src/readelf.c:3315
-#: src/readelf.c:3365 src/readelf.c:3428 src/readelf.c:8430 src/readelf.c:9530
-#: src/readelf.c:9733 src/readelf.c:9801 src/size.c:397 src/size.c:466
-#: src/strip.c:572
+#: 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 "セクションヘッダー文字列テーブル索引ãŒå¾—られã¾ã›ã‚“"
@@ -3563,7 +3629,7 @@ msgstr ""
msgid "Show information from FILEs (a.out by default)."
msgstr ""
-#: src/objdump.c:219 src/readelf.c:485
+#: src/objdump.c:219 src/readelf.c:551
msgid "No operation specified.\n"
msgstr "æ“作ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。\n"
@@ -3572,11 +3638,11 @@ msgstr "æ“作ãŒæŒ‡å®šã•ã‚Œã¦ã„ã¾ã›ã‚“。\n"
msgid "while close `%s'"
msgstr ""
-#: src/objdump.c:364 src/readelf.c:1965 src/readelf.c:2157
+#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238
msgid "INVALID SYMBOL"
msgstr "ä¸å½“ãªã‚·ãƒ³ãƒœãƒ«"
-#: src/objdump.c:379 src/readelf.c:1999 src/readelf.c:2193
+#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274
msgid "INVALID SECTION"
msgstr "ä¸å½“ãªã‚»ã‚¯ã‚·ãƒ§ãƒ³"
@@ -3627,150 +3693,170 @@ msgstr ""
msgid "error while freeing sub-ELF descriptor: %s"
msgstr ""
-#: src/readelf.c:73
+#: src/readelf.c:95
#, fuzzy
msgid "ELF input selection:"
msgstr "出力é¸æŠž:"
-#: src/readelf.c:75
+#: src/readelf.c:97
msgid ""
"Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data"
msgstr ""
-#: src/readelf.c:77
+#: 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:79
+#: src/readelf.c:104
msgid "All these plus -p .strtab -p .dynstr -p .comment"
msgstr ""
-#: src/readelf.c:80
+#: src/readelf.c:105
msgid "Display the dynamic segment"
msgstr "動的セグメントを表示"
-#: src/readelf.c:81
+#: src/readelf.c:106
msgid "Display the ELF file header"
msgstr "ELF ファイルヘッダーを表示"
-#: src/readelf.c:83
+#: src/readelf.c:108
msgid "Display histogram of bucket list lengths"
msgstr "ãƒã‚±ãƒƒãƒˆãƒªã‚¹ãƒˆé•·ã®æŸ±çŠ¶å›³ã‚’表示"
-#: src/readelf.c:84
+#: src/readelf.c:109
msgid "Display the program headers"
msgstr "プログラムヘッダーを表示"
-#: src/readelf.c:86
+#: src/readelf.c:111
msgid "Display relocations"
msgstr "リロケーションを表示"
-#: src/readelf.c:87
+#: 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:90
+#: src/readelf.c:116
#, fuzzy
msgid "Display the symbol table sections"
msgstr "シンボルテーブルを表示"
-#: src/readelf.c:91
+#: src/readelf.c:117
msgid "Display versioning information"
msgstr "ãƒãƒ¼ã‚¸ãƒ§ãƒ‹ãƒ³ã‚°æƒ…å ±ã®è¡¨ç¤º"
-#: src/readelf.c:92
+#: src/readelf.c:118
#, fuzzy
msgid "Display the ELF notes"
msgstr "コアノートを表示"
-#: src/readelf.c:94
+#: src/readelf.c:120
#, fuzzy
msgid "Display architecture specific information, if any"
msgstr "(ã‚‚ã—ã‚ã‚Œã°)アーキテクãƒãƒ£ãƒ¼å›ºæœ‰ã®æƒ…報を表示"
-#: src/readelf.c:96
+#: src/readelf.c:122
msgid "Display sections for exception handling"
msgstr "例外をå–り扱ã†ãŸã‚ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’表示"
-#: src/readelf.c:98
+#: src/readelf.c:124
#, fuzzy
msgid "Additional output selection:"
msgstr "出力é¸æŠž:"
-#: src/readelf.c:100
+#: 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:104
+#: src/readelf.c:130
msgid "Dump the uninterpreted contents of SECTION, by number or name"
msgstr "æ•°å­—ã‹åå‰ã§è§£é‡ˆã§ããªã„セクションã®å†…容をダンプã™ã‚‹"
-#: src/readelf.c:106
+#: src/readelf.c:132
msgid "Print string contents of sections"
msgstr "セクションã®æ–‡å­—列内容をå°åˆ·ã™ã‚‹"
-#: src/readelf.c:109
+#: src/readelf.c:135
msgid "Display the symbol index of an archive"
msgstr "アーカイブã®ã‚·ãƒ³ãƒœãƒ«ç´¢å¼•ã‚’表示"
-#: src/readelf.c:111
+#: src/readelf.c:137
msgid "Output control:"
msgstr "出力制御:"
-#: src/readelf.c:113
+#: src/readelf.c:139
msgid "Do not find symbol names for addresses in DWARF data"
msgstr "DWARFデータ中ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãŸã‚ã®ã‚·ãƒ³ãƒœãƒ«åを探ã•ãªã„"
-#: src/readelf.c:115
+#: src/readelf.c:141
#, fuzzy
msgid ""
"Display just offsets instead of resolving values to addresses in DWARF data"
msgstr "DWARFデータ中ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãŸã‚ã®ã‚·ãƒ³ãƒœãƒ«åを探ã•ãªã„"
-#: src/readelf.c:117
+#: src/readelf.c:143
msgid "Ignored for compatibility (lines always wide)"
msgstr ""
-#: src/readelf.c:119
+#: 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:124
+#: src/readelf.c:150
msgid "Print information from ELF file in human-readable form."
msgstr "ELF ファイルã‹ã‚‰äººé–“ãŒèª­ã‚ã‚‹å½¢ã§æƒ…報をå°åˆ·ã™ã‚‹ã€‚"
-#: src/readelf.c:453
+#. 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:521 src/readelf.c:632
+#: src/readelf.c:590 src/readelf.c:701
#, c-format
msgid "cannot generate Elf descriptor: %s"
msgstr "Elf 記述å­ã‚’生æˆã§ãã¾ã›ã‚“: %s"
-#: src/readelf.c:528 src/readelf.c:844 src/strip.c:641
+#: 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:546 src/readelf.c:1137 src/readelf.c:1339
+#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420
#, c-format
msgid "cannot get section: %s"
msgstr "セクションを得られã¾ã›ã‚“: %s"
-#: src/readelf.c:555 src/readelf.c:1144 src/readelf.c:1347 src/readelf.c:9753
+#: 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:1109
#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650
@@ -3779,109 +3865,109 @@ msgstr "セクションを得られã¾ã›ã‚“: %s"
msgid "cannot get section header: %s"
msgstr "セクションヘッダーを得られã¾ã›ã‚“: %s"
-#: src/readelf.c:563
+#: src/readelf.c:632
#, fuzzy, c-format
msgid "cannot get section name"
msgstr "セクションを得られã¾ã›ã‚“: %s"
-#: src/readelf.c:572 src/readelf.c:5548 src/readelf.c:7888 src/readelf.c:7990
-#: src/readelf.c:8167
+#: 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:588
+#: src/readelf.c:657
#, fuzzy, c-format
msgid "cannot create temp file '%s'"
msgstr "æ–°ã—ã„ファイル '%s' を生æˆã§ãã¾ã›ã‚“: %s"
-#: src/readelf.c:597
+#: src/readelf.c:666
#, fuzzy, c-format
msgid "cannot write section data"
msgstr "セクションデータを割り当ã¦ã‚‰ã‚Œã¾ã›ã‚“: %s"
-#: src/readelf.c:603 src/readelf.c:620 src/readelf.c:649
+#: 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:610
+#: src/readelf.c:679
#, fuzzy, c-format
msgid "error while rewinding file descriptor"
msgstr "Elf 記述å­ã‚’é–‰ã˜ã¦ã„る時ã«ã‚¨ãƒ©ãƒ¼: %s"
-#: src/readelf.c:644
+#: src/readelf.c:713
#, c-format
msgid "'%s' is not an archive, cannot print archive index"
msgstr "'%s' ã¯ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–ã§ã¯ãªãã€ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–索引をå°åˆ·ã§ãã¾ã›ã‚“"
-#: src/readelf.c:743
-#, fuzzy, c-format
-msgid "No such section '%s' in '%s'"
-msgstr "セクション [%Zu] '%s' ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ãŒå¾—られã¾ã›ã‚“: %s"
-
-#: src/readelf.c:770
+#: src/readelf.c:817
#, c-format
msgid "cannot stat input file"
msgstr "入力ファイルを stat ã§ãã¾ã›ã‚“"
-#: src/readelf.c:772
+#: src/readelf.c:819
#, c-format
msgid "input file is empty"
msgstr "入力ファイルãŒç©ºã§ã™"
-#: src/readelf.c:774
+#: src/readelf.c:821
#, c-format
msgid "failed reading '%s': %s"
msgstr "'%s' ã®èª­è¾¼ã¿ã«å¤±æ•—: %s"
-#: src/readelf.c:829
+#: 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:837
+#: src/readelf.c:918
#, c-format
msgid "cannot create EBL handle"
msgstr "EBL ヘッダーを生æˆã§ãã¾ã›ã‚“"
-#: src/readelf.c:850
+#: src/readelf.c:931
#, fuzzy, c-format
msgid "cannot determine number of program headers: %s"
msgstr "セクション数を決定ã§ãã¾ã›ã‚“: %s"
-#: src/readelf.c:940
+#: src/readelf.c:1021
msgid "NONE (None)"
msgstr "ãªã— (ãªã—)"
-#: src/readelf.c:941
+#: src/readelf.c:1022
msgid "REL (Relocatable file)"
msgstr "REL (リロケータブルファイル)"
-#: src/readelf.c:942
+#: src/readelf.c:1023
msgid "EXEC (Executable file)"
msgstr "(EXEC (実行ファイル)"
-#: src/readelf.c:943
+#: src/readelf.c:1024
msgid "DYN (Shared object file)"
msgstr "DYN (共用オブジェクトファイル)"
-#: src/readelf.c:944
+#: src/readelf.c:1025
msgid "CORE (Core file)"
msgstr "CORE (コアファイル)"
-#: src/readelf.c:949
+#: src/readelf.c:1030
#, c-format
msgid "OS Specific: (%x)\n"
msgstr "OS 固有: (%x)\n"
#. && e_type <= ET_HIPROC always true
-#: src/readelf.c:951
+#: src/readelf.c:1032
#, c-format
msgid "Processor Specific: (%x)\n"
msgstr "プロセッサー固有: (%x)\n"
-#: src/readelf.c:961
+#: src/readelf.c:1042
msgid ""
"ELF Header:\n"
" Magic: "
@@ -3889,7 +3975,7 @@ msgstr ""
"ELF ヘッダー:\n"
" マジック: "
-#: src/readelf.c:965
+#: src/readelf.c:1046
#, c-format
msgid ""
"\n"
@@ -3898,118 +3984,118 @@ msgstr ""
"\n"
" クラス: %s\n"
-#: src/readelf.c:970
+#: src/readelf.c:1051
#, c-format
msgid " Data: %s\n"
msgstr " データ: %s\n"
-#: src/readelf.c:976
+#: src/readelf.c:1057
#, c-format
msgid " Ident Version: %hhd %s\n"
msgstr " 識別ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %hhd %s\n"
-#: src/readelf.c:978 src/readelf.c:995
+#: src/readelf.c:1059 src/readelf.c:1076
msgid "(current)"
msgstr "(ç¾åœ¨)"
-#: src/readelf.c:982
+#: src/readelf.c:1063
#, c-format
msgid " OS/ABI: %s\n"
msgstr " OS/ABI: %s\n"
-#: src/readelf.c:985
+#: src/readelf.c:1066
#, c-format
msgid " ABI Version: %hhd\n"
msgstr " ABI ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %hhd\n"
-#: src/readelf.c:988
+#: src/readelf.c:1069
msgid " Type: "
msgstr " タイプ: "
-#: src/readelf.c:991
+#: src/readelf.c:1072
#, c-format
msgid " Machine: %s\n"
msgstr " マシン : %s\n"
-#: src/readelf.c:993
+#: src/readelf.c:1074
#, c-format
msgid " Version: %d %s\n"
msgstr " ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %d %s\n"
-#: src/readelf.c:997
+#: src/readelf.c:1078
#, c-format
msgid " Entry point address: %#<PRIx64>\n"
msgstr " å…¥å£ç‚¹ã‚¢ãƒ‰ãƒ¬ã‚¹ : %#<PRIx64>\n"
-#: src/readelf.c:1000
+#: src/readelf.c:1081
#, c-format
msgid " Start of program headers: %<PRId64> %s\n"
msgstr " プログラムヘッダーã®é–‹å§‹: %<PRId64> %s\n"
-#: src/readelf.c:1001 src/readelf.c:1004
+#: src/readelf.c:1082 src/readelf.c:1085
msgid "(bytes into file)"
msgstr "(ファイルã¸ã®ãƒã‚¤ãƒˆæ•°)"
-#: src/readelf.c:1003
+#: src/readelf.c:1084
#, c-format
msgid " Start of section headers: %<PRId64> %s\n"
msgstr " セクションヘッダーã®é–‹å§‹: %<PRId64> %s\n"
-#: src/readelf.c:1006
+#: src/readelf.c:1087
#, c-format
msgid " Flags: %s\n"
msgstr " フラグ: %s\n"
-#: src/readelf.c:1009
+#: src/readelf.c:1090
#, c-format
msgid " Size of this header: %<PRId16> %s\n"
msgstr " ã“ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã®å¤§ãã•: %<PRId16> %s\n"
-#: src/readelf.c:1010 src/readelf.c:1013 src/readelf.c:1030
+#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111
msgid "(bytes)"
msgstr "(ãƒã‚¤ãƒˆ)"
-#: src/readelf.c:1012
+#: src/readelf.c:1093
#, c-format
msgid " Size of program header entries: %<PRId16> %s\n"
msgstr " プログラムヘッダー項目ã®å¤§ãã•:%<PRId16> %s\n"
-#: src/readelf.c:1015
+#: src/readelf.c:1096
#, fuzzy, c-format
msgid " Number of program headers entries: %<PRId16>"
msgstr " プログラムヘッダー項目ã®æ•° : %<PRId16>\n"
-#: src/readelf.c:1022
+#: src/readelf.c:1103
#, fuzzy, c-format
msgid " (%<PRIu32> in [0].sh_info)"
msgstr "([0].sh_link ã® %<PRIu32>)"
-#: src/readelf.c:1025 src/readelf.c:1042 src/readelf.c:1056
+#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137
msgid " ([0] not available)"
msgstr "([0]ã¯ä½¿ãˆã¾ã›ã‚“)"
-#: src/readelf.c:1029
+#: src/readelf.c:1110
#, c-format
msgid " Size of section header entries: %<PRId16> %s\n"
msgstr " セクションヘッダー項目ã®å¤§ãã•:%<PRId16> %s\n"
-#: src/readelf.c:1032
+#: src/readelf.c:1113
#, c-format
msgid " Number of section headers entries: %<PRId16>"
msgstr " セクションヘッダー項目ã®æ•° : %<PRId16>"
-#: src/readelf.c:1039
+#: src/readelf.c:1120
#, c-format
msgid " (%<PRIu32> in [0].sh_size)"
msgstr " ([0].sh_size ã® %<PRIu32>)"
#. We managed to get the zeroth section.
-#: src/readelf.c:1052
+#: src/readelf.c:1133
#, c-format
msgid " (%<PRIu32> in [0].sh_link)"
msgstr "([0].sh_link ã® %<PRIu32>)"
-#: src/readelf.c:1060
+#: src/readelf.c:1141
#, c-format
msgid ""
" Section header string table index: XINDEX%s\n"
@@ -4018,7 +4104,7 @@ msgstr ""
" セクションヘッダー文字列テーブル索引: XINDEX%s\n"
"\n"
-#: src/readelf.c:1064
+#: src/readelf.c:1145
#, c-format
msgid ""
" Section header string table index: %<PRId16>\n"
@@ -4027,7 +4113,7 @@ msgstr ""
" セクションヘッダー文字列テーブル索引: %<PRId16>\n"
"\n"
-#: src/readelf.c:1107
+#: src/readelf.c:1188
#, c-format
msgid ""
"There are %d section headers, starting at offset %#<PRIx64>:\n"
@@ -4036,11 +4122,11 @@ msgstr ""
"オフセット %2$#<PRIx64> ã‹ã‚‰å§‹ã¾ã‚‹ %1$d 個ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ãƒ˜ãƒƒãƒ€ãƒ¼ãŒã‚ã‚Šã¾ã™:\n"
"\n"
-#: src/readelf.c:1117
+#: src/readelf.c:1198
msgid "Section Headers:"
msgstr "セクションヘッダー:"
-#: src/readelf.c:1120
+#: src/readelf.c:1201
msgid ""
"[Nr] Name Type Addr Off Size ES Flags Lk "
"Inf Al"
@@ -4048,7 +4134,7 @@ msgstr ""
"[番] åå‰ ã‚¿ã‚¤ãƒ— アドレス オフセ 大ãã• ES フラグLk "
"Inf Al"
-#: src/readelf.c:1122
+#: src/readelf.c:1203
msgid ""
"[Nr] Name Type Addr Off Size ES "
"Flags Lk Inf Al"
@@ -4056,35 +4142,35 @@ msgstr ""
"[番] åå‰ ã‚¿ã‚¤ãƒ— アドレス オフセ 大ãã• ES "
"フラグLk Inf Al"
-#: src/readelf.c:1127
+#: src/readelf.c:1208
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1129
+#: src/readelf.c:1210
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1205
+#: src/readelf.c:1286
#, fuzzy, c-format
msgid "bad compression header for section %zd: %s"
msgstr "セクションヘッダー文字列セクションを生æˆã§ãã¾ã›ã‚“: %s"
-#: src/readelf.c:1216
+#: src/readelf.c:1297
#, fuzzy, c-format
msgid "bad gnu compressed size for section %zd: %s"
msgstr "セクションã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’得られã¾ã›ã‚“ %d: %s"
-#: src/readelf.c:1234
+#: src/readelf.c:1315
msgid "Program Headers:"
msgstr "プログラムヘッダー:"
-#: src/readelf.c:1236
+#: src/readelf.c:1317
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align"
msgstr ""
" タイプ オフセ 仮アドレス 物アドレス ãƒ•ã‚¡ã‚¤é‡ ãƒ¡ãƒ¢é‡ Flg 調整 "
-#: src/readelf.c:1239
+#: src/readelf.c:1320
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align"
@@ -4092,12 +4178,12 @@ msgstr ""
" タイプ オフセ 仮想アドレス 物ç†ã‚¢ãƒ‰ãƒ¬ã‚¹ ファイルé‡ãƒ¡ãƒ¢"
"é‡ Flg 調整 "
-#: src/readelf.c:1296
+#: src/readelf.c:1377
#, c-format
msgid "\t[Requesting program interpreter: %s]\n"
msgstr "\t[プログラム割込ã¿ã‚’è¦æ±‚: %s]\n"
-#: src/readelf.c:1317
+#: src/readelf.c:1398
msgid ""
"\n"
" Section to Segment mapping:\n"
@@ -4107,12 +4193,12 @@ msgstr ""
" セクションã‹ã‚‰ã‚»ã‚°ãƒ¡ãƒ³ãƒˆã¸ã®ãƒžãƒƒãƒ“ング:\n"
" セグメント セクション..."
-#: src/readelf.c:1328 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993
+#: 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:1471
+#: src/readelf.c:1552
#, c-format
msgid ""
"\n"
@@ -4125,7 +4211,7 @@ msgstr[0] ""
"ç½²å '%3$s' ã‚’æŒã¤ COMDAT セクショングループ [%1$2zu] '%2$s' ã«ã¯ %4$zu 個ã®"
"é …ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:1476
+#: src/readelf.c:1557
#, c-format
msgid ""
"\n"
@@ -4138,31 +4224,31 @@ msgstr[0] ""
"ç½²å '%3$s' ã‚’æŒã¤ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚°ãƒ«ãƒ¼ãƒ— [%1$2zu] '%2$s' ã«ã¯ %4$zu 個ã®é …ç›®ãŒã‚"
"ã‚Šã¾ã™:\n"
-#: src/readelf.c:1484
+#: src/readelf.c:1565
msgid "<INVALID SYMBOL>"
msgstr "<ä¸å½“ãªã‚·ãƒ³ãƒœãƒ«>"
-#: src/readelf.c:1498
+#: src/readelf.c:1579
msgid "<INVALID SECTION>"
msgstr "<ä¸å½“ãªã‚»ã‚¯ã‚·ãƒ§ãƒ³>"
-#: src/readelf.c:1521 src/readelf.c:2248 src/readelf.c:3331 src/readelf.c:9624
-#: src/readelf.c:9631 src/readelf.c:9675 src/readelf.c:9682
+#: 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:1526 src/readelf.c:2253 src/readelf.c:3336
+#: 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:1670 src/readelf.c:2320 src/readelf.c:2578 src/readelf.c:2654
-#: src/readelf.c:2958 src/readelf.c:3032 src/readelf.c:4759
+#: 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:1673
+#: src/readelf.c:1754
#, c-format
msgid ""
"\n"
@@ -4178,36 +4264,36 @@ msgstr[0] ""
" アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションã¸ã®ãƒªãƒ³ã‚¯: "
"[%2u] '%s'\n"
-#: src/readelf.c:1683
+#: src/readelf.c:1764
msgid " Type Value\n"
msgstr " タイプ 値\n"
-#: src/readelf.c:1707
+#: src/readelf.c:1788
#, c-format
msgid "Shared library: [%s]\n"
msgstr "共用ライブラリー: [%s]\n"
-#: src/readelf.c:1712
+#: src/readelf.c:1793
#, c-format
msgid "Library soname: [%s]\n"
msgstr "ライブラリー so å: [%s]\n"
-#: src/readelf.c:1717
+#: src/readelf.c:1798
#, c-format
msgid "Library rpath: [%s]\n"
msgstr "ライブラリー rパス: [%s]\n"
-#: src/readelf.c:1722
+#: src/readelf.c:1803
#, c-format
msgid "Library runpath: [%s]\n"
msgstr "ライブラリー run パス: [%s]\n"
-#: src/readelf.c:1742
+#: src/readelf.c:1823
#, c-format
msgid "%<PRId64> (bytes)\n"
msgstr "%<PRId64> (ãƒã‚¤ãƒˆ)\n"
-#: src/readelf.c:1855 src/readelf.c:2045
+#: src/readelf.c:1936 src/readelf.c:2126
#, c-format
msgid ""
"\n"
@@ -4216,7 +4302,7 @@ msgstr ""
"\n"
"オフセット %#0<PRIx64> ã«ä¸å½“ãªã‚·ãƒ³ãƒœãƒ«ãƒ†ãƒ¼ãƒ–ル\n"
-#: src/readelf.c:1873 src/readelf.c:2063
+#: src/readelf.c:1954 src/readelf.c:2144
#, c-format
msgid ""
"\n"
@@ -4237,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:1888 src/readelf.c:2078
+#: src/readelf.c:1969 src/readelf.c:2159
#, c-format
msgid ""
"\n"
@@ -4250,29 +4336,29 @@ msgstr[0] ""
"オフセット %3$#0<PRIx64> ã®ãƒªãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã‚»ã‚¯ã‚·ãƒ§ãƒ³ [%1$2u] '%2$s' ã«ã¯ %4$d "
"個ã®é …ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:1898
+#: src/readelf.c:1979
msgid " Offset Type Value Name\n"
msgstr " オフセット タイプ 値 åå‰\n"
-#: src/readelf.c:1900
+#: src/readelf.c:1981
msgid " Offset Type Value Name\n"
msgstr " オフセット タイプ 値 åå‰\n"
-#: src/readelf.c:1953 src/readelf.c:1964 src/readelf.c:1977 src/readelf.c:1998
-#: src/readelf.c:2010 src/readelf.c:2144 src/readelf.c:2156 src/readelf.c:2170
-#: src/readelf.c:2192 src/readelf.c:2205
+#: 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 "<INVALID RELOC>"
msgstr "<ä¸å½“ãªRELOC>"
-#: src/readelf.c:2088
+#: src/readelf.c:2169
msgid " Offset Type Value Addend Name\n"
msgstr " オフセット タイプ 値 付加å\n"
-#: src/readelf.c:2090
+#: src/readelf.c:2171
msgid " Offset Type Value Addend Name\n"
msgstr " オフセット タイプ 値 付加å\n"
-#: src/readelf.c:2328
+#: src/readelf.c:2409
#, c-format
msgid ""
"\n"
@@ -4284,39 +4370,39 @@ msgstr[0] ""
"\n"
"シンボルテーブル [%2u] '%s' ã«ã¯ %u 個ã®é …ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:2333
+#: 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:2341
+#: src/readelf.c:2422
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr " æ•° : 値 大ã タイプ Bind Vis Ndx åå‰\n"
-#: src/readelf.c:2343
+#: src/readelf.c:2424
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr " æ•° : 値 大ã タイプ Bind Vis Ndx åå‰\n"
-#: src/readelf.c:2363
+#: src/readelf.c:2444
#, c-format
msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
-#: src/readelf.c:2451
+#: src/readelf.c:2532
#, c-format
msgid "bad dynamic symbol"
msgstr "ä¸æ­£ãªå‹•çš„シンボル"
-#: src/readelf.c:2533
+#: src/readelf.c:2614
msgid "none"
msgstr "ãªã—"
-#: src/readelf.c:2550
+#: src/readelf.c:2631
msgid "| <unknown>"
msgstr "| <ä¸æ˜Ž>"
-#: src/readelf.c:2581
+#: src/readelf.c:2662
#, c-format
msgid ""
"\n"
@@ -4332,17 +4418,17 @@ msgstr[0] ""
" アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションã¸ã®ãƒªãƒ³ã‚¯: "
"[%2u] '%s'\n"
-#: src/readelf.c:2602
+#: src/readelf.c:2683
#, c-format
msgid " %#06x: Version: %hu File: %s Cnt: %hu\n"
msgstr " %#06x: ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %hu ファイル: %s æ•°: %hu\n"
-#: src/readelf.c:2615
+#: src/readelf.c:2696
#, c-format
msgid " %#06x: Name: %s Flags: %s Version: %hu\n"
msgstr " %#06x: åå‰: %s フラグ: %s ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %hu\n"
-#: src/readelf.c:2658
+#: src/readelf.c:2739
#, c-format
msgid ""
"\n"
@@ -4358,18 +4444,18 @@ msgstr[0] ""
" アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションã¸ã®ãƒªãƒ³ã‚¯: "
"[%2u] '%s'\n"
-#: src/readelf.c:2686
+#: 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:2701
+#: src/readelf.c:2782
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr " %#06x: 親 %d: %s\n"
#. Print the header.
-#: src/readelf.c:2962
+#: src/readelf.c:3043
#, c-format
msgid ""
"\n"
@@ -4385,15 +4471,15 @@ msgstr[0] ""
" アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションã¸ã®ãƒªãƒ³ã‚¯: "
"[%2u] '%s'"
-#: src/readelf.c:2990
+#: src/readelf.c:3071
msgid " 0 *local* "
msgstr " 0 *ローカル* "
-#: src/readelf.c:2995
+#: src/readelf.c:3076
msgid " 1 *global* "
msgstr " 1 *グローãƒãƒ«* "
-#: src/readelf.c:3037
+#: src/readelf.c:3118
#, c-format
msgid ""
"\n"
@@ -4411,22 +4497,22 @@ msgstr[0] ""
" アドレス: %#0*<PRIx64> オフセット: %#08<PRIx64> セクションã¸ã®ãƒªãƒ³ã‚¯: "
"[%2u] '%s'\n"
-#: src/readelf.c:3059
+#: src/readelf.c:3140
#, fuzzy, no-c-format
msgid " Length Number % of total Coverage\n"
msgstr " é•·ã• æ•° 全体ã®% 範囲 \n"
-#: src/readelf.c:3061
+#: src/readelf.c:3142
#, c-format
msgid " 0 %6<PRIu32> %5.1f%%\n"
msgstr " 0 %6<PRIu32> %5.1f%%\n"
-#: src/readelf.c:3068
+#: src/readelf.c:3149
#, c-format
msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
-#: src/readelf.c:3081
+#: src/readelf.c:3162
#, fuzzy, c-format
msgid ""
" Average number of tests: successful lookup: %f\n"
@@ -4435,27 +4521,37 @@ msgstr ""
" テストã®å¹³å‡æ•°: 検索æˆåŠŸ: %f\n"
" 検索失敗: %f\n"
-#: src/readelf.c:3099 src/readelf.c:3154 src/readelf.c:3211
+#: 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:3107
+#: src/readelf.c:3188
#, fuzzy, c-format
msgid "invalid data in sysv.hash section %d"
msgstr "セクション [%zu] '%s' ã®ä¸å½“ãªãƒ‡ãƒ¼ã‚¿"
-#: src/readelf.c:3162
+#: 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:3220
+#: 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:3287
+#: src/readelf.c:3386
#, c-format
msgid ""
" Symbol Bias: %u\n"
@@ -4465,7 +4561,7 @@ msgstr ""
" ビットマスクã®å¤§ãã•: %zu ãƒã‚¤ãƒˆ %<PRIuFAST32>%% ビット設定 第2ãƒãƒƒã‚·ãƒ¥ã‚·ãƒ•"
"ト: %u\n"
-#: src/readelf.c:3376
+#: src/readelf.c:3475
#, c-format
msgid ""
"\n"
@@ -4478,7 +4574,7 @@ msgstr[0] ""
"オフセット %3$#0<PRIx64> ã®ãƒ©ã‚¤ãƒ–ラリー一覧セクション [%1$2zu] '%2$s' ã«ã¯ "
"%4$d 個ã®é …ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:3390
+#: src/readelf.c:3489
msgid ""
" Library Time Stamp Checksum Version "
"Flags"
@@ -4486,7 +4582,7 @@ msgstr ""
" ライブラリー タイムスタンプ ãƒã‚§ãƒƒã‚¯ã‚µãƒ  ãƒãƒ¼"
"ジョン フラグ"
-#: src/readelf.c:3440
+#: src/readelf.c:3539
#, c-format
msgid ""
"\n"
@@ -4497,142 +4593,102 @@ msgstr ""
"オフセット %4$#0<PRIx64> ã® %3$<PRIu64> ãƒã‚¤ãƒˆã®ã‚ªãƒ–ジェクト属性セクション "
"[%1$2zu] '%2$s':\n"
-#: src/readelf.c:3457
+#: src/readelf.c:3556
msgid " Owner Size\n"
msgstr " 所有者 大ãã•\n"
-#: src/readelf.c:3486
+#: src/readelf.c:3585
#, c-format
msgid " %-13s %4<PRIu32>\n"
msgstr " %-13s %4<PRIu32>\n"
#. Unknown subsection, print and skip.
-#: src/readelf.c:3525
+#: src/readelf.c:3624
#, c-format
msgid " %-4u %12<PRIu32>\n"
msgstr " %-4u %12<PRIu32>\n"
#. Tag_File
-#: src/readelf.c:3530
+#: src/readelf.c:3629
#, c-format
msgid " File: %11<PRIu32>\n"
msgstr " ファイル: %11<PRIu32>\n"
-#: src/readelf.c:3579
+#: src/readelf.c:3678
#, c-format
msgid " %s: %<PRId64>, %s\n"
msgstr " %s: %<PRId64>ã€%s\n"
-#: src/readelf.c:3582
+#: src/readelf.c:3681
#, c-format
msgid " %s: %<PRId64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:3585
+#: src/readelf.c:3684
#, c-format
msgid " %s: %s\n"
msgstr " %s: %s\n"
-#: src/readelf.c:3595
+#: src/readelf.c:3694
#, c-format
msgid " %u: %<PRId64>\n"
msgstr " %u: %<PRId64>\n"
-#: src/readelf.c:3598
+#: src/readelf.c:3697
#, c-format
msgid " %u: %s\n"
msgstr " %u: %s\n"
-#: src/readelf.c:3643
-#, c-format
-msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3646
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3651
-#, c-format
-msgid "%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3654
+#: src/readelf.c:3767
#, c-format
-msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3660
-#, c-format
-msgid "%s+%#<PRIx64> <%s>"
-msgstr "%s+%#<PRIx64> <%s>"
-
-#: src/readelf.c:3663
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s>"
-msgstr "%s+%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3667
-#, c-format
-msgid "%#<PRIx64> <%s>"
-msgstr "%#<PRIx64> <%s>"
-
-#: src/readelf.c:3670
-#, c-format
-msgid "%#0*<PRIx64> <%s>"
-msgstr "%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3675
-#, c-format
-msgid "%s+%#<PRIx64>"
-msgstr "%s+%#<PRIx64>"
-
-#: src/readelf.c:3678
-#, c-format
-msgid "%s+%#0*<PRIx64>"
-msgstr "%s+%#0*<PRIx64>"
+msgid "sprintf failure"
+msgstr ""
-#: src/readelf.c:4081
+#: src/readelf.c:4249
msgid "empty block"
msgstr "空ブロック"
-#: src/readelf.c:4084
+#: src/readelf.c:4252
#, c-format
msgid "%zu byte block:"
msgstr "%zu ãƒã‚¤ãƒˆã®ãƒ–ロック:"
-#: src/readelf.c:4481
-#, c-format
-msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n"
+#: src/readelf.c:4730
+#, fuzzy, c-format
+msgid "%*s[%2<PRIuMAX>] %s <TRUNCATED>\n"
msgstr "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n"
-#: src/readelf.c:4538
+#: src/readelf.c:4794
#, c-format
msgid "%s %#<PRIx64> used with different address sizes"
msgstr ""
-#: src/readelf.c:4545
+#: src/readelf.c:4801
#, c-format
msgid "%s %#<PRIx64> used with different offset sizes"
msgstr ""
-#: src/readelf.c:4552
+#: src/readelf.c:4808
#, c-format
msgid "%s %#<PRIx64> used with different base addresses"
msgstr ""
-#: src/readelf.c:4641
+#: src/readelf.c:4815
+#, c-format
+msgid "%s %#<PRIx64> used with different attribute %s and %s"
+msgstr ""
+
+#: src/readelf.c:4912
#, c-format
msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n"
msgstr ""
-#: src/readelf.c:4649
+#: src/readelf.c:4920
#, c-format
msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n"
msgstr ""
-#: src/readelf.c:4675
+#: src/readelf.c:4998
#, c-format
msgid ""
"\n"
@@ -4643,7 +4699,7 @@ msgstr ""
"オフセット %3$#<PRIx64> 㮠DWARF セクション [%1$2zu] '%2$s':\n"
" [ コード]\n"
-#: src/readelf.c:4683
+#: src/readelf.c:5006
#, c-format
msgid ""
"\n"
@@ -4652,30 +4708,74 @@ msgstr ""
"\n"
"オフセット %<PRIu64> ã®ç•¥èªžã‚»ã‚¯ã‚·ãƒ§ãƒ³:\n"
-#: src/readelf.c:4696
+#: src/readelf.c:5019
#, c-format
msgid " *** error while reading abbreviation: %s\n"
msgstr " *** 略語を読んã§ã„ã‚‹é–“ã«ã‚¨ãƒ©ãƒ¼: %s\n"
-#: src/readelf.c:4712
+#: src/readelf.c:5035
#, c-format
msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n"
msgstr " [%5u] オフセット: %<PRId64>ã€å­: %sã€ã‚¿ã‚°: %s\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:6172 src/readelf.c:7745
-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 %#<PRIx64>:\n"
+msgstr ""
+"\n"
+"オフセット %3$#<PRIx64> 㮠DWARF セクション [%1$2zu] '%2$s':\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:7745
-msgid "no"
-msgstr "ã„ã„ãˆ"
+#: 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<PRIu64>\n"
+msgstr " (オフセット: %#<PRIx64>)"
+
+#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905
+#, fuzzy, c-format
+msgid " Address size: %8<PRIu64>\n"
+msgstr " (終了オフセット: %#<PRIx64>)"
+
+#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915
+#, fuzzy, c-format
+msgid " Segment size: %8<PRIu64>\n"
+msgstr " ファイルを %<PRIu64> ã«è¨­å®šã™ã‚‹\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
+#, 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:4749 src/readelf.c:4822
+#: src/readelf.c:5298 src/readelf.c:5372
#, c-format
msgid "cannot get .debug_aranges content: %s"
msgstr ".debug_aragnes ã®å†…容を得られã¾ã›ã‚“: %s"
-#: src/readelf.c:4764
+#: src/readelf.c:5313
#, c-format
msgid ""
"\n"
@@ -4688,29 +4788,19 @@ msgstr[0] ""
"オフセット %3$#<PRIx64> ã® DWARF セクション [%1$2zu] '%2$s' ã«ã¯ %4$zu 個ã®é …"
"ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:4795
+#: src/readelf.c:5344
#, c-format
msgid " [%*zu] ???\n"
msgstr " [%*zu] ???\n"
-#: src/readelf.c:4797
+#: src/readelf.c:5346
#, c-format
msgid ""
" [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n"
msgstr ""
" [%*zu] 開始: %0#*<PRIx64>ã€é•·ã•: %5<PRIu64>ã€CU DIE オフセット: %6<PRId64>\n"
-#: src/readelf.c:4827 src/readelf.c:4981 src/readelf.c:5558 src/readelf.c:6515
-#: src/readelf.c:7047 src/readelf.c:7167 src/readelf.c:7331 src/readelf.c:7819
-#, c-format
-msgid ""
-"\n"
-"DWARF section [%2zu] '%s' at offset %#<PRIx64>:\n"
-msgstr ""
-"\n"
-"オフセット %3$#<PRIx64> 㮠DWARF セクション [%1$2zu] '%2$s':\n"
-
-#: src/readelf.c:4840 src/readelf.c:6541
+#: src/readelf.c:5390 src/readelf.c:8195
#, fuzzy, c-format
msgid ""
"\n"
@@ -4719,115 +4809,154 @@ msgstr ""
"\n"
"オフセット %Zu ã®ãƒ†ãƒ¼ãƒ–ル:\n"
-#: src/readelf.c:4844 src/readelf.c:5582 src/readelf.c:6552
+#: 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:4860
+#: src/readelf.c:5410
#, fuzzy, c-format
msgid ""
"\n"
" Length: %6<PRIu64>\n"
msgstr " (オフセット: %#<PRIx64>)"
-#: src/readelf.c:4872
+#: src/readelf.c:5422
#, fuzzy, c-format
msgid " DWARF version: %6<PRIuFAST16>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:4876
+#: src/readelf.c:5426
#, c-format
msgid "unsupported aranges version"
msgstr ""
-#: src/readelf.c:4887
+#: src/readelf.c:5437
#, fuzzy, c-format
msgid " CU offset: %6<PRIx64>\n"
msgstr " (オフセット: %#<PRIx64>)"
-#: src/readelf.c:4893
+#: src/readelf.c:5443
#, fuzzy, c-format
msgid " Address size: %6<PRIu64>\n"
msgstr " (終了オフセット: %#<PRIx64>)"
-#: src/readelf.c:4897
-#, fuzzy, c-format
-msgid "unsupported address size"
-msgstr "アドレス値ã§ã¯ã‚ã‚Šã¾ã›ã‚“"
-
-#: src/readelf.c:4902
+#: src/readelf.c:5452
#, fuzzy, c-format
msgid ""
" Segment size: %6<PRIu64>\n"
"\n"
msgstr " ファイルを %<PRIu64> ã«è¨­å®šã™ã‚‹\n"
-#: src/readelf.c:4906
+#: src/readelf.c:5507
#, c-format
-msgid "unsupported segment size"
+msgid " %zu padding bytes\n"
msgstr ""
-#: src/readelf.c:4946
+#: src/readelf.c:5550
#, fuzzy, c-format
-msgid " %s..%s (%<PRIx64>)\n"
-msgstr " %s: %<PRId64>\n"
+msgid "cannot get .debug_rnglists content: %s"
+msgstr ".degub_ranges ã®å†…容を得られã¾ã›ã‚“: %s"
-#: src/readelf.c:4949
+#: src/readelf.c:5573 src/readelf.c:8870
#, fuzzy, c-format
-msgid " %s..%s\n"
-msgstr " [%6tx] %s..%s\n"
+msgid ""
+"Table at Offset 0x%<PRIx64>:\n"
+"\n"
+msgstr " (終了オフセット: %#<PRIx64>)"
-#: src/readelf.c:4958
+#: src/readelf.c:5628 src/readelf.c:8925
+#, fuzzy, c-format
+msgid " Offset entries: %8<PRIu64>\n"
+msgstr " (オフセット: %#<PRIx64>)"
+
+#: src/readelf.c:5644 src/readelf.c:8941
#, c-format
-msgid " %zu padding bytes\n"
+msgid " Unknown CU base: "
+msgstr ""
+
+#: src/readelf.c:5646 src/readelf.c:8943
+#, c-format
+msgid " CU [%6<PRIx64>] 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%<PRIx64>:\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:4976
+#: src/readelf.c:5921
#, c-format
msgid "cannot get .debug_ranges content: %s"
msgstr ".degub_ranges ã®å†…容を得られã¾ã›ã‚“: %s"
-#: src/readelf.c:5006 src/readelf.c:7074
+#: 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<PRIx64>] base: "
+msgstr ""
+
+#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361
#, c-format
msgid " [%6tx] <INVALID DATA>\n"
msgstr " [%6tx] <ä¸å½“ãªãƒ‡ãƒ¼ã‚¿>\n"
-#: src/readelf.c:5028 src/readelf.c:7096
-#, 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:5035 src/readelf.c:7103
+#: 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:5046
-#, c-format
-msgid " [%6tx] %s..%s\n"
-msgstr " [%6tx] %s..%s\n"
-
-#: src/readelf.c:5048
-#, c-format
-msgid " %s..%s\n"
-msgstr " %s..%s\n"
-
-#: src/readelf.c:5284
+#: src/readelf.c:6252
#, fuzzy
msgid " <INVALID DATA>\n"
msgstr " [%6tx] <ä¸å½“ãªãƒ‡ãƒ¼ã‚¿>\n"
-#: src/readelf.c:5537
+#: src/readelf.c:6505
#, fuzzy, c-format
msgid "cannot get ELF: %s"
msgstr "次㮠DIE を得られã¾ã›ã‚“: %s"
-#: src/readelf.c:5554
+#: src/readelf.c:6523
#, c-format
msgid ""
"\n"
@@ -4836,7 +4965,7 @@ msgstr ""
"\n"
"オフセット %3$#<PRIx64> 㮠フレーム情報呼出ã—セクション [%1$2zu] '%2$s':\n"
-#: src/readelf.c:5604
+#: src/readelf.c:6573
#, c-format
msgid ""
"\n"
@@ -4845,50 +4974,65 @@ msgstr ""
"\n"
" [%6tx] ゼロ終端\n"
-#: src/readelf.c:5697 src/readelf.c:5852
+#: src/readelf.c:6666 src/readelf.c:6820
#, fuzzy, c-format
msgid "invalid augmentation length"
msgstr "ä¸å½“ãªæ‹¡å¤§ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰"
-#: src/readelf.c:5712
+#: src/readelf.c:6681
msgid "FDE address encoding: "
msgstr "FDE アドレスエンコード"
-#: src/readelf.c:5718
+#: src/readelf.c:6687
msgid "LSDA pointer encoding: "
msgstr "LSDA ãƒã‚¤ãƒ³ã‚¿ãƒ¼ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰:"
-#: src/readelf.c:5829
+#: src/readelf.c:6797
#, c-format
msgid " (offset: %#<PRIx64>)"
msgstr " (オフセット: %#<PRIx64>)"
-#: src/readelf.c:5836
+#: src/readelf.c:6804
#, c-format
msgid " (end offset: %#<PRIx64>)"
msgstr " (終了オフセット: %#<PRIx64>)"
-#: src/readelf.c:5873
+#: src/readelf.c:6841
#, c-format
msgid " %-26sLSDA pointer: %#<PRIx64>\n"
msgstr " %-26sLSDA ãƒã‚¤ãƒ³ã‚¿ãƒ¼: %#<PRIx64>\n"
-#: src/readelf.c:5928
-#, c-format
-msgid "cannot get attribute code: %s"
+#: src/readelf.c:6926
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute code: %s"
msgstr "属性コードを得られã¾ã›ã‚“: %s"
-#: src/readelf.c:5937
-#, c-format
-msgid "cannot get attribute form: %s"
+#: src/readelf.c:6936
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute form: %s"
msgstr "属性様å¼ã‚’得られã¾ã›ã‚“: %s"
-#: src/readelf.c:5952
-#, c-format
-msgid "cannot get attribute value: %s"
+#: src/readelf.c:6958
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute '%s' (%s) value: %s"
msgstr "属性値を得られã¾ã›ã‚“: %s"
-#: src/readelf.c:6254
+#: src/readelf.c:7291
+#, fuzzy, c-format
+msgid "invalid file (%<PRId64>): %s"
+msgstr "ä¸å½“ãªãƒ•ã‚¡ã‚¤ãƒ«"
+
+#: src/readelf.c:7295
+#, fuzzy, c-format
+msgid "no srcfiles for CU [%<PRIx64>]"
+msgstr " ファイルを %<PRIu64> ã«è¨­å®šã™ã‚‹\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"
@@ -4899,19 +5043,24 @@ msgstr ""
"オフセット %3$#<PRIx64> 㮠DWARF セクション [%1$2zu] '%2$s':\n"
" [オフセット]\n"
-#: src/readelf.c:6286
+#: 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 %<PRIu64>:\n"
" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
"%<PRIu8>, Offset size: %<PRIu8>\n"
-" Type signature: %#<PRIx64>, Type offset: %#<PRIx64>\n"
+" Type signature: %#<PRIx64>, Type offset: %#<PRIx64> [%<PRIx64>]\n"
msgstr ""
" オフセット %1$<PRIu64> ã®ã‚³ãƒ³ãƒ‘イルå˜ä½:\n"
" ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %2$<PRIu16>ã€ç•¥èªžã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚ªãƒ•ã‚»ãƒƒãƒˆ: %3$<PRIu64>ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ã®å¤§"
"ãã•: %4$<PRIu8>ã€ã‚ªãƒ•ã‚»ãƒƒãƒˆã®å¤§ãã•: %5$<PRIu8>\n"
-#: src/readelf.c:6295
+#: src/readelf.c:7603
#, c-format
msgid ""
" Compilation unit at offset %<PRIu64>:\n"
@@ -4922,35 +5071,50 @@ msgstr ""
" ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %2$<PRIu16>ã€ç•¥èªžã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚ªãƒ•ã‚»ãƒƒãƒˆ: %3$<PRIu64>ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ã®å¤§"
"ãã•: %4$<PRIu8>ã€ã‚ªãƒ•ã‚»ãƒƒãƒˆã®å¤§ãã•: %5$<PRIu8>\n"
-#: src/readelf.c:6320
+#: src/readelf.c:7613 src/readelf.c:7776
#, c-format
-msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s"
+msgid " Unit type: %s (%<PRIu8>)"
msgstr ""
-"セクション '%2$s' 㮠オフセット %1$<PRIu64> ã® DIE を得られã¾ã›ã‚“: %3$s"
-#: src/readelf.c:6334
+#: src/readelf.c:7640
+#, c-format
+msgid "unknown version (%d) or unit type (%d)"
+msgstr ""
+
+#: src/readelf.c:7669
#, c-format
msgid "cannot get DIE offset: %s"
msgstr "DIE オフセットを得られã¾ã›ã‚“: %s"
-#: src/readelf.c:6343
-#, c-format
-msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s"
+#: src/readelf.c:7678
+#, fuzzy, c-format
+msgid "cannot get tag of DIE at offset [%<PRIx64>] in section '%s': %s"
msgstr ""
"セクション '%2$s' 中ã®ã‚ªãƒ•ã‚»ãƒƒãƒˆ %1$<PRIu64> ã® DIE ã®ã‚¿ã‚°ã‚’得られã¾ã›ã‚“: "
"%3$s"
-#: src/readelf.c:6375
+#: src/readelf.c:7716
#, c-format
msgid "cannot get next DIE: %s\n"
msgstr "次㮠DIE を得られã¾ã›ã‚“: %s\n"
-#: src/readelf.c:6383
+#: src/readelf.c:7724
#, c-format
msgid "cannot get next DIE: %s"
msgstr "次㮠DIE を得られã¾ã›ã‚“: %s"
-#: src/readelf.c:6419
+#: src/readelf.c:7768
+#, fuzzy, c-format
+msgid ""
+" Split compilation unit at offset %<PRIu64>:\n"
+" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
+"%<PRIu8>, Offset size: %<PRIu8>\n"
+msgstr ""
+" オフセット %1$<PRIu64> ã®ã‚³ãƒ³ãƒ‘イルå˜ä½:\n"
+" ãƒãƒ¼ã‚¸ãƒ§ãƒ³: %2$<PRIu16>ã€ç•¥èªžã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚ªãƒ•ã‚»ãƒƒãƒˆ: %3$<PRIu64>ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ã®å¤§"
+"ãã•: %4$<PRIu8>ã€ã‚ªãƒ•ã‚»ãƒƒãƒˆã®å¤§ãã•: %5$<PRIu8>\n"
+
+#: src/readelf.c:7819
#, fuzzy, c-format
msgid ""
"\n"
@@ -4960,25 +5124,32 @@ msgstr ""
"\n"
"オフセット %3$#<PRIx64> 㮠DWARF セクション [%1$2zu] '%2$s':\n"
-#: src/readelf.c:6528
+#: src/readelf.c:8151
+#, fuzzy, c-format
+msgid "unknown form: %s"
+msgstr "ä¸æ˜Žãªæ§˜å¼ %<PRIx64>"
+
+#: 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:6598
+#: src/readelf.c:8284
#, fuzzy, c-format
msgid ""
"\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"
msgstr ""
@@ -4994,18 +5165,33 @@ msgstr ""
"\n"
"命令コード:\n"
-#: src/readelf.c:6619
+#: 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:6634
+#: src/readelf.c:8347
#, c-format
msgid " [%*<PRIuFAST8>] %hhu argument\n"
msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n"
msgstr[0] " [%*<PRIuFAST8>] %hhu パラメーター\n"
-#: src/readelf.c:6642
+#: src/readelf.c:8358
msgid ""
"\n"
"Directory table:"
@@ -5013,17 +5199,29 @@ msgstr ""
"\n"
"ディレクトリーテーブル:"
-#: src/readelf.c:6658
+#: 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:6693
+#: src/readelf.c:8529
msgid ""
"\n"
"Line number statements:"
@@ -5031,119 +5229,119 @@ msgstr ""
"\n"
"è¡Œ ç•ªå· æ–‡:"
-#: src/readelf.c:6744
+#: src/readelf.c:8552
#, c-format
msgid "invalid maximum operations per instruction is zero"
msgstr ""
-#: src/readelf.c:6780
+#: 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:6785
-#, 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:6805
+#: 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:6810
+#: src/readelf.c:8616
#, fuzzy
msgid " end of sequence"
msgstr "列ã®çµ‚ã‚ã‚Š"
-#: src/readelf.c:6829
+#: src/readelf.c:8634
#, fuzzy, c-format
-msgid " set address to %s\n"
+msgid " set address to "
msgstr "アドレスを %s ã«è¨­å®šã™ã‚‹\n"
-#: src/readelf.c:6856
+#: src/readelf.c:8662
#, fuzzy, c-format
msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n"
msgstr ""
"新ファイルを定義ã™ã‚‹: dir=%uã€mtime=%<PRIu64>ã€é•·ã•h=%<PRIu64>ã€åå‰=%s\n"
-#: src/readelf.c:6869
+#: src/readelf.c:8675
#, fuzzy, c-format
msgid " set discriminator to %u\n"
msgstr "カラムを %<PRIu64> ã«è¨­å®šã™ã‚‹\n"
#. Unknown, ignore it.
-#: src/readelf.c:6874
+#: src/readelf.c:8680
#, fuzzy
msgid " unknown opcode"
msgstr "ä¸æ˜Žãªå‘½ä»¤ã‚³ãƒ¼ãƒ‰"
#. Takes no argument.
-#: src/readelf.c:6886
+#: src/readelf.c:8692
msgid " copy"
msgstr "複写"
-#: src/readelf.c:6897
+#: 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:6901
-#, 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:6912
+#: src/readelf.c:8715
#, c-format
msgid " advance line by constant %d to %<PRId64>\n"
msgstr "行を定数 %d ã ã‘進ã‚㦠%<PRId64> ã«ã™ã‚‹\n"
-#: src/readelf.c:6920
+#: src/readelf.c:8723
#, c-format
msgid " set file to %<PRIu64>\n"
msgstr " ファイルを %<PRIu64> ã«è¨­å®šã™ã‚‹\n"
-#: src/readelf.c:6930
+#: src/readelf.c:8733
#, c-format
msgid " set column to %<PRIu64>\n"
msgstr "カラムを %<PRIu64> ã«è¨­å®šã™ã‚‹\n"
-#: src/readelf.c:6937
+#: src/readelf.c:8740
#, c-format
msgid " set '%s' to %<PRIuFAST8>\n"
msgstr " '%s' ã‚’ %<PRIuFAST8> ã«è¨­å®šã™ã‚‹\n"
#. Takes no argument.
-#: src/readelf.c:6943
+#: src/readelf.c:8746
msgid " set basic block flag"
msgstr "基本ブロックフラグを設定ã™ã‚‹"
-#: src/readelf.c:6956
+#: src/readelf.c:8757
#, fuzzy, c-format
-msgid " advance address by constant %u to %s, op_index to %u\n"
+msgid " advance address by constant %u to "
msgstr "アドレスを定数 %u ã ã‘済ã‚㦠%s ã«ã™ã‚‹\n"
-#: src/readelf.c:6960
+#: src/readelf.c:8776
#, fuzzy, c-format
-msgid " advance address by constant %u to %s\n"
-msgstr "アドレスを定数 %u ã ã‘済ã‚㦠%s ã«ã™ã‚‹\n"
-
-#: src/readelf.c:6978
-#, 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:6987
+#: src/readelf.c:8786
msgid " set prologue end flag"
msgstr "プロローグ終了フラグを設定ã™ã‚‹"
#. Takes no argument.
-#: src/readelf.c:6992
+#: src/readelf.c:8791
msgid " set epilogue begin flag"
msgstr "エピローグ開始フラグを設定ã™ã‚‹"
-#: src/readelf.c:7001
+#: src/readelf.c:8800
#, fuzzy, c-format
msgid " set isa to %u\n"
msgstr " ファイルを %<PRIu64> ã«è¨­å®šã™ã‚‹\n"
@@ -5151,104 +5349,98 @@ msgstr " ファイルを %<PRIu64> ã«è¨­å®šã™ã‚‹\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:7010
+#: src/readelf.c:8809
#, c-format
msgid " unknown opcode with %<PRIu8> parameter:"
msgid_plural " unknown opcode with %<PRIu8> parameters:"
msgstr[0] " %<PRIu8> 個ã®ãƒ‘ラメーターã®ã‚ã‚‹ä¸æ˜Žãªå‘½ä»¤ã‚³ãƒ¼ãƒ‰:"
-#: src/readelf.c:7042
-#, 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:7117
-#, 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:7119
+#: 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:7126 src/readelf.c:8077
+#: src/readelf.c:9476 src/readelf.c:10490
#, fuzzy
msgid " <INVALID DATA>\n"
msgstr " [%6tx] <ä¸å½“ãªãƒ‡ãƒ¼ã‚¿>\n"
-#: src/readelf.c:7178 src/readelf.c:7340
+#: src/readelf.c:9530 src/readelf.c:9693
#, c-format
msgid "cannot get macro information section data: %s"
msgstr "マクロ情報セクションã®ãƒ‡ãƒ¼ã‚¿ã‚’得られã¾ã›ã‚“: %s"
-#: src/readelf.c:7258
+#: src/readelf.c:9610
#, c-format
msgid "%*s*** non-terminated string at end of section"
msgstr "%*s*** 最後ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚端ã—ã¦ã„ãªã„文字列"
-#: src/readelf.c:7281
+#: src/readelf.c:9633
#, fuzzy, c-format
msgid "%*s*** missing DW_MACINFO_start_file argument at end of section"
msgstr "%*s*** 最後ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã®çµ‚端ã—ã¦ã„ãªã„文字列"
-#: src/readelf.c:7381
+#: src/readelf.c:9734
#, fuzzy, c-format
msgid " Offset: 0x%<PRIx64>\n"
msgstr " 所有者 大ãã•\n"
-#: src/readelf.c:7393
+#: src/readelf.c:9746
#, fuzzy, c-format
msgid " Version: %<PRIu16>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:7399 src/readelf.c:8196
+#: src/readelf.c:9752 src/readelf.c:10609
#, c-format
msgid " unknown version, cannot parse section\n"
msgstr ""
-#: src/readelf.c:7406
+#: src/readelf.c:9759
#, fuzzy, c-format
msgid " Flag: 0x%<PRIx8>\n"
msgstr " å…¥å£ç‚¹ã‚¢ãƒ‰ãƒ¬ã‚¹ : %#<PRIx64>\n"
-#: src/readelf.c:7409
+#: src/readelf.c:9762
#, fuzzy, c-format
msgid " Offset length: %<PRIu8>\n"
msgstr " (オフセット: %#<PRIx64>)"
-#: src/readelf.c:7417
+#: src/readelf.c:9770
#, fuzzy, c-format
msgid " .debug_line offset: 0x%<PRIx64>\n"
msgstr " (終了オフセット: %#<PRIx64>)"
-#: src/readelf.c:7430
+#: src/readelf.c:9795
#, fuzzy, c-format
msgid " extension opcode table, %<PRIu8> items:\n"
msgstr " %<PRIu8> 個ã®ãƒ‘ラメーターã®ã‚ã‚‹ä¸æ˜Žãªå‘½ä»¤ã‚³ãƒ¼ãƒ‰:"
-#: src/readelf.c:7437
+#: src/readelf.c:9802
#, c-format
msgid " [%<PRIx8>]"
msgstr ""
-#: src/readelf.c:7449
+#: src/readelf.c:9814
#, fuzzy, c-format
msgid " %<PRIu8> arguments:"
msgstr " [%*<PRIuFAST8>] %hhu パラメーター\n"
-#: src/readelf.c:7477
+#: src/readelf.c:9829
#, c-format
msgid " no arguments."
msgstr ""
-#: src/readelf.c:7777
-#, c-format
-msgid "vendor opcode not verified?"
-msgstr ""
-
-#: src/readelf.c:7805
+#: src/readelf.c:10030
#, c-format
msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n"
msgstr ""
@@ -5256,7 +5448,7 @@ msgstr ""
# # "オフセット %3$#<PRIx64> 㮠DWARF セクション [%1$2zu] '%2$s':\n"
# # " %4$*s 文字列\n" ãŒã‚¨ãƒ©ãƒ¼ã«ãªã‚‹ã®ã¯ä½•æ•…? å–ã‚Šæ•¢ãˆãš fuzzy扱ã„
-#: src/readelf.c:7846
+#: src/readelf.c:10072
#, fuzzy, c-format
msgid ""
"\n"
@@ -5267,12 +5459,37 @@ msgstr ""
"オフセット %3$#<PRIx64> 㮠DWARF セクション [%1$2zu] '%2$s':\n"
" %4$*s 文字列\n"
-#: src/readelf.c:7860
-#, 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:7880
+#: 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<PRIu64>\n"
+msgstr " (オフセット: %#<PRIx64>)"
+
+#: src/readelf.c:10216
+#, fuzzy, c-format
+msgid " Offset size: %8<PRIu8>\n"
+msgstr " (オフセット: %#<PRIx64>)"
+
+#: src/readelf.c:10230
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " %s: %<PRId64>\n"
+
+#: src/readelf.c:10239
+#, fuzzy, c-format
+msgid " Padding: %8<PRIx16>\n"
+msgstr " (オフセット: %#<PRIx64>)"
+
+#: src/readelf.c:10293
#, c-format
msgid ""
"\n"
@@ -5281,7 +5498,7 @@ msgstr ""
"\n"
"呼出ã—フレーム検索テーブルセクション [%2zu] '.eh_frame_hdr':\n"
-#: src/readelf.c:7982
+#: src/readelf.c:10395
#, c-format
msgid ""
"\n"
@@ -5290,22 +5507,22 @@ msgstr ""
"\n"
"例外å–扱ã„テーブルセクション [%2zu] '.gcc_except_table':\n"
-#: src/readelf.c:8005
+#: src/readelf.c:10418
#, c-format
msgid " LPStart encoding: %#x "
msgstr " LPStart コード化: %#x "
-#: src/readelf.c:8017
+#: src/readelf.c:10430
#, c-format
msgid " TType encoding: %#x "
msgstr "TType コード化: %#x "
-#: src/readelf.c:8032
+#: src/readelf.c:10445
#, c-format
msgid " Call site encoding: %#x "
msgstr "呼出ã—サイトコード化: %#x "
-#: src/readelf.c:8045
+#: src/readelf.c:10458
msgid ""
"\n"
" Call site table:"
@@ -5313,7 +5530,7 @@ msgstr ""
"\n"
" 呼出ã—サイトテーブル:"
-#: src/readelf.c:8059
+#: src/readelf.c:10472
#, c-format
msgid ""
" [%4u] Call site start: %#<PRIx64>\n"
@@ -5326,12 +5543,12 @@ msgstr ""
" 離ç€é™¸å ´: %#<PRIx64>\n"
" 行動: %u\n"
-#: src/readelf.c:8132
+#: src/readelf.c:10545
#, c-format
msgid "invalid TType encoding"
msgstr "ä¸å½“㪠TType コード化"
-#: src/readelf.c:8158
+#: src/readelf.c:10571
#, fuzzy, c-format
msgid ""
"\n"
@@ -5341,37 +5558,37 @@ msgstr ""
"オフセット %3$#<PRIx64> ã® DWARF セクション [%1$2zu] '%2$s' ã«ã¯ %4$zu 個ã®é …"
"ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:8187
+#: src/readelf.c:10600
#, fuzzy, c-format
msgid " Version: %<PRId32>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:8205
+#: src/readelf.c:10618
#, fuzzy, c-format
msgid " CU offset: %#<PRIx32>\n"
msgstr " (オフセット: %#<PRIx64>)"
-#: src/readelf.c:8212
+#: src/readelf.c:10625
#, fuzzy, c-format
msgid " TU offset: %#<PRIx32>\n"
msgstr " (オフセット: %#<PRIx64>)"
-#: src/readelf.c:8219
+#: src/readelf.c:10632
#, fuzzy, c-format
msgid " address offset: %#<PRIx32>\n"
msgstr " (終了オフセット: %#<PRIx64>)"
-#: src/readelf.c:8226
+#: src/readelf.c:10639
#, fuzzy, c-format
msgid " symbol offset: %#<PRIx32>\n"
msgstr " (オフセット: %#<PRIx64>)"
-#: src/readelf.c:8233
+#: src/readelf.c:10646
#, fuzzy, c-format
msgid " constant offset: %#<PRIx32>\n"
msgstr " (終了オフセット: %#<PRIx64>)"
-#: src/readelf.c:8247
+#: src/readelf.c:10660
#, fuzzy, c-format
msgid ""
"\n"
@@ -5381,7 +5598,7 @@ msgstr ""
"オフセット %3$#<PRIx64> ã® DWARF セクション [%1$2zu] '%2$s' ã«ã¯ %4$zu 個ã®é …"
"ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:8272
+#: src/readelf.c:10685
#, fuzzy, c-format
msgid ""
"\n"
@@ -5391,7 +5608,7 @@ msgstr ""
"オフセット %3$#<PRIx64> ã® DWARF セクション [%1$2zu] '%2$s' ã«ã¯ %4$zu 個ã®é …"
"ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:8301
+#: src/readelf.c:10714
#, fuzzy, c-format
msgid ""
"\n"
@@ -5401,7 +5618,7 @@ msgstr ""
"オフセット %3$#<PRIx64> ã® DWARF セクション [%1$2zu] '%2$s' ã«ã¯ %4$zu 個ã®é …"
"ç›®ãŒã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:8334
+#: src/readelf.c:10746
#, fuzzy, c-format
msgid ""
"\n"
@@ -5410,17 +5627,18 @@ msgstr ""
"\n"
"オフセット %#0<PRIx64> ã«ä¸å½“ãªã‚·ãƒ³ãƒœãƒ«ãƒ†ãƒ¼ãƒ–ル\n"
-#: src/readelf.c:8421
+#: src/readelf.c:10884
#, c-format
msgid "cannot get debug context descriptor: %s"
msgstr "デãƒãƒƒã‚°å†…容記述å­ã‚’得られã¾ã›ã‚“: %s"
-#: src/readelf.c:8577 src/readelf.c:9199 src/readelf.c:9310 src/readelf.c:9368
+#: 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:8940
+#: src/readelf.c:11610
#, c-format
msgid ""
"\n"
@@ -5429,21 +5647,21 @@ msgstr ""
"\n"
"%*s... < %u 回ã®ç¹°è¿”ã—> ..."
-#: src/readelf.c:9447
+#: src/readelf.c:12117
msgid " Owner Data size Type\n"
msgstr " 所有者 データ大ãã•ã‚¿ã‚¤ãƒ—\n"
-#: src/readelf.c:9465
+#: src/readelf.c:12135
#, c-format
msgid " %-13.*s %9<PRId32> %s\n"
msgstr " %-13.*s %9<PRId32> %s\n"
-#: src/readelf.c:9515
-#, 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:9542
+#: src/readelf.c:12212
#, c-format
msgid ""
"\n"
@@ -5453,7 +5671,7 @@ msgstr ""
"オフセット %4$#0<PRIx64> ã® %3$<PRIu64> ãƒã‚¤ãƒˆã®ãƒŽãƒ¼ãƒˆã‚»ã‚¯ã‚·ãƒ§ãƒ³ [%1$2zu] "
"'%2$s':\n"
-#: src/readelf.c:9565
+#: src/readelf.c:12235
#, c-format
msgid ""
"\n"
@@ -5462,7 +5680,7 @@ msgstr ""
"\n"
"オフセット %2$#0<PRIx64> ã® %1$<PRIu64> ãƒã‚¤ãƒˆã®ãƒŽãƒ¼ãƒˆã‚»ã‚°ãƒ¡ãƒ³ãƒˆ:\n"
-#: src/readelf.c:9611
+#: src/readelf.c:12281
#, fuzzy, c-format
msgid ""
"\n"
@@ -5471,12 +5689,12 @@ msgstr ""
"\n"
"セクション [%Zu] '%s' ã«ã¯ãƒ€ãƒ³ãƒ—ã™ã¹ãデータãŒã‚ã‚Šã¾ã›ã‚“。\n"
-#: src/readelf.c:9638 src/readelf.c:9689
+#: 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:9643
+#: src/readelf.c:12313
#, fuzzy, c-format
msgid ""
"\n"
@@ -5486,7 +5704,7 @@ msgstr ""
"オフセット %4$#0<PRIx64> ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ [%1$Zu] '%2$s' ã®16進ダン"
"プã€%3$<PRIu64> ãƒã‚¤ãƒˆ:\n"
-#: src/readelf.c:9648
+#: src/readelf.c:12318
#, fuzzy, c-format
msgid ""
"\n"
@@ -5497,7 +5715,7 @@ msgstr ""
"オフセット %4$#0<PRIx64> ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ [%1$Zu] '%2$s' ã®16進ダン"
"プã€%3$<PRIu64> ãƒã‚¤ãƒˆ:\n"
-#: src/readelf.c:9662
+#: src/readelf.c:12332
#, fuzzy, c-format
msgid ""
"\n"
@@ -5506,7 +5724,7 @@ msgstr ""
"\n"
"セクション [%Zu] '%s' ã«ã¯ãƒ€ãƒ³ãƒ—ã™ã¹ãデータãŒã‚ã‚Šã¾ã›ã‚“。\n"
-#: src/readelf.c:9694
+#: src/readelf.c:12364
#, fuzzy, c-format
msgid ""
"\n"
@@ -5516,7 +5734,7 @@ msgstr ""
"オフセット %4$#0<PRIx64> 文字列セクション [%1$Zu] '%2$s' ã«ã¯ %3$<PRIu64> ãƒ"
"イトã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:9699
+#: src/readelf.c:12369
#, fuzzy, c-format
msgid ""
"\n"
@@ -5527,7 +5745,7 @@ msgstr ""
"オフセット %4$#0<PRIx64> 文字列セクション [%1$Zu] '%2$s' ã«ã¯ %3$<PRIu64> ãƒ"
"イトã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:9748
+#: src/readelf.c:12418
#, c-format
msgid ""
"\n"
@@ -5536,7 +5754,7 @@ msgstr ""
"\n"
"セクション [%lu] ãŒã‚ã‚Šã¾ã›ã‚“"
-#: src/readelf.c:9777
+#: src/readelf.c:12447
#, c-format
msgid ""
"\n"
@@ -5545,12 +5763,12 @@ msgstr ""
"\n"
"セクション '%s' ãŒã‚ã‚Šã¾ã›ã‚“"
-#: src/readelf.c:9834
+#: src/readelf.c:12504
#, c-format
msgid "cannot get symbol index of archive '%s': %s"
msgstr "アーカイブã®ã‚·ãƒ³ãƒœãƒ«ç´¢å¼• '%s' を得られã¾ã›ã‚“: %s"
-#: src/readelf.c:9837
+#: src/readelf.c:12507
#, c-format
msgid ""
"\n"
@@ -5559,7 +5777,7 @@ msgstr ""
"\n"
"アーカイブ '%s' ã«ã¯ã‚·ãƒ³ãƒœãƒ«ç´¢å¼•ãŒã‚ã‚Šã¾ã›ã‚“\n"
-#: src/readelf.c:9841
+#: src/readelf.c:12511
#, fuzzy, c-format
msgid ""
"\n"
@@ -5568,12 +5786,12 @@ msgstr ""
"\n"
"アーカイブ '%s' ã®ç´¢å¼•ã«ã¯ %Zu é …ç›®ã‚ã‚Šã¾ã™:\n"
-#: src/readelf.c:9859
+#: 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:9864
+#: src/readelf.c:12534
#, c-format
msgid "Archive member '%s' contains:\n"
msgstr "アーカイブメンãƒãƒ¼ '%s' ã«ã¯ä»¥ä¸‹ãŒã‚ã‚Šã¾ã™:\n"
@@ -5647,120 +5865,121 @@ msgstr " (ex %s)"
msgid "(TOTALS)\n"
msgstr "(åˆè¨ˆ)\n"
-#: src/stack.c:482
+#: src/stack.c:483
#, c-format
msgid "-p PID should be a positive process id."
msgstr ""
-#: src/stack.c:488
+#: src/stack.c:489
#, fuzzy, c-format
msgid "Cannot open core file '%s'"
msgstr "アーカイブ '%s' ã‚’é–‹ãã“ã¨ãŒã§ãã¾ã›ã‚“"
-#: src/stack.c:548
+#: src/stack.c:549
#, c-format
msgid "-n MAXFRAMES should be 0 or higher."
msgstr ""
-#: src/stack.c:560
+#: src/stack.c:561
#, c-format
msgid "-e EXEC needs a core given by --core."
msgstr ""
-#: src/stack.c:564
+#: src/stack.c:565
#, c-format
msgid "-1 needs a thread id given by -p."
msgstr ""
-#: src/stack.c:568
+#: src/stack.c:569
#, c-format
msgid "One of -p PID or --core COREFILE should be given."
msgstr ""
-#: src/stack.c:638
+#: src/stack.c:641
#, fuzzy
msgid "Show stack of process PID"
msgstr "検索ツリーを生æˆã§ãã¾ã›ã‚“"
-#: src/stack.c:640
+#: src/stack.c:643
msgid "Show stack found in COREFILE"
msgstr ""
-#: src/stack.c:641
+#: src/stack.c:644
msgid "(optional) EXECUTABLE that produced COREFILE"
msgstr ""
-#: src/stack.c:645
+#: src/stack.c:648
#, fuzzy
msgid "Output selection options:"
msgstr "é¸æŠžã‚ªãƒ—ションを入力ã—ã¦ãã ã•ã„:"
-#: src/stack.c:647
+#: src/stack.c:650
#, fuzzy
msgid "Additionally show frame activation"
msgstr "出力é¸æŠž:"
-#: src/stack.c:649
+#: src/stack.c:652
msgid "Additionally try to lookup DWARF debuginfo name for frame address"
msgstr ""
-#: src/stack.c:652
+#: src/stack.c:655
msgid ""
"Additionally show inlined function frames using DWARF debuginfo if available "
"(implies -d)"
msgstr ""
-#: src/stack.c:654
+#: src/stack.c:657
msgid "Additionally show module file information"
msgstr ""
-#: src/stack.c:656
+#: src/stack.c:659
#, fuzzy
msgid "Additionally show source file information"
msgstr "出力é¸æŠž:"
-#: src/stack.c:658
+#: src/stack.c:661
msgid ""
"Show all additional information (activation, debugname, inlines, module and "
"source)"
msgstr ""
-#: src/stack.c:660
+#: src/stack.c:663
msgid "Do not resolve address to function symbol name"
msgstr ""
-#: src/stack.c:662
+#: src/stack.c:665
msgid "Show raw function symbol names, do not try to demangle names"
msgstr ""
-#: src/stack.c:664
+#: src/stack.c:667
msgid "Show module build-id, load address and pc offset"
msgstr ""
-#: src/stack.c:666
+#: src/stack.c:669
msgid "Show the backtrace of only one thread"
msgstr ""
-#: src/stack.c:668
+#: src/stack.c:671
msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)"
msgstr ""
-#: src/stack.c:670
+#: src/stack.c:673
msgid "Show module memory map with build-id, elf and debug files detected"
msgstr ""
-#: src/stack.c:678
+#: 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:751
+#: src/stack.c:756
#, c-format
msgid "Couldn't show any frames."
msgstr ""
@@ -6373,8 +6592,9 @@ msgstr ""
#: 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 "
@@ -6411,6 +6631,68 @@ msgstr "出力é¸æŠž:"
msgid "Show instances of inlined functions"
msgstr ""
+#~ msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#<PRIx64> <%s>"
+#~ msgstr "%s+%#<PRIx64> <%s>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s>"
+#~ msgstr "%s+%#0*<PRIx64> <%s>"
+
+#~ msgid "%#<PRIx64> <%s>"
+#~ msgstr "%#<PRIx64> <%s>"
+
+#~ msgid "%#0*<PRIx64> <%s>"
+#~ msgstr "%#0*<PRIx64> <%s>"
+
+#~ msgid "%s+%#<PRIx64>"
+#~ msgstr "%s+%#<PRIx64>"
+
+#~ msgid "%s+%#0*<PRIx64>"
+#~ msgstr "%s+%#0*<PRIx64>"
+
+#, fuzzy
+#~ msgid " %s..%s (%<PRIx64>)\n"
+#~ msgstr " %s: %<PRId64>\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 %<PRIu64> in section '%s': %s"
+#~ msgstr ""
+#~ "セクション '%2$s' 㮠オフセット %1$<PRIu64> ã® 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 セクションã®ã¿ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™"
@@ -6900,10 +7182,6 @@ msgstr ""
#~ msgid "unknown user attribute %hx"
#~ msgstr "ä¸æ˜Žãªåˆ©ç”¨è€…属性 %hx"
-#, fuzzy
-#~ msgid "unknown form %#<PRIx64>"
-#~ msgstr "ä¸æ˜Žãªæ§˜å¼ %<PRIx64>"
-
#~ 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 13070d44..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: 2017-08-02 18:29+0200\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 <piotrdrag@gmail.com>\n"
"Language-Team: Polish <trans-pl@lists.fedoraproject.org>\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:3296
-#: src/readelf.c:3687 src/readelf.c:8526 src/unstrip.c:2227 src/unstrip.c:2432
+#: 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:50
+#: 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:52
+#: 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,165 +107,201 @@ 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:51
+#: 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:71
+#: 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:72
+#: 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"
-#: libdw/dwarf_error.c:98
+#: libdw/dwarf_error.c:103
#, fuzzy
msgid "unknown language code"
msgstr " nieznana instrukcja"
-#: libdwfl/argp-std.c:50 src/stack.c:636 src/unstrip.c:2374
+#: 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:"
@@ -297,7 +333,7 @@ msgstr "Wyszukuje adresy w uruchomionych jądrze"
msgid "Kernel with all modules"
msgstr "Jądro ze wszystkimi modułami"
-#: libdwfl/argp-std.c:63 src/stack.c:643
+#: 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"
@@ -375,7 +411,7 @@ msgstr "Nieobsługiwany typ relokacji"
msgid "r_offset is bogus"
msgstr "r_offset jest fałszywe"
-#: libdwfl/libdwflP.h:64 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"
@@ -494,7 +530,7 @@ msgstr "Brak zaplecza"
msgid "<unknown>"
msgstr "<nieznany>"
-#: libebl/ebldynamictagname.c:101
+#: libebl/ebldynamictagname.c:103
#, c-format
msgid "<unknown>: %#<PRIx64>"
msgstr "<nieznany>: %#<PRIx64>"
@@ -584,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:5139
+#: libelf/elf_error.c:87 src/readelf.c:6107
#, c-format
msgid "invalid encoding"
msgstr "nieprawidłowe kodowanie"
@@ -594,147 +630,152 @@ 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:7389 src/readelf.c:7900
-#: src/readelf.c:8001 src/readelf.c:8182
+#: 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"
@@ -813,22 +854,22 @@ msgstr ""
msgid "[ADDR...]"
msgstr "[ADRES…]"
-#: src/addr2line.c:519
+#: 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:542
+#: src/addr2line.c:543
#, c-format
msgid "offset %#<PRIxMAX> lies outside section '%s'"
msgstr "offset %#<PRIxMAX> leży poza sekcjÄ… „%sâ€"
-#: src/addr2line.c:632
+#: src/addr2line.c:633
#, c-format
msgid "cannot find symbol '%s'"
msgstr "nie można odnaleźć symbolu „%sâ€"
-#: src/addr2line.c:637
+#: src/addr2line.c:638
#, c-format
msgid "offset %#<PRIxMAX> lies outside contents of '%s'"
msgstr "offset %#<PRIxMAX> leży poza zawartoÅ›ciÄ… „%sâ€"
@@ -997,12 +1038,12 @@ msgstr "nie można wykonać stat na archiwum „%sâ€"
msgid "no entry %s in archive\n"
msgstr "brak wpisu %s w archiwum\n"
-#: src/ar.c:473 src/ar.c:918 src/ar.c:1118
+#: 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:480 src/ar.c:925 src/ar.c:1127
+#: 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"
@@ -1042,46 +1083,71 @@ msgstr "nie można zmienić czasu modyfikacji %s"
msgid "cannot rename temporary file to %.*s"
msgstr "nie można zmienić nazwy pliku tymczasowego na %.*s"
-#: src/ar.c:759 src/ar.c:1010 src/ar.c:1409 src/ranlib.c:223
+#: 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:1209
+#: src/ar.c:1213
#, c-format
msgid "position member %s not found"
msgstr "nie odnaleziono położenia elementu %s"
-#: src/ar.c:1219
+#: 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:1248 src/objdump.c:242
+#: src/ar.c:1252 src/objdump.c:242
#, c-format
msgid "cannot open %s"
msgstr "nie można otworzyć %s"
-#: src/ar.c:1253
+#: src/ar.c:1257
#, c-format
msgid "cannot stat %s"
msgstr "nie można wykonać stat na %s"
-#: src/ar.c:1259
+#: src/ar.c:1263
#, c-format
msgid "%s is no regular file"
msgstr "%s nie jest zwykłym plikiem"
-#: src/ar.c:1272
+#: 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:1292
+#: 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."
@@ -1385,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:78 src/readelf.c:128
+#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154
msgid "FILE..."
msgstr "PLIK…"
@@ -1419,7 +1485,7 @@ 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:155 src/readelf.c:303
+#: src/elflint.c:155 src/readelf.c:347
#, c-format
msgid "cannot open input file"
msgstr "nie można otworzyć pliku wejściowego"
@@ -1438,7 +1504,7 @@ msgstr "błąd podczas zamykania deskryptora ELF: %s\n"
msgid "No errors"
msgstr "Brak błędów"
-#: src/elflint.c:220 src/readelf.c:480
+#: src/elflint.c:220 src/readelf.c:546
msgid "Missing file name.\n"
msgstr "Brak nazwy pliku.\n"
@@ -1474,8 +1540,8 @@ msgid "unsupported OS ABI e_ident[%d] == '%s'\n"
msgstr "nieobsÅ‚ugiwane ABI systemu operacyjnego e_ident[%d] == „%sâ€\n"
#: src/elflint.c:381
-#, c-format
-msgid "unsupport ABI version e_ident[%d] == %d\n"
+#, 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:386
@@ -3610,13 +3676,13 @@ msgstr "%s%s%s: nie rozpoznano formatu pliku"
msgid "cannot create search tree"
msgstr "nie można utworzyć drzewa wyszukiwania"
-#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:537
-#: src/readelf.c:1115 src/readelf.c:1315 src/readelf.c:1463 src/readelf.c:1664
-#: src/readelf.c:1870 src/readelf.c:2060 src/readelf.c:2238 src/readelf.c:2314
-#: src/readelf.c:2572 src/readelf.c:2648 src/readelf.c:2735 src/readelf.c:3315
-#: src/readelf.c:3365 src/readelf.c:3428 src/readelf.c:8430 src/readelf.c:9530
-#: src/readelf.c:9733 src/readelf.c:9801 src/size.c:397 src/size.c:466
-#: src/strip.c:572
+#: 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"
@@ -3700,7 +3766,7 @@ msgstr "Wyświetla tylko informacje o sekcji NAZWA."
msgid "Show information from FILEs (a.out by default)."
msgstr "Wyświetla informacje z PLIKÓW (domyślnie a.out)."
-#: src/objdump.c:219 src/readelf.c:485
+#: src/objdump.c:219 src/readelf.c:551
msgid "No operation specified.\n"
msgstr "Nie podano działania.\n"
@@ -3709,11 +3775,11 @@ msgstr "Nie podano działania.\n"
msgid "while close `%s'"
msgstr "podczas zamykania „%sâ€"
-#: src/objdump.c:364 src/readelf.c:1965 src/readelf.c:2157
+#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238
msgid "INVALID SYMBOL"
msgstr "NIEPRAWIDÅOWY SYMBOL"
-#: src/objdump.c:379 src/readelf.c:1999 src/readelf.c:2193
+#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274
msgid "INVALID SECTION"
msgstr "NIEPRAWIDÅOWA SEKCJA"
@@ -3767,115 +3833,127 @@ msgstr "„%s†nie jest archiwum"
msgid "error while freeing sub-ELF descriptor: %s"
msgstr "błąd podczas zwalniania deskryptora pod-ELF: %s"
-#: src/readelf.c:73
+#: src/readelf.c:95
msgid "ELF input selection:"
msgstr "Wybór wyjścia ELF:"
-#: src/readelf.c:75
+#: 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:77
+#: 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:79
+#: 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:80
+#: src/readelf.c:105
msgid "Display the dynamic segment"
msgstr "Wyświetla segment dynamiczny"
-#: src/readelf.c:81
+#: src/readelf.c:106
msgid "Display the ELF file header"
msgstr "Wyświetla nagłówek pliku ELF"
-#: src/readelf.c:83
+#: 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:84
+#: src/readelf.c:109
msgid "Display the program headers"
msgstr "Wyświetla nagłówki programu"
-#: src/readelf.c:86
+#: src/readelf.c:111
msgid "Display relocations"
msgstr "Wyświetla relokacje"
-#: src/readelf.c:87
+#: 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:90
+#: src/readelf.c:116
msgid "Display the symbol table sections"
msgstr "Wyświetla sekcje tabeli symboli"
-#: src/readelf.c:91
+#: src/readelf.c:117
msgid "Display versioning information"
msgstr "Wyświetla informacje o wersji"
-#: src/readelf.c:92
+#: src/readelf.c:118
msgid "Display the ELF notes"
msgstr "Wyświetla notatki ELF"
-#: src/readelf.c:94
+#: src/readelf.c:120
msgid "Display architecture specific information, if any"
msgstr "Wyświetla informacje dla konkretnej architektury, jeśli są"
-#: src/readelf.c:96
+#: src/readelf.c:122
msgid "Display sections for exception handling"
msgstr "Wyświetla sekcje do obsługi wyjątków"
-#: src/readelf.c:98
+#: src/readelf.c:124
msgid "Additional output selection:"
msgstr "Dodatkowy wybór wyjścia:"
-#: src/readelf.c:100
+#: 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:104
+#: 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:106
+#: src/readelf.c:132
msgid "Print string contents of sections"
msgstr "Wyświetla zawartość ciągów sekcji"
-#: src/readelf.c:109
+#: src/readelf.c:135
msgid "Display the symbol index of an archive"
msgstr "Wyświetla indeks symboli archiwum"
-#: src/readelf.c:111
+#: src/readelf.c:137
msgid "Output control:"
msgstr "Kontrola wyjścia:"
-#: src/readelf.c:113
+#: 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:115
+#: 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:117
+#: src/readelf.c:143
msgid "Ignored for compatibility (lines always wide)"
msgstr "Ignorowane dla zgodności (wiersze są zawsze szerokie)"
-#: src/readelf.c:119
+#: 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)"
@@ -3885,31 +3963,40 @@ msgstr ""
"używane z opcją -p lub -x)"
#. Short description of program.
-#: src/readelf.c:124
+#: 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:453
+#. 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:521 src/readelf.c:632
+#: 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:528 src/readelf.c:844 src/strip.c:641
+#: 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:546 src/readelf.c:1137 src/readelf.c:1339
+#: 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:555 src/readelf.c:1144 src/readelf.c:1347 src/readelf.c:9753
+#: 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:1109
#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650
@@ -3918,109 +4005,109 @@ msgstr "nie można uzyskać sekcji: %s"
msgid "cannot get section header: %s"
msgstr "nie można uzyskać nagłówka sekcji: %s"
-#: src/readelf.c:563
+#: src/readelf.c:632
#, c-format
msgid "cannot get section name"
msgstr "nie można uzyskać nazwy sekcji"
-#: src/readelf.c:572 src/readelf.c:5548 src/readelf.c:7888 src/readelf.c:7990
-#: src/readelf.c:8167
+#: 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:588
+#: src/readelf.c:657
#, c-format
msgid "cannot create temp file '%s'"
msgstr "nie można utworzyć pliku tymczasowego „%sâ€"
-#: src/readelf.c:597
+#: src/readelf.c:666
#, c-format
msgid "cannot write section data"
msgstr "nie można zapisać danych sekcji"
-#: src/readelf.c:603 src/readelf.c:620 src/readelf.c:649
+#: 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:610
+#: src/readelf.c:679
#, c-format
msgid "error while rewinding file descriptor"
msgstr "błąd podczas przewijania deskryptora pliku"
-#: src/readelf.c:644
+#: 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:743
-#, c-format
-msgid "No such section '%s' in '%s'"
-msgstr "Brak sekcji „%s†w „%sâ€"
-
-#: src/readelf.c:770
+#: src/readelf.c:817
#, c-format
msgid "cannot stat input file"
msgstr "nie można wykonać stat na pliku wejściowym"
-#: src/readelf.c:772
+#: src/readelf.c:819
#, c-format
msgid "input file is empty"
msgstr "plik wejściowy jest pusty"
-#: src/readelf.c:774
+#: src/readelf.c:821
#, c-format
msgid "failed reading '%s': %s"
msgstr "odczytanie „%s†się nie powiodło: %s"
-#: src/readelf.c:829
+#: 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:837
+#: src/readelf.c:918
#, c-format
msgid "cannot create EBL handle"
msgstr "nie można utworzyć uchwytu EBL"
-#: src/readelf.c:850
+#: 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:940
+#: src/readelf.c:1021
msgid "NONE (None)"
msgstr "NONE (żaden)"
-#: src/readelf.c:941
+#: src/readelf.c:1022
msgid "REL (Relocatable file)"
msgstr "REL (plik relokowalny)"
-#: src/readelf.c:942
+#: src/readelf.c:1023
msgid "EXEC (Executable file)"
msgstr "EXEC (plik wykonywalny)"
-#: src/readelf.c:943
+#: src/readelf.c:1024
msgid "DYN (Shared object file)"
msgstr "DYN (plik obiektu współdzielonego)"
-#: src/readelf.c:944
+#: src/readelf.c:1025
msgid "CORE (Core file)"
msgstr "CORE (plik core)"
-#: src/readelf.c:949
+#: 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:951
+#: src/readelf.c:1032
#, c-format
msgid "Processor Specific: (%x)\n"
msgstr "Zależny od procesora: (%x)\n"
-#: src/readelf.c:961
+#: src/readelf.c:1042
msgid ""
"ELF Header:\n"
" Magic: "
@@ -4028,7 +4115,7 @@ msgstr ""
"Nagłówek ELF:\n"
" Magic: "
-#: src/readelf.c:965
+#: src/readelf.c:1046
#, c-format
msgid ""
"\n"
@@ -4037,118 +4124,118 @@ msgstr ""
"\n"
" Klasa: %s\n"
-#: src/readelf.c:970
+#: src/readelf.c:1051
#, c-format
msgid " Data: %s\n"
msgstr " Dane: %s\n"
-#: src/readelf.c:976
+#: src/readelf.c:1057
#, c-format
msgid " Ident Version: %hhd %s\n"
msgstr " Wersja Ident: %hhd %s\n"
-#: src/readelf.c:978 src/readelf.c:995
+#: src/readelf.c:1059 src/readelf.c:1076
msgid "(current)"
msgstr "(bieżąca)"
-#: src/readelf.c:982
+#: src/readelf.c:1063
#, c-format
msgid " OS/ABI: %s\n"
msgstr " System operacyjny/ABI: %s\n"
-#: src/readelf.c:985
+#: src/readelf.c:1066
#, c-format
msgid " ABI Version: %hhd\n"
msgstr " Wersja ABI: %hhd\n"
-#: src/readelf.c:988
+#: src/readelf.c:1069
msgid " Type: "
msgstr " Typ: "
-#: src/readelf.c:991
+#: src/readelf.c:1072
#, c-format
msgid " Machine: %s\n"
msgstr " Komputer: %s\n"
-#: src/readelf.c:993
+#: src/readelf.c:1074
#, c-format
msgid " Version: %d %s\n"
msgstr " Wersja: %d %s\n"
-#: src/readelf.c:997
+#: src/readelf.c:1078
#, c-format
msgid " Entry point address: %#<PRIx64>\n"
msgstr " Adres punktu wejściowego: %#<PRIx64>\n"
-#: src/readelf.c:1000
+#: src/readelf.c:1081
#, c-format
msgid " Start of program headers: %<PRId64> %s\n"
msgstr " Początek nagłówków programu: %<PRId64> %s\n"
-#: src/readelf.c:1001 src/readelf.c:1004
+#: src/readelf.c:1082 src/readelf.c:1085
msgid "(bytes into file)"
msgstr "(bajtów w pliku)"
-#: src/readelf.c:1003
+#: src/readelf.c:1084
#, c-format
msgid " Start of section headers: %<PRId64> %s\n"
msgstr " Początek nagłówków sekcji: %<PRId64> %s\n"
-#: src/readelf.c:1006
+#: src/readelf.c:1087
#, c-format
msgid " Flags: %s\n"
msgstr " Flagi: %s\n"
-#: src/readelf.c:1009
+#: src/readelf.c:1090
#, c-format
msgid " Size of this header: %<PRId16> %s\n"
msgstr " Rozmiar tego nagłówka: %<PRId16> %s\n"
-#: src/readelf.c:1010 src/readelf.c:1013 src/readelf.c:1030
+#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111
msgid "(bytes)"
msgstr "(bajtów)"
-#: src/readelf.c:1012
+#: src/readelf.c:1093
#, c-format
msgid " Size of program header entries: %<PRId16> %s\n"
msgstr " Rozmiar wpisów nagłówka programu: %<PRId16> %s\n"
-#: src/readelf.c:1015
+#: src/readelf.c:1096
#, c-format
msgid " Number of program headers entries: %<PRId16>"
msgstr " Liczba wpisów nagłówków programu: %<PRId16>"
-#: src/readelf.c:1022
+#: src/readelf.c:1103
#, c-format
msgid " (%<PRIu32> in [0].sh_info)"
msgstr " (%<PRIu32> w [0].sh_info)"
-#: src/readelf.c:1025 src/readelf.c:1042 src/readelf.c:1056
+#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137
msgid " ([0] not available)"
msgstr " ([0] niedostępny)"
-#: src/readelf.c:1029
+#: src/readelf.c:1110
#, c-format
msgid " Size of section header entries: %<PRId16> %s\n"
msgstr " Rozmiar wpisów nagłówka sekcji: %<PRId16> %s\n"
-#: src/readelf.c:1032
+#: src/readelf.c:1113
#, c-format
msgid " Number of section headers entries: %<PRId16>"
msgstr " Liczba wpisów nagłówków sekcji: %<PRId16>"
-#: src/readelf.c:1039
+#: src/readelf.c:1120
#, c-format
msgid " (%<PRIu32> in [0].sh_size)"
msgstr " (%<PRIu32> w [0].sh_size)"
#. We managed to get the zeroth section.
-#: src/readelf.c:1052
+#: src/readelf.c:1133
#, c-format
msgid " (%<PRIu32> in [0].sh_link)"
msgstr " (%<PRIu32> w [0].sh_link)"
-#: src/readelf.c:1060
+#: src/readelf.c:1141
#, c-format
msgid ""
" Section header string table index: XINDEX%s\n"
@@ -4157,7 +4244,7 @@ msgstr ""
" Indeks tabeli ciągów nagłówków sekcji: XINDEX%s\n"
"\n"
-#: src/readelf.c:1064
+#: src/readelf.c:1145
#, c-format
msgid ""
" Section header string table index: %<PRId16>\n"
@@ -4166,7 +4253,7 @@ msgstr ""
" Indeks tabeli ciągów nagłówków sekcji: %<PRId16>\n"
"\n"
-#: src/readelf.c:1107
+#: src/readelf.c:1188
#, c-format
msgid ""
"There are %d section headers, starting at offset %#<PRIx64>:\n"
@@ -4175,11 +4262,11 @@ msgstr ""
"Jest %d nagłówków sekcji, rozpoczynających się od offsetu %#<PRIx64>:\n"
"\n"
-#: src/readelf.c:1117
+#: src/readelf.c:1198
msgid "Section Headers:"
msgstr "Nagłówki sekcji:"
-#: src/readelf.c:1120
+#: src/readelf.c:1201
msgid ""
"[Nr] Name Type Addr Off Size ES Flags Lk "
"Inf Al"
@@ -4187,7 +4274,7 @@ msgstr ""
"[Nr] Nazwa Typ Adres Offset Rozm. ES Flagi Lk "
"Inf Al"
-#: src/readelf.c:1122
+#: src/readelf.c:1203
msgid ""
"[Nr] Name Type Addr Off Size ES "
"Flags Lk Inf Al"
@@ -4195,36 +4282,36 @@ msgstr ""
"[Nr] Nazwa Typ Adres Offset Rozmiar ES "
"Flagi Lk Inf Al"
-#: src/readelf.c:1127
+#: src/readelf.c:1208
msgid " [Compression Size Al]"
msgstr " [Kompresja Rozmiar Al]"
-#: src/readelf.c:1129
+#: src/readelf.c:1210
msgid " [Compression Size Al]"
msgstr " [Kompresja Rozmiar Al]"
-#: src/readelf.c:1205
+#: 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:1216
+#: 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:1234
+#: src/readelf.c:1315
msgid "Program Headers:"
msgstr "Nagłówki programu:"
-#: src/readelf.c:1236
+#: 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:1239
+#: src/readelf.c:1320
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align"
@@ -4232,12 +4319,12 @@ msgstr ""
" Typ Offset AdresWirtualny AdresFizyczny RozmPlik "
"RozmPam Flg Wyrównanie"
-#: src/readelf.c:1296
+#: src/readelf.c:1377
#, c-format
msgid "\t[Requesting program interpreter: %s]\n"
msgstr "\t[Wywołanie interpretera programu: %s]\n"
-#: src/readelf.c:1317
+#: src/readelf.c:1398
msgid ""
"\n"
" Section to Segment mapping:\n"
@@ -4247,12 +4334,12 @@ msgstr ""
" Mapowanie sekcji do segmentów:\n"
" Segment sekcji…"
-#: src/readelf.c:1328 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993
+#: 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:1471
+#: src/readelf.c:1552
#, c-format
msgid ""
"\n"
@@ -4270,7 +4357,7 @@ msgstr[2] ""
"\n"
"Grupa sekcji COMDAT [%2zu] „%s†z podpisem „%s†zawiera %zu wpisów:\n"
-#: src/readelf.c:1476
+#: src/readelf.c:1557
#, c-format
msgid ""
"\n"
@@ -4288,31 +4375,31 @@ msgstr[2] ""
"\n"
"Grupa sekcji [%2zu] „%s†z podpisem „%s†zawiera %zu wpisów:\n"
-#: src/readelf.c:1484
+#: src/readelf.c:1565
msgid "<INVALID SYMBOL>"
msgstr "<NIEPRAWIDÅOWY SYMBOL>"
-#: src/readelf.c:1498
+#: src/readelf.c:1579
msgid "<INVALID SECTION>"
msgstr "<NIEPRAWIDÅOWY SEKCJA>"
-#: src/readelf.c:1521 src/readelf.c:2248 src/readelf.c:3331 src/readelf.c:9624
-#: src/readelf.c:9631 src/readelf.c:9675 src/readelf.c:9682
+#: 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:1526 src/readelf.c:2253 src/readelf.c:3336
+#: 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:1670 src/readelf.c:2320 src/readelf.c:2578 src/readelf.c:2654
-#: src/readelf.c:2958 src/readelf.c:3032 src/readelf.c:4759
+#: 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:1673
+#: src/readelf.c:1754
#, c-format
msgid ""
"\n"
@@ -4338,36 +4425,36 @@ msgstr[2] ""
" Adres: %#0*<PRIx64> Offset: %#08<PRIx64> DowiÄ…zanie do sekcji: [%2u] "
"'%s'\n"
-#: src/readelf.c:1683
+#: src/readelf.c:1764
msgid " Type Value\n"
msgstr " Typ Wartość\n"
-#: src/readelf.c:1707
+#: src/readelf.c:1788
#, c-format
msgid "Shared library: [%s]\n"
msgstr "Biblioteka współdzielona: [%s]\n"
-#: src/readelf.c:1712
+#: src/readelf.c:1793
#, c-format
msgid "Library soname: [%s]\n"
msgstr "soname biblioteki: [%s]\n"
-#: src/readelf.c:1717
+#: src/readelf.c:1798
#, c-format
msgid "Library rpath: [%s]\n"
msgstr "rpath biblioteki: [%s]\n"
-#: src/readelf.c:1722
+#: src/readelf.c:1803
#, c-format
msgid "Library runpath: [%s]\n"
msgstr "runpath biblioteki: [%s]\n"
-#: src/readelf.c:1742
+#: src/readelf.c:1823
#, c-format
msgid "%<PRId64> (bytes)\n"
msgstr "%<PRId64> (bajtów)\n"
-#: src/readelf.c:1855 src/readelf.c:2045
+#: src/readelf.c:1936 src/readelf.c:2126
#, c-format
msgid ""
"\n"
@@ -4376,7 +4463,7 @@ msgstr ""
"\n"
"Nieprawidłowa tabela symboli pod offsetem %#0<PRIx64>\n"
-#: src/readelf.c:1873 src/readelf.c:2063
+#: src/readelf.c:1954 src/readelf.c:2144
#, c-format
msgid ""
"\n"
@@ -4405,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:1888 src/readelf.c:2078
+#: src/readelf.c:1969 src/readelf.c:2159
#, c-format
msgid ""
"\n"
@@ -4423,30 +4510,30 @@ msgstr[2] ""
"\n"
"Sekcja relokacji [%2u] „%s†pod offsetem %#0<PRIx64> zawiera %d wpisów:\n"
-#: src/readelf.c:1898
+#: src/readelf.c:1979
msgid " Offset Type Value Name\n"
msgstr " Offset Typ Wartość Nazwa\n"
-#: src/readelf.c:1900
+#: src/readelf.c:1981
msgid " Offset Type Value Name\n"
msgstr " Offset Typ Wartość Nazwa\n"
-#: src/readelf.c:1953 src/readelf.c:1964 src/readelf.c:1977 src/readelf.c:1998
-#: src/readelf.c:2010 src/readelf.c:2144 src/readelf.c:2156 src/readelf.c:2170
-#: src/readelf.c:2192 src/readelf.c:2205
+#: 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 "<INVALID RELOC>"
msgstr "<NIEPRAWIDÅOWA RELOKACJA>"
-#: src/readelf.c:2088
+#: src/readelf.c:2169
msgid " Offset Type Value Addend Name\n"
msgstr " Offset Typ Wartość Koniec Nazwa\n"
-#: src/readelf.c:2090
+#: src/readelf.c:2171
msgid " Offset Type Value Addend Name\n"
msgstr ""
" Offset Typ Wartość Koniec Nazwa\n"
-#: src/readelf.c:2328
+#: src/readelf.c:2409
#, c-format
msgid ""
"\n"
@@ -4464,7 +4551,7 @@ msgstr[2] ""
"\n"
"Tabela symboli [%2u] „%s†zawiera %u wpisów:\n"
-#: src/readelf.c:2333
+#: 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"
@@ -4472,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:2341
+#: 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:2343
+#: 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:2363
+#: src/readelf.c:2444
#, c-format
msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
-#: src/readelf.c:2451
+#: src/readelf.c:2532
#, c-format
msgid "bad dynamic symbol"
msgstr "błędny symbol dynamiczny"
-#: src/readelf.c:2533
+#: src/readelf.c:2614
msgid "none"
msgstr "brak"
-#: src/readelf.c:2550
+#: src/readelf.c:2631
msgid "| <unknown>"
msgstr "| <nieznany>"
-#: src/readelf.c:2581
+#: src/readelf.c:2662
#, c-format
msgid ""
"\n"
@@ -4524,17 +4611,17 @@ msgstr[2] ""
" Adres: %#0*<PRIx64> Offset: %#08<PRIx64> DowiÄ…zanie do sekcji: [%2u] "
"„%sâ€\n"
-#: src/readelf.c:2602
+#: 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:2615
+#: 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:2658
+#: src/readelf.c:2739
#, c-format
msgid ""
"\n"
@@ -4560,19 +4647,19 @@ msgstr[2] ""
" Adres: %#0*<PRIx64> Offset: %#08<PRIx64> DowiÄ…zanie do sekcji: [%2u] "
"„%sâ€\n"
-#: src/readelf.c:2686
+#: 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:2701
+#: src/readelf.c:2782
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr " %#06x: Rodzic %d: %s\n"
#. Print the header.
-#: src/readelf.c:2962
+#: src/readelf.c:3043
#, c-format
msgid ""
"\n"
@@ -4595,15 +4682,15 @@ msgstr[2] ""
"Sekcja symboli wersji [%2u] „%s†zawiera %d wpisów:\n"
" Adres: %#0*<PRIx64> Offset: %#08<PRIx64> DowiÄ…zanie do sekcji: [%2u] „%sâ€"
-#: src/readelf.c:2990
+#: src/readelf.c:3071
msgid " 0 *local* "
msgstr " 0 *lokalny* "
-#: src/readelf.c:2995
+#: src/readelf.c:3076
msgid " 1 *global* "
msgstr " 1 *globalny* "
-#: src/readelf.c:3037
+#: src/readelf.c:3118
#, c-format
msgid ""
"\n"
@@ -4634,22 +4721,22 @@ msgstr[2] ""
" Adres: %#0*<PRIx64> Offset: %#08<PRIx64> DowiÄ…zanie do sekcji: [%2u] "
"„%sâ€\n"
-#: src/readelf.c:3059
+#: 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:3061
+#: src/readelf.c:3142
#, c-format
msgid " 0 %6<PRIu32> %5.1f%%\n"
msgstr " 0 %6<PRIu32> %5.1f%%\n"
-#: src/readelf.c:3068
+#: src/readelf.c:3149
#, c-format
msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
-#: src/readelf.c:3081
+#: src/readelf.c:3162
#, c-format
msgid ""
" Average number of tests: successful lookup: %f\n"
@@ -4658,27 +4745,37 @@ msgstr ""
" Średnia liczba testów: udane wyszukania: %f\n"
"\t\t\t nieudane wyszukania: %f\n"
-#: src/readelf.c:3099 src/readelf.c:3154 src/readelf.c:3211
+#: 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:3107
+#: 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:3162
+#: 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:3220
+#: 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:3287
+#: src/readelf.c:3386
#, c-format
msgid ""
" Symbol Bias: %u\n"
@@ -4688,7 +4785,7 @@ msgstr ""
" Rozmiar maski bitowej: %zu bajtów %<PRIuFAST32>%% bitów ustawionych "
"drugie przesunięcie skrótu: %u\n"
-#: src/readelf.c:3376
+#: src/readelf.c:3475
#, c-format
msgid ""
"\n"
@@ -4709,7 +4806,7 @@ msgstr[2] ""
"Sekcja listy bibliotek [%2zu] „%s†pod offsetem %#0<PRIx64> zawiera %d "
"wpisów:\n"
-#: src/readelf.c:3390
+#: src/readelf.c:3489
msgid ""
" Library Time Stamp Checksum Version "
"Flags"
@@ -4717,7 +4814,7 @@ msgstr ""
" Biblioteka Oznaczenie czasu Suma k. Wersja "
"Flagi"
-#: src/readelf.c:3440
+#: src/readelf.c:3539
#, c-format
msgid ""
"\n"
@@ -4728,142 +4825,102 @@ msgstr ""
"Sekcja atrybutów obiektu [%2zu] „%s†%<PRIu64> bajtów pod offsetem "
"%#0<PRIx64>:\n"
-#: src/readelf.c:3457
+#: src/readelf.c:3556
msgid " Owner Size\n"
msgstr " Właściciel Rozmiar\n"
-#: src/readelf.c:3486
+#: src/readelf.c:3585
#, c-format
msgid " %-13s %4<PRIu32>\n"
msgstr " %-13s %4<PRIu32>\n"
#. Unknown subsection, print and skip.
-#: src/readelf.c:3525
+#: src/readelf.c:3624
#, c-format
msgid " %-4u %12<PRIu32>\n"
msgstr " %-4u %12<PRIu32>\n"
#. Tag_File
-#: src/readelf.c:3530
+#: src/readelf.c:3629
#, c-format
msgid " File: %11<PRIu32>\n"
msgstr " Plik: %11<PRIu32>\n"
-#: src/readelf.c:3579
+#: src/readelf.c:3678
#, c-format
msgid " %s: %<PRId64>, %s\n"
msgstr " %s: %<PRId64>, %s\n"
-#: src/readelf.c:3582
+#: src/readelf.c:3681
#, c-format
msgid " %s: %<PRId64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:3585
+#: src/readelf.c:3684
#, c-format
msgid " %s: %s\n"
msgstr " %s: %s\n"
-#: src/readelf.c:3595
+#: src/readelf.c:3694
#, c-format
msgid " %u: %<PRId64>\n"
msgstr " %u: %<PRId64>\n"
-#: src/readelf.c:3598
+#: src/readelf.c:3697
#, c-format
msgid " %u: %s\n"
msgstr " %u: %s\n"
-#: src/readelf.c:3643
-#, c-format
-msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3646
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3651
-#, c-format
-msgid "%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3654
-#, c-format
-msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3660
-#, c-format
-msgid "%s+%#<PRIx64> <%s>"
-msgstr "%s+%#<PRIx64> <%s>"
-
-#: src/readelf.c:3663
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s>"
-msgstr "%s+%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3667
-#, c-format
-msgid "%#<PRIx64> <%s>"
-msgstr "%#<PRIx64> <%s>"
-
-#: src/readelf.c:3670
-#, c-format
-msgid "%#0*<PRIx64> <%s>"
-msgstr "%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3675
-#, c-format
-msgid "%s+%#<PRIx64>"
-msgstr "%s+%#<PRIx64>"
-
-#: src/readelf.c:3678
-#, c-format
-msgid "%s+%#0*<PRIx64>"
-msgstr "%s+%#0*<PRIx64>"
+#: src/readelf.c:3767
+#, fuzzy, c-format
+msgid "sprintf failure"
+msgstr "mprotect się nie powiodło"
-#: src/readelf.c:4081
+#: src/readelf.c:4249
msgid "empty block"
msgstr "pusty blok"
-#: src/readelf.c:4084
+#: src/readelf.c:4252
#, c-format
msgid "%zu byte block:"
msgstr "%zu bajtowy blok:"
-#: src/readelf.c:4481
-#, c-format
-msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n"
+#: src/readelf.c:4730
+#, fuzzy, c-format
+msgid "%*s[%2<PRIuMAX>] %s <TRUNCATED>\n"
msgstr "%*s[%4<PRIuMAX>] %s <SKRÓCONE>\n"
-#: src/readelf.c:4538
+#: src/readelf.c:4794
#, c-format
msgid "%s %#<PRIx64> used with different address sizes"
msgstr "%s %#<PRIx64> zostało użyte z różnymi rozmiarami adresu"
-#: src/readelf.c:4545
+#: src/readelf.c:4801
#, c-format
msgid "%s %#<PRIx64> used with different offset sizes"
msgstr "%s %#<PRIx64> zostało użyte z różnymi rozmiarami offsetu"
-#: src/readelf.c:4552
+#: src/readelf.c:4808
#, c-format
msgid "%s %#<PRIx64> used with different base addresses"
msgstr "%s %#<PRIx64> zostało użyte z różnymi adresami podstawowymi"
-#: src/readelf.c:4641
+#: src/readelf.c:4815
+#, fuzzy, c-format
+msgid "%s %#<PRIx64> used with different attribute %s and %s"
+msgstr "%s %#<PRIx64> zostało użyte z różnymi rozmiarami adresu"
+
+#: src/readelf.c:4912
#, c-format
msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n"
msgstr " [%6tx] <NIEUŻYWANE ŚMIECIE W RESZCIE SEKCJI>\n"
-#: src/readelf.c:4649
+#: src/readelf.c:4920
#, c-format
msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n"
msgstr " [%6tx] <NIEUŻYWANE ŚMIECIE>… %<PRIu64> bajtów…\n"
-#: src/readelf.c:4675
+#: src/readelf.c:4998
#, c-format
msgid ""
"\n"
@@ -4874,7 +4931,7 @@ msgstr ""
"Sekcja DWARF [%2zu] „%s†pod offsetem %#<PRIx64>:\n"
" [ Kod]\n"
-#: src/readelf.c:4683
+#: src/readelf.c:5006
#, c-format
msgid ""
"\n"
@@ -4883,30 +4940,78 @@ msgstr ""
"\n"
"Sekcja skrótów pod offsetem %<PRIu64>:\n"
-#: src/readelf.c:4696
+#: 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:4712
+#: src/readelf.c:5035
#, c-format
msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n"
msgstr " [%5u] offset: %<PRId64>, potomek: %s, znacznik: %s\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:6172 src/readelf.c:7745
-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 %#<PRIx64>:\n"
+msgstr ""
+"\n"
+"Sekcja DWARF [%2zu] „%s†pod offsetem %#<PRIx64>:\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:7745
-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<PRIu64>\n"
+msgstr ""
+"\n"
+" Długość: %6<PRIu64>\n"
+
+#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " Wersja DWARF: %6<PRIuFAST16>\n"
+
+#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905
+#, fuzzy, c-format
+msgid " Address size: %8<PRIu64>\n"
+msgstr " Offset adresu: %6<PRIu64>\n"
+
+#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915
+#, fuzzy, c-format
+msgid " Segment size: %8<PRIu64>\n"
+msgstr ""
+" Rozmiar segmentu: %6<PRIu64>\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:4749 src/readelf.c:4822
+#: 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:4764
+#: src/readelf.c:5313
#, c-format
msgid ""
"\n"
@@ -4924,12 +5029,12 @@ msgstr[2] ""
"\n"
"Sekcja DWARF [%2zu] „%s†pod offsetem %#<PRIx64> zawiera %zu wpisów:\n"
-#: src/readelf.c:4795
+#: src/readelf.c:5344
#, c-format
msgid " [%*zu] ???\n"
msgstr " [%*zu] ???\n"
-#: src/readelf.c:4797
+#: src/readelf.c:5346
#, c-format
msgid ""
" [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n"
@@ -4937,17 +5042,7 @@ msgstr ""
" [%*zu] początek: %0#*<PRIx64>, długość: %5<PRIu64>, offset CU DIE: "
"%6<PRId64>\n"
-#: src/readelf.c:4827 src/readelf.c:4981 src/readelf.c:5558 src/readelf.c:6515
-#: src/readelf.c:7047 src/readelf.c:7167 src/readelf.c:7331 src/readelf.c:7819
-#, c-format
-msgid ""
-"\n"
-"DWARF section [%2zu] '%s' at offset %#<PRIx64>:\n"
-msgstr ""
-"\n"
-"Sekcja DWARF [%2zu] „%s†pod offsetem %#<PRIx64>:\n"
-
-#: src/readelf.c:4840 src/readelf.c:6541
+#: src/readelf.c:5390 src/readelf.c:8195
#, c-format
msgid ""
"\n"
@@ -4956,12 +5051,13 @@ msgstr ""
"\n"
"Tabela pod offsetem %zu:\n"
-#: src/readelf.c:4844 src/readelf.c:5582 src/readelf.c:6552
+#: 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:4860
+#: src/readelf.c:5410
#, c-format
msgid ""
"\n"
@@ -4970,32 +5066,27 @@ msgstr ""
"\n"
" Długość: %6<PRIu64>\n"
-#: src/readelf.c:4872
+#: src/readelf.c:5422
#, c-format
msgid " DWARF version: %6<PRIuFAST16>\n"
msgstr " Wersja DWARF: %6<PRIuFAST16>\n"
-#: src/readelf.c:4876
+#: src/readelf.c:5426
#, c-format
msgid "unsupported aranges version"
msgstr "nieobsługiwana wersja aranges"
-#: src/readelf.c:4887
+#: src/readelf.c:5437
#, c-format
msgid " CU offset: %6<PRIx64>\n"
msgstr " Offset CU: %6<PRIx64>\n"
-#: src/readelf.c:4893
+#: src/readelf.c:5443
#, c-format
msgid " Address size: %6<PRIu64>\n"
msgstr " Offset adresu: %6<PRIu64>\n"
-#: src/readelf.c:4897
-#, c-format
-msgid "unsupported address size"
-msgstr "nieobsługiwany rozmiar adresu"
-
-#: src/readelf.c:4902
+#: src/readelf.c:5452
#, c-format
msgid ""
" Segment size: %6<PRIu64>\n"
@@ -5004,68 +5095,111 @@ msgstr ""
" Rozmiar segmentu: %6<PRIu64>\n"
"\n"
-#: src/readelf.c:4906
+#: 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%<PRIx64>:\n"
+"\n"
+msgstr " Offset .debug_line: 0x%<PRIx64>\n"
-#: src/readelf.c:4946
+#: src/readelf.c:5628 src/readelf.c:8925
+#, fuzzy, c-format
+msgid " Offset entries: %8<PRIu64>\n"
+msgstr " Długość offsetu: %<PRIu8>\n"
+
+#: src/readelf.c:5644 src/readelf.c:8941
#, c-format
-msgid " %s..%s (%<PRIx64>)\n"
-msgstr " %s..%s (%<PRIx64>)\n"
+msgid " Unknown CU base: "
+msgstr ""
-#: src/readelf.c:4949
+#: src/readelf.c:5646 src/readelf.c:8943
#, c-format
-msgid " %s..%s\n"
-msgstr " %s..%s\n"
+msgid " CU [%6<PRIx64>] base: "
+msgstr ""
-#: src/readelf.c:4958
+#: 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%<PRIx64>:\n"
+msgstr " Offset: 0x%<PRIx64>\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:4976
+#: 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:5006 src/readelf.c:7074
+#: src/readelf.c:5957 src/readelf.c:9307
#, c-format
-msgid " [%6tx] <INVALID DATA>\n"
-msgstr " [%6tx] <NIEPRAWIDÅOWE DANE>\n"
+msgid ""
+"\n"
+" Unknown CU base: "
+msgstr ""
-#: src/readelf.c:5028 src/readelf.c:7096
+#: 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<PRIx64>] base: "
+msgstr ""
-#: src/readelf.c:5035 src/readelf.c:7103
+#: 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] <INVALID DATA>\n"
+msgstr " [%6tx] <NIEPRAWIDÅOWE DANE>\n"
-#. We have an address range entry.
-#. First address range entry in a list.
-#: src/readelf.c:5046
-#, 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:5048
-#, 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:5284
+#: src/readelf.c:6252
msgid " <INVALID DATA>\n"
msgstr " <NIEPRAWIDÅOWE DANE>\n"
-#: src/readelf.c:5537
+#: src/readelf.c:6505
#, c-format
msgid "cannot get ELF: %s"
msgstr "nie można uzyskać ELF: %s"
-#: src/readelf.c:5554
+#: src/readelf.c:6523
#, c-format
msgid ""
"\n"
@@ -5074,7 +5208,7 @@ msgstr ""
"\n"
"Sekcja informacji o ramce wywołania [%2zu] „%s†pod offsetem %#<PRIx64>:\n"
-#: src/readelf.c:5604
+#: src/readelf.c:6573
#, c-format
msgid ""
"\n"
@@ -5083,50 +5217,65 @@ msgstr ""
"\n"
" [%6tx] Zerowy koniec\n"
-#: src/readelf.c:5697 src/readelf.c:5852
+#: src/readelf.c:6666 src/readelf.c:6820
#, c-format
msgid "invalid augmentation length"
msgstr "nieprawidłowa długość powiększenia"
-#: src/readelf.c:5712
+#: src/readelf.c:6681
msgid "FDE address encoding: "
msgstr "Kodowanie adresu FDE: "
-#: src/readelf.c:5718
+#: src/readelf.c:6687
msgid "LSDA pointer encoding: "
msgstr "Kodowanie wskaźnika LSDA: "
-#: src/readelf.c:5829
+#: src/readelf.c:6797
#, c-format
msgid " (offset: %#<PRIx64>)"
msgstr " (offset: %#<PRIx64>)"
-#: src/readelf.c:5836
+#: src/readelf.c:6804
#, c-format
msgid " (end offset: %#<PRIx64>)"
msgstr " (kończący offset: %#<PRIx64>)"
-#: src/readelf.c:5873
+#: src/readelf.c:6841
#, c-format
msgid " %-26sLSDA pointer: %#<PRIx64>\n"
msgstr " %-26sWskaźnik LSDA: %#<PRIx64>\n"
-#: src/readelf.c:5928
-#, c-format
-msgid "cannot get attribute code: %s"
+#: src/readelf.c:6926
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute code: %s"
msgstr "nie można uzyskać kodu atrybutu: %s"
-#: src/readelf.c:5937
-#, c-format
-msgid "cannot get attribute form: %s"
+#: src/readelf.c:6936
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute form: %s"
msgstr "nie można uzyskać formy atrybutu: %s"
-#: src/readelf.c:5952
-#, c-format
-msgid "cannot get attribute value: %s"
+#: src/readelf.c:6958
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute '%s' (%s) value: %s"
msgstr "nie można uzyskać wartości atrybutu: %s"
-#: src/readelf.c:6254
+#: src/readelf.c:7291
+#, fuzzy, c-format
+msgid "invalid file (%<PRId64>): %s"
+msgstr "nieprawidłowy plik"
+
+#: src/readelf.c:7295
+#, fuzzy, c-format
+msgid "no srcfiles for CU [%<PRIx64>]"
+msgstr " ustawienie pliku na %<PRIu64>\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"
@@ -5137,20 +5286,25 @@ msgstr ""
"Sekcja DWARF [%2zu] „%s†pod offsetem %#<PRIx64>:\n"
" [Offset]\n"
-#: src/readelf.c:6286
-#, 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 %<PRIu64>:\n"
" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
"%<PRIu8>, Offset size: %<PRIu8>\n"
-" Type signature: %#<PRIx64>, Type offset: %#<PRIx64>\n"
+" Type signature: %#<PRIx64>, Type offset: %#<PRIx64> [%<PRIx64>]\n"
msgstr ""
" Jednostka typu pod offsetem %<PRIu64>:\n"
" Wersja: %<PRIu16>, offset sekcji skrótów: %<PRIu64>, rozmiar adresu: "
"%<PRIu8>, rozmiar offsetu: %<PRIu8>\n"
" Podpis typu: %#<PRIx64>, offset typu: %#<PRIx64>\n"
-#: src/readelf.c:6295
+#: src/readelf.c:7603
#, c-format
msgid ""
" Compilation unit at offset %<PRIu64>:\n"
@@ -5161,33 +5315,49 @@ msgstr ""
" Wersja: %<PRIu16>, offset sekcji skrótów: %<PRIu64>, rozmiar adresu: "
"%<PRIu8>, rozmiar offsetu: %<PRIu8>\n"
-#: src/readelf.c:6320
+#: src/readelf.c:7613 src/readelf.c:7776
#, c-format
-msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s"
-msgstr "nie można uzyskać DIE pod offsetem %<PRIu64> w sekcji „%sâ€: %s"
+msgid " Unit type: %s (%<PRIu8>)"
+msgstr ""
+
+#: src/readelf.c:7640
+#, c-format
+msgid "unknown version (%d) or unit type (%d)"
+msgstr ""
-#: src/readelf.c:6334
+#: src/readelf.c:7669
#, c-format
msgid "cannot get DIE offset: %s"
msgstr "nie można uzyskać offsetu DIE: %s"
-#: src/readelf.c:6343
-#, c-format
-msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s"
+#: src/readelf.c:7678
+#, fuzzy, c-format
+msgid "cannot get tag of DIE at offset [%<PRIx64>] in section '%s': %s"
msgstr ""
"nie można uzyskać znacznika DIE pod offsetem %<PRIu64> w sekcji „%sâ€: %s"
-#: src/readelf.c:6375
+#: 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:6383
+#: src/readelf.c:7724
#, c-format
msgid "cannot get next DIE: %s"
msgstr "nie można uzyskać następnego DIE: %s"
-#: src/readelf.c:6419
+#: src/readelf.c:7768
+#, fuzzy, c-format
+msgid ""
+" Split compilation unit at offset %<PRIu64>:\n"
+" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
+"%<PRIu8>, Offset size: %<PRIu8>\n"
+msgstr ""
+" Jednostka kompilacji pod offsetem %<PRIu64>:\n"
+" Wersja: %<PRIu16>, offset sekcji skrótów: %<PRIu64>, rozmiar adresu: "
+"%<PRIu8>, rozmiar offsetu: %<PRIu8>\n"
+
+#: src/readelf.c:7819
#, c-format
msgid ""
"\n"
@@ -5198,25 +5368,32 @@ msgstr ""
"Sekcja DWARF [%2zu] „%s†pod offsetem %#<PRIx64>:\n"
"\n"
-#: src/readelf.c:6528
+#: 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:6598
-#, c-format
+#: src/readelf.c:8284
+#, fuzzy, c-format
msgid ""
"\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"
msgstr ""
@@ -5233,12 +5410,27 @@ msgstr ""
"\n"
"Instrukcje:\n"
-#: src/readelf.c:6619
+#: 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:6634
+#: src/readelf.c:8347
#, c-format
msgid " [%*<PRIuFAST8>] %hhu argument\n"
msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n"
@@ -5246,7 +5438,7 @@ msgstr[0] " [%*<PRIuFAST8>] %hhu parametr\n"
msgstr[1] " [%*<PRIuFAST8>] %hhu parametry\n"
msgstr[2] " [%*<PRIuFAST8>] %hhu parametrów\n"
-#: src/readelf.c:6642
+#: src/readelf.c:8358
msgid ""
"\n"
"Directory table:"
@@ -5254,17 +5446,29 @@ msgstr ""
"\n"
"Tabela katalogu:"
-#: src/readelf.c:6658
+#: 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:6693
+#: src/readelf.c:8529
msgid ""
"\n"
"Line number statements:"
@@ -5272,119 +5476,119 @@ msgstr ""
"\n"
"Instrukcje numerów wierszy:"
-#: src/readelf.c:6744
+#: 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:6780
-#, 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:6785
+#: 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:6805
+#: src/readelf.c:8611
#, c-format
msgid " extended opcode %u: "
msgstr " instrukcja rozszerzona %u: "
-#: src/readelf.c:6810
+#: src/readelf.c:8616
msgid " end of sequence"
msgstr " koniec sekwencji"
-#: src/readelf.c:6829
-#, 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:6856
+#: src/readelf.c:8662
#, c-format
msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n"
msgstr ""
" definicja nowego pliku: dir=%u, mtime=%<PRIu64>, długość=%<PRIu64>, nazwa="
"%s\n"
-#: src/readelf.c:6869
+#: src/readelf.c:8675
#, c-format
msgid " set discriminator to %u\n"
msgstr " ustawienie dyskryminatora na %u\n"
#. Unknown, ignore it.
-#: src/readelf.c:6874
+#: src/readelf.c:8680
msgid " unknown opcode"
msgstr " nieznana instrukcja"
#. Takes no argument.
-#: src/readelf.c:6886
+#: src/readelf.c:8692
msgid " copy"
msgstr " kopiowanie"
-#: src/readelf.c:6897
-#, 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:6901
+#: 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:6912
+#: src/readelf.c:8715
#, c-format
msgid " advance line by constant %d to %<PRId64>\n"
msgstr " zwiększenie wiersza o stałą %d do %<PRId64>\n"
-#: src/readelf.c:6920
+#: src/readelf.c:8723
#, c-format
msgid " set file to %<PRIu64>\n"
msgstr " ustawienie pliku na %<PRIu64>\n"
-#: src/readelf.c:6930
+#: src/readelf.c:8733
#, c-format
msgid " set column to %<PRIu64>\n"
msgstr " ustawienie kolumny na %<PRIu64>\n"
-#: src/readelf.c:6937
+#: src/readelf.c:8740
#, c-format
msgid " set '%s' to %<PRIuFAST8>\n"
msgstr " ustawienie „%s†na %<PRIuFAST8>\n"
#. Takes no argument.
-#: src/readelf.c:6943
+#: src/readelf.c:8746
msgid " set basic block flag"
msgstr " ustawienie podstawowej flagi bloku"
-#: src/readelf.c:6956
-#, 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:6960
-#, 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:6978
-#, 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:6987
+#: src/readelf.c:8786
msgid " set prologue end flag"
msgstr " ustawienie flagi końca prologu"
#. Takes no argument.
-#: src/readelf.c:6992
+#: src/readelf.c:8791
msgid " set epilogue begin flag"
msgstr " ustawienie flagi poczÄ…tku epilogu"
-#: src/readelf.c:7001
+#: src/readelf.c:8800
#, c-format
msgid " set isa to %u\n"
msgstr " ustawienie isa na %u\n"
@@ -5392,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:7010
+#: src/readelf.c:8809
#, c-format
msgid " unknown opcode with %<PRIu8> parameter:"
msgid_plural " unknown opcode with %<PRIu8> parameters:"
@@ -5400,102 +5604,96 @@ msgstr[0] " nieznana instrukcja z %<PRIu8> parametrem:"
msgstr[1] " nieznana instrukcja z %<PRIu8> parametrami:"
msgstr[2] " nieznana instrukcja z %<PRIu8> parametrami:"
-#: src/readelf.c:7042
-#, 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:7117
-#, 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:7119
+#: 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:7126 src/readelf.c:8077
+#: src/readelf.c:9476 src/readelf.c:10490
msgid " <INVALID DATA>\n"
msgstr " <NIEPRAWIDÅOWE DANE>\n"
-#: src/readelf.c:7178 src/readelf.c:7340
+#: 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:7258
+#: 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:7281
+#: 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:7381
+#: src/readelf.c:9734
#, c-format
msgid " Offset: 0x%<PRIx64>\n"
msgstr " Offset: 0x%<PRIx64>\n"
-#: src/readelf.c:7393
+#: src/readelf.c:9746
#, c-format
msgid " Version: %<PRIu16>\n"
msgstr " Wersja: %<PRIu16>\n"
-#: src/readelf.c:7399 src/readelf.c:8196
+#: 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:7406
+#: src/readelf.c:9759
#, c-format
msgid " Flag: 0x%<PRIx8>\n"
msgstr " Flaga: 0x%<PRIx8>\n"
-#: src/readelf.c:7409
+#: src/readelf.c:9762
#, c-format
msgid " Offset length: %<PRIu8>\n"
msgstr " Długość offsetu: %<PRIu8>\n"
-#: src/readelf.c:7417
+#: src/readelf.c:9770
#, c-format
msgid " .debug_line offset: 0x%<PRIx64>\n"
msgstr " Offset .debug_line: 0x%<PRIx64>\n"
-#: src/readelf.c:7430
+#: src/readelf.c:9795
#, c-format
msgid " extension opcode table, %<PRIu8> items:\n"
msgstr " tabela instrukcji rozszerzenia, %<PRIu8> elementów:\n"
-#: src/readelf.c:7437
+#: src/readelf.c:9802
#, c-format
msgid " [%<PRIx8>]"
msgstr " [%<PRIx8>]"
-#: src/readelf.c:7449
+#: src/readelf.c:9814
#, c-format
msgid " %<PRIu8> arguments:"
msgstr " Parametry %<PRIu8>:"
-#: src/readelf.c:7477
+#: src/readelf.c:9829
#, c-format
msgid " no arguments."
msgstr " brak parametrów."
-#: src/readelf.c:7777
-#, c-format
-msgid "vendor opcode not verified?"
-msgstr "instrukcja producenta nie została sprawdzona?"
-
-#: src/readelf.c:7805
+#: src/readelf.c:10030
#, c-format
msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n"
msgstr " [%5d] offset DIE: %6<PRId64>, offset CU DIE: %6<PRId64>, nazwa: %s\n"
-#: src/readelf.c:7846
+#: src/readelf.c:10072
#, c-format
msgid ""
"\n"
@@ -5506,12 +5704,41 @@ msgstr ""
"Sekcja DWARF [%2zu] „%s†pod offsetem %#<PRIx64>:\n"
" %*s CiÄ…g\n"
-#: src/readelf.c:7860
-#, 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:7880
+#: 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<PRIu64>\n"
+msgstr ""
+"\n"
+" Długość: %6<PRIu64>\n"
+
+#: src/readelf.c:10216
+#, fuzzy, c-format
+msgid " Offset size: %8<PRIu8>\n"
+msgstr " Długość offsetu: %<PRIu8>\n"
+
+#: src/readelf.c:10230
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " Wersja DWARF: %6<PRIuFAST16>\n"
+
+#: src/readelf.c:10239
+#, fuzzy, c-format
+msgid " Padding: %8<PRIx16>\n"
+msgstr ""
+"\n"
+" Długość: %6<PRIu64>\n"
+
+#: src/readelf.c:10293
#, c-format
msgid ""
"\n"
@@ -5520,7 +5747,7 @@ msgstr ""
"\n"
"Sekcja tabeli wyszukiwania ramki wywoÅ‚ania [%2zu] „.eh_frame_hdrâ€:\n"
-#: src/readelf.c:7982
+#: src/readelf.c:10395
#, c-format
msgid ""
"\n"
@@ -5529,22 +5756,22 @@ msgstr ""
"\n"
"Sekcja tabeli obsÅ‚ugiwania wyjÄ…tków [%2zu] „.gcc_except_tableâ€:\n"
-#: src/readelf.c:8005
+#: src/readelf.c:10418
#, c-format
msgid " LPStart encoding: %#x "
msgstr " Kodowanie LPStart: %#x "
-#: src/readelf.c:8017
+#: src/readelf.c:10430
#, c-format
msgid " TType encoding: %#x "
msgstr " Kodowanie TType: %#x "
-#: src/readelf.c:8032
+#: src/readelf.c:10445
#, c-format
msgid " Call site encoding: %#x "
msgstr " Kodowanie strony wywołania: %#x "
-#: src/readelf.c:8045
+#: src/readelf.c:10458
msgid ""
"\n"
" Call site table:"
@@ -5552,7 +5779,7 @@ msgstr ""
"\n"
" Tabela strony wywołania:"
-#: src/readelf.c:8059
+#: src/readelf.c:10472
#, c-format
msgid ""
" [%4u] Call site start: %#<PRIx64>\n"
@@ -5565,12 +5792,12 @@ msgstr ""
" LÄ…dowisko: %#<PRIx64>\n"
" Działanie: %u\n"
-#: src/readelf.c:8132
+#: src/readelf.c:10545
#, c-format
msgid "invalid TType encoding"
msgstr "nieprawidłowe kodowanie TType"
-#: src/readelf.c:8158
+#: src/readelf.c:10571
#, c-format
msgid ""
"\n"
@@ -5579,37 +5806,37 @@ msgstr ""
"\n"
"Sekcja GDB [%2zu] „%s†pod offsetem %#<PRIx64> zawiera %<PRId64> bajtów:\n"
-#: src/readelf.c:8187
+#: src/readelf.c:10600
#, c-format
msgid " Version: %<PRId32>\n"
msgstr " Wersja: %<PRId32>\n"
-#: src/readelf.c:8205
+#: src/readelf.c:10618
#, c-format
msgid " CU offset: %#<PRIx32>\n"
msgstr " offset CU: %#<PRIx32>\n"
-#: src/readelf.c:8212
+#: src/readelf.c:10625
#, c-format
msgid " TU offset: %#<PRIx32>\n"
msgstr " offset TU: %#<PRIx32>\n"
-#: src/readelf.c:8219
+#: src/readelf.c:10632
#, c-format
msgid " address offset: %#<PRIx32>\n"
msgstr " offset adresu: %#<PRIx32>\n"
-#: src/readelf.c:8226
+#: src/readelf.c:10639
#, c-format
msgid " symbol offset: %#<PRIx32>\n"
msgstr " offset symbolu: %#<PRIx32>\n"
-#: src/readelf.c:8233
+#: src/readelf.c:10646
#, c-format
msgid " constant offset: %#<PRIx32>\n"
msgstr " offset stałej: %#<PRIx32>\n"
-#: src/readelf.c:8247
+#: src/readelf.c:10660
#, c-format
msgid ""
"\n"
@@ -5618,7 +5845,7 @@ msgstr ""
"\n"
" Lista CU pod offsetem %#<PRIx32> zawiera %zu wpisów:\n"
-#: src/readelf.c:8272
+#: src/readelf.c:10685
#, c-format
msgid ""
"\n"
@@ -5627,7 +5854,7 @@ msgstr ""
"\n"
" Lista TU pod offsetem %#<PRIx32> zawiera %zu wpisów:\n"
-#: src/readelf.c:8301
+#: src/readelf.c:10714
#, c-format
msgid ""
"\n"
@@ -5636,7 +5863,7 @@ msgstr ""
"\n"
" Lista adresów pod offsetem %#<PRIx32> zawiera %zu wpisów:\n"
-#: src/readelf.c:8334
+#: src/readelf.c:10746
#, c-format
msgid ""
"\n"
@@ -5645,17 +5872,18 @@ msgstr ""
"\n"
" Tabela symboli pod offsetem %#<PRIx32> zawiera %zu gniazd:\n"
-#: src/readelf.c:8421
+#: 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:8577 src/readelf.c:9199 src/readelf.c:9310 src/readelf.c:9368
+#: 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:8940
+#: src/readelf.c:11610
#, c-format
msgid ""
"\n"
@@ -5664,21 +5892,21 @@ msgstr ""
"\n"
"%*s… <powtarza się jeszcze %u razy>…"
-#: src/readelf.c:9447
+#: src/readelf.c:12117
msgid " Owner Data size Type\n"
msgstr " Właściciel Rozmiar danych Typ\n"
-#: src/readelf.c:9465
+#: src/readelf.c:12135
#, c-format
msgid " %-13.*s %9<PRId32> %s\n"
msgstr " %-13.*s %9<PRId32> %s\n"
-#: src/readelf.c:9515
-#, 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:9542
+#: src/readelf.c:12212
#, c-format
msgid ""
"\n"
@@ -5688,7 +5916,7 @@ msgstr ""
"Segment notatki [%2zu] „%s†o długości %<PRIu64> bajtów pod offsetem "
"%#0<PRIx64>:\n"
-#: src/readelf.c:9565
+#: src/readelf.c:12235
#, c-format
msgid ""
"\n"
@@ -5697,7 +5925,7 @@ msgstr ""
"\n"
"Segment notatki o długości %<PRIu64> bajtów pod offsetem %#0<PRIx64>:\n"
-#: src/readelf.c:9611
+#: src/readelf.c:12281
#, c-format
msgid ""
"\n"
@@ -5706,12 +5934,12 @@ msgstr ""
"\n"
"Sekcja [%zu] „%s†nie ma danych do zrzucenia.\n"
-#: src/readelf.c:9638 src/readelf.c:9689
+#: 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:9643
+#: src/readelf.c:12313
#, c-format
msgid ""
"\n"
@@ -5721,7 +5949,7 @@ msgstr ""
"Segment zrzutu szesnastkowego [%zu] „%sâ€, %<PRIu64> bajtów pod offsetem "
"%#0<PRIx64>:\n"
-#: src/readelf.c:9648
+#: src/readelf.c:12318
#, c-format
msgid ""
"\n"
@@ -5732,7 +5960,7 @@ msgstr ""
"Zrzut szesnastkowy sekcji [%zu] „%sâ€, %<PRIu64> bajtów (%zd "
"nieskompresowanych) pod offsetem %#0<PRIx64>:\n"
-#: src/readelf.c:9662
+#: src/readelf.c:12332
#, c-format
msgid ""
"\n"
@@ -5741,7 +5969,7 @@ msgstr ""
"\n"
"Sekcja [%zu] „%s†nie ma ciągów do zrzucenia.\n"
-#: src/readelf.c:9694
+#: src/readelf.c:12364
#, c-format
msgid ""
"\n"
@@ -5750,7 +5978,7 @@ msgstr ""
"\n"
"Sekcja ciągów [%zu] „%s†zawiera %<PRIu64> bajtów pod offsetem %#0<PRIx64>:\n"
-#: src/readelf.c:9699
+#: src/readelf.c:12369
#, c-format
msgid ""
"\n"
@@ -5761,7 +5989,7 @@ msgstr ""
"Sekcja ciągów [%zu] „%s†zawiera %<PRIu64> bajtów (%zd nieskompresowanych) "
"pod offsetem %#0<PRIx64>:\n"
-#: src/readelf.c:9748
+#: src/readelf.c:12418
#, c-format
msgid ""
"\n"
@@ -5770,7 +5998,7 @@ msgstr ""
"\n"
"sekcja [%lu] nie istnieje"
-#: src/readelf.c:9777
+#: src/readelf.c:12447
#, c-format
msgid ""
"\n"
@@ -5779,12 +6007,12 @@ msgstr ""
"\n"
"sekcja „%s†nie istnieje"
-#: src/readelf.c:9834
+#: 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:9837
+#: src/readelf.c:12507
#, c-format
msgid ""
"\n"
@@ -5793,7 +6021,7 @@ msgstr ""
"\n"
"Archiwum „%s†nie ma indeksu symboli\n"
-#: src/readelf.c:9841
+#: src/readelf.c:12511
#, c-format
msgid ""
"\n"
@@ -5802,12 +6030,12 @@ msgstr ""
"\n"
"Indeks archiwum „%s†ma %zu wpisów:\n"
-#: src/readelf.c:9859
+#: 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:9864
+#: src/readelf.c:12534
#, c-format
msgid "Archive member '%s' contains:\n"
msgstr "Element archiwum „%s†zawiera:\n"
@@ -5880,61 +6108,61 @@ msgstr " (ex %s)"
msgid "(TOTALS)\n"
msgstr "(CAÅKOWITE)\n"
-#: src/stack.c:482
+#: 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:488
+#: src/stack.c:489
#, c-format
msgid "Cannot open core file '%s'"
msgstr "Nie można otworzyć pliku core „%sâ€"
-#: src/stack.c:548
+#: 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:560
+#: 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:564
+#: 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:568
+#: 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:638
+#: src/stack.c:641
msgid "Show stack of process PID"
msgstr "Wyświetla stos numeru PID procesu"
-#: src/stack.c:640
+#: src/stack.c:643
msgid "Show stack found in COREFILE"
msgstr "Wyświetla stos odnaleziony w PLIKU_CORE"
-#: src/stack.c:641
+#: src/stack.c:644
msgid "(optional) EXECUTABLE that produced COREFILE"
msgstr "(opcjonalnie) PLIK_WYKONYWALNY, który utworzył PLIK_CORE"
-#: src/stack.c:645
+#: src/stack.c:648
msgid "Output selection options:"
msgstr "Opcje wyboru wyjścia:"
-#: src/stack.c:647
+#: src/stack.c:650
msgid "Additionally show frame activation"
msgstr "Dodatkowo wyświetla aktywację ramki"
-#: src/stack.c:649
+#: 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:652
+#: src/stack.c:655
msgid ""
"Additionally show inlined function frames using DWARF debuginfo if available "
"(implies -d)"
@@ -5942,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:654
+#: src/stack.c:657
msgid "Additionally show module file information"
msgstr "Dodatkowo wyświetla informacje o pliku modułu"
-#: src/stack.c:656
+#: src/stack.c:659
msgid "Additionally show source file information"
msgstr "Dodatkowo wyświetla informacje o pliku źródłowym"
-#: src/stack.c:658
+#: src/stack.c:661
msgid ""
"Show all additional information (activation, debugname, inlines, module and "
"source)"
@@ -5958,55 +6186,58 @@ msgstr ""
"Wyświetla wszystkie dodatkowe informacje (aktywację, nazwę debugowania, "
"wstawki, moduł i źródło)"
-#: src/stack.c:660
+#: 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:662
+#: 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:664
+#: 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:666
+#: 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:668
+#: 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:670
+#: 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:678
+#: src/stack.c:681
+#, fuzzy
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 ""
-"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."
+"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:751
+#: src/stack.c:756
#, c-format
msgid "Couldn't show any frames."
msgstr "Nie można wyświetlić żadnych ramek."
@@ -6636,9 +6867,11 @@ msgstr ""
"[MODUÅ…]"
#: 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 "
@@ -6661,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 "
@@ -6700,5 +6934,65 @@ msgstr "Dodatkowo wyświetla nazwy funkcji"
msgid "Show instances of inlined functions"
msgstr "Wyświetla wystąpienia wstawionych funkcji"
+#~ msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#<PRIx64> <%s>"
+#~ msgstr "%s+%#<PRIx64> <%s>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s>"
+#~ msgstr "%s+%#0*<PRIx64> <%s>"
+
+#~ msgid "%#<PRIx64> <%s>"
+#~ msgstr "%#<PRIx64> <%s>"
+
+#~ msgid "%#0*<PRIx64> <%s>"
+#~ msgstr "%#0*<PRIx64> <%s>"
+
+#~ msgid "%s+%#<PRIx64>"
+#~ msgstr "%s+%#<PRIx64>"
+
+#~ msgid "%s+%#0*<PRIx64>"
+#~ msgstr "%s+%#0*<PRIx64>"
+
+#~ msgid " %s..%s (%<PRIx64>)\n"
+#~ msgstr " %s..%s (%<PRIx64>)\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 %<PRIu64> in section '%s': %s"
+#~ msgstr "nie można uzyskać DIE pod offsetem %<PRIu64> 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 032cd3da..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: 2017-08-02 18:29+0200\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 <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <kde-i18n-uk@kde.org>\n"
@@ -58,18 +58,18 @@ msgstr ""
"початкових кодах. Умовами Ð»Ñ–Ñ†ÐµÐ½Ð·ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¸ ÐЕ передбачено жодних "
"гарантій, зокрема гарантій працездатноÑÑ‚Ñ– або придатноÑÑ‚Ñ– Ð´Ð»Ñ Ð¿ÐµÐ²Ð½Ð¾Ñ— мети.\n"
-#: lib/xmalloc.c:53 lib/xmalloc.c:66 lib/xmalloc.c:78 src/readelf.c:3296
-#: src/readelf.c:3687 src/readelf.c:8526 src/unstrip.c:2227 src/unstrip.c:2432
+#: 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:50
+#: 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:52
+#: libasm/asm_error.c:66 libdw/dwarf_error.c:67 libdwfl/libdwflP.h:52
#: libelf/elf_error.c:91
msgid "out of memory"
msgstr "неÑтача пам'ÑÑ‚Ñ–"
@@ -106,165 +106,201 @@ msgstr "помилка під Ñ‡Ð°Ñ Ñпроби Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…"
msgid "no backend support available"
msgstr "підтримки Ñерверів не передбачено"
-#: libasm/asm_error.c:83 libdw/dwarf_error.c:59 libdwfl/libdwflP.h:51
+#: 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:71
+#: 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:72
+#: 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 (модулÑ)"
-#: libdw/dwarf_error.c:98
+#: libdw/dwarf_error.c:103
#, fuzzy
msgid "unknown language code"
msgstr " невідомий код операції"
-#: libdwfl/argp-std.c:50 src/stack.c:636 src/unstrip.c:2374
+#: 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 "Вибір параметрів Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð´Ð°Ð½Ð¸Ñ…:"
@@ -296,7 +332,7 @@ msgstr "Знайти адреÑи у запущеному Ñдрі"
msgid "Kernel with all modules"
msgstr "Ядро з уÑіма модулÑми"
-#: libdwfl/argp-std.c:63 src/stack.c:643
+#: libdwfl/argp-std.c:63 src/stack.c:646
msgid "Search path for separate debuginfo files"
msgstr "Шукати у вказаному каталозі окремі файли debuginfo"
@@ -376,7 +412,7 @@ msgstr "Ðепідтримуваний тип переÑуваннÑ"
msgid "r_offset is bogus"
msgstr "r_offset є фіктивним"
-#: libdwfl/libdwflP.h:64 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 "Ð¿ÐµÑ€ÐµÐ²Ð¸Ñ‰ÐµÐ½Ð½Ñ Ð¼Ð¾Ð¶Ð»Ð¸Ð²Ð¾Ð³Ð¾ зміщеннÑ"
@@ -495,7 +531,7 @@ msgstr "Ðемає Ñервера"
msgid "<unknown>"
msgstr "<невідомо>"
-#: libebl/ebldynamictagname.c:101
+#: libebl/ebldynamictagname.c:103
#, c-format
msgid "<unknown>: %#<PRIx64>"
msgstr "<невідомо>: %#<PRIx64>"
@@ -585,7 +621,7 @@ msgstr "некоректна розмірніÑÑ‚ÑŒ вхідного парамÐ
msgid "invalid size of destination operand"
msgstr "некоректна розмірніÑÑ‚ÑŒ вихідного параметра"
-#: libelf/elf_error.c:87 src/readelf.c:5139
+#: libelf/elf_error.c:87 src/readelf.c:6107
#, c-format
msgid "invalid encoding"
msgstr "некоректне кодуваннÑ"
@@ -595,152 +631,157 @@ 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:7389 src/readelf.c:7900
-#: src/readelf.c:8001 src/readelf.c:8182
+#: 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"
@@ -817,22 +858,22 @@ msgstr "Шукати ÐДРЕСИ у файлах кодів та даних пÑ
msgid "[ADDR...]"
msgstr "[ÐДРЕСÐ...]"
-#: src/addr2line.c:519
+#: src/addr2line.c:520
#, c-format
msgid "Section syntax requires exactly one module"
msgstr "СинтакÑÐ¸Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»Ñ–Ð² вимагає точного одного модулÑ"
-#: src/addr2line.c:542
+#: src/addr2line.c:543
#, c-format
msgid "offset %#<PRIxMAX> lies outside section '%s'"
msgstr "Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ %#<PRIxMAX> розташовано поза межами розділу «%s»"
-#: src/addr2line.c:632
+#: src/addr2line.c:633
#, c-format
msgid "cannot find symbol '%s'"
msgstr "не вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ Ñимвол «%s»"
-#: src/addr2line.c:637
+#: src/addr2line.c:638
#, c-format
msgid "offset %#<PRIxMAX> lies outside contents of '%s'"
msgstr "Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ %#<PRIxMAX> розташовано поза межами вміÑту «%s»"
@@ -1004,12 +1045,12 @@ msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані архіву «%s» за Ð
msgid "no entry %s in archive\n"
msgstr "у архіві немає запиÑу %s\n"
-#: src/ar.c:473 src/ar.c:918 src/ar.c:1118
+#: src/ar.c:473 src/ar.c:918 src/ar.c:1122
#, c-format
msgid "cannot create hash table"
msgstr "не вдалоÑÑ Ñтворити таблицю хешів"
-#: src/ar.c:480 src/ar.c:925 src/ar.c:1127
+#: src/ar.c:480 src/ar.c:925 src/ar.c:1131
#, c-format
msgid "cannot insert into hash table"
msgstr "не вдалоÑÑ Ð²Ñтавити Ð·Ð°Ð¿Ð¸Ñ Ð´Ð¾ таблиці хешів"
@@ -1049,46 +1090,71 @@ msgstr "не вдалоÑÑ Ð·Ð¼Ñ–Ð½Ð¸Ñ‚Ð¸ чаÑову мітку зміни %s
msgid "cannot rename temporary file to %.*s"
msgstr "не вдалоÑÑ Ð¿ÐµÑ€ÐµÐ¹Ð¼ÐµÐ½ÑƒÐ²Ð°Ñ‚Ð¸ файл тимчаÑових даних на %.*s"
-#: src/ar.c:759 src/ar.c:1010 src/ar.c:1409 src/ranlib.c:223
+#: 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:1209
+#: src/ar.c:1213
#, c-format
msgid "position member %s not found"
msgstr "не виÑвлено елемента позиції %s"
-#: src/ar.c:1219
+#: src/ar.c:1223
#, c-format
msgid "%s: no entry %s in archive!\n"
msgstr "%s: у архіві немає запиÑу %s!\n"
-#: src/ar.c:1248 src/objdump.c:242
+#: src/ar.c:1252 src/objdump.c:242
#, c-format
msgid "cannot open %s"
msgstr "не вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ %s"
-#: src/ar.c:1253
+#: src/ar.c:1257
#, c-format
msgid "cannot stat %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані %s за допомогою stat"
-#: src/ar.c:1259
+#: src/ar.c:1263
#, c-format
msgid "%s is no regular file"
msgstr "%s не є звичайним файлом"
-#: src/ar.c:1272
+#: src/ar.c:1276
#, c-format
msgid "cannot get ELF descriptor for %s: %s\n"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ деÑкриптор ELF Ð´Ð»Ñ %s: %s\n"
-#: src/ar.c:1292
+#: 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 ""
@@ -1395,7 +1461,7 @@ msgstr ""
"розділ [%2zu] «%s»: адреÑа розділів локальних даних потоків не Ñ” нульовою\n"
#. Strings for arguments in help texts.
-#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:128
+#: src/elfcompress.c:1294 src/elflint.c:78 src/readelf.c:154
msgid "FILE..."
msgstr "ФÐЙЛ..."
@@ -1429,7 +1495,7 @@ msgid "Pedantic checking of ELF files compliance with gABI/psABI spec."
msgstr ""
"Педантична перевірка файлів ELF на ÑуміÑніÑÑ‚ÑŒ зі ÑпецифікаціÑми gABI/psABI."
-#: src/elflint.c:155 src/readelf.c:303
+#: src/elflint.c:155 src/readelf.c:347
#, c-format
msgid "cannot open input file"
msgstr "не вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ вхідний файл."
@@ -1448,7 +1514,7 @@ msgstr "помилка під Ñ‡Ð°Ñ Ñпроби Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ð´ÐµÑкриÐ
msgid "No errors"
msgstr "Без помилок"
-#: src/elflint.c:220 src/readelf.c:480
+#: src/elflint.c:220 src/readelf.c:546
msgid "Missing file name.\n"
msgstr "Ðе вказано назви файла.\n"
@@ -1484,8 +1550,8 @@ msgid "unsupported OS ABI e_ident[%d] == '%s'\n"
msgstr "непідтримуване ABI ОС e_ident[%d] == «%s»\n"
#: src/elflint.c:381
-#, c-format
-msgid "unsupport ABI version e_ident[%d] == %d\n"
+#, fuzzy, c-format
+msgid "unsupported ABI version e_ident[%d] == %d\n"
msgstr "непідтримувана верÑÑ–Ñ ABI e_ident[%d] == %d\n"
#: src/elflint.c:386
@@ -3666,13 +3732,13 @@ msgstr "%s%s%s: не вдалоÑÑ Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ñ‚Ð¸ формат файла
msgid "cannot create search tree"
msgstr "не вдалоÑÑ Ñтворити дерево пошуку"
-#: src/nm.c:747 src/nm.c:1208 src/objdump.c:778 src/readelf.c:537
-#: src/readelf.c:1115 src/readelf.c:1315 src/readelf.c:1463 src/readelf.c:1664
-#: src/readelf.c:1870 src/readelf.c:2060 src/readelf.c:2238 src/readelf.c:2314
-#: src/readelf.c:2572 src/readelf.c:2648 src/readelf.c:2735 src/readelf.c:3315
-#: src/readelf.c:3365 src/readelf.c:3428 src/readelf.c:8430 src/readelf.c:9530
-#: src/readelf.c:9733 src/readelf.c:9801 src/size.c:397 src/size.c:466
-#: src/strip.c:572
+#: 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 "не вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ Ñ–Ð½Ð´ÐµÐºÑ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ° розділу у таблиці Ñ€Ñдків"
@@ -3756,7 +3822,7 @@ msgstr "Показати інформацію лише з розділу ÐÐЗÐ
msgid "Show information from FILEs (a.out by default)."
msgstr "Показати інформацію з ФÐЙЛів (типово a.out)."
-#: src/objdump.c:219 src/readelf.c:485
+#: src/objdump.c:219 src/readelf.c:551
msgid "No operation specified.\n"
msgstr "Ðе вказано дії.\n"
@@ -3765,11 +3831,11 @@ msgstr "Ðе вказано дії.\n"
msgid "while close `%s'"
msgstr "під Ñ‡Ð°Ñ Ð·Ð°ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Â«%s»"
-#: src/objdump.c:364 src/readelf.c:1965 src/readelf.c:2157
+#: src/objdump.c:364 src/readelf.c:2046 src/readelf.c:2238
msgid "INVALID SYMBOL"
msgstr "ÐЕКОРЕКТÐИЙ СИМВОЛ"
-#: src/objdump.c:379 src/readelf.c:1999 src/readelf.c:2193
+#: src/objdump.c:379 src/readelf.c:2080 src/readelf.c:2274
msgid "INVALID SECTION"
msgstr "ÐЕКОРЕКТÐИЙ РОЗДІЛ"
@@ -3823,147 +3889,168 @@ msgstr "«%s» не є архівом"
msgid "error while freeing sub-ELF descriptor: %s"
msgstr "помилка під Ñ‡Ð°Ñ Ñпроби Ð²Ð¸Ð²Ñ–Ð»ÑŒÐ½ÐµÐ½Ð½Ñ Ð´ÐµÑкриптора під-ELF: %s"
-#: src/readelf.c:73
+#: src/readelf.c:95
msgid "ELF input selection:"
msgstr "Вибір вихідних даних ELF:"
-#: src/readelf.c:75
+#: src/readelf.c:97
msgid ""
"Use the named SECTION (default .gnu_debugdata) as (compressed) ELF input data"
msgstr ""
"ВикориÑтовувати вказаний за іменем РОЗДІЛ (типово .gnu_debugdata) Ñк "
"(ÑтиÑнені) вхідні дані ELF"
-#: src/readelf.c:77
+#: 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:79
+#: src/readelf.c:104
msgid "All these plus -p .strtab -p .dynstr -p .comment"
msgstr "Ð’Ñе це Ð¿Ð»ÑŽÑ -p .strtab -p .dynstr -p .comment"
-#: src/readelf.c:80
+#: src/readelf.c:105
msgid "Display the dynamic segment"
msgstr "Показувати динамічний Ñегмент"
-#: src/readelf.c:81
+#: src/readelf.c:106
msgid "Display the ELF file header"
msgstr "Показувати заголовок файла ELF"
-#: src/readelf.c:83
+#: src/readelf.c:108
msgid "Display histogram of bucket list lengths"
msgstr "Показати гіÑтограму довжин ÑпиÑку блоків"
-#: src/readelf.c:84
+#: src/readelf.c:109
msgid "Display the program headers"
msgstr "Показувати заголовки програми"
-#: src/readelf.c:86
+#: src/readelf.c:111
msgid "Display relocations"
msgstr "Показувати переÑуваннÑ"
-#: src/readelf.c:87
+#: src/readelf.c:112
+#, fuzzy
+msgid "Display the section groups"
+msgstr "Показувати заголовки розділів"
+
+#: src/readelf.c:113
msgid "Display the sections' headers"
msgstr "Показувати заголовки розділів"
-#: src/readelf.c:90
+#: src/readelf.c:116
#, fuzzy
msgid "Display the symbol table sections"
msgstr "Показувати таблицю Ñимволів"
-#: src/readelf.c:91
+#: src/readelf.c:117
msgid "Display versioning information"
msgstr "Показувати відомоÑÑ‚Ñ– щодо верÑÑ–Ñ—"
-#: src/readelf.c:92
+#: src/readelf.c:118
msgid "Display the ELF notes"
msgstr "Показувати нотатки ELF"
-#: src/readelf.c:94
+#: src/readelf.c:120
msgid "Display architecture specific information, if any"
msgstr "Показувати Ñпецифічні Ð´Ð»Ñ Ð°Ñ€Ñ…Ñ–Ñ‚ÐµÐºÑ‚ÑƒÑ€Ð¸ дані, Ñкщо такі буде виÑвлено"
-#: src/readelf.c:96
+#: src/readelf.c:122
msgid "Display sections for exception handling"
msgstr "Показувати розділи Ð´Ð»Ñ Ð¾Ð±Ñ€Ð¾Ð±ÐºÐ¸ виключень"
-#: src/readelf.c:98
+#: src/readelf.c:124
msgid "Additional output selection:"
msgstr "Додатковий вибір виводу:"
-#: src/readelf.c:100
+#: 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:104
+#: src/readelf.c:130
msgid "Dump the uninterpreted contents of SECTION, by number or name"
msgstr ""
"Створити дамп даних РОЗДІЛ, Ñкі не вдалоÑÑ Ñ–Ð½Ñ‚ÐµÑ€Ð¿Ñ€ÐµÑ‚ÑƒÐ²Ð°Ñ‚Ð¸, за номером або "
"назвами"
-#: src/readelf.c:106
+#: src/readelf.c:132
msgid "Print string contents of sections"
msgstr "Виводити вміÑÑ‚ Ñ€Ñдків розділів"
-#: src/readelf.c:109
+#: src/readelf.c:135
msgid "Display the symbol index of an archive"
msgstr "Показувати покажчик Ñимволів архіву"
-#: src/readelf.c:111
+#: src/readelf.c:137
msgid "Output control:"
msgstr "ÐšÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð²Ð¸Ð²Ð¾Ð´Ð¾Ð¼:"
-#: src/readelf.c:113
+#: src/readelf.c:139
msgid "Do not find symbol names for addresses in DWARF data"
msgstr "Ðе шукати назви Ñимволів Ð´Ð»Ñ Ð°Ð´Ñ€ÐµÑ Ñƒ даних DWARF"
-#: src/readelf.c:115
+#: src/readelf.c:141
msgid ""
"Display just offsets instead of resolving values to addresses in DWARF data"
msgstr "Показати лише зміщеннÑ, а не визначені Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑи у даних DWARF"
-#: src/readelf.c:117
+#: src/readelf.c:143
msgid "Ignored for compatibility (lines always wide)"
msgstr "ІгноруєтьÑÑ Ð· міркувань ÑуміÑноÑÑ‚Ñ– (Ñ€Ñдки завжди широкі)"
-#: src/readelf.c:119
+#: 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:124
+#: src/readelf.c:150
msgid "Print information from ELF file in human-readable form."
msgstr "Виводити відомоÑÑ‚Ñ– з файла ELF у придатному Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ñ–."
-#: src/readelf.c:453
+#. 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:521 src/readelf.c:632
+#: src/readelf.c:590 src/readelf.c:701
#, c-format
msgid "cannot generate Elf descriptor: %s"
msgstr "не вдалоÑÑ Ñтворити деÑкриптор Elf: %s"
-#: src/readelf.c:528 src/readelf.c:844 src/strip.c:641
+#: 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:546 src/readelf.c:1137 src/readelf.c:1339
+#: src/readelf.c:615 src/readelf.c:1218 src/readelf.c:1420
#, c-format
msgid "cannot get section: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ розділ: %s"
-#: src/readelf.c:555 src/readelf.c:1144 src/readelf.c:1347 src/readelf.c:9753
+#: 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:1109
#: src/unstrip.c:1301 src/unstrip.c:1362 src/unstrip.c:1535 src/unstrip.c:1650
@@ -3972,109 +4059,109 @@ msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ розділ: %s"
msgid "cannot get section header: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ заголовок розділу: %s"
-#: src/readelf.c:563
+#: src/readelf.c:632
#, c-format
msgid "cannot get section name"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ назву розділу"
-#: src/readelf.c:572 src/readelf.c:5548 src/readelf.c:7888 src/readelf.c:7990
-#: src/readelf.c:8167
+#: 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:588
+#: src/readelf.c:657
#, c-format
msgid "cannot create temp file '%s'"
msgstr "не вдалоÑÑ Ñтворити файл тимчаÑових даних «%s»"
-#: src/readelf.c:597
+#: src/readelf.c:666
#, c-format
msgid "cannot write section data"
msgstr "не вдалоÑÑ Ð·Ð°Ð¿Ð¸Ñати дані розділу"
-#: src/readelf.c:603 src/readelf.c:620 src/readelf.c:649
+#: 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:610
+#: src/readelf.c:679
#, c-format
msgid "error while rewinding file descriptor"
msgstr "помилка під Ñ‡Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ð½ÐµÐ½Ð½Ñ Ð´Ð¾ початкового Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð´ÐµÑкриптора файла"
-#: src/readelf.c:644
+#: src/readelf.c:713
#, c-format
msgid "'%s' is not an archive, cannot print archive index"
msgstr "«%s» не Ñ” архівом, Ð²Ð¸Ð²ÐµÐ´ÐµÐ½Ð½Ñ Ð¿Ð¾ÐºÐ°Ð¶Ñ‡Ð¸ÐºÐ° архіву неможливе"
-#: src/readelf.c:743
-#, c-format
-msgid "No such section '%s' in '%s'"
-msgstr "У «%2$s» немає розділу «%1$s»"
-
-#: src/readelf.c:770
+#: src/readelf.c:817
#, c-format
msgid "cannot stat input file"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані з вхідного файла за допомогою stat"
-#: src/readelf.c:772
+#: src/readelf.c:819
#, c-format
msgid "input file is empty"
msgstr "вхідний файл є порожнім"
-#: src/readelf.c:774
+#: src/readelf.c:821
#, c-format
msgid "failed reading '%s': %s"
msgstr "не вдалоÑÑ Ð¿Ñ€Ð¾Ñ‡Ð¸Ñ‚Ð°Ñ‚Ð¸ «%s»: %s"
-#: src/readelf.c:829
+#: 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:837
+#: src/readelf.c:918
#, c-format
msgid "cannot create EBL handle"
msgstr "не вдалоÑÑ Ñтворити деÑкриптор EBL"
-#: src/readelf.c:850
+#: src/readelf.c:931
#, c-format
msgid "cannot determine number of program headers: %s"
msgstr "не вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ кількіÑÑ‚ÑŒ заголовків програми: %s"
-#: src/readelf.c:940
+#: src/readelf.c:1021
msgid "NONE (None)"
msgstr "NONE (Ðемає)"
-#: src/readelf.c:941
+#: src/readelf.c:1022
msgid "REL (Relocatable file)"
msgstr "REL (Придатний до переÑÑƒÐ²Ð°Ð½Ð½Ñ Ñ„Ð°Ð¹Ð»)"
-#: src/readelf.c:942
+#: src/readelf.c:1023
msgid "EXEC (Executable file)"
msgstr "EXEC (Виконуваний файл)"
-#: src/readelf.c:943
+#: src/readelf.c:1024
msgid "DYN (Shared object file)"
msgstr "DYN (Файл об’єктів Ñпільного викориÑтаннÑ)"
-#: src/readelf.c:944
+#: src/readelf.c:1025
msgid "CORE (Core file)"
msgstr "CORE (Файл Ñдра)"
-#: src/readelf.c:949
+#: src/readelf.c:1030
#, c-format
msgid "OS Specific: (%x)\n"
msgstr "ОС-Ñпецифічне: (%x)\n"
#. && e_type <= ET_HIPROC always true
-#: src/readelf.c:951
+#: src/readelf.c:1032
#, c-format
msgid "Processor Specific: (%x)\n"
msgstr "Специфічне Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñ†ÐµÑора: (%x)\n"
-#: src/readelf.c:961
+#: src/readelf.c:1042
msgid ""
"ELF Header:\n"
" Magic: "
@@ -4082,7 +4169,7 @@ msgstr ""
"Заголовок ELF:\n"
" Magic: "
-#: src/readelf.c:965
+#: src/readelf.c:1046
#, c-format
msgid ""
"\n"
@@ -4091,118 +4178,118 @@ msgstr ""
"\n"
" КлаÑ: %s\n"
-#: src/readelf.c:970
+#: src/readelf.c:1051
#, c-format
msgid " Data: %s\n"
msgstr " Дані: %s\n"
-#: src/readelf.c:976
+#: src/readelf.c:1057
#, c-format
msgid " Ident Version: %hhd %s\n"
msgstr " ВерÑÑ–Ñ Ident: %hhd %s\n"
-#: src/readelf.c:978 src/readelf.c:995
+#: src/readelf.c:1059 src/readelf.c:1076
msgid "(current)"
msgstr "(поточний)"
-#: src/readelf.c:982
+#: src/readelf.c:1063
#, c-format
msgid " OS/ABI: %s\n"
msgstr " ОС/ABI: %s\n"
-#: src/readelf.c:985
+#: src/readelf.c:1066
#, c-format
msgid " ABI Version: %hhd\n"
msgstr " ВерÑÑ–Ñ ABI: %hhd\n"
-#: src/readelf.c:988
+#: src/readelf.c:1069
msgid " Type: "
msgstr " Тип: "
-#: src/readelf.c:991
+#: src/readelf.c:1072
#, c-format
msgid " Machine: %s\n"
msgstr " Ðрхітектура: %s\n"
-#: src/readelf.c:993
+#: src/readelf.c:1074
#, c-format
msgid " Version: %d %s\n"
msgstr " ВерÑÑ–Ñ: %d %s\n"
-#: src/readelf.c:997
+#: src/readelf.c:1078
#, c-format
msgid " Entry point address: %#<PRIx64>\n"
msgstr " ÐдреÑа вхідної точки: %#<PRIx64>\n"
-#: src/readelf.c:1000
+#: src/readelf.c:1081
#, c-format
msgid " Start of program headers: %<PRId64> %s\n"
msgstr " Початок заголовків програм: %<PRId64> %s\n"
-#: src/readelf.c:1001 src/readelf.c:1004
+#: src/readelf.c:1082 src/readelf.c:1085
msgid "(bytes into file)"
msgstr "(байтів у файл)"
-#: src/readelf.c:1003
+#: src/readelf.c:1084
#, c-format
msgid " Start of section headers: %<PRId64> %s\n"
msgstr " Початок заголовків розділів: %<PRId64> %s\n"
-#: src/readelf.c:1006
+#: src/readelf.c:1087
#, c-format
msgid " Flags: %s\n"
msgstr " Прапорці: %s\n"
-#: src/readelf.c:1009
+#: src/readelf.c:1090
#, c-format
msgid " Size of this header: %<PRId16> %s\n"
msgstr " Розмір цього заголовка: %<PRId16> %s\n"
-#: src/readelf.c:1010 src/readelf.c:1013 src/readelf.c:1030
+#: src/readelf.c:1091 src/readelf.c:1094 src/readelf.c:1111
msgid "(bytes)"
msgstr "(байтів)"
-#: src/readelf.c:1012
+#: src/readelf.c:1093
#, c-format
msgid " Size of program header entries: %<PRId16> %s\n"
msgstr " Розмір запиÑів заголовка програми: %<PRId16> %s\n"
-#: src/readelf.c:1015
+#: src/readelf.c:1096
#, c-format
msgid " Number of program headers entries: %<PRId16>"
msgstr " КількіÑÑ‚ÑŒ запиÑів заголовків програми: %<PRId16>"
-#: src/readelf.c:1022
+#: src/readelf.c:1103
#, c-format
msgid " (%<PRIu32> in [0].sh_info)"
msgstr " (%<PRIu32> у [0].sh_info)"
-#: src/readelf.c:1025 src/readelf.c:1042 src/readelf.c:1056
+#: src/readelf.c:1106 src/readelf.c:1123 src/readelf.c:1137
msgid " ([0] not available)"
msgstr " ([0] недоÑтупний)"
-#: src/readelf.c:1029
+#: src/readelf.c:1110
#, c-format
msgid " Size of section header entries: %<PRId16> %s\n"
msgstr " Розмір запиÑів заголовків розділів: %<PRId16> %s\n"
-#: src/readelf.c:1032
+#: src/readelf.c:1113
#, c-format
msgid " Number of section headers entries: %<PRId16>"
msgstr " КількіÑÑ‚ÑŒ запиÑів заголовків розділів: %<PRId16>"
-#: src/readelf.c:1039
+#: src/readelf.c:1120
#, c-format
msgid " (%<PRIu32> in [0].sh_size)"
msgstr " (%<PRIu32> у [0].sh_size)"
#. We managed to get the zeroth section.
-#: src/readelf.c:1052
+#: src/readelf.c:1133
#, c-format
msgid " (%<PRIu32> in [0].sh_link)"
msgstr " (%<PRIu32> у [0].sh_link)"
-#: src/readelf.c:1060
+#: src/readelf.c:1141
#, c-format
msgid ""
" Section header string table index: XINDEX%s\n"
@@ -4211,7 +4298,7 @@ msgstr ""
" Ð†Ð½Ð´ÐµÐºÑ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ° розділу у таблиці Ñ€Ñдків: XINDEX%s\n"
"\n"
-#: src/readelf.c:1064
+#: src/readelf.c:1145
#, c-format
msgid ""
" Section header string table index: %<PRId16>\n"
@@ -4220,7 +4307,7 @@ msgstr ""
" Ð†Ð½Ð´ÐµÐºÑ Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²ÐºÐ° розділу у таблиці Ñ€Ñдків: %<PRId16>\n"
"\n"
-#: src/readelf.c:1107
+#: src/readelf.c:1188
#, c-format
msgid ""
"There are %d section headers, starting at offset %#<PRIx64>:\n"
@@ -4229,11 +4316,11 @@ msgstr ""
"ВиÑвлено %d заголовків розділів, Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ‡Ð°Ñ‚ÐºÑƒ — %#<PRIx64>:\n"
"\n"
-#: src/readelf.c:1117
+#: src/readelf.c:1198
msgid "Section Headers:"
msgstr "Заголовки розділів:"
-#: src/readelf.c:1120
+#: src/readelf.c:1201
msgid ""
"[Nr] Name Type Addr Off Size ES Flags Lk "
"Inf Al"
@@ -4241,7 +4328,7 @@ msgstr ""
"[â„– ] Ðазва Тип Ðдр Змі Розмір ES Прап Lk "
"Інф Al"
-#: src/readelf.c:1122
+#: src/readelf.c:1203
msgid ""
"[Nr] Name Type Addr Off Size ES "
"Flags Lk Inf Al"
@@ -4249,35 +4336,35 @@ msgstr ""
"[â„– ] Ðазва Тип Ðдр Змі Розмір ES "
"Прап Lk Інф Al"
-#: src/readelf.c:1127
+#: src/readelf.c:1208
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1129
+#: src/readelf.c:1210
msgid " [Compression Size Al]"
msgstr ""
-#: src/readelf.c:1205
+#: src/readelf.c:1286
#, fuzzy, c-format
msgid "bad compression header for section %zd: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ заголовок розділу %zu: %s"
-#: src/readelf.c:1216
+#: src/readelf.c:1297
#, fuzzy, c-format
msgid "bad gnu compressed size for section %zd: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані Ð´Ð»Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»Ñƒ %d: %s"
-#: src/readelf.c:1234
+#: src/readelf.c:1315
msgid "Program Headers:"
msgstr "Заголовки програми:"
-#: src/readelf.c:1236
+#: src/readelf.c:1317
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align"
msgstr ""
" Тип Зміщен ВіртÐдр ФізÐдр РозмФайл РозмПам Пра Вирів"
-#: src/readelf.c:1239
+#: src/readelf.c:1320
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align"
@@ -4285,12 +4372,12 @@ msgstr ""
" Тип Зміщен ВіртÐдр ФізÐдр "
"РозмФайлРозмПам Пра Вирів"
-#: src/readelf.c:1296
+#: src/readelf.c:1377
#, c-format
msgid "\t[Requesting program interpreter: %s]\n"
msgstr "\t[Запит щодо інтерпретатора програми: %s]\n"
-#: src/readelf.c:1317
+#: src/readelf.c:1398
msgid ""
"\n"
" Section to Segment mapping:\n"
@@ -4300,12 +4387,12 @@ msgstr ""
" Ð’Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»Ñ–Ð² на Ñегмент:\n"
" Розділи Ñегмента..."
-#: src/readelf.c:1328 src/unstrip.c:1944 src/unstrip.c:1986 src/unstrip.c:1993
+#: 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:1471
+#: src/readelf.c:1552
#, c-format
msgid ""
"\n"
@@ -4323,7 +4410,7 @@ msgstr[2] ""
"\n"
"Група розділів COMDAT [%2zu] «%s» з підпиÑом «%s» міÑтить %zu запиÑів:\n"
-#: src/readelf.c:1476
+#: src/readelf.c:1557
#, c-format
msgid ""
"\n"
@@ -4341,31 +4428,31 @@ msgstr[2] ""
"\n"
"Група розділів [%2zu] «%s» з підпиÑом «%s» міÑтить %zu запиÑів:\n"
-#: src/readelf.c:1484
+#: src/readelf.c:1565
msgid "<INVALID SYMBOL>"
msgstr "<ÐЕКОРЕКТÐИЙ СИМВОЛ>"
-#: src/readelf.c:1498
+#: src/readelf.c:1579
msgid "<INVALID SECTION>"
msgstr "<ÐЕКОРЕКТÐИЙ РОЗДІЛ>"
-#: src/readelf.c:1521 src/readelf.c:2248 src/readelf.c:3331 src/readelf.c:9624
-#: src/readelf.c:9631 src/readelf.c:9675 src/readelf.c:9682
+#: 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:1526 src/readelf.c:2253 src/readelf.c:3336
+#: 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:1670 src/readelf.c:2320 src/readelf.c:2578 src/readelf.c:2654
-#: src/readelf.c:2958 src/readelf.c:3032 src/readelf.c:4759
+#: 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:1673
+#: src/readelf.c:1754
#, c-format
msgid ""
"\n"
@@ -4388,36 +4475,36 @@ msgstr[2] ""
"Динамічний Ñегмент міÑтить %lu запиÑів:\n"
" Ðдр: %#0*<PRIx64> ЗміщеннÑ: %#08<PRIx64> ПоÑ. на розділ: [%2u] '%s'\n"
-#: src/readelf.c:1683
+#: src/readelf.c:1764
msgid " Type Value\n"
msgstr " Тип ЗначеннÑ\n"
-#: src/readelf.c:1707
+#: src/readelf.c:1788
#, c-format
msgid "Shared library: [%s]\n"
msgstr "Спільна бібліотека: [%s]\n"
-#: src/readelf.c:1712
+#: src/readelf.c:1793
#, c-format
msgid "Library soname: [%s]\n"
msgstr "Ðазва so бібліотеки: [%s]\n"
-#: src/readelf.c:1717
+#: src/readelf.c:1798
#, c-format
msgid "Library rpath: [%s]\n"
msgstr "Rpath бібліотеки: [%s]\n"
-#: src/readelf.c:1722
+#: src/readelf.c:1803
#, c-format
msgid "Library runpath: [%s]\n"
msgstr "Runpath бібліотеки: [%s]\n"
-#: src/readelf.c:1742
+#: src/readelf.c:1823
#, c-format
msgid "%<PRId64> (bytes)\n"
msgstr "%<PRId64> (байт)\n"
-#: src/readelf.c:1855 src/readelf.c:2045
+#: src/readelf.c:1936 src/readelf.c:2126
#, c-format
msgid ""
"\n"
@@ -4426,7 +4513,7 @@ msgstr ""
"\n"
"Ðекоректна Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ Ñимволів за зміщеннÑм %#0<PRIx64>\n"
-#: src/readelf.c:1873 src/readelf.c:2063
+#: src/readelf.c:1954 src/readelf.c:2144
#, c-format
msgid ""
"\n"
@@ -4455,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:1888 src/readelf.c:2078
+#: src/readelf.c:1969 src/readelf.c:2159
#, c-format
msgid ""
"\n"
@@ -4473,30 +4560,30 @@ msgstr[2] ""
"\n"
"Розділ переÑÑƒÐ²Ð°Ð½Ð½Ñ [%2u] «%s» за зміщеннÑм %#0<PRIx64> міÑтить %d запиÑів:\n"
-#: src/readelf.c:1898
+#: src/readelf.c:1979
msgid " Offset Type Value Name\n"
msgstr " Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð¢Ð¸Ð¿ Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ðазва\n"
-#: src/readelf.c:1900
+#: src/readelf.c:1981
msgid " Offset Type Value Name\n"
msgstr " Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð¢Ð¸Ð¿ Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ðазва\n"
-#: src/readelf.c:1953 src/readelf.c:1964 src/readelf.c:1977 src/readelf.c:1998
-#: src/readelf.c:2010 src/readelf.c:2144 src/readelf.c:2156 src/readelf.c:2170
-#: src/readelf.c:2192 src/readelf.c:2205
+#: 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 "<INVALID RELOC>"
msgstr "<ÐЕКОРЕКТÐЕ ПЕРЕМІЩЕÐÐЯ>"
-#: src/readelf.c:2088
+#: src/readelf.c:2169
msgid " Offset Type Value Addend Name\n"
msgstr " Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð¢Ð¸Ð¿ Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ðазва додатка\n"
-#: src/readelf.c:2090
+#: src/readelf.c:2171
msgid " Offset Type Value Addend Name\n"
msgstr ""
" Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð¢Ð¸Ð¿ Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ðазва додатка\n"
-#: src/readelf.c:2328
+#: src/readelf.c:2409
#, c-format
msgid ""
"\n"
@@ -4514,7 +4601,7 @@ msgstr[2] ""
"\n"
"Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ñимволів [%2u] «%s» міÑтить %u запиÑів:\n"
-#: src/readelf.c:2333
+#: 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"
@@ -4522,33 +4609,33 @@ msgstr[0] " %lu лок. Ñимвол Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ñимволів: [%2u] «
msgstr[1] " %lu лок. Ñимволи Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ñимволів: [%2u] «%s»\n"
msgstr[2] " %lu лок. Ñимволів Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ñимволів: [%2u] «%s»\n"
-#: src/readelf.c:2341
+#: src/readelf.c:2422
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr " â„–â„– Знач. Роз. Тип Зв’Ñз Вид. Інд Ðазва\n"
-#: src/readelf.c:2343
+#: src/readelf.c:2424
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr " â„–â„– Знач. Роз. Тип Зв’Ñз Вид. Інд Ðазва\n"
-#: src/readelf.c:2363
+#: src/readelf.c:2444
#, c-format
msgid "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
msgstr "%5u: %0*<PRIx64> %6<PRId64> %-7s %-6s %-9s %6s %s"
-#: src/readelf.c:2451
+#: src/readelf.c:2532
#, c-format
msgid "bad dynamic symbol"
msgstr "помилковий динамічний Ñимвол"
-#: src/readelf.c:2533
+#: src/readelf.c:2614
msgid "none"
msgstr "немає"
-#: src/readelf.c:2550
+#: src/readelf.c:2631
msgid "| <unknown>"
msgstr "| <невідомо>"
-#: src/readelf.c:2581
+#: src/readelf.c:2662
#, c-format
msgid ""
"\n"
@@ -4571,17 +4658,17 @@ msgstr[2] ""
"Розділ потреби у верÑÑ–ÑÑ… [%2u] «%s», що міÑтить %d запиÑів:\n"
" Ðдр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> ПоÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° розділ: [%2u] «%s»\n"
-#: src/readelf.c:2602
+#: src/readelf.c:2683
#, c-format
msgid " %#06x: Version: %hu File: %s Cnt: %hu\n"
msgstr " %#06x: ВерÑÑ–Ñ: %hu Файл: %s Кть: %hu\n"
-#: src/readelf.c:2615
+#: src/readelf.c:2696
#, c-format
msgid " %#06x: Name: %s Flags: %s Version: %hu\n"
msgstr " %#06x: Ðазва: %s Прап: %s ВерÑÑ–Ñ: %hu\n"
-#: src/readelf.c:2658
+#: src/readelf.c:2739
#, c-format
msgid ""
"\n"
@@ -4604,18 +4691,18 @@ msgstr[2] ""
"Розділ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð²ÐµÑ€ÑÑ–Ñ— [%2u] «%s», що міÑтить %d запиÑів:\n"
" Ðдр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> ПоÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° розділ: [%2u] «%s»\n"
-#: src/readelf.c:2686
+#: 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:2701
+#: src/readelf.c:2782
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr " %#06x: батьківÑький %d: %s\n"
#. Print the header.
-#: src/readelf.c:2962
+#: src/readelf.c:3043
#, c-format
msgid ""
"\n"
@@ -4638,15 +4725,15 @@ msgstr[2] ""
"Розділ Ñимволів верÑій [%2u] «%s», що міÑтить %d запиÑів:\n"
" Ðдр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> ПоÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° розділ: [%2u] «%s»"
-#: src/readelf.c:2990
+#: src/readelf.c:3071
msgid " 0 *local* "
msgstr " 0 *локальний* "
-#: src/readelf.c:2995
+#: src/readelf.c:3076
msgid " 1 *global* "
msgstr " 1 *загальний* "
-#: src/readelf.c:3037
+#: src/readelf.c:3118
#, c-format
msgid ""
"\n"
@@ -4674,22 +4761,22 @@ msgstr[2] ""
"блоками):\n"
" Ðдр.: %#0*<PRIx64> Зміщ.: %#08<PRIx64> ПоÑÐ¸Ð»Ð°Ð½Ð½Ñ Ð½Ð° розділ: [%2u] «%s»\n"
-#: src/readelf.c:3059
+#: src/readelf.c:3140
#, no-c-format
msgid " Length Number % of total Coverage\n"
msgstr " Довжина Ðомер % від загал. ПокриттÑ\n"
-#: src/readelf.c:3061
+#: src/readelf.c:3142
#, c-format
msgid " 0 %6<PRIu32> %5.1f%%\n"
msgstr " 0 %6<PRIu32> %5.1f%%\n"
-#: src/readelf.c:3068
+#: src/readelf.c:3149
#, c-format
msgid "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
msgstr "%7d %6<PRIu32> %5.1f%% %5.1f%%\n"
-#: src/readelf.c:3081
+#: src/readelf.c:3162
#, c-format
msgid ""
" Average number of tests: successful lookup: %f\n"
@@ -4698,27 +4785,37 @@ msgstr ""
" Ð¡ÐµÑ€ÐµÐ´Ð½Ñ ÐºÑ–Ð»ÑŒÐºÑ–ÑÑ‚ÑŒ теÑтів: уÑпішний пошук: %f\n"
"\t\t\t неуÑпішний пошук: %f\n"
-#: src/readelf.c:3099 src/readelf.c:3154 src/readelf.c:3211
+#: 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:3107
+#: src/readelf.c:3188
#, c-format
msgid "invalid data in sysv.hash section %d"
msgstr "некоректні дані у розділі sysv.hash %d"
-#: src/readelf.c:3162
+#: 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:3220
+#: 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:3287
+#: src/readelf.c:3386
#, c-format
msgid ""
" Symbol Bias: %u\n"
@@ -4728,7 +4825,7 @@ msgstr ""
" Розмір бітової маÑки: %zu байтів %<PRIuFAST32>%% вÑтановлених бітів зÑув "
"2-го хешу: %u\n"
-#: src/readelf.c:3376
+#: src/readelf.c:3475
#, c-format
msgid ""
"\n"
@@ -4749,7 +4846,7 @@ msgstr[2] ""
"Розділ ÑпиÑку бібліотек [%2zu] «%s» за зміщеннÑм %#0<PRIx64> міÑтить %d "
"запиÑів:\n"
-#: src/readelf.c:3390
+#: src/readelf.c:3489
msgid ""
" Library Time Stamp Checksum Version "
"Flags"
@@ -4757,7 +4854,7 @@ msgstr ""
" Бібліотека ЧаÑовий штамп ВерÑÑ–Ñ Ñуми "
"Прапорці"
-#: src/readelf.c:3440
+#: src/readelf.c:3539
#, c-format
msgid ""
"\n"
@@ -4768,142 +4865,102 @@ msgstr ""
"Розділ атрибутів об’єктів [%2zu] «%s» з %<PRIu64> байтів за зміщеннÑм "
"%#0<PRIx64>:\n"
-#: src/readelf.c:3457
+#: src/readelf.c:3556
msgid " Owner Size\n"
msgstr " ВлаÑник Розмір\n"
-#: src/readelf.c:3486
+#: src/readelf.c:3585
#, c-format
msgid " %-13s %4<PRIu32>\n"
msgstr " %-13s %4<PRIu32>\n"
#. Unknown subsection, print and skip.
-#: src/readelf.c:3525
+#: src/readelf.c:3624
#, c-format
msgid " %-4u %12<PRIu32>\n"
msgstr " %-4u %12<PRIu32>\n"
#. Tag_File
-#: src/readelf.c:3530
+#: src/readelf.c:3629
#, c-format
msgid " File: %11<PRIu32>\n"
msgstr " Файл: %11<PRIu32>\n"
-#: src/readelf.c:3579
+#: src/readelf.c:3678
#, c-format
msgid " %s: %<PRId64>, %s\n"
msgstr " %s: %<PRId64>, %s\n"
-#: src/readelf.c:3582
+#: src/readelf.c:3681
#, c-format
msgid " %s: %<PRId64>\n"
msgstr " %s: %<PRId64>\n"
-#: src/readelf.c:3585
+#: src/readelf.c:3684
#, c-format
msgid " %s: %s\n"
msgstr " %s: %s\n"
-#: src/readelf.c:3595
+#: src/readelf.c:3694
#, c-format
msgid " %u: %<PRId64>\n"
msgstr " %u: %<PRId64>\n"
-#: src/readelf.c:3598
+#: src/readelf.c:3697
#, c-format
msgid " %u: %s\n"
msgstr " %u: %s\n"
-#: src/readelf.c:3643
-#, c-format
-msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3646
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3651
-#, c-format
-msgid "%#<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3654
-#, c-format
-msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
-msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
-
-#: src/readelf.c:3660
-#, c-format
-msgid "%s+%#<PRIx64> <%s>"
-msgstr "%s+%#<PRIx64> <%s>"
-
-#: src/readelf.c:3663
-#, c-format
-msgid "%s+%#0*<PRIx64> <%s>"
-msgstr "%s+%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3667
-#, c-format
-msgid "%#<PRIx64> <%s>"
-msgstr "%#<PRIx64> <%s>"
-
-#: src/readelf.c:3670
-#, c-format
-msgid "%#0*<PRIx64> <%s>"
-msgstr "%#0*<PRIx64> <%s>"
-
-#: src/readelf.c:3675
-#, c-format
-msgid "%s+%#<PRIx64>"
-msgstr "%s+%#<PRIx64>"
-
-#: src/readelf.c:3678
-#, c-format
-msgid "%s+%#0*<PRIx64>"
-msgstr "%s+%#0*<PRIx64>"
+#: src/readelf.c:3767
+#, fuzzy, c-format
+msgid "sprintf failure"
+msgstr "помилка mprotect"
-#: src/readelf.c:4081
+#: src/readelf.c:4249
msgid "empty block"
msgstr "порожній блок"
-#: src/readelf.c:4084
+#: src/readelf.c:4252
#, c-format
msgid "%zu byte block:"
msgstr "%zu-байтовий блок:"
-#: src/readelf.c:4481
-#, c-format
-msgid "%*s[%4<PRIuMAX>] %s <TRUNCATED>\n"
+#: src/readelf.c:4730
+#, fuzzy, c-format
+msgid "%*s[%2<PRIuMAX>] %s <TRUNCATED>\n"
msgstr "%*s[%4<PRIuMAX>] %s <ОБРІЗÐÐО>\n"
-#: src/readelf.c:4538
+#: src/readelf.c:4794
#, c-format
msgid "%s %#<PRIx64> used with different address sizes"
msgstr "%s %#<PRIx64> викориÑтано з різними розмірами адреÑ"
-#: src/readelf.c:4545
+#: src/readelf.c:4801
#, c-format
msgid "%s %#<PRIx64> used with different offset sizes"
msgstr "%s %#<PRIx64> викориÑтано з різними розмірами зміщень"
-#: src/readelf.c:4552
+#: src/readelf.c:4808
#, c-format
msgid "%s %#<PRIx64> used with different base addresses"
msgstr "%s %#<PRIx64> викориÑтано з різними базовими адреÑами"
-#: src/readelf.c:4641
+#: src/readelf.c:4815
+#, fuzzy, c-format
+msgid "%s %#<PRIx64> used with different attribute %s and %s"
+msgstr "%s %#<PRIx64> викориÑтано з різними розмірами адреÑ"
+
+#: src/readelf.c:4912
#, c-format
msgid " [%6tx] <UNUSED GARBAGE IN REST OF SECTION>\n"
msgstr " [%6tx] <ÐЕВИКОРИСТОВУВÐÐІ ДÐÐІ У РЕШТІ РОЗДІЛУ>\n"
-#: src/readelf.c:4649
+#: src/readelf.c:4920
#, c-format
msgid " [%6tx] <UNUSED GARBAGE> ... %<PRIu64> bytes ...\n"
msgstr " [%6tx] <ÐЕВИКОРИСТОВУВÐÐІ ДÐÐІ> ... %<PRIu64> байтів ...\n"
-#: src/readelf.c:4675
+#: src/readelf.c:4998
#, c-format
msgid ""
"\n"
@@ -4914,7 +4971,7 @@ msgstr ""
"Розділ DWARF [%2zu] «%s» зі зміщеннÑм %#<PRIx64>:\n"
" [ Код]\n"
-#: src/readelf.c:4683
+#: src/readelf.c:5006
#, c-format
msgid ""
"\n"
@@ -4923,30 +4980,78 @@ msgstr ""
"\n"
"Розділ Ñкорочень за зміщеннÑм %<PRIu64>:\n"
-#: src/readelf.c:4696
+#: src/readelf.c:5019
#, c-format
msgid " *** error while reading abbreviation: %s\n"
msgstr " *** помилка під Ñ‡Ð°Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ ÑкороченнÑ: %s\n"
-#: src/readelf.c:4712
+#: src/readelf.c:5035
#, c-format
msgid " [%5u] offset: %<PRId64>, children: %s, tag: %s\n"
msgstr " [%5u] зміщеннÑ: %<PRId64>, дочірній: %s, мітка: %s\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:6172 src/readelf.c:7745
-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 %#<PRIx64>:\n"
+msgstr ""
+"\n"
+"Розділ DWARF [%2zu] «%s» зі зміщеннÑм %#<PRIx64>:\n"
-#: src/readelf.c:4715 src/readelf.c:6164 src/readelf.c:7745
-msgid "no"
-msgstr "ні"
+#: 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<PRIu64>\n"
+msgstr ""
+"\n"
+" Довжина: %6<PRIu64>\n"
+
+#: src/readelf.c:5183 src/readelf.c:5220 src/readelf.c:5599 src/readelf.c:8896
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " верÑÑ–Ñ DWARF: %6<PRIuFAST16>\n"
+
+#: src/readelf.c:5184 src/readelf.c:5229 src/readelf.c:5608 src/readelf.c:8905
+#, fuzzy, c-format
+msgid " Address size: %8<PRIu64>\n"
+msgstr " Розмір адреÑи: %6<PRIu64>\n"
+
+#: src/readelf.c:5186 src/readelf.c:5239 src/readelf.c:5618 src/readelf.c:8915
+#, fuzzy, c-format
+msgid " Segment size: %8<PRIu64>\n"
+msgstr ""
+" Розмір Ñегмента: %6<PRIu64>\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:4749 src/readelf.c:4822
+#: 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:4764
+#: src/readelf.c:5313
#, c-format
msgid ""
"\n"
@@ -4964,12 +5069,12 @@ msgstr[2] ""
"\n"
"Розділ DWARF [%2zu] «%s» за зміщеннÑм %#<PRIx64> міÑтить %zu запиÑів:\n"
-#: src/readelf.c:4795
+#: src/readelf.c:5344
#, c-format
msgid " [%*zu] ???\n"
msgstr " [%*zu] ???\n"
-#: src/readelf.c:4797
+#: src/readelf.c:5346
#, c-format
msgid ""
" [%*zu] start: %0#*<PRIx64>, length: %5<PRIu64>, CU DIE offset: %6<PRId64>\n"
@@ -4977,17 +5082,7 @@ msgstr ""
" [%*zu] початок: %0#*<PRIx64>, довжина: %5<PRIu64>, Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ CU DIE: "
"%6<PRId64>\n"
-#: src/readelf.c:4827 src/readelf.c:4981 src/readelf.c:5558 src/readelf.c:6515
-#: src/readelf.c:7047 src/readelf.c:7167 src/readelf.c:7331 src/readelf.c:7819
-#, c-format
-msgid ""
-"\n"
-"DWARF section [%2zu] '%s' at offset %#<PRIx64>:\n"
-msgstr ""
-"\n"
-"Розділ DWARF [%2zu] «%s» зі зміщеннÑм %#<PRIx64>:\n"
-
-#: src/readelf.c:4840 src/readelf.c:6541
+#: src/readelf.c:5390 src/readelf.c:8195
#, c-format
msgid ""
"\n"
@@ -4996,12 +5091,13 @@ msgstr ""
"\n"
"Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ð·Ð° зміщеннÑм %zu:\n"
-#: src/readelf.c:4844 src/readelf.c:5582 src/readelf.c:6552
+#: 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:4860
+#: src/readelf.c:5410
#, c-format
msgid ""
"\n"
@@ -5010,32 +5106,27 @@ msgstr ""
"\n"
" Довжина: %6<PRIu64>\n"
-#: src/readelf.c:4872
+#: src/readelf.c:5422
#, c-format
msgid " DWARF version: %6<PRIuFAST16>\n"
msgstr " верÑÑ–Ñ DWARF: %6<PRIuFAST16>\n"
-#: src/readelf.c:4876
+#: src/readelf.c:5426
#, c-format
msgid "unsupported aranges version"
msgstr "непідтримувана верÑÑ–Ñ aranges"
-#: src/readelf.c:4887
+#: src/readelf.c:5437
#, c-format
msgid " CU offset: %6<PRIx64>\n"
msgstr " Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ CU: %6<PRIx64>\n"
-#: src/readelf.c:4893
+#: src/readelf.c:5443
#, c-format
msgid " Address size: %6<PRIu64>\n"
msgstr " Розмір адреÑи: %6<PRIu64>\n"
-#: src/readelf.c:4897
-#, c-format
-msgid "unsupported address size"
-msgstr "непідтримуваний розмір адреÑи"
-
-#: src/readelf.c:4902
+#: src/readelf.c:5452
#, c-format
msgid ""
" Segment size: %6<PRIu64>\n"
@@ -5044,68 +5135,111 @@ msgstr ""
" Розмір Ñегмента: %6<PRIu64>\n"
"\n"
-#: src/readelf.c:4906
+#: src/readelf.c:5507
#, c-format
-msgid "unsupported segment size"
-msgstr "непідтримуваний розмір Ñегмента"
+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%<PRIx64>:\n"
+"\n"
+msgstr " Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ .debug_line: 0x%<PRIx64>\n"
-#: src/readelf.c:4946
+#: src/readelf.c:5628 src/readelf.c:8925
+#, fuzzy, c-format
+msgid " Offset entries: %8<PRIu64>\n"
+msgstr " Довжина зміщеннÑ: %<PRIu8>\n"
+
+#: src/readelf.c:5644 src/readelf.c:8941
#, c-format
-msgid " %s..%s (%<PRIx64>)\n"
-msgstr " %s..%s (%<PRIx64>)\n"
+msgid " Unknown CU base: "
+msgstr ""
-#: src/readelf.c:4949
+#: src/readelf.c:5646 src/readelf.c:8943
#, c-format
-msgid " %s..%s\n"
-msgstr " %s..%s\n"
+msgid " CU [%6<PRIx64>] base: "
+msgstr ""
-#: src/readelf.c:4958
+#: 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%<PRIx64>:\n"
+msgstr " ЗміщеннÑ: 0x%<PRIx64>\n"
+
+#: src/readelf.c:5719
+#, fuzzy, c-format
+msgid "invalid range list data"
+msgstr "некоректні дані"
+
+#: src/readelf.c:5904 src/readelf.c:9252
+#, fuzzy, c-format
+msgid ""
+" %zu padding bytes\n"
+"\n"
msgstr " %zu байтів доповненнÑ\n"
-#: src/readelf.c:4976
+#: src/readelf.c:5921
#, c-format
msgid "cannot get .debug_ranges content: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані .debug_ranges: %s"
-#: src/readelf.c:5006 src/readelf.c:7074
+#: src/readelf.c:5957 src/readelf.c:9307
#, c-format
-msgid " [%6tx] <INVALID DATA>\n"
-msgstr " [%6tx] <ÐЕКОРЕКТÐІ ДÐÐІ>\n"
+msgid ""
+"\n"
+" Unknown CU base: "
+msgstr ""
-#: src/readelf.c:5028 src/readelf.c:7096
+#: src/readelf.c:5959 src/readelf.c:9309
#, c-format
-msgid " [%6tx] base address %s\n"
-msgstr " [%6tx] базова адреÑа %s\n"
+msgid ""
+"\n"
+" CU [%6<PRIx64>] base: "
+msgstr ""
-#: src/readelf.c:5035 src/readelf.c:7103
+#: src/readelf.c:5968 src/readelf.c:9335 src/readelf.c:9361
#, c-format
-msgid " [%6tx] empty list\n"
-msgstr " [%6tx] порожній ÑпиÑок\n"
+msgid " [%6tx] <INVALID DATA>\n"
+msgstr " [%6tx] <ÐЕКОРЕКТÐІ ДÐÐІ>\n"
-#. We have an address range entry.
-#. First address range entry in a list.
-#: src/readelf.c:5046
-#, 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:5048
-#, 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:5284
+#: src/readelf.c:6252
msgid " <INVALID DATA>\n"
msgstr " <ÐЕКОРЕКТÐІ ДÐÐІ>\n"
-#: src/readelf.c:5537
+#: src/readelf.c:6505
#, c-format
msgid "cannot get ELF: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ ELF: %s"
-#: src/readelf.c:5554
+#: src/readelf.c:6523
#, c-format
msgid ""
"\n"
@@ -5114,7 +5248,7 @@ msgstr ""
"\n"
"Розділ відомоÑтей щодо вікна викликів [%2zu] «%s» за зміщеннÑм %#<PRIx64>:\n"
-#: src/readelf.c:5604
+#: src/readelf.c:6573
#, c-format
msgid ""
"\n"
@@ -5123,50 +5257,65 @@ msgstr ""
"\n"
" [%6tx] нульовий переривач\n"
-#: src/readelf.c:5697 src/readelf.c:5852
+#: src/readelf.c:6666 src/readelf.c:6820
#, c-format
msgid "invalid augmentation length"
msgstr "некоректна довжина збільшеннÑ"
-#: src/readelf.c:5712
+#: src/readelf.c:6681
msgid "FDE address encoding: "
msgstr "ÐšÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð°Ð´Ñ€ÐµÑи FDE: "
-#: src/readelf.c:5718
+#: src/readelf.c:6687
msgid "LSDA pointer encoding: "
msgstr "ÐšÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð²ÐºÐ°Ð·Ñ–Ð²Ð½Ð¸ÐºÐ° LSDA: "
-#: src/readelf.c:5829
+#: src/readelf.c:6797
#, c-format
msgid " (offset: %#<PRIx64>)"
msgstr " (зміщеннÑ: %#<PRIx64>)"
-#: src/readelf.c:5836
+#: src/readelf.c:6804
#, c-format
msgid " (end offset: %#<PRIx64>)"
msgstr " (Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð²Ñ–Ð´ кінцÑ: %#<PRIx64>)"
-#: src/readelf.c:5873
+#: src/readelf.c:6841
#, c-format
msgid " %-26sLSDA pointer: %#<PRIx64>\n"
msgstr " %-26sвказівник LSDA: %#<PRIx64>\n"
-#: src/readelf.c:5928
-#, c-format
-msgid "cannot get attribute code: %s"
+#: src/readelf.c:6926
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute code: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ код атрибута: %s"
-#: src/readelf.c:5937
-#, c-format
-msgid "cannot get attribute form: %s"
+#: src/readelf.c:6936
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute form: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ форму атрибута: %s"
-#: src/readelf.c:5952
-#, c-format
-msgid "cannot get attribute value: %s"
+#: src/readelf.c:6958
+#, fuzzy, c-format
+msgid "DIE [%<PRIx64>] cannot get attribute '%s' (%s) value: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚Ð°: %s"
-#: src/readelf.c:6254
+#: src/readelf.c:7291
+#, fuzzy, c-format
+msgid "invalid file (%<PRId64>): %s"
+msgstr "некоректний файл"
+
+#: src/readelf.c:7295
+#, fuzzy, c-format
+msgid "no srcfiles for CU [%<PRIx64>]"
+msgstr " вÑтановити файл у %<PRIu64>\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"
@@ -5177,20 +5326,25 @@ msgstr ""
"Розділ DWARF [%2zu] «%s» за зміщеннÑм %#<PRIx64>:\n"
" [ЗміщеннÑ]\n"
-#: src/readelf.c:6286
-#, 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 %<PRIu64>:\n"
" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
"%<PRIu8>, Offset size: %<PRIu8>\n"
-" Type signature: %#<PRIx64>, Type offset: %#<PRIx64>\n"
+" Type signature: %#<PRIx64>, Type offset: %#<PRIx64> [%<PRIx64>]\n"
msgstr ""
" Модуль типів за зміщеннÑм %<PRIu64>:\n"
" ВерÑÑ–Ñ: %<PRIu16>, Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»Ñƒ Ñкорочень: %<PRIu64>, ÐдреÑа: %<PRIu8>, "
"ЗміщеннÑ: %<PRIu8>\n"
" ÐŸÑ–Ð´Ð¿Ð¸Ñ Ñ‚Ð¸Ð¿Ñƒ: %#<PRIx64>, Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ‚Ð¸Ð¿Ñƒ: %#<PRIx64>\n"
-#: src/readelf.c:6295
+#: src/readelf.c:7603
#, c-format
msgid ""
" Compilation unit at offset %<PRIu64>:\n"
@@ -5201,33 +5355,49 @@ msgstr ""
" ВерÑÑ–Ñ: %<PRIu16>, Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»Ñƒ Ñкорочень: %<PRIu64>, ÐдреÑа: %<PRIu8>, "
"ЗміщеннÑ: %<PRIu8>\n"
-#: src/readelf.c:6320
+#: src/readelf.c:7613 src/readelf.c:7776
#, c-format
-msgid "cannot get DIE at offset %<PRIu64> in section '%s': %s"
-msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ DIE за зміщеннÑм %<PRIu64> у розділі «%s»: %s"
+msgid " Unit type: %s (%<PRIu8>)"
+msgstr ""
+
+#: src/readelf.c:7640
+#, c-format
+msgid "unknown version (%d) or unit type (%d)"
+msgstr ""
-#: src/readelf.c:6334
+#: src/readelf.c:7669
#, c-format
msgid "cannot get DIE offset: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ DIE: %s"
-#: src/readelf.c:6343
-#, c-format
-msgid "cannot get tag of DIE at offset %<PRIu64> in section '%s': %s"
+#: src/readelf.c:7678
+#, fuzzy, c-format
+msgid "cannot get tag of DIE at offset [%<PRIx64>] in section '%s': %s"
msgstr ""
"не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ мітку DIE за зміщеннÑм %<PRIu64> у розділі «%s»: %s"
-#: src/readelf.c:6375
+#: src/readelf.c:7716
#, c-format
msgid "cannot get next DIE: %s\n"
msgstr "не вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ наÑтупний DIE: %s\n"
-#: src/readelf.c:6383
+#: src/readelf.c:7724
#, c-format
msgid "cannot get next DIE: %s"
msgstr "не вдалоÑÑ Ð²Ð¸Ð·Ð½Ð°Ñ‡Ð¸Ñ‚Ð¸ наÑтупний DIE: %s"
-#: src/readelf.c:6419
+#: src/readelf.c:7768
+#, fuzzy, c-format
+msgid ""
+" Split compilation unit at offset %<PRIu64>:\n"
+" Version: %<PRIu16>, Abbreviation section offset: %<PRIu64>, Address size: "
+"%<PRIu8>, Offset size: %<PRIu8>\n"
+msgstr ""
+" Модуль компілÑції за зміщеннÑм %<PRIu64>:\n"
+" ВерÑÑ–Ñ: %<PRIu16>, Ð—Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»Ñƒ Ñкорочень: %<PRIu64>, ÐдреÑа: %<PRIu8>, "
+"ЗміщеннÑ: %<PRIu8>\n"
+
+#: src/readelf.c:7819
#, c-format
msgid ""
"\n"
@@ -5238,25 +5408,32 @@ msgstr ""
"Розділ DWARF [%2zu] «%s» зі зміщеннÑм %#<PRIx64>:\n"
"\n"
-#: src/readelf.c:6528
+#: src/readelf.c:8151
+#, fuzzy, c-format
+msgid "unknown form: %s"
+msgstr "невідома форма %#<PRIx64>"
+
+#: 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:6598
-#, c-format
+#: src/readelf.c:8284
+#, fuzzy, c-format
msgid ""
"\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"
msgstr ""
@@ -5273,12 +5450,27 @@ msgstr ""
"\n"
"Коди операцій:\n"
-#: src/readelf.c:6619
+#: 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:6634
+#: src/readelf.c:8347
#, c-format
msgid " [%*<PRIuFAST8>] %hhu argument\n"
msgid_plural " [%*<PRIuFAST8>] %hhu arguments\n"
@@ -5286,7 +5478,7 @@ msgstr[0] " [%*<PRIuFAST8>] %hhu аргумент\n"
msgstr[1] " [%*<PRIuFAST8>] %hhu аргументи\n"
msgstr[2] " [%*<PRIuFAST8>] %hhu аргументів\n"
-#: src/readelf.c:6642
+#: src/readelf.c:8358
msgid ""
"\n"
"Directory table:"
@@ -5294,17 +5486,29 @@ msgstr ""
"\n"
"Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ ÐºÐ°Ñ‚Ð°Ð»Ð¾Ð³Ñƒ:"
-#: src/readelf.c:6658
+#: 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:6693
+#: src/readelf.c:8529
msgid ""
"\n"
"Line number statements:"
@@ -5312,120 +5516,120 @@ msgstr ""
"\n"
"Оператори номерів Ñ€Ñдків:"
-#: src/readelf.c:6744
+#: src/readelf.c:8552
#, c-format
msgid "invalid maximum operations per instruction is zero"
msgstr "некоректну кількіÑÑ‚ÑŒ операцій на інÑтрукцію прирівнÑно до нулÑ"
-#: src/readelf.c:6780
-#, 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:6785
+#: 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:6805
+#: src/readelf.c:8611
#, c-format
msgid " extended opcode %u: "
msgstr " розширений код операції %u: "
-#: src/readelf.c:6810
+#: src/readelf.c:8616
msgid " end of sequence"
msgstr " кінець поÑлідовноÑÑ‚Ñ–"
-#: src/readelf.c:6829
-#, 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:6856
+#: src/readelf.c:8662
#, c-format
msgid " define new file: dir=%u, mtime=%<PRIu64>, length=%<PRIu64>, name=%s\n"
msgstr ""
" Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ файла: dir=%u, mtime=%<PRIu64>, довжина=%<PRIu64>, назва="
"%s\n"
-#: src/readelf.c:6869
+#: src/readelf.c:8675
#, c-format
msgid " set discriminator to %u\n"
msgstr " вÑтановити Ñ€Ð¾Ð·Ñ€Ñ–Ð·Ð½ÐµÐ½Ð½Ñ Ð´Ð»Ñ %u\n"
#. Unknown, ignore it.
-#: src/readelf.c:6874
+#: src/readelf.c:8680
msgid " unknown opcode"
msgstr " невідомий код операції"
#. Takes no argument.
-#: src/readelf.c:6886
+#: src/readelf.c:8692
msgid " copy"
msgstr " копіÑ"
-#: src/readelf.c:6897
-#, 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:6901
+#: 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:6912
+#: src/readelf.c:8715
#, c-format
msgid " advance line by constant %d to %<PRId64>\n"
msgstr " проÑувати Ñ€Ñдок на Ñталу %d до %<PRId64>\n"
-#: src/readelf.c:6920
+#: src/readelf.c:8723
#, c-format
msgid " set file to %<PRIu64>\n"
msgstr " вÑтановити файл у %<PRIu64>\n"
-#: src/readelf.c:6930
+#: src/readelf.c:8733
#, c-format
msgid " set column to %<PRIu64>\n"
msgstr " вÑтановити Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñтовпчика %<PRIu64>\n"
-#: src/readelf.c:6937
+#: src/readelf.c:8740
#, c-format
msgid " set '%s' to %<PRIuFAST8>\n"
msgstr " вÑтановити «%s» у %<PRIuFAST8>\n"
#. Takes no argument.
-#: src/readelf.c:6943
+#: src/readelf.c:8746
msgid " set basic block flag"
msgstr " вÑтановити прапорець базового блоку"
-#: src/readelf.c:6956
-#, c-format
-msgid " advance address by constant %u to %s, op_index to %u\n"
-msgstr " збільшити адреÑу на Ñталу величину %u до %s, індекÑ_оп до %u\n"
-
-#: src/readelf.c:6960
-#, 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:6978
-#, 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:6987
+#: src/readelf.c:8786
msgid " set prologue end flag"
msgstr " вÑтановити прапорець ÐºÑ–Ð½Ñ†Ñ Ð²Ñтупу"
#. Takes no argument.
-#: src/readelf.c:6992
+#: src/readelf.c:8791
msgid " set epilogue begin flag"
msgstr " вÑтановити прапорець початку епілогу"
-#: src/readelf.c:7001
+#: src/readelf.c:8800
#, c-format
msgid " set isa to %u\n"
msgstr " вÑтановити isa у %u\n"
@@ -5433,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:7010
+#: src/readelf.c:8809
#, c-format
msgid " unknown opcode with %<PRIu8> parameter:"
msgid_plural " unknown opcode with %<PRIu8> parameters:"
@@ -5441,103 +5645,97 @@ msgstr[0] " невідомий код операції з %<PRIu8> парамеÑ
msgstr[1] " невідомий код операції з %<PRIu8> параметрами:"
msgstr[2] " невідомий код операції з %<PRIu8> параметрами:"
-#: src/readelf.c:7042
-#, 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:7117
-#, 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:7119
+#: 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:7126 src/readelf.c:8077
+#: src/readelf.c:9476 src/readelf.c:10490
msgid " <INVALID DATA>\n"
msgstr " <ÐЕКОРЕКТÐІ ДÐÐІ>\n"
-#: src/readelf.c:7178 src/readelf.c:7340
+#: src/readelf.c:9530 src/readelf.c:9693
#, c-format
msgid "cannot get macro information section data: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані розділу відомоÑтей щодо макроÑів: %s"
-#: src/readelf.c:7258
+#: src/readelf.c:9610
#, c-format
msgid "%*s*** non-terminated string at end of section"
msgstr "%*s*** незавершений Ñ€Ñдок наприкінці розділу"
-#: src/readelf.c:7281
+#: 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:7381
+#: src/readelf.c:9734
#, c-format
msgid " Offset: 0x%<PRIx64>\n"
msgstr " ЗміщеннÑ: 0x%<PRIx64>\n"
-#: src/readelf.c:7393
+#: src/readelf.c:9746
#, c-format
msgid " Version: %<PRIu16>\n"
msgstr " ВерÑÑ–Ñ: %<PRIu16>\n"
-#: src/readelf.c:7399 src/readelf.c:8196
+#: src/readelf.c:9752 src/readelf.c:10609
#, c-format
msgid " unknown version, cannot parse section\n"
msgstr " невідома верÑÑ–Ñ, не вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ розділ\n"
-#: src/readelf.c:7406
+#: src/readelf.c:9759
#, c-format
msgid " Flag: 0x%<PRIx8>\n"
msgstr " Прапорець: 0x%<PRIx8>\n"
-#: src/readelf.c:7409
+#: src/readelf.c:9762
#, c-format
msgid " Offset length: %<PRIu8>\n"
msgstr " Довжина зміщеннÑ: %<PRIu8>\n"
-#: src/readelf.c:7417
+#: src/readelf.c:9770
#, c-format
msgid " .debug_line offset: 0x%<PRIx64>\n"
msgstr " Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ .debug_line: 0x%<PRIx64>\n"
-#: src/readelf.c:7430
+#: src/readelf.c:9795
#, c-format
msgid " extension opcode table, %<PRIu8> items:\n"
msgstr " Ñ‚Ð°Ð±Ð»Ð¸Ñ†Ñ ÐºÐ¾Ð´Ñ–Ð² операцій розширень, запиÑів — %<PRIu8>:\n"
-#: src/readelf.c:7437
+#: src/readelf.c:9802
#, c-format
msgid " [%<PRIx8>]"
msgstr " [%<PRIx8>]"
-#: src/readelf.c:7449
+#: src/readelf.c:9814
#, c-format
msgid " %<PRIu8> arguments:"
msgstr " %<PRIu8> аргументів:"
-#: src/readelf.c:7477
+#: src/readelf.c:9829
#, c-format
msgid " no arguments."
msgstr " немає аргументів."
-#: src/readelf.c:7777
-#, c-format
-msgid "vendor opcode not verified?"
-msgstr "код операції поÑтачальника не перевірено?"
-
-#: src/readelf.c:7805
+#: src/readelf.c:10030
#, c-format
msgid " [%5d] DIE offset: %6<PRId64>, CU DIE offset: %6<PRId64>, name: %s\n"
msgstr ""
" [%5d] Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ DIE: %6<PRId64>, Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ CU DIE: %6<PRId64>, назва: %s\n"
-#: src/readelf.c:7846
+#: src/readelf.c:10072
#, c-format
msgid ""
"\n"
@@ -5548,12 +5746,41 @@ msgstr ""
"Розділ DWARF [%2zu] «%s» зі зміщеннÑм %#<PRIx64>:\n"
" %*s РÑдок\n"
-#: src/readelf.c:7860
-#, 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:7880
+#: 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<PRIu64>\n"
+msgstr ""
+"\n"
+" Довжина: %6<PRIu64>\n"
+
+#: src/readelf.c:10216
+#, fuzzy, c-format
+msgid " Offset size: %8<PRIu8>\n"
+msgstr " Довжина зміщеннÑ: %<PRIu8>\n"
+
+#: src/readelf.c:10230
+#, fuzzy, c-format
+msgid " DWARF version: %8<PRIu16>\n"
+msgstr " верÑÑ–Ñ DWARF: %6<PRIuFAST16>\n"
+
+#: src/readelf.c:10239
+#, fuzzy, c-format
+msgid " Padding: %8<PRIx16>\n"
+msgstr ""
+"\n"
+" Довжина: %6<PRIu64>\n"
+
+#: src/readelf.c:10293
#, c-format
msgid ""
"\n"
@@ -5562,7 +5789,7 @@ msgstr ""
"\n"
"Розділ таблиці пошуку вікон виклику [%2zu] '.eh_frame_hdr':\n"
-#: src/readelf.c:7982
+#: src/readelf.c:10395
#, c-format
msgid ""
"\n"
@@ -5571,22 +5798,22 @@ msgstr ""
"\n"
"Розділ таблиці обробки виключень [%2zu] '.gcc_except_table':\n"
-#: src/readelf.c:8005
+#: src/readelf.c:10418
#, c-format
msgid " LPStart encoding: %#x "
msgstr " ÐšÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ LPStart: %#x "
-#: src/readelf.c:8017
+#: src/readelf.c:10430
#, c-format
msgid " TType encoding: %#x "
msgstr " ÐšÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ TType: %#x "
-#: src/readelf.c:8032
+#: src/readelf.c:10445
#, c-format
msgid " Call site encoding: %#x "
msgstr " ÐšÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼Ñ–ÑÑ†Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ:%#x "
-#: src/readelf.c:8045
+#: src/readelf.c:10458
msgid ""
"\n"
" Call site table:"
@@ -5594,7 +5821,7 @@ msgstr ""
"\n"
" Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ð¼Ñ–ÑÑ†Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ:"
-#: src/readelf.c:8059
+#: src/readelf.c:10472
#, c-format
msgid ""
" [%4u] Call site start: %#<PRIx64>\n"
@@ -5607,12 +5834,12 @@ msgstr ""
" МіÑце заÑтоÑуваннÑ: %#<PRIx64>\n"
" ДіÑ: %u\n"
-#: src/readelf.c:8132
+#: src/readelf.c:10545
#, c-format
msgid "invalid TType encoding"
msgstr "некоректне ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ TType"
-#: src/readelf.c:8158
+#: src/readelf.c:10571
#, c-format
msgid ""
"\n"
@@ -5621,37 +5848,37 @@ msgstr ""
"\n"
"Розділ GDB [%2zu] «%s» за зміщеннÑм %#<PRIx64> міÑтить %<PRId64> байтів:\n"
-#: src/readelf.c:8187
+#: src/readelf.c:10600
#, c-format
msgid " Version: %<PRId32>\n"
msgstr " ВерÑÑ–Ñ: %<PRId32>\n"
-#: src/readelf.c:8205
+#: src/readelf.c:10618
#, c-format
msgid " CU offset: %#<PRIx32>\n"
msgstr " Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ CU: %#<PRIx32>\n"
-#: src/readelf.c:8212
+#: src/readelf.c:10625
#, c-format
msgid " TU offset: %#<PRIx32>\n"
msgstr " Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ TU: %#<PRIx32>\n"
-#: src/readelf.c:8219
+#: src/readelf.c:10632
#, c-format
msgid " address offset: %#<PRIx32>\n"
msgstr " Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð°Ð´Ñ€ÐµÑи: %#<PRIx32>\n"
-#: src/readelf.c:8226
+#: src/readelf.c:10639
#, c-format
msgid " symbol offset: %#<PRIx32>\n"
msgstr " Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñимволу: %#<PRIx32>\n"
-#: src/readelf.c:8233
+#: src/readelf.c:10646
#, c-format
msgid " constant offset: %#<PRIx32>\n"
msgstr " Ñтале зміщеннÑ: %#<PRIx32>\n"
-#: src/readelf.c:8247
+#: src/readelf.c:10660
#, c-format
msgid ""
"\n"
@@ -5660,7 +5887,7 @@ msgstr ""
"\n"
" СпиÑок CU зі зміщеннÑм %#<PRIx32> міÑтить %zu запиÑів:\n"
-#: src/readelf.c:8272
+#: src/readelf.c:10685
#, c-format
msgid ""
"\n"
@@ -5669,7 +5896,7 @@ msgstr ""
"\n"
" СпиÑок TU зі зміщеннÑм %#<PRIx32> міÑтить %zu запиÑів:\n"
-#: src/readelf.c:8301
+#: src/readelf.c:10714
#, c-format
msgid ""
"\n"
@@ -5678,7 +5905,7 @@ msgstr ""
"\n"
" СпиÑок Ð°Ð´Ñ€ÐµÑ Ð·Ñ– зміщеннÑм %#<PRIx32> міÑтить %zu запиÑів:\n"
-#: src/readelf.c:8334
+#: src/readelf.c:10746
#, c-format
msgid ""
"\n"
@@ -5687,17 +5914,18 @@ msgstr ""
"\n"
" Ð¢Ð°Ð±Ð»Ð¸Ñ†Ñ Ñимволів за зміщеннÑм %#<PRIx32> міÑтить %zu позицій:\n"
-#: src/readelf.c:8421
+#: src/readelf.c:10884
#, c-format
msgid "cannot get debug context descriptor: %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ деÑкриптор контекÑту зневаджуваннÑ: %s"
-#: src/readelf.c:8577 src/readelf.c:9199 src/readelf.c:9310 src/readelf.c:9368
+#: 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:8940
+#: src/readelf.c:11610
#, c-format
msgid ""
"\n"
@@ -5706,21 +5934,21 @@ msgstr ""
"\n"
"%*s... <повторюєтьÑÑ %u разів> ..."
-#: src/readelf.c:9447
+#: src/readelf.c:12117
msgid " Owner Data size Type\n"
msgstr " ВлаÑник Розм. даних Тип\n"
-#: src/readelf.c:9465
+#: src/readelf.c:12135
#, c-format
msgid " %-13.*s %9<PRId32> %s\n"
msgstr " %-13.*s %9<PRId32> %s\n"
-#: src/readelf.c:9515
-#, 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:9542
+#: src/readelf.c:12212
#, c-format
msgid ""
"\n"
@@ -5730,7 +5958,7 @@ msgstr ""
"Розділ запиÑів (note) [%2zu] «%s» з %<PRIu64> байтів за зміщеннÑм "
"%#0<PRIx64>:\n"
-#: src/readelf.c:9565
+#: src/readelf.c:12235
#, c-format
msgid ""
"\n"
@@ -5739,7 +5967,7 @@ msgstr ""
"\n"
"Сегмент запиÑів з %<PRIu64> байтів за зміщеннÑм %#0<PRIx64>:\n"
-#: src/readelf.c:9611
+#: src/readelf.c:12281
#, c-format
msgid ""
"\n"
@@ -5748,12 +5976,12 @@ msgstr ""
"\n"
"У розділі [%zu] «%s» не міÑтитьÑÑ Ð´Ð°Ð½Ð¸Ñ… Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð´Ð°Ð¼Ð¿Ñƒ.\n"
-#: src/readelf.c:9638 src/readelf.c:9689
+#: 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:9643
+#: src/readelf.c:12313
#, c-format
msgid ""
"\n"
@@ -5762,7 +5990,7 @@ msgstr ""
"\n"
"ШіÑÑ‚. дамп розділу [%zu] «%s», %<PRIu64> байтів за зміщеннÑм %#0<PRIx64>:\n"
-#: src/readelf.c:9648
+#: src/readelf.c:12318
#, fuzzy, c-format
msgid ""
"\n"
@@ -5772,7 +6000,7 @@ msgstr ""
"\n"
"ШіÑÑ‚. дамп розділу [%zu] «%s», %<PRIu64> байтів за зміщеннÑм %#0<PRIx64>:\n"
-#: src/readelf.c:9662
+#: src/readelf.c:12332
#, c-format
msgid ""
"\n"
@@ -5781,7 +6009,7 @@ msgstr ""
"\n"
"У розділі [%zu] «%s» не міÑтитьÑÑ Ñ€Ñдків Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð´Ð°Ð¼Ð¿Ñƒ.\n"
-#: src/readelf.c:9694
+#: src/readelf.c:12364
#, c-format
msgid ""
"\n"
@@ -5790,7 +6018,7 @@ msgstr ""
"\n"
"Розділ Ñ€Ñдків [%zu] «%s» міÑтить %<PRIu64> байтів за зміщеннÑм %#0<PRIx64>:\n"
-#: src/readelf.c:9699
+#: src/readelf.c:12369
#, fuzzy, c-format
msgid ""
"\n"
@@ -5800,7 +6028,7 @@ msgstr ""
"\n"
"Розділ Ñ€Ñдків [%zu] «%s» міÑтить %<PRIu64> байтів за зміщеннÑм %#0<PRIx64>:\n"
-#: src/readelf.c:9748
+#: src/readelf.c:12418
#, c-format
msgid ""
"\n"
@@ -5809,7 +6037,7 @@ msgstr ""
"\n"
"розділу [%lu] не Ñ–Ñнує"
-#: src/readelf.c:9777
+#: src/readelf.c:12447
#, c-format
msgid ""
"\n"
@@ -5818,12 +6046,12 @@ msgstr ""
"\n"
"розділу «%s» не Ñ–Ñнує"
-#: src/readelf.c:9834
+#: src/readelf.c:12504
#, c-format
msgid "cannot get symbol index of archive '%s': %s"
msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ покажчик Ñимволів архіву «%s»: %s"
-#: src/readelf.c:9837
+#: src/readelf.c:12507
#, c-format
msgid ""
"\n"
@@ -5832,7 +6060,7 @@ msgstr ""
"\n"
"У архіві «%s» немає покажчика Ñимволів\n"
-#: src/readelf.c:9841
+#: src/readelf.c:12511
#, c-format
msgid ""
"\n"
@@ -5841,12 +6069,12 @@ msgstr ""
"\n"
"Покажчик архіву «%s» міÑтить %zu запиÑів:\n"
-#: src/readelf.c:9859
+#: src/readelf.c:12529
#, c-format
msgid "cannot extract member at offset %zu in '%s': %s"
msgstr "не вдалоÑÑ Ð²Ð¸Ð´Ð¾Ð±ÑƒÑ‚Ð¸ елемент за зміщеннÑм %zu у «%s»: %s"
-#: src/readelf.c:9864
+#: src/readelf.c:12534
#, c-format
msgid "Archive member '%s' contains:\n"
msgstr "Елемент архіву «%s» міÑтить:\n"
@@ -5922,63 +6150,63 @@ msgstr " (прикл. %s)"
msgid "(TOTALS)\n"
msgstr "(ЗÐГÐЛОМ)\n"
-#: src/stack.c:482
+#: src/stack.c:483
#, c-format
msgid "-p PID should be a positive process id."
msgstr "PID у -p PID має бути додатним значеннÑм ідентифікатора процеÑу."
-#: src/stack.c:488
+#: src/stack.c:489
#, c-format
msgid "Cannot open core file '%s'"
msgstr "Ðе вдалоÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ файл дампу Ñдра «%s»"
-#: src/stack.c:548
+#: src/stack.c:549
#, c-format
msgid "-n MAXFRAMES should be 0 or higher."
msgstr "MAXFRAMES у -n має бути значеннÑм рівним 0 або більшим."
-#: src/stack.c:560
+#: src/stack.c:561
#, c-format
msgid "-e EXEC needs a core given by --core."
msgstr "Ð”Ð»Ñ -e EXEC Ñлід вказати Ñдро за допомогою --core."
-#: src/stack.c:564
+#: src/stack.c:565
#, c-format
msgid "-1 needs a thread id given by -p."
msgstr "-1 Ñлід передати ідентифікатор потоку виконаннÑ, заданого -p."
-#: src/stack.c:568
+#: 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:638
+#: src/stack.c:641
msgid "Show stack of process PID"
msgstr "ВивеÑти Ñтек PID процеÑу"
-#: src/stack.c:640
+#: src/stack.c:643
msgid "Show stack found in COREFILE"
msgstr "ВивеÑти Ñтек, знайдений у COREFILE"
-#: src/stack.c:641
+#: src/stack.c:644
msgid "(optional) EXECUTABLE that produced COREFILE"
msgstr "(необов’Ñзковий) EXECUTABLE, Ñким Ñтворено COREFILE"
-#: src/stack.c:645
+#: src/stack.c:648
msgid "Output selection options:"
msgstr "Параметри вибору виведених даних:"
-#: src/stack.c:647
+#: src/stack.c:650
msgid "Additionally show frame activation"
msgstr "Додатково вивеÑти активацію вікна"
-#: src/stack.c:649
+#: src/stack.c:652
msgid "Additionally try to lookup DWARF debuginfo name for frame address"
msgstr ""
"Додатково Ñпробувати визначити назву файла даних діагноÑтики DWARF Ð´Ð»Ñ "
"адреÑи вікна"
-#: src/stack.c:652
+#: src/stack.c:655
msgid ""
"Additionally show inlined function frames using DWARF debuginfo if available "
"(implies -d)"
@@ -5986,15 +6214,15 @@ msgstr ""
"Додатково вивеÑти вікна вбудованих функцій за допомогою даних діагноÑтики "
"DWARF, Ñкщо такі Ñ” (викориÑтовуєтьÑÑ Ñ– -d)"
-#: src/stack.c:654
+#: src/stack.c:657
msgid "Additionally show module file information"
msgstr "Додатково вивеÑти дані щодо файла модулÑ"
-#: src/stack.c:656
+#: src/stack.c:659
msgid "Additionally show source file information"
msgstr "Додатково вивеÑти дані щодо файла початкового коду"
-#: src/stack.c:658
+#: src/stack.c:661
msgid ""
"Show all additional information (activation, debugname, inlines, module and "
"source)"
@@ -6002,55 +6230,58 @@ msgstr ""
"ВивеÑти уÑÑ– додаткові дані (активацію, назву у ÑиÑтемі діагноÑтики, "
"вбудовані функції, модуль і початковий файл)"
-#: src/stack.c:660
+#: src/stack.c:663
msgid "Do not resolve address to function symbol name"
msgstr "Ðе розгортати адреÑу до назви Ñимволу функції"
-#: src/stack.c:662
+#: src/stack.c:665
msgid "Show raw function symbol names, do not try to demangle names"
msgstr ""
"ВивеÑти назви Ñимволів функцій без обробки, не намагатиÑÑ Ñ€Ð¾Ð·ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ñ‚Ð¸ назви"
-#: src/stack.c:664
+#: src/stack.c:667
msgid "Show module build-id, load address and pc offset"
msgstr "Виводити ідентифікатор збираннÑ, адреÑу Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶ÐµÐ½Ð½Ñ Ñ‚Ð° зÑув модулÑ"
-#: src/stack.c:666
+#: src/stack.c:669
msgid "Show the backtrace of only one thread"
msgstr "Виводити зворотне траÑÑƒÐ²Ð°Ð½Ð½Ñ Ð»Ð¸ÑˆÐµ одного потоку"
-#: src/stack.c:668
+#: src/stack.c:671
msgid "Show at most MAXFRAMES per thread (default 256, use 0 for unlimited)"
msgstr ""
"Виводити не більше MAXFRAMES на потік Ð²Ð¸ÐºÐ¾Ð½Ð°Ð½Ð½Ñ (типове Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ 256, 0 — не "
"обмежувати)"
-#: src/stack.c:670
+#: src/stack.c:673
msgid "Show module memory map with build-id, elf and debug files detected"
msgstr ""
"ВивеÑти карту пам’ÑÑ‚Ñ– Ð¼Ð¾Ð´ÑƒÐ»Ñ Ñ–Ð· виÑвленими ідентифікатором збираннÑ, elf та "
"файлами діагноÑтичних даних"
-#: src/stack.c:678
+#: src/stack.c:681
+#, fuzzy
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 ""
-"ВивеÑти Ñтек Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ потоку у процеÑÑ– або файлі дампу Ñдра.\vПрограма "
-"завершує роботу з кодом виходу 0, Ñкщо уÑÑ– вікна було виведено без помилок. "
-"Якщо деÑкі вікна було показано, але ÑталиÑÑ Ð½ÐµÐºÑ€Ð¸Ñ‚Ð¸Ñ‡Ð½Ñ– помилки, ймовірно "
-"Ñпричинені неповними даними зворотного траÑуваннÑ, програма завершує роботу "
-"з кодом Ð¿Ð¾Ð²ÐµÑ€Ð½ÐµÐ½Ð½Ñ 1. Якщо не вдалоÑÑ Ð²Ð¸Ð²ÐµÑти жодного вікна або ÑталаÑÑ "
-"критична помилка, програма виходить з кодом Ð¿Ð¾Ð²ÐµÑ€Ð½ÐµÐ½Ð½Ñ 2. Якщо програму було "
-"викликано з помилковими або пропущеними аргументами, програма завершить "
-"роботу з кодом виходу 64."
+"ВивеÑти Ñтек Ð´Ð»Ñ ÐºÐ¾Ð¶Ð½Ð¾Ð³Ð¾ потоку у процеÑÑ– або файлі дампу Ñдра.\n"
+"\n"
+"Програма завершує роботу з кодом виходу 0, Ñкщо уÑÑ– вікна було виведено без "
+"помилок. Якщо деÑкі вікна було показано, але ÑталиÑÑ Ð½ÐµÐºÑ€Ð¸Ñ‚Ð¸Ñ‡Ð½Ñ– помилки, "
+"ймовірно Ñпричинені неповними даними зворотного траÑуваннÑ, програма "
+"завершує роботу з кодом Ð¿Ð¾Ð²ÐµÑ€Ð½ÐµÐ½Ð½Ñ 1. Якщо не вдалоÑÑ Ð²Ð¸Ð²ÐµÑти жодного вікна "
+"або ÑталаÑÑ ÐºÑ€Ð¸Ñ‚Ð¸Ñ‡Ð½Ð° помилка, програма виходить з кодом Ð¿Ð¾Ð²ÐµÑ€Ð½ÐµÐ½Ð½Ñ 2. Якщо "
+"програму було викликано з помилковими або пропущеними аргументами, програма "
+"завершить роботу з кодом виходу 64."
-#: src/stack.c:751
+#: src/stack.c:756
#, c-format
msgid "Couldn't show any frames."
msgstr "Ðе вдалоÑÑ Ð²Ð¸Ð²ÐµÑти жодного вікна."
@@ -6688,9 +6919,11 @@ msgstr ""
"[МОДУЛЬ...]"
#: 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 "
@@ -6714,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"
@@ -6755,6 +6990,66 @@ msgstr "Додатково вивеÑти назви функцій"
msgid "Show instances of inlined functions"
msgstr "ВивеÑти екземплÑри вбудованих функцій"
+#~ msgid "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%s+%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%#0*<PRIx64> <%s+%#<PRIx64>>"
+#~ msgstr "%#0*<PRIx64> <%s+%#<PRIx64>>"
+
+#~ msgid "%s+%#<PRIx64> <%s>"
+#~ msgstr "%s+%#<PRIx64> <%s>"
+
+#~ msgid "%s+%#0*<PRIx64> <%s>"
+#~ msgstr "%s+%#0*<PRIx64> <%s>"
+
+#~ msgid "%#<PRIx64> <%s>"
+#~ msgstr "%#<PRIx64> <%s>"
+
+#~ msgid "%#0*<PRIx64> <%s>"
+#~ msgstr "%#0*<PRIx64> <%s>"
+
+#~ msgid "%s+%#<PRIx64>"
+#~ msgstr "%s+%#<PRIx64>"
+
+#~ msgid "%s+%#0*<PRIx64>"
+#~ msgstr "%s+%#0*<PRIx64>"
+
+#~ msgid " %s..%s (%<PRIx64>)\n"
+#~ msgstr " %s..%s (%<PRIx64>)\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 %<PRIu64> in section '%s': %s"
+#~ msgstr "не вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ DIE за зміщеннÑм %<PRIu64> у розділі «%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"
@@ -7266,9 +7561,6 @@ msgstr "ВивеÑти екземплÑри вбудованих функцій"
#~ msgid "unknown user attribute %hx"
#~ msgstr "невідомий атрибут кориÑтувача %hx"
-#~ msgid "unknown form %#<PRIx64>"
-#~ msgstr "невідома форма %#<PRIx64>"
-
#~ 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 54ba767e..6d962bbb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,537 @@
+2018-06-25 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (attr_callback): Only print block as expressions if it
+ isn't DW_FORM_data16.
+
+2018-06-12 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_form_data): Check we have 4, not 2, bytes
+ available for DW_FORM_block4.
+
+2018-06-12 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_form_data): Don't increase strreadp after use.
+ Do increase readp for DW_FORM_strx[1234].
+
+2018-06-16 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_loc_section): Make sure next_off doesn't
+ overflow d_buf.
+
+2018-06-13 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (print_form_data): Don't reuse readp and readendp when
+ reading str_offsets section.
+
+2018-06-10 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_form_data): Don't cast value to ptrdiff_t, cast
+ ptrdiff_t to size_t.
+
+2018-06-08 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (handle_sysv_hash): Don't leak lengths array when
+ detecting an invalid chain.
+ (handle_sysv_hash64): Likewise.
+
+2018-06-05 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_macro_section): Extend vendor array by one
+ to include max DW_MACRO_hi_user opcode.
+
+2018-06-07 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (main): Call __fsetlocking (stdout, FSETLOCKING_BYCALLER).
+
+2018-05-31 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_units): Print the dwo name and id when
+ unable to find a .dwo file.
+
+2018-05-31 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (attr_callback): Only register section_loc when not
+ looking at a split dwarf from a skeleton.
+
+2018-05-30 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_loc_section): Use correct listptr for
+ locview attribute.
+
+2018-05-31 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_units): Check offset against -1 not ~0ul.
+
+2018-05-29 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_loc_section): Handle GNU DebugFission list
+ entries.
+
+2018-05-29 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug): Record and reset section_info status in
+ implicit_debug_sections and print_debug_sections.
+
+2018-05-28 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_units): Turn "Could not find split compile
+ unit" into an Warning instead of an error.
+
+2018-04-29 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (attr_callback): Handle DW_FORM_loclistx and
+ DW_AT_segment.
+
+2018-04-12 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (print_debug): Also recognize .dwo section name variants.
+
+2018-05-15 Dmitry V. Levin <ldv@altlinux.org>
+
+ * elflint.c (check_elf_header): Fix typo in error diagnostics.
+
+2018-05-15 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * addr2line.c (main): Add fflush (stdout) after handle_address ()
+ when reading from stdin.
+
+2018-04-24 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (attr_callback): Handle DW_FORM_ref_sup4 and
+ DW_FORM_ref_sup8 as references.
+
+2018-04-24 Mark Wielaard <mark@klomp.org>
+
+ * 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 <schwab@suse.de>
+
+ * elflint.c (valid_e_machine): Add EM_RISCV.
+
+2018-04-16 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_line_section). In advance_pc, advance
+ using op_addr_advance, not op_advance.
+
+2018-04-14 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Only show errors when not silent.
+
+2018-03-23 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Handle DW_FORM_strx[1234].
+
+2018-03-22 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Handle DW_FORM_addrx[1234].
+
+2018-03-28 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (handle_sysv_hash): Break bucket chain after nchain
+ entries are found.
+ (handle_sysv_hash64): Likewise.
+
+2018-03-27 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Print dwarf_dieoffset as %PRIx64,
+ not %zx.
+
+2018-03-20 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Report error when DW_AT_decl_file or
+ DW_AT_call_file cannot be resolved.
+
+2018-03-06 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * elflint.c (check_group): Make sure we can read a complete
+ element when iterating over the group.
+
+2018-02-09 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (attr_callback): Handle DW_FORM_data16 as Dwarf_Block.
+
+2018-02-09 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <JPEWhacker@gmail.com>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (print_debug_ranges_section): Initialize cu to last_cu.
+ (print_debug_loc_section): Likewise.
+
+2018-01-01 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (print_debug_units): Print DIE offset in error message
+ as hex.
+
+2017-12-18 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (argp_options): Add "section-groups", 'g'.
+
+2017-11-29 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_loc_section): Print CU base and unresolved
+ addresses. Adjust formatting.
+
+2017-11-29 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_ranges_section): Print CU base and unresolved
+ addresses. Adjust formatting.
+
+2017-11-29 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (print_debug_units): Print abbrev code after DIE tag.
+
+2017-11-29 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_ops): Use only2 space for index. re-indent +5
+ for DW_OP_GNU_entry_value.
+
+2017-11-21 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * readelf.c (attr_callback): Print DIE offset in error messages.
+
+2017-11-03 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_ops): Handle DW_OP_GNU_variable_value. Print
+ referenced DIE as offset.
+
+2017-09-10 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * stack.c (main): Replace \v in doc string with \n\n.
+ * unstrip.c (main): Likewise.
+
+2017-05-04 Ulf Hermann <ulf.hermann@qt.io>
+
+ * stack.c: Print pid_t using %lld.
+
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * readelf.c: Hardcode the signal numbers for non-linux systems.
+
2017-07-26 Mark Wielaard <mark@klomp.org>
* readelf.c (print_debug_macro_section): Accept either version 4 or
diff --git a/src/addr2line.c b/src/addr2line.c
index ba414a74..5acafa00 100644
--- a/src/addr2line.c
+++ b/src/addr2line.c
@@ -187,6 +187,7 @@ main (int argc, char *argv[])
buf[chars - 1] = '\0';
result = handle_address (buf, dwfl);
+ fflush (stdout);
}
free (buf);
@@ -618,7 +619,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..818115bd 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 <drepper@redhat.com>, 2005.
@@ -442,7 +442,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 +1056,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 +1068,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 +1088,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 +1307,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 +1465,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 +1538,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/elfcompress.c b/src/elfcompress.c
index 8e0d5c55..25378a45 100644
--- a/src/elfcompress.c
+++ b/src/elfcompress.c
@@ -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;
}
diff --git a/src/elflint.c b/src/elflint.c
index 51e53c23..0a26d97d 100644
--- a/src/elflint.c
+++ b/src/elflint.c
@@ -331,7 +331,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 +376,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)
@@ -1764,7 +1764,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:
@@ -2713,7 +2713,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));
@@ -3993,7 +3993,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"),
@@ -4137,7 +4137,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;
@@ -4336,7 +4336,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/objdump.c b/src/objdump.c
index 860cfac6..0dd9a6aa 100644
--- a/src/objdump.c
+++ b/src/objdump.c
@@ -223,7 +223,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/readelf.c b/src/readelf.c
index 73be474b..faed61a6 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 <drepper@redhat.com>, 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
@@ -36,6 +35,8 @@
#include <locale.h>
#include <stdarg.h>
#include <stdbool.h>
+#include <stdio.h>
+#include <stdio_ext.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
@@ -57,6 +58,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;
@@ -67,6 +82,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[] =
{
@@ -74,6 +96,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 },
@@ -84,6 +109,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,
@@ -97,8 +123,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 },
@@ -139,6 +165,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. */
@@ -201,14 +230,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 */
@@ -218,11 +249,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. */
@@ -276,15 +309,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);
@@ -405,9 +449,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)
@@ -423,7 +476,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;
@@ -439,7 +501,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)
@@ -465,7 +531,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;
@@ -500,6 +566,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;
}
@@ -722,31 +791,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))
@@ -774,11 +821,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. */
@@ -790,7 +868,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. */
@@ -3126,9 +3207,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;
@@ -3183,9 +3273,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;
@@ -3606,9 +3705,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;
@@ -3634,61 +3733,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)
{
@@ -3935,6 +4014,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,
@@ -4074,6 +4209,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)
{
@@ -4091,6 +4259,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,
struct Dwarf_CU *cu, Dwarf_Word len, const unsigned char *data)
@@ -4137,15 +4342,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. */
@@ -4156,8 +4362,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;
@@ -4169,7 +4375,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;
@@ -4180,7 +4386,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);
@@ -4191,7 +4397,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);
@@ -4202,7 +4408,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);
@@ -4213,7 +4419,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;
@@ -4224,7 +4430,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);
@@ -4235,7 +4441,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);
@@ -4246,7 +4452,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);
@@ -4262,12 +4468,32 @@ 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:
start = data;
uint64_t uleb2;
@@ -4275,7 +4501,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);
@@ -4288,7 +4514,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);
@@ -4300,7 +4526,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);
@@ -4308,26 +4534,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);
@@ -4339,7 +4567,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);
@@ -4348,6 +4576,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;
@@ -4363,28 +4592,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. */
@@ -4396,7 +4627,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;
@@ -4404,6 +4635,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. */
@@ -4414,12 +4646,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. */
@@ -4430,6 +4663,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);
@@ -4437,7 +4684,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. */
@@ -4446,7 +4695,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);
@@ -4459,7 +4708,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;
@@ -4468,7 +4717,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;
@@ -4478,7 +4727,7 @@ print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
continue;
invalid:
- printf (gettext ("%*s[%4" PRIuMAX "] %s <TRUNCATED>\n"),
+ printf (gettext ("%*s[%2" PRIuMAX "] %s <TRUNCATED>\n"),
indent, "", (uintmax_t) offset, op_name);
break;
}
@@ -4492,31 +4741,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)
{
@@ -4552,6 +4808,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;
@@ -4564,8 +4829,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)
@@ -4579,7 +4848,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)
{
@@ -4600,7 +4869,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)
@@ -4624,7 +4894,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;
@@ -4659,10 +4930,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)),
@@ -4712,20 +5035,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;
}
@@ -4735,6 +5060,230 @@ print_debug_abbrev_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
}
+static void
+print_debug_addr_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_addr]
+ ?: elf_rawdata (scn, NULL));
+ if (unlikely (data == NULL))
+ {
+ error (0, 0, gettext ("cannot get .debug_addr section data: %s"),
+ elf_errmsg (-1));
+ return;
+ }
+
+ 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 index = 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, index++);
+ 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. */
@@ -4815,7 +5364,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))
{
@@ -4937,18 +5487,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:
@@ -4962,6 +5511,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,
@@ -4969,8 +5914,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"),
@@ -4992,15 +5937,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] <INVALID DATA>\n"), offset);
@@ -5024,30 +5986,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;
}
@@ -5541,7 +6509,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))
{
@@ -5810,14 +6779,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
@@ -5901,6 +6869,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;
@@ -5908,6 +6903,7 @@ struct attrcb_args
Dwarf_Die *die;
int level;
bool silent;
+ bool is_split;
unsigned int version;
unsigned int addrsize;
unsigned int offset_size;
@@ -5920,13 +6916,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;
}
@@ -5934,14 +6933,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;
@@ -5949,23 +6955,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 index;
+ if (dwarf_formudata (attrp, &index) != 0)
+ goto attrval_out;
+ printf (" %*s%-20s (%s) [%" PRIx64 "] ",
+ (int) (level * 2), "", dwarf_attr_name (attr),
+ dwarf_form_name (form), index);
+ }
+ 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);
@@ -5983,15 +7011,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:
@@ -6004,9 +7038,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:;
@@ -6015,6 +7052,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. */
@@ -6029,9 +7067,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:
@@ -6040,14 +7078,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 ? "" : " <WARNING offset too big>");
+ 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),
@@ -6057,18 +7146,90 @@ attr_callback (Dwarf_Attribute *attrp, void *arg)
return DWARF_CB_OK;
case DW_AT_ranges:
+ case DW_AT_start_scope:
{
- bool nlpt = notice_listptr (section_ranges, &known_rangelistptr,
+ 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 ? "" : " <WARNING offset too big>");
+ 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_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 ? "" : " <WARNING offset too big>");
}
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 ? "" : " <WARNING offset too big>");
+ }
+ 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 ? "" : " <WARNING offset too big>");
+ }
+ return DWARF_CB_OK;
+
case DW_AT_language:
valuestr = dwarf_lang_name (num);
break;
@@ -6102,6 +7263,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;
@@ -6115,39 +7319,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 (valuestr == NULL)
+ if (as_hex_id)
{
- printf (" %*s%-20s (%s)",
+ printf (" %*s%-20s (%s) 0x%.16" PRIx64 "\n",
(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);
+ dwarf_form_name (form), 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);
+ 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;
+ }
+
+ /* 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;
@@ -6161,7 +7423,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), flag ? gettext ("yes") : gettext ("no"));
+ dwarf_form_name (form), flag ? yes_str : no_str);
break;
case DW_FORM_flag_present:
@@ -6169,7 +7431,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), gettext ("yes"));
+ dwarf_form_name (form), yes_str);
break;
case DW_FORM_exprloc:
@@ -6177,6 +7439,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;
@@ -6195,7 +7458,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:
@@ -6220,11 +7483,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;
@@ -6232,9 +7500,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;
}
@@ -6247,7 +7515,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)
@@ -6262,73 +7530,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"),
@@ -6340,16 +7675,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;
@@ -6389,9 +7730,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))
+ ?: "<unknown>"));
+ 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);
@@ -6424,23 +7824,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 = "";
@@ -6483,17 +7911,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");
@@ -6502,6 +7930,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)
@@ -6522,8 +8175,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));
@@ -6558,35 +8212,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++;
@@ -6596,22 +8282,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:
@@ -6636,94 +8349,189 @@ 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:"));
- while (*linep != 0)
+ 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 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;
- linep = endp + 1;
+ 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;
}
- /* Skip the final NUL byte. */
- ++linep;
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)
+
+ puts (gettext ("\nFile name table:"));
+ if (version > 4)
{
- /* 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;
+ struct encpair { uint16_t desc; uint16_t form; };
+ struct encpair enc[256];
- /* Then the index. */
- unsigned int diridx;
- if (lineendp - linep < 1)
- goto invalid_unit;
- get_uleb128 (diridx, linep, lineendp);
+ 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);
- /* Next comes the modification time. */
- unsigned int mtime;
- if (lineendp - linep < 1)
- goto invalid_unit;
- get_uleb128 (mtime, linep, lineendp);
+ if (! libdw_valid_user_form (form))
+ goto invalid_data;
- /* Finally the length of the file. */
- unsigned int fsize;
- if (lineendp - linep < 1)
- goto invalid_unit;
- get_uleb128 (fsize, linep, lineendp);
+ enc[i].desc = desc;
+ enc[i].form = form;
- printf (" %-5u %-5u %-9u %-9u %s\n",
- cnt, diridx, mtime, fsize, fname);
- }
- /* Skip the final NUL byte. */
- ++linep;
+ printf ("%s(%s)",
+ dwarf_line_content_description_name (desc),
+ dwarf_form_name (form));
+ if (i + 1 < file_name_format_count)
+ printf (", ");
+ }
+ printf ("]\n");
- puts (gettext ("\nLine number statements:"));
- Dwarf_Word address = 0;
- unsigned int op_index = 0;
- size_t line = 1;
- uint_fast8_t is_stmt = default_is_stmt;
+ uint64_t file_name_count;
+ if ((size_t) (lineendp - linep) < 1)
+ goto invalid_data;
+ get_uleb128 (file_name_count, linep, lineendp);
- /* 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;
+ if (file_name_format_count == 0
+ && file_name_count != 0)
+ goto invalid_data;
- /* 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)
+ 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
{
- 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)
+ puts (gettext (" Entry Dir Time Size Name"));
+ for (unsigned int cnt = 1; *linep != 0; ++cnt)
{
- /* Found the CU. */
- address_size = cudie.cu->address_size;
- break;
+ /* 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);
+
+ /* 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);
+
+ printf (" %-5u %-5u %-9u %-9u %s\n",
+ cnt, diridx, mtime, fsize, fname);
}
+ /* Skip the final NUL byte. */
+ ++linep;
}
+ puts (gettext ("\nLine number statements:"));
+ Dwarf_Word address = 0;
+ unsigned int op_index = 0;
+ size_t line = 1;
+ uint_fast8_t is_stmt = default_is_stmt;
+
/* 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;
@@ -6732,7 +8540,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;
@@ -6775,17 +8583,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)
{
@@ -6825,9 +8631,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;
@@ -6892,15 +8698,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;
@@ -6951,16 +8754,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;
@@ -6974,11 +8773,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;
@@ -7031,11 +8830,439 @@ 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))
{
@@ -7049,35 +9276,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] <INVALID DATA>\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] <INVALID DATA>\n"), offset);
break;
}
Dwarf_Addr begin;
Dwarf_Addr end;
- if (address_size == 8)
+ 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);
@@ -7092,15 +9438,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
@@ -7108,18 +9454,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)
{
@@ -7127,8 +9477,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;
@@ -7172,8 +9523,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));
@@ -7334,8 +9686,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));
@@ -7418,7 +9771,19 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
line_offset);
}
- const unsigned char *vendor[DW_MACRO_hi_user - DW_MACRO_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)
{
@@ -7452,21 +9817,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)
@@ -7501,22 +9853,16 @@ 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);
@@ -7587,26 +9933,22 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
get_uleb128 (u128, readp, readendp);
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);
- // Needs support for reading from supplementary object file.
- printf ("%*s#define <str-at-0x%" PRIx64 ">, line %u (sup)\n",
- level, "", off, u128);
+ 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;
- if (offset_len == 8)
- off = read_8ubyte_unaligned_inc (dbg, readp);
- else
- off = read_4ubyte_unaligned_inc (dbg, readp);
- // Needs support for reading from supplementary object file.
- printf ("%*s#undef <str-at-0x%" PRIx64 ">, line %u (sup)\n",
- level, "", off, u128);
+ 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:
@@ -7616,6 +9958,7 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
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;
@@ -7624,26 +9967,22 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
get_uleb128 (u128, readp, readendp);
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);
- // Needs support for reading indirect string offset table
- printf ("%*s#define <str-at-0x%" PRIx64 ">, line %u (strx)\n",
- level, "", off, u128);
+ 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;
- if (offset_len == 8)
- off = read_8ubyte_unaligned_inc (dbg, readp);
- else
- off = read_4ubyte_unaligned_inc (dbg, readp);
- // Needs support for reading indirect string offset table.
- printf ("%*s#undef <str-at-0x%" PRIx64 ">, line %u (strx)\n",
- level, "", off, u128);
+ 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:
@@ -7659,128 +9998,14 @@ print_debug_macro_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
// 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", val != 0 ? gettext ("yes") : gettext ("no"));
- 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');
}
@@ -7828,10 +10053,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;
@@ -7854,20 +10080,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 index = 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, index++, (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'. */
@@ -8314,12 +10727,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++;
}
@@ -8404,9 +10816,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);
@@ -8422,6 +10885,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;
@@ -8429,6 +11027,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)
@@ -8449,17 +11083,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,
@@ -8477,22 +11124,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);
}
@@ -9226,7 +11896,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 */
@@ -9335,10 +12005,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))
@@ -9349,7 +12019,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)
@@ -9511,9 +12181,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/stack.c b/src/stack.c
index 6f2ff69f..52ae3a86 100644
--- a/src/stack.c
+++ b/src/stack.c
@@ -362,7 +362,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 +419,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 +440,12 @@ print_frames (struct frames *frames, pid_t tid, int dwflerr, const char *what)
else
modname = "<unknown>";
}
- 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 +576,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 +599,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 +678,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 +692,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 +725,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..03d0f133 100644
--- a/src/strings.c
+++ b/src/strings.c
@@ -246,7 +246,7 @@ parse_opt (int key, char *arg,
case 'b':
case 'B':
big_endian = true;
- /* FALLTHROUGH */
+ FALLTHROUGH;
case 'l':
case 'L':
diff --git a/src/unstrip.c b/src/unstrip.c
index 50749093..f368e696 100644
--- a/src/unstrip.c
+++ b/src/unstrip.c
@@ -2383,7 +2383,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 04efdc81..765a874b 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,489 @@
+2018-06-28 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <yhs@fb.com>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * varlocs.c (print_expr): Error on bad DW_OP_GNU_parameter_ref
+ target, do not assert.
+
+2018-06-08 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * varlocs.c (main): Only assert when cfi_debug_bias != 0 if there
+ actually is a cfi_debug.
+
+2018-06-07 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-loc.sh: Fix expected output for startx_length.
+
+2018-06-06 Mark Wielaard <mark@klomp.org>
+
+ * varlocs.c (print_base_type): Use error, not assert when the DIE
+ isn't a base type.
+
+2018-06-02 Mark Wielaard <mark@klomp.org>
+
+ * test-subr.sh (self_test_files_exe): Drop shared libraries.
+ Keep addr2line, elfcmp, objdump and readelf.
+
+2018-05-31 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-types.sh: New test.
+ * Makefile.am (TESTS): Add run-readelf-types.sh.
+ (EXTRA_DIST): Likewise.
+
+2018-05-31 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * get-units-invalid.c (main): Check dwarf_cuoffset and
+ dwarf_dieoffset.
+
+2018-05-29 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * run-readelf-loc.sh: Add GNU DebugFission split-dwarf variant.
+ * run-varlocs.sh: Likewise.
+
+2018-05-29 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-twofiles.sh: Add --debug-dump=loc testcase.
+
+2018-05-28 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-info-plus.sh: New test.
+ * Makefile.am (TESTS): Add run-readelf-info-plus.sh.
+ (EXTRA_DIST): Likewise.
+
+2018-04-29 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-addr.sh: New test.
+ * Makefile.am (TESTS): Add run-readelf-addr.sh.
+ (EXTRA_DIST): Likewise.
+
+2018-04-27 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * run-readelf-loc.sh: Add new testcases.
+
+2018-04-06 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * run-readelf-ranges.sh: New test.
+ * Makefile.am (TESTS): Add run-readelf-ranges.sh.
+ (EXTRA_DIST): Likewise.
+
+2018-05-21 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * get-units-invalid.c (main): Add check for invalid dwarf_ranges.
+ * run-all-dwarf-ranges.sh: Correct expected output.
+
+2018-05-18 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <schwab@suse.de>
+
+ * hello_riscv64.ko.bz2: New file.
+ * run-strip-reloc.sh: Test it.
+ * Makefile.am (EXTRA_DIST): Add it.
+
+2018-04-16 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * run-addrcfi.sh: Adjust expected rule for aarch64 sp.
+
+2018-04-03 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * backtrace-subr.sh (check_native_core): Check if there is any core,
+ if so, use it.
+
+2018-02-15 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <JPEWhacker@gmail.com>
+
+ * elfstrmerge.c (main): Use FALLTHROUGH macro instead of comment.
+
+2018-01-22 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * elfstrmerge.c (main): Initialize and check symtabshdr instead of
+ symtabndx.
+
+2018-01-14 Petr Machata <pmachata@gmail.com>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <dima@secretsauce.net>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * run-readelf-loc.sh: Adjust expected range list output.
+ * run-readelf-zdebug.sh: Likewise.
+
+2017-11-29 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-dwz-multi.sh: Add expected file names.
+ * run-readelf-zdebug-rel.sh: Likewise.
+
+2017-11-29 Mark Wielaard <mark@klomp.org>
+
+ * run-readelf-dwz-multi.sh: Add expected abbrev codes.
+ * run-readelf-zdebug-rel.sh: Likewise.
+
+2017-11-29 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * varlocs.c (main): Fix cfi_debug => cfi_debug_bias typo in assert.
+
+2017-11-10 Mark Wielaard <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * 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 <mark@klomp.org>
+
+ * msg_tst.c: Handle ELF_E_INVALID_ELF.
+
+2017-09-10 Mark Wielaard <mark@klomp.org>
+
+ * run-ar.sh: New test.
+ * Makefile.am (TESTS): Add run-ar.sh.
+ (EXTRA_DIST): Likewise.
+
+2017-08-18 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Drop -rdynamic from deleted_lib_so_LDFLAGS.
+
+2017-04-27 Ulf Hermann <ulf.hermann@qt.io>
+
+ * Makefile.am: Use fpie_CFLAGS and fpic_CFLAGS.
+
+2017-08-08 Dmitry V. Levin <ldv@altlinux.org>
+
+ * run-strip-nothing.sh: Add -s.
+
2017-07-26 Mark Wielaard <mark@klomp.org>
* dwarf-getmacros.c (mac): Use DW_MACRO names instead of DW_MACRO_GNU.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 483f3878..e89163d5 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,15 +38,17 @@ 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 \
@@ -55,7 +57,9 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
getsrc_die strptr newdata elfstrtab dwfl-proc-attach \
elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \
elfgetzdata elfputzdata zstrptr emptyfile vendorelf \
- fillfile dwarf_default_lower_bound
+ 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
@@ -72,9 +76,10 @@ 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 \
@@ -91,10 +96,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 \
@@ -109,10 +117,11 @@ 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 \
@@ -126,6 +135,8 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
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 run-peel-type.sh \
vdsosyms run-readelf-A.sh \
@@ -135,7 +146,13 @@ TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \
run-compress-test.sh \
run-readelf-zdebug.sh run-readelf-zdebug-rel.sh \
- emptyfile vendorelf fillfile dwarf_default_lower_bound
+ 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
@@ -146,8 +163,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
@@ -159,8 +176,9 @@ check_PROGRAMS += $(asm_TESTS)
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 \
@@ -178,7 +196,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.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 \
@@ -188,12 +206,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 \
@@ -224,11 +251,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 \
@@ -262,6 +297,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 \
@@ -284,13 +320,15 @@ 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 \
@@ -329,7 +367,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 run-peel-type.sh \
+ 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 \
@@ -347,7 +386,18 @@ 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
if USE_VALGRIND
valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1'
@@ -430,7 +480,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_no_Wformat = yes
@@ -462,10 +514,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)
@@ -476,7 +528,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)
@@ -486,8 +538,8 @@ 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)
@@ -508,12 +560,22 @@ 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/addrx_constx-4.dwo.bz2 b/tests/addrx_constx-4.dwo.bz2
new file mode 100644
index 00000000..f0bae1cd
--- /dev/null
+++ b/tests/addrx_constx-4.dwo.bz2
Binary files differ
diff --git a/tests/addrx_constx-5.dwo.bz2 b/tests/addrx_constx-5.dwo.bz2
new file mode 100644
index 00000000..a5f4b1a6
--- /dev/null
+++ b/tests/addrx_constx-5.dwo.bz2
Binary files 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include ELFUTILS_HEADER(dw)
+#include <dwarf.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <inttypes.h>
+
+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) ?: "<unknown>",
+ 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/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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <dwarf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+
+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 2c27414f..9c6ba94f 100644
--- a/tests/backtrace-child.c
+++ b/tests/backtrace-child.c
@@ -81,7 +81,6 @@
#include <config.h>
#include <assert.h>
#include <stdlib.h>
-#include <signal.h>
#include <errno.h>
#include <string.h>
#include <pthread.h>
@@ -100,6 +99,7 @@ main (int argc __attribute__ ((unused)), char **argv)
#else /* __linux__ */
#include <sys/ptrace.h>
+#include <signal.h>
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
#define NOINLINE_NOCLONE __attribute__ ((noinline, noclone))
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index 2dc8a9a2..7ff826cd 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -17,7 +17,6 @@
#include <config.h>
#include <assert.h>
-#include <signal.h>
#include <inttypes.h>
#include <stdio_ext.h>
#include <locale.h>
@@ -25,7 +24,6 @@
#include <error.h>
#include <unistd.h>
#include <sys/types.h>
-#include <sys/wait.h>
#include ELFUTILS_HEADER(dwfl)
#ifndef __linux__
@@ -40,6 +38,8 @@ main (int argc __attribute__ ((unused)), char **argv)
#else /* __linux__ */
#include <sys/ptrace.h>
+#include <sys/wait.h>
+#include <signal.h>
#define main cleanup_13_main
#include "cleanup-13.c"
diff --git a/tests/backtrace-subr.sh b/tests/backtrace-subr.sh
index c1f31569..ff42c6ff 100644
--- a/tests/backtrace-subr.sh
+++ b/tests/backtrace-subr.sh
@@ -137,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"
@@ -163,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.c b/tests/backtrace.c
index 21abe8af..f5dd761f 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -127,7 +127,7 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
break;
}
- /* FALLTHRU */
+ FALLTHROUGH;
case 4:
/* Some simple frame unwinders get this wrong and think sigusr2
is calling itself again. Allow it and just pretend there is
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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include ELFUTILS_HEADER(dw)
+#include <dwarf.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+
+/* 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/dwarfcfi.c b/tests/dwarfcfi.c
new file mode 100644
index 00000000..db4a36ff
--- /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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <error.h>
+#include ELFUTILS_HEADER(dw)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.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/elfstrmerge.c b/tests/elfstrmerge.c
index 8d5b53cb..3bb90c42 100644
--- a/tests/elfstrmerge.c
+++ b/tests/elfstrmerge.c
@@ -195,7 +195,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 +210,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 +578,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/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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <dwarf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+
+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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <dwarf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+
+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/hello_riscv64.ko.bz2 b/tests/hello_riscv64.ko.bz2
new file mode 100644
index 00000000..355a5122
--- /dev/null
+++ b/tests/hello_riscv64.ko.bz2
Binary files differ
diff --git a/tests/low_high_pc.c b/tests/low_high_pc.c
index d0f43023..5c6b343c 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
@@ -55,7 +55,9 @@ handle_die (Dwarf_Die *die, void *arg)
const char *name = dwarf_diename (die);
if (name == NULL)
- fail (off, "<no name>", "die without a name");
+ name = "<no name>";
+
+ printf ("[%" PRIx64 "] %s\n", off, name);
Dwarf_Addr lowpc = 0;
Dwarf_Addr highpc = 0;
@@ -101,9 +103,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) ?: "<unknown>";
+ 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 <http://www.gnu.org/licenses/>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <string.h>
-#include <error.h>
-
-#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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include <libelf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <unistd.h>
+
+
+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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <fcntl.h>
+#include <inttypes.h>
+#include <libelf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
+
+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..b923744f
--- /dev/null
+++ b/tests/next_cfi.c
@@ -0,0 +1,131 @@
+/* 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 <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include <assert.h>
+#include <inttypes.h>
+#include <error.h>
+#include ELFUTILS_HEADER(dw)
+#include <dwarf.h>
+#include <argp.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+void
+handle_section (const unsigned char e_ident[],
+ Elf_Scn *scn, const bool is_eh)
+{
+ if (is_eh)
+ printf (".eh_frame\n");
+ else
+ printf (".debug_frame\n");
+
+ 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 (ident, scn, true);
+ if (strcmp (name, ".debug_frame") == 0)
+ handle_section (ident, scn, false);
+ }
+ }
+ }
+
+ elf_end (elf);
+ close (fd);
+
+ return 0;
+}
diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
index 7fc46e58..76db7d2d 100755
--- a/tests/run-addrcfi.sh
+++ b/tests/run-addrcfi.sh
@@ -3561,7 +3561,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 <http://www.gnu.org/licenses/>.
+
+. $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-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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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-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 <http://www.gnu.org/licenses/>.
+
+. $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..87691ae5
--- /dev/null
+++ b/tests/run-dwarfcfi.sh
@@ -0,0 +1,116 @@
+#! /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 <http://www.gnu.org/licenses/>.
+
+. $srcdir/test-subr.sh
+
+# Test files come from run-addrcfi with all sections stripped except
+# the .debug_frame.
+# for i in <testfiles>
+# 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 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-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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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/<built-in>"
+ 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 <http://www.gnu.org/licenses/>.
+
+. $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
index 7fd96e84..668e3161 100755
--- a/tests/run-peel-type.sh
+++ b/tests/run-peel-type.sh
@@ -55,6 +55,7 @@ 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
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 <http://www.gnu.org/licenses/>.
+
+. $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 <foo+0xa>
+ [ 1] 0x0000000000401189 <foo+0x29>
+ [ 2] 0x000000000040118d <foo+0x2d>
+ [ 3] 0x0000000000401194
+ [ 4] 0x0000000000401181 <foo+0x21>
+ [ 5] 0x00000000004011af <baz+0xf>
+ [ 6] 0x00000000004011b1
+ [ 7] 0x00000000004011a0 <baz>
+ [ 8] 0x0000000000401160 <foo>
+ [ 9] 0x00000000004011a0 <baz>
+ [10] 0x000000000040117b <foo+0x1b>
+ [11] 0x000000000040117b <foo+0x1b>
+ [12] 0x0000000000401181 <foo+0x21>
+ [13] 0x0000000000401181 <foo+0x21>
+ [14] 0x000000000040118d <foo+0x2d>
+ [15] 0x0000000000401160 <foo>
+ [16] 0x0000000000401060 <main>
+ [17] 0x000000000040117b <foo+0x1b>
+ [18] 0x0000000000404038 <m>
+
+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 <calc+0x1f>
+ [ 1] 0x00000000004011e4 <calc+0x24>
+ [ 2] 0x0000000000401060 <main>
+ [ 3] 0x0000000000401071 <main+0x11>
+ [ 4] 0x0000000000401074 <main+0x14>
+ [ 5] 0x0000000000401079 <main+0x19>
+ [ 6] 0x00000000004011d3 <calc+0x13>
+ [ 7] 0x0000000000401078 <main+0x18>
+ [ 8] 0x00000000004011a0 <baz>
+ [ 9] 0x0000000000401040
+ [10] 0x0000000000401080 <_start>
+ [11] 0x00000000004011c0 <calc>
+ [12] 0x0000000000401060 <main>
+ [13] 0x00000000004011c0 <calc>
+ [14] 0x00000000004011c8 <calc+0x8>
+ [15] 0x00000000004011d8 <calc+0x18>
+ [16] 0x00000000004011da <calc+0x1a>
+
+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 <foo+0xa>
+ [ 1] 0x0000000000401189 <foo+0x29>
+ [ 2] 0x000000000040118d <foo+0x2d>
+ [ 3] 0x0000000000401194
+ [ 4] 0x0000000000401181 <foo+0x21>
+ [ 5] 0x00000000004011af <baz+0xf>
+ [ 6] 0x00000000004011b1
+ [ 7] 0x00000000004011a0 <baz>
+ [ 8] 0x0000000000401160 <foo>
+ [ 9] 0x00000000004011a0 <baz>
+ [10] 0x000000000040117b <foo+0x1b>
+ [11] 0x000000000040117b <foo+0x1b>
+ [12] 0x0000000000401181 <foo+0x21>
+ [13] 0x0000000000401181 <foo+0x21>
+ [14] 0x000000000040118d <foo+0x2d>
+ [15] 0x0000000000401160 <foo>
+ [16] 0x0000000000401060 <main>
+ [17] 0x000000000040117b <foo+0x1b>
+ [18] 0x0000000000404038 <m>
+
+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 <calc+0x1f>
+ [ 1] 0x00000000004011e4 <calc+0x24>
+ [ 2] 0x0000000000401060 <main>
+ [ 3] 0x0000000000401071 <main+0x11>
+ [ 4] 0x0000000000401074 <main+0x14>
+ [ 5] 0x0000000000401079 <main+0x19>
+ [ 6] 0x00000000004011d3 <calc+0x13>
+ [ 7] 0x0000000000401078 <main+0x18>
+ [ 8] 0x00000000004011a0 <baz>
+ [ 9] 0x0000000000401040
+ [10] 0x0000000000401080 <_start>
+ [11] 0x00000000004011c0 <calc>
+ [12] 0x0000000000401060 <main>
+ [13] 0x00000000004011c0 <calc>
+ [14] 0x00000000004011c8 <calc+0x8>
+ [15] 0x00000000004011d8 <calc+0x18>
+ [16] 0x00000000004011da <calc+0x1a>
+
+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 <http://www.gnu.org/licenses/>.
+
+. $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 23ca944c..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 <main>
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
+ [ 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) yes
type (GNU_ref_alt) [ 3e]
low_pc (addr) 0x00000000004006ac <main>
high_pc (udata) 44 (0x00000000004006d8)
frame_base (exprloc)
- [ 0] call_frame_cfa
+ [ 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 <main>
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
+ [ 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) yes
type (GNU_ref_alt) [ 3e]
low_pc (addr) 0x00000000004006ac <main>
high_pc (udata) 44 (0x00000000004006d8)
frame_base (exprloc)
- [ 0] call_frame_cfa
+ [ 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 <call_foo>
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
+ [ 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) yes
type (GNU_ref_alt) [ 3e]
low_pc (addr) +0x0000000000000670 <call_foo>
high_pc (udata) 23 (+0x0000000000000687)
frame_base (exprloc)
- [ 0] call_frame_cfa
+ [ 0] call_frame_cfa
GNU_all_call_sites (flag_present) yes
- [ 41] formal_parameter
+ [ 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 <call_foo>
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
+ [ 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) yes
type (GNU_ref_alt) [ 3e]
low_pc (addr) +0x0000000000000670 <call_foo>
high_pc (udata) 23 (+0x0000000000000687)
frame_base (exprloc)
- [ 0] call_frame_cfa
+ [ 0] call_frame_cfa
GNU_all_call_sites (flag_present) yes
- [ 41] formal_parameter
+ [ 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 <main>
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
+ [ 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) yes
type (GNU_ref_alt) [ 30]
low_pc (addr) 0x00000000004004ec <main>
high_pc (udata) 18 (0x00000000004004fe)
frame_base (exprloc)
- [ 0] call_frame_cfa
+ [ 0] call_frame_cfa
GNU_all_call_sites (flag_present) yes
- [ 41] formal_parameter
+ [ 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 <http://www.gnu.org/licenses/>.
+
+. $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 <stdio.h>
+#
+# 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 <main>
+ [ 33] special opcode 22: address+0 = 0x100005a4 <main>, line+4 = 5
+ [ 34] set column to 27
+ [ 36] set prologue end flag
+ [ 37] special opcode 19: address+0 = 0x100005a4 <main>, line+1 = 6
+ [ 38] set column to 8
+ [ 3a] special opcode 47: address+8 = 0x100005ac <main+0x8>, line+1 = 7
+ [ 3b] set 'is_stmt' to 0
+ [ 3c] advance line by constant -7 to 0
+ [ 3e] special opcode 32: address+4 = 0x100005b0 <main+0xc>, line+0 = 0
+ [ 3f] set column to 3
+ [ 41] set 'is_stmt' to 1
+ [ 42] special opcode 108: address+24 = 0x100005c8 <main+0x24>, line+6 = 6
+ [ 43] special opcode 76: address+16 = 0x100005d8 <main+0x34>, 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 <main>
+ 6:27 S P 0 0 0 0x00000000100005a4 <main>
+ 7:8 S 0 0 0 0x00000000100005ac <main+0x8>
+ 0:8 0 0 0 0x00000000100005b0 <main+0xc>
+ 6:3 S 0 0 0 0x00000000100005c8 <main+0x24>
+ 8:3 S 0 0 0 0x00000000100005d8 <main+0x34>
+ 8:3 S * 0 0 0 0x00000000100005f7 <main+0x53>
+
+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 <foo>
+ 22:1 S 0 0 0 0x0000000000400510 <foo>
+ 22:3 0 0 0 0x0000000000400510 <foo>
+ 25:6 0 0 0 0x0000000000400514 <foo+0x4>
+ 25:34 S 0 0 0 0x000000000040051a <foo+0xa>
+ 25:3 0 0 0 0x000000000040051a <foo+0xa>
+ 26:34 0 0 0 0x000000000040051e <foo+0xe>
+ 25:1 1 0 0 0x0000000000400528 <foo+0x18>
+ /var/tmp/hello/hello.h (mtime: 0, length: 0)
+ 7:18 S 0 0 0 0x000000000040052b <foo+0x1b>
+ 9:3 S 0 0 0 0x000000000040052b <foo+0x1b>
+ 9:3 0 0 0 0x000000000040052b <foo+0x1b>
+ 10:6 S 0 0 0 0x000000000040052f <foo+0x1f>
+ 10:5 0 0 0 0x000000000040052f <foo+0x1f>
+ 12:7 S 0 0 0 0x0000000000400531 <foo+0x21>
+ /var/tmp/hello/hello.c (mtime: 0, length: 0)
+ 10:3 S 0 0 0 0x0000000000400531 <foo+0x21>
+ 12:3 S 0 0 0 0x0000000000400531 <foo+0x21>
+ 12:3 0 0 0 0x0000000000400531 <foo+0x21>
+ 13:6 S 0 0 0 0x0000000000400535 <foo+0x25>
+ 13:5 0 0 0 0x0000000000400535 <foo+0x25>
+ 15:7 S 0 0 0 0x0000000000400539 <foo+0x29>
+ 22:3 S 0 0 0 0x0000000000400539 <foo+0x29>
+ 22:3 0 0 0 0x0000000000400539 <foo+0x29>
+ 23:6 S 0 0 0 0x000000000040053d <foo+0x2d>
+ 23:5 0 0 0 0x000000000040053d <foo+0x2d>
+ 9:12 S 0 0 0 0x0000000000400550 <baz>
+ 10:1 S 0 0 0 0x0000000000400550 <baz>
+ 12:3 S 0 0 0 0x0000000000400550 <baz>
+ 12:3 0 0 0 0x0000000000400550 <baz>
+ 13:9 0 0 0 0x0000000000400556 <baz+0x6>
+ 15:7 S 0 0 0 0x000000000040055f <baz+0xf>
+ 15:3 0 0 0 0x000000000040055f <baz+0xf>
+ 15:7 * 0 0 0 0x0000000000400560 <baz+0x10>
+
+ 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 <main>
+ 16:1 S 0 0 0 0x0000000000400410 <main>
+ 17:3 S 0 0 0 0x0000000000400410 <main>
+ 15:3 0 0 0 0x0000000000400410 <main>
+ 17:1 0 0 0 0x0000000000400419 <main+0x9>
+ 18:6 S 0 0 0 0x000000000040041e <main+0xe>
+ 18:5 0 0 0 0x000000000040041e <main+0xe>
+ 22:7 S 0 0 0 0x0000000000400421 <main+0x11>
+ 22:3 S * 0 0 0 0x000000000040042f <main+0x1f>
+
+ 6:0 S 0 0 0 0x0000000000400570 <calc>
+ 7:1 S 0 0 0 0x0000000000400570 <calc>
+ 7:3 0 0 0 0x0000000000400570 <calc>
+ 7:6 1 0 0 0x0000000000400575 <calc+0x5>
+ 7:24 0 0 0 0x0000000000400578 <calc+0x8>
+ 10:17 S 0 0 0 0x000000000040057d <calc+0xd>
+ 10:3 0 0 0 0x000000000040057d <calc+0xd>
+ /var/tmp/hello/hello.h (mtime: 0, length: 0)
+ 10:10 0 0 0 0x0000000000400583 <calc+0x13>
+ /var/tmp/hello/world.c (mtime: 0, length: 0)
+ 10:7 0 0 0 0x0000000000400585 <calc+0x15>
+ /var/tmp/hello/hello.h (mtime: 0, length: 0)
+ 7:10 S 0 0 0 0x0000000000400588 <calc+0x18>
+ 9:3 S 0 0 0 0x0000000000400588 <calc+0x18>
+ 10:3 0 0 0 0x0000000000400588 <calc+0x18>
+ 12:7 S 0 0 0 0x000000000040058f <calc+0x1f>
+ 12:3 0 0 0 0x000000000040058f <calc+0x1f>
+ /var/tmp/hello/world.c (mtime: 0, length: 0)
+ 11:10 0 0 0 0x0000000000400598 <calc+0x28>
+ 11:1 * 0 0 0 0x000000000040059a <calc+0x2a>
+
+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 <foo>
+ 22:1 S 0 0 0 0x0000000000400510 <foo>
+ 22:3 0 0 0 0x0000000000400510 <foo>
+ 25:6 0 0 0 0x0000000000400514 <foo+0x4>
+ 25:34 S 0 0 0 0x000000000040051a <foo+0xa>
+ 25:3 0 0 0 0x000000000040051a <foo+0xa>
+ 26:34 0 0 0 0x000000000040051e <foo+0xe>
+ 25:1 1 0 0 0x0000000000400528 <foo+0x18>
+ /var/tmp/hello/hello.h (mtime: 0, length: 0)
+ 7:18 S 0 0 0 0x000000000040052b <foo+0x1b>
+ 9:3 S 0 0 0 0x000000000040052b <foo+0x1b>
+ 9:3 0 0 0 0x000000000040052b <foo+0x1b>
+ 10:6 S 0 0 0 0x000000000040052f <foo+0x1f>
+ 10:5 0 0 0 0x000000000040052f <foo+0x1f>
+ 12:7 S 0 0 0 0x0000000000400531 <foo+0x21>
+ /var/tmp/hello/hello.c (mtime: 0, length: 0)
+ 10:3 S 0 0 0 0x0000000000400531 <foo+0x21>
+ 12:3 S 0 0 0 0x0000000000400531 <foo+0x21>
+ 12:3 0 0 0 0x0000000000400531 <foo+0x21>
+ 13:6 S 0 0 0 0x0000000000400535 <foo+0x25>
+ 13:5 0 0 0 0x0000000000400535 <foo+0x25>
+ 15:7 S 0 0 0 0x0000000000400539 <foo+0x29>
+ 22:3 S 0 0 0 0x0000000000400539 <foo+0x29>
+ 22:3 0 0 0 0x0000000000400539 <foo+0x29>
+ 23:6 S 0 0 0 0x000000000040053d <foo+0x2d>
+ 23:5 0 0 0 0x000000000040053d <foo+0x2d>
+ 9:12 S 0 0 0 0x0000000000400550 <baz>
+ 10:1 S 0 0 0 0x0000000000400550 <baz>
+ 12:3 S 0 0 0 0x0000000000400550 <baz>
+ 12:3 0 0 0 0x0000000000400550 <baz>
+ 13:9 0 0 0 0x0000000000400556 <baz+0x6>
+ 15:7 S 0 0 0 0x000000000040055f <baz+0xf>
+ 15:3 0 0 0 0x000000000040055f <baz+0xf>
+ 15:7 * 0 0 0 0x0000000000400560 <baz+0x10>
+
+ 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 <main>
+ 16:1 S 0 0 0 0x0000000000400410 <main>
+ 17:3 S 0 0 0 0x0000000000400410 <main>
+ 15:3 0 0 0 0x0000000000400410 <main>
+ 17:1 0 0 0 0x0000000000400419 <main+0x9>
+ 18:6 S 0 0 0 0x000000000040041e <main+0xe>
+ 18:5 0 0 0 0x000000000040041e <main+0xe>
+ 22:7 S 0 0 0 0x0000000000400421 <main+0x11>
+ 22:3 S * 0 0 0 0x000000000040042f <main+0x1f>
+
+ 6:0 S 0 0 0 0x0000000000400570 <calc>
+ 7:1 S 0 0 0 0x0000000000400570 <calc>
+ 7:3 0 0 0 0x0000000000400570 <calc>
+ 7:6 1 0 0 0x0000000000400575 <calc+0x5>
+ 7:24 0 0 0 0x0000000000400578 <calc+0x8>
+ 10:17 S 0 0 0 0x000000000040057d <calc+0xd>
+ 10:3 0 0 0 0x000000000040057d <calc+0xd>
+ /var/tmp/hello/hello.h (mtime: 0, length: 0)
+ 10:10 0 0 0 0x0000000000400583 <calc+0x13>
+ /var/tmp/hello/world.c (mtime: 0, length: 0)
+ 10:7 0 0 0 0x0000000000400585 <calc+0x15>
+ /var/tmp/hello/hello.h (mtime: 0, length: 0)
+ 7:10 S 0 0 0 0x0000000000400588 <calc+0x18>
+ 9:3 S 0 0 0 0x0000000000400588 <calc+0x18>
+ 10:3 0 0 0 0x0000000000400588 <calc+0x18>
+ 12:7 S 0 0 0 0x000000000040058f <calc+0x1f>
+ 12:3 0 0 0 0x000000000040058f <calc+0x1f>
+ /var/tmp/hello/world.c (mtime: 0, length: 0)
+ 11:10 0 0 0 0x0000000000400598 <calc+0x28>
+ 11:1 * 0 0 0 0x000000000040059a <calc+0x2a>
+
+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 <foo>
+ [ 8c] special opcode 43: address+0 = 0x400510 <foo>, line+20 = 21
+ [ 8d] set column to 1
+ [ 8f] extended opcode 2: set address to 0x400510 <foo>
+ [ 9a] special opcode 24: address+0 = 0x400510 <foo>, line+1 = 22
+ [ 9b] set column to 3
+ [ 9d] extended opcode 2: set address to 0x400510 <foo>
+ [ a8] set 'is_stmt' to 0
+ [ a9] copy
+ [ aa] set column to 6
+ [ ac] extended opcode 2: set address to 0x400514 <foo+0x4>
+ [ b7] special opcode 26: address+0 = 0x400514 <foo+0x4>, line+3 = 25
+ [ b8] set column to 34
+ [ ba] extended opcode 2: set address to 0x40051a <foo+0xa>
+ [ c5] set 'is_stmt' to 1
+ [ c6] copy
+ [ c7] set column to 3
+ [ c9] extended opcode 2: set address to 0x40051a <foo+0xa>
+ [ d4] set 'is_stmt' to 0
+ [ d5] copy
+ [ d6] set column to 34
+ [ d8] extended opcode 2: set address to 0x40051e <foo+0xe>
+ [ e3] special opcode 24: address+0 = 0x40051e <foo+0xe>, line+1 = 26
+ [ e4] set column to 1
+ [ e6] extended opcode 2: set address to 0x400528 <foo+0x18>
+ [ f1] extended opcode 4: set discriminator to 1
+ [ f5] special opcode 22: address+0 = 0x400528 <foo+0x18>, line-1 = 25
+ [ f6] set column to 18
+ [ f8] extended opcode 2: set address to 0x40052b <foo+0x1b>
+ [ 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 <foo+0x1b>
+ [ 116] special opcode 25: address+0 = 0x40052b <foo+0x1b>, line+2 = 9
+ [ 117] set column to 3
+ [ 119] extended opcode 2: set address to 0x40052b <foo+0x1b>
+ [ 124] set 'is_stmt' to 0
+ [ 125] copy
+ [ 126] set column to 6
+ [ 128] extended opcode 2: set address to 0x40052f <foo+0x1f>
+ [ 133] extended opcode 4: set discriminator to 0
+ [ 137] set 'is_stmt' to 1
+ [ 138] special opcode 24: address+0 = 0x40052f <foo+0x1f>, line+1 = 10
+ [ 139] set column to 5
+ [ 13b] extended opcode 2: set address to 0x40052f <foo+0x1f>
+ [ 146] set 'is_stmt' to 0
+ [ 147] copy
+ [ 148] set column to 7
+ [ 14a] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 155] set 'is_stmt' to 1
+ [ 156] special opcode 25: address+0 = 0x400531 <foo+0x21>, line+2 = 12
+ [ 157] set column to 3
+ [ 159] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 164] set file to 1
+ [ 166] special opcode 21: address+0 = 0x400531 <foo+0x21>, line-2 = 10
+ [ 167] set column to 3
+ [ 169] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 174] special opcode 25: address+0 = 0x400531 <foo+0x21>, line+2 = 12
+ [ 175] set column to 3
+ [ 177] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 182] set 'is_stmt' to 0
+ [ 183] copy
+ [ 184] set column to 6
+ [ 186] extended opcode 2: set address to 0x400535 <foo+0x25>
+ [ 191] set 'is_stmt' to 1
+ [ 192] special opcode 24: address+0 = 0x400535 <foo+0x25>, line+1 = 13
+ [ 193] set column to 5
+ [ 195] extended opcode 2: set address to 0x400535 <foo+0x25>
+ [ 1a0] set 'is_stmt' to 0
+ [ 1a1] copy
+ [ 1a2] set column to 7
+ [ 1a4] extended opcode 2: set address to 0x400539 <foo+0x29>
+ [ 1af] set 'is_stmt' to 1
+ [ 1b0] special opcode 25: address+0 = 0x400539 <foo+0x29>, line+2 = 15
+ [ 1b1] set column to 3
+ [ 1b3] extended opcode 2: set address to 0x400539 <foo+0x29>
+ [ 1be] special opcode 30: address+0 = 0x400539 <foo+0x29>, line+7 = 22
+ [ 1bf] set column to 3
+ [ 1c1] extended opcode 2: set address to 0x400539 <foo+0x29>
+ [ 1cc] set 'is_stmt' to 0
+ [ 1cd] copy
+ [ 1ce] set column to 6
+ [ 1d0] extended opcode 2: set address to 0x40053d <foo+0x2d>
+ [ 1db] set 'is_stmt' to 1
+ [ 1dc] special opcode 24: address+0 = 0x40053d <foo+0x2d>, line+1 = 23
+ [ 1dd] set column to 5
+ [ 1df] extended opcode 2: set address to 0x40053d <foo+0x2d>
+ [ 1ea] set 'is_stmt' to 0
+ [ 1eb] copy
+ [ 1ec] set column to 12
+ [ 1ee] extended opcode 2: set address to 0x400550 <baz>
+ [ 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 <baz>
+ [ 20a] special opcode 24: address+0 = 0x400550 <baz>, line+1 = 10
+ [ 20b] set column to 3
+ [ 20d] extended opcode 2: set address to 0x400550 <baz>
+ [ 218] special opcode 25: address+0 = 0x400550 <baz>, line+2 = 12
+ [ 219] set column to 3
+ [ 21b] extended opcode 2: set address to 0x400550 <baz>
+ [ 226] set 'is_stmt' to 0
+ [ 227] copy
+ [ 228] set column to 9
+ [ 22a] extended opcode 2: set address to 0x400556 <baz+0x6>
+ [ 235] special opcode 24: address+0 = 0x400556 <baz+0x6>, line+1 = 13
+ [ 236] set column to 7
+ [ 238] extended opcode 2: set address to 0x40055f <baz+0xf>
+ [ 243] set 'is_stmt' to 1
+ [ 244] special opcode 25: address+0 = 0x40055f <baz+0xf>, line+2 = 15
+ [ 245] set column to 3
+ [ 247] extended opcode 2: set address to 0x40055f <baz+0xf>
+ [ 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 <main>
+ [ 2bc] special opcode 37: address+0 = 0x400410 <main>, line+14 = 15
+ [ 2bd] set column to 1
+ [ 2bf] extended opcode 2: set address to 0x400410 <main>
+ [ 2ca] special opcode 24: address+0 = 0x400410 <main>, line+1 = 16
+ [ 2cb] set column to 3
+ [ 2cd] extended opcode 2: set address to 0x400410 <main>
+ [ 2d8] special opcode 24: address+0 = 0x400410 <main>, line+1 = 17
+ [ 2d9] set column to 3
+ [ 2db] extended opcode 2: set address to 0x400410 <main>
+ [ 2e6] set 'is_stmt' to 0
+ [ 2e7] special opcode 21: address+0 = 0x400410 <main>, line-2 = 15
+ [ 2e8] set column to 1
+ [ 2ea] extended opcode 2: set address to 0x400419 <main+0x9>
+ [ 2f5] special opcode 25: address+0 = 0x400419 <main+0x9>, line+2 = 17
+ [ 2f6] set column to 6
+ [ 2f8] extended opcode 2: set address to 0x40041e <main+0xe>
+ [ 303] set 'is_stmt' to 1
+ [ 304] special opcode 24: address+0 = 0x40041e <main+0xe>, line+1 = 18
+ [ 305] set column to 5
+ [ 307] extended opcode 2: set address to 0x40041e <main+0xe>
+ [ 312] set 'is_stmt' to 0
+ [ 313] copy
+ [ 314] set column to 7
+ [ 316] extended opcode 2: set address to 0x400421 <main+0x11>
+ [ 321] set 'is_stmt' to 1
+ [ 322] special opcode 27: address+0 = 0x400421 <main+0x11>, 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 <calc>
+ [ 33e] special opcode 28: address+0 = 0x400570 <calc>, line+5 = 6
+ [ 33f] set column to 1
+ [ 341] extended opcode 2: set address to 0x400570 <calc>
+ [ 34c] special opcode 24: address+0 = 0x400570 <calc>, line+1 = 7
+ [ 34d] set column to 3
+ [ 34f] extended opcode 2: set address to 0x400570 <calc>
+ [ 35a] set 'is_stmt' to 0
+ [ 35b] copy
+ [ 35c] set column to 6
+ [ 35e] extended opcode 2: set address to 0x400575 <calc+0x5>
+ [ 369] extended opcode 4: set discriminator to 1
+ [ 36d] copy
+ [ 36e] set column to 24
+ [ 370] extended opcode 2: set address to 0x400578 <calc+0x8>
+ [ 37b] copy
+ [ 37c] set column to 17
+ [ 37e] extended opcode 2: set address to 0x40057d <calc+0xd>
+ [ 389] extended opcode 4: set discriminator to 0
+ [ 38d] set 'is_stmt' to 1
+ [ 38e] special opcode 26: address+0 = 0x40057d <calc+0xd>, line+3 = 10
+ [ 38f] set column to 3
+ [ 391] extended opcode 2: set address to 0x40057d <calc+0xd>
+ [ 39c] set 'is_stmt' to 0
+ [ 39d] copy
+ [ 39e] set column to 10
+ [ 3a0] extended opcode 2: set address to 0x400583 <calc+0x13>
+ [ 3ab] set file to 2
+ [ 3ad] copy
+ [ 3ae] set column to 7
+ [ 3b0] extended opcode 2: set address to 0x400585 <calc+0x15>
+ [ 3bb] set file to 1
+ [ 3bd] copy
+ [ 3be] set column to 10
+ [ 3c0] extended opcode 2: set address to 0x400588 <calc+0x18>
+ [ 3cb] set file to 2
+ [ 3cd] set 'is_stmt' to 1
+ [ 3ce] special opcode 20: address+0 = 0x400588 <calc+0x18>, line-3 = 7
+ [ 3cf] set column to 3
+ [ 3d1] extended opcode 2: set address to 0x400588 <calc+0x18>
+ [ 3dc] special opcode 25: address+0 = 0x400588 <calc+0x18>, line+2 = 9
+ [ 3dd] set column to 3
+ [ 3df] extended opcode 2: set address to 0x400588 <calc+0x18>
+ [ 3ea] set 'is_stmt' to 0
+ [ 3eb] special opcode 24: address+0 = 0x400588 <calc+0x18>, line+1 = 10
+ [ 3ec] set column to 7
+ [ 3ee] extended opcode 2: set address to 0x40058f <calc+0x1f>
+ [ 3f9] set 'is_stmt' to 1
+ [ 3fa] special opcode 25: address+0 = 0x40058f <calc+0x1f>, line+2 = 12
+ [ 3fb] set column to 3
+ [ 3fd] extended opcode 2: set address to 0x40058f <calc+0x1f>
+ [ 408] set 'is_stmt' to 0
+ [ 409] copy
+ [ 40a] set column to 10
+ [ 40c] extended opcode 2: set address to 0x400598 <calc+0x28>
+ [ 417] set file to 1
+ [ 419] special opcode 22: address+0 = 0x400598 <calc+0x28>, 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 <foo>
+ [ 4f] special opcode 43: address+0 = 0x400510 <foo>, line+20 = 21
+ [ 50] set column to 1
+ [ 52] extended opcode 2: set address to 0x400510 <foo>
+ [ 5d] special opcode 24: address+0 = 0x400510 <foo>, line+1 = 22
+ [ 5e] set column to 3
+ [ 60] extended opcode 2: set address to 0x400510 <foo>
+ [ 6b] set 'is_stmt' to 0
+ [ 6c] copy
+ [ 6d] set column to 6
+ [ 6f] extended opcode 2: set address to 0x400514 <foo+0x4>
+ [ 7a] special opcode 26: address+0 = 0x400514 <foo+0x4>, line+3 = 25
+ [ 7b] set column to 34
+ [ 7d] extended opcode 2: set address to 0x40051a <foo+0xa>
+ [ 88] set 'is_stmt' to 1
+ [ 89] copy
+ [ 8a] set column to 3
+ [ 8c] extended opcode 2: set address to 0x40051a <foo+0xa>
+ [ 97] set 'is_stmt' to 0
+ [ 98] copy
+ [ 99] set column to 34
+ [ 9b] extended opcode 2: set address to 0x40051e <foo+0xe>
+ [ a6] special opcode 24: address+0 = 0x40051e <foo+0xe>, line+1 = 26
+ [ a7] set column to 1
+ [ a9] extended opcode 2: set address to 0x400528 <foo+0x18>
+ [ b4] extended opcode 4: set discriminator to 1
+ [ b8] special opcode 22: address+0 = 0x400528 <foo+0x18>, line-1 = 25
+ [ b9] set column to 18
+ [ bb] extended opcode 2: set address to 0x40052b <foo+0x1b>
+ [ 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 <foo+0x1b>
+ [ d9] special opcode 25: address+0 = 0x40052b <foo+0x1b>, line+2 = 9
+ [ da] set column to 3
+ [ dc] extended opcode 2: set address to 0x40052b <foo+0x1b>
+ [ e7] set 'is_stmt' to 0
+ [ e8] copy
+ [ e9] set column to 6
+ [ eb] extended opcode 2: set address to 0x40052f <foo+0x1f>
+ [ f6] extended opcode 4: set discriminator to 0
+ [ fa] set 'is_stmt' to 1
+ [ fb] special opcode 24: address+0 = 0x40052f <foo+0x1f>, line+1 = 10
+ [ fc] set column to 5
+ [ fe] extended opcode 2: set address to 0x40052f <foo+0x1f>
+ [ 109] set 'is_stmt' to 0
+ [ 10a] copy
+ [ 10b] set column to 7
+ [ 10d] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 118] set 'is_stmt' to 1
+ [ 119] special opcode 25: address+0 = 0x400531 <foo+0x21>, line+2 = 12
+ [ 11a] set column to 3
+ [ 11c] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 127] set file to 1
+ [ 129] special opcode 21: address+0 = 0x400531 <foo+0x21>, line-2 = 10
+ [ 12a] set column to 3
+ [ 12c] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 137] special opcode 25: address+0 = 0x400531 <foo+0x21>, line+2 = 12
+ [ 138] set column to 3
+ [ 13a] extended opcode 2: set address to 0x400531 <foo+0x21>
+ [ 145] set 'is_stmt' to 0
+ [ 146] copy
+ [ 147] set column to 6
+ [ 149] extended opcode 2: set address to 0x400535 <foo+0x25>
+ [ 154] set 'is_stmt' to 1
+ [ 155] special opcode 24: address+0 = 0x400535 <foo+0x25>, line+1 = 13
+ [ 156] set column to 5
+ [ 158] extended opcode 2: set address to 0x400535 <foo+0x25>
+ [ 163] set 'is_stmt' to 0
+ [ 164] copy
+ [ 165] set column to 7
+ [ 167] extended opcode 2: set address to 0x400539 <foo+0x29>
+ [ 172] set 'is_stmt' to 1
+ [ 173] special opcode 25: address+0 = 0x400539 <foo+0x29>, line+2 = 15
+ [ 174] set column to 3
+ [ 176] extended opcode 2: set address to 0x400539 <foo+0x29>
+ [ 181] special opcode 30: address+0 = 0x400539 <foo+0x29>, line+7 = 22
+ [ 182] set column to 3
+ [ 184] extended opcode 2: set address to 0x400539 <foo+0x29>
+ [ 18f] set 'is_stmt' to 0
+ [ 190] copy
+ [ 191] set column to 6
+ [ 193] extended opcode 2: set address to 0x40053d <foo+0x2d>
+ [ 19e] set 'is_stmt' to 1
+ [ 19f] special opcode 24: address+0 = 0x40053d <foo+0x2d>, line+1 = 23
+ [ 1a0] set column to 5
+ [ 1a2] extended opcode 2: set address to 0x40053d <foo+0x2d>
+ [ 1ad] set 'is_stmt' to 0
+ [ 1ae] copy
+ [ 1af] set column to 12
+ [ 1b1] extended opcode 2: set address to 0x400550 <baz>
+ [ 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 <baz>
+ [ 1cd] special opcode 24: address+0 = 0x400550 <baz>, line+1 = 10
+ [ 1ce] set column to 3
+ [ 1d0] extended opcode 2: set address to 0x400550 <baz>
+ [ 1db] special opcode 25: address+0 = 0x400550 <baz>, line+2 = 12
+ [ 1dc] set column to 3
+ [ 1de] extended opcode 2: set address to 0x400550 <baz>
+ [ 1e9] set 'is_stmt' to 0
+ [ 1ea] copy
+ [ 1eb] set column to 9
+ [ 1ed] extended opcode 2: set address to 0x400556 <baz+0x6>
+ [ 1f8] special opcode 24: address+0 = 0x400556 <baz+0x6>, line+1 = 13
+ [ 1f9] set column to 7
+ [ 1fb] extended opcode 2: set address to 0x40055f <baz+0xf>
+ [ 206] set 'is_stmt' to 1
+ [ 207] special opcode 25: address+0 = 0x40055f <baz+0xf>, line+2 = 15
+ [ 208] set column to 3
+ [ 20a] extended opcode 2: set address to 0x40055f <baz+0xf>
+ [ 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 <main>
+ [ 276] special opcode 37: address+0 = 0x400410 <main>, line+14 = 15
+ [ 277] set column to 1
+ [ 279] extended opcode 2: set address to 0x400410 <main>
+ [ 284] special opcode 24: address+0 = 0x400410 <main>, line+1 = 16
+ [ 285] set column to 3
+ [ 287] extended opcode 2: set address to 0x400410 <main>
+ [ 292] special opcode 24: address+0 = 0x400410 <main>, line+1 = 17
+ [ 293] set column to 3
+ [ 295] extended opcode 2: set address to 0x400410 <main>
+ [ 2a0] set 'is_stmt' to 0
+ [ 2a1] special opcode 21: address+0 = 0x400410 <main>, line-2 = 15
+ [ 2a2] set column to 1
+ [ 2a4] extended opcode 2: set address to 0x400419 <main+0x9>
+ [ 2af] special opcode 25: address+0 = 0x400419 <main+0x9>, line+2 = 17
+ [ 2b0] set column to 6
+ [ 2b2] extended opcode 2: set address to 0x40041e <main+0xe>
+ [ 2bd] set 'is_stmt' to 1
+ [ 2be] special opcode 24: address+0 = 0x40041e <main+0xe>, line+1 = 18
+ [ 2bf] set column to 5
+ [ 2c1] extended opcode 2: set address to 0x40041e <main+0xe>
+ [ 2cc] set 'is_stmt' to 0
+ [ 2cd] copy
+ [ 2ce] set column to 7
+ [ 2d0] extended opcode 2: set address to 0x400421 <main+0x11>
+ [ 2db] set 'is_stmt' to 1
+ [ 2dc] special opcode 27: address+0 = 0x400421 <main+0x11>, 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 <calc>
+ [ 2f8] special opcode 28: address+0 = 0x400570 <calc>, line+5 = 6
+ [ 2f9] set column to 1
+ [ 2fb] extended opcode 2: set address to 0x400570 <calc>
+ [ 306] special opcode 24: address+0 = 0x400570 <calc>, line+1 = 7
+ [ 307] set column to 3
+ [ 309] extended opcode 2: set address to 0x400570 <calc>
+ [ 314] set 'is_stmt' to 0
+ [ 315] copy
+ [ 316] set column to 6
+ [ 318] extended opcode 2: set address to 0x400575 <calc+0x5>
+ [ 323] extended opcode 4: set discriminator to 1
+ [ 327] copy
+ [ 328] set column to 24
+ [ 32a] extended opcode 2: set address to 0x400578 <calc+0x8>
+ [ 335] copy
+ [ 336] set column to 17
+ [ 338] extended opcode 2: set address to 0x40057d <calc+0xd>
+ [ 343] extended opcode 4: set discriminator to 0
+ [ 347] set 'is_stmt' to 1
+ [ 348] special opcode 26: address+0 = 0x40057d <calc+0xd>, line+3 = 10
+ [ 349] set column to 3
+ [ 34b] extended opcode 2: set address to 0x40057d <calc+0xd>
+ [ 356] set 'is_stmt' to 0
+ [ 357] copy
+ [ 358] set column to 10
+ [ 35a] extended opcode 2: set address to 0x400583 <calc+0x13>
+ [ 365] set file to 2
+ [ 367] copy
+ [ 368] set column to 7
+ [ 36a] extended opcode 2: set address to 0x400585 <calc+0x15>
+ [ 375] set file to 1
+ [ 377] copy
+ [ 378] set column to 10
+ [ 37a] extended opcode 2: set address to 0x400588 <calc+0x18>
+ [ 385] set file to 2
+ [ 387] set 'is_stmt' to 1
+ [ 388] special opcode 20: address+0 = 0x400588 <calc+0x18>, line-3 = 7
+ [ 389] set column to 3
+ [ 38b] extended opcode 2: set address to 0x400588 <calc+0x18>
+ [ 396] special opcode 25: address+0 = 0x400588 <calc+0x18>, line+2 = 9
+ [ 397] set column to 3
+ [ 399] extended opcode 2: set address to 0x400588 <calc+0x18>
+ [ 3a4] set 'is_stmt' to 0
+ [ 3a5] special opcode 24: address+0 = 0x400588 <calc+0x18>, line+1 = 10
+ [ 3a6] set column to 7
+ [ 3a8] extended opcode 2: set address to 0x40058f <calc+0x1f>
+ [ 3b3] set 'is_stmt' to 1
+ [ 3b4] special opcode 25: address+0 = 0x40058f <calc+0x1f>, line+2 = 12
+ [ 3b5] set column to 3
+ [ 3b7] extended opcode 2: set address to 0x40058f <calc+0x1f>
+ [ 3c2] set 'is_stmt' to 0
+ [ 3c3] copy
+ [ 3c4] set column to 10
+ [ 3c6] extended opcode 2: set address to 0x400598 <calc+0x28>
+ [ 3d1] set file to 1
+ [ 3d3] special opcode 22: address+0 = 0x400598 <calc+0x28>, 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 <main>..0x000000000040048d <main+0xd> [ 0] reg5
- [ 23] 0x0000000000400485 <main+0x5>..0x000000000040048d <main+0xd> [ 0] reg5
- [ 46] 0x00000000004004b2 <say+0x12>..0x00000000004004ba <say+0x1a> [ 0] breg5 0
+
+ CU [ b] base: 0x0000000000400480 <main>
+ [ 0] range 0, d
+ 0x0000000000400480 <main>..
+ 0x000000000040048c <main+0xc>
+ [ 0] reg5
+ [ 23] range 5, d
+ 0x0000000000400485 <main+0x5>..
+ 0x000000000040048c <main+0xc>
+ [ 0] reg5
+
+ CU [ e0] base: 0x00000000004004a0 <say>
+ [ 46] range 12, 1a
+ 0x00000000004004b2 <say+0x12>..
+ 0x00000000004004b9 <say+0x19>
+ [ 0] breg5 0
DWARF section [34] '.debug_ranges' at offset 0xd94:
- [ 0] 0x0000000000400480 <main>..0x0000000000400482 <main+0x2>
- 0x0000000000400485 <main+0x5>..0x000000000040048d <main+0xd>
- [ 30] 0x00000000004004ad <say+0xd>..0x00000000004004af <say+0xf>
- 0x00000000004004b2 <say+0x12>..0x00000000004004ba <say+0x1a>
+
+ CU [ b] base: 0x0000000000400480 <main>
+ [ 0] range 0, 2
+ 0x0000000000400480 <main>..
+ 0x0000000000400481 <main+0x1>
+ range 5, d
+ 0x0000000000400485 <main+0x5>..
+ 0x000000000040048c <main+0xc>
+
+ CU [ e0] base: 0x00000000004004a0 <say>
+ [ 30] range d, f
+ 0x00000000004004ad <say+0xd>..
+ 0x00000000004004ae <say+0xe>
+ range 12, 1a
+ 0x00000000004004b2 <say+0x12>..
+ 0x00000000004004b9 <say+0x19>
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 <foo>
+
+ Offset: c, Index: 0
+ offset_pair 0, a
+ 0x0000000000400510 <foo>..
+ 0x0000000000400519 <foo+0x9>
+ [ 0] reg5
+ offset_pair a, 34
+ 0x000000000040051a <foo+0xa>..
+ 0x0000000000400543 <foo+0x33>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 1a, Index: e
+ offset_pair 1b, 2d
+ 0x000000000040052b <foo+0x1b>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] addr 0x601038 <m>
+ end_of_list
+
+ Offset: 28, Index: 1c
+ offset_pair 1b, 21
+ 0x000000000040052b <foo+0x1b>..
+ 0x0000000000400530 <foo+0x20>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 2e, Index: 22
+ offset_pair 1b, 27
+ 0x000000000040052b <foo+0x1b>..
+ 0x0000000000400536 <foo+0x26>
+ [ 0] reg5
+ offset_pair 29, 2d
+ 0x0000000000400539 <foo+0x29>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 39, Index: 2d
+ offset_pair 21, 27
+ 0x0000000000400531 <foo+0x21>..
+ 0x0000000000400536 <foo+0x26>
+ [ 0] reg5
+ offset_pair 29, 2d
+ 0x0000000000400539 <foo+0x29>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 44, Index: 38
+ offset_pair 21, 2d
+ 0x0000000000400531 <foo+0x21>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 4a, Index: 3e
+ offset_pair 2d, 33
+ 0x000000000040053d <foo+0x2d>..
+ 0x0000000000400542 <foo+0x32>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 50, Index: 44
+ offset_pair 40, 4f
+ 0x0000000000400550 <baz>..
+ 0x000000000040055e <baz+0xe>
+ [ 0] reg5
+ offset_pair 4f, 51
+ 0x000000000040055f <baz+0xf>..
+ 0x0000000000400560 <baz+0x10>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 5e, Index: 52
+ offset_pair 40, 50
+ 0x0000000000400550 <baz>..
+ 0x000000000040055f <baz+0xf>
+ [ 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 <main>
+ offset_pair 0, 14
+ 0x0000000000400410 <main>..
+ 0x0000000000400423 <main+0x13>
+ [ 0] reg5
+ offset_pair 14, 20
+ 0x0000000000400424 <main+0x14>..
+ 0x000000000040042f <main+0x1f>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 87, Index: 17
+ base_address 0x400410
+ 0x0000000000400410 <main>
+ offset_pair 0, 18
+ 0x0000000000400410 <main>..
+ 0x0000000000400427 <main+0x17>
+ [ 0] reg4
+ offset_pair 18, 20
+ 0x0000000000400428 <main+0x18>..
+ 0x000000000040042f <main+0x1f>
+ [ 0] entry_value:
+ [ 0] reg4
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 9e, Index: 2e
+ start_length 0x400421, 7
+ 0x0000000000400421 <main+0x11>..
+ 0x0000000000400427 <main+0x17>
+ [ 0] reg0
+ end_of_list
+
+ Offset: ab, Index: 3b
+ base_address 0x400570
+ 0x0000000000400570 <calc>
+ offset_pair 0, 8
+ 0x0000000000400570 <calc>..
+ 0x0000000000400577 <calc+0x7>
+ [ 0] reg5
+ offset_pair 8, 2b
+ 0x0000000000400578 <calc+0x8>..
+ 0x000000000040059a <calc+0x2a>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: c2, Index: 52
+ start_length 0x400588, b
+ 0x0000000000400588 <calc+0x18>..
+ 0x0000000000400592 <calc+0x22>
+ [ 0] reg0
+ end_of_list
+
+ Offset: cf, Index: 5f
+ base_address 0x400588
+ 0x0000000000400588 <calc+0x18>
+ offset_pair 0, 2
+ 0x0000000000400588 <calc+0x18>..
+ 0x0000000000400589 <calc+0x19>
+ [ 0] reg1
+ offset_pair 2, 7
+ 0x000000000040058a <calc+0x1a>..
+ 0x000000000040058e <calc+0x1e>
+ [ 0] reg5
+ offset_pair 7, b
+ 0x000000000040058f <calc+0x1f>..
+ 0x0000000000400592 <calc+0x22>
+ [ 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 <calc+0x18>
+ offset_pair 0, 2
+ 0x0000000000400588 <calc+0x18>..
+ 0x0000000000400589 <calc+0x19>
+ [ 0] reg1
+ offset_pair 2, b
+ 0x000000000040058a <calc+0x1a>..
+ 0x0000000000400592 <calc+0x22>
+ [ 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 <foo>
+ [ 0] range 0, a
+ 0x0000000000400510 <foo>..
+ 0x0000000000400519 <foo+0x9>
+ [ 0] reg5
+ range a, 34
+ 0x000000000040051a <foo+0xa>..
+ 0x0000000000400543 <foo+0x33>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 39] range 1b, 2d
+ 0x000000000040052b <foo+0x1b>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] addr 0x601038 <m>
+ [ 64] range 1b, 21
+ 0x000000000040052b <foo+0x1b>..
+ 0x0000000000400530 <foo+0x20>
+ [ 0] reg5
+ [ 87] range 1b, 27
+ 0x000000000040052b <foo+0x1b>..
+ 0x0000000000400536 <foo+0x26>
+ [ 0] reg5
+ range 29, 2d
+ 0x0000000000400539 <foo+0x29>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] reg5
+ [ bd] range 21, 27
+ 0x0000000000400531 <foo+0x21>..
+ 0x0000000000400536 <foo+0x26>
+ [ 0] reg5
+ range 29, 2d
+ 0x0000000000400539 <foo+0x29>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] reg5
+ [ f3] range 21, 2d
+ 0x0000000000400531 <foo+0x21>..
+ 0x000000000040053c <foo+0x2c>
+ [ 0] reg5
+ [ 116] range 2d, 33
+ 0x000000000040053d <foo+0x2d>..
+ 0x0000000000400542 <foo+0x32>
+ [ 0] reg5
+ [ 139] range 40, 4f
+ 0x0000000000400550 <baz>..
+ 0x000000000040055e <baz+0xe>
+ [ 0] reg5
+ range 4f, 51
+ 0x000000000040055f <baz+0xf>..
+ 0x0000000000400560 <baz+0x10>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 172] range 40, 50
+ 0x0000000000400550 <baz>..
+ 0x000000000040055f <baz+0xf>
+ [ 0] reg5
+
+ CU [ 21c] base: 000000000000000000
+ [ 195] range 400410, 400424
+ 0x0000000000400410 <main>..
+ 0x0000000000400423 <main+0x13>
+ [ 0] reg5
+ range 400424, 400430
+ 0x0000000000400424 <main+0x14>..
+ 0x000000000040042f <main+0x1f>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 1ce] range 400410, 400428
+ 0x0000000000400410 <main>..
+ 0x0000000000400427 <main+0x17>
+ [ 0] reg4
+ range 400428, 400430
+ 0x0000000000400428 <main+0x18>..
+ 0x000000000040042f <main+0x1f>
+ [ 0] GNU_entry_value:
+ [ 0] reg4
+ [ 3] stack_value
+ [ 207] range 400421, 400428
+ 0x0000000000400421 <main+0x11>..
+ 0x0000000000400427 <main+0x17>
+ [ 0] reg0
+ [ 22a] range 400570, 400578
+ 0x0000000000400570 <calc>..
+ 0x0000000000400577 <calc+0x7>
+ [ 0] reg5
+ range 400578, 40059b
+ 0x0000000000400578 <calc+0x8>..
+ 0x000000000040059a <calc+0x2a>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 263] range 400588, 400593
+ 0x0000000000400588 <calc+0x18>..
+ 0x0000000000400592 <calc+0x22>
+ [ 0] reg0
+ [ 286] range 400588, 40058a
+ 0x0000000000400588 <calc+0x18>..
+ 0x0000000000400589 <calc+0x19>
+ [ 0] reg1
+ range 40058a, 40058f
+ 0x000000000040058a <calc+0x1a>..
+ 0x000000000040058e <calc+0x1e>
+ [ 0] reg5
+ range 40058f, 400593
+ 0x000000000040058f <calc+0x1f>..
+ 0x0000000000400592 <calc+0x22>
+ [ 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 <calc+0x18>..
+ 0x0000000000400589 <calc+0x19>
+ [ 0] reg1
+ range 40058a, 400593
+ 0x000000000040058a <calc+0x1a>..
+ 0x0000000000400592 <calc+0x22>
+ [ 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 <foo>
+
+ 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 <foo>..
+ 0x0000000000401169 <foo+0x9>
+ [ 0] reg5
+ startx_length 0, 2a
+ 0x000000000040116a <foo+0xa>..
+ 0x0000000000401193 <foo+0x33>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 3e, Index: 32
+ startx_length 11, 12
+ 0x000000000040117b <foo+0x1b>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] addrx [18] 0x404038 <m>
+ end_of_list
+
+ Offset: 45, Index: 39
+ startx_length 11, 6
+ 0x000000000040117b <foo+0x1b>..
+ 0x0000000000401180 <foo+0x20>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 4b, Index: 3f
+ startx_length 11, c
+ 0x000000000040117b <foo+0x1b>..
+ 0x0000000000401186 <foo+0x26>
+ [ 0] reg5
+ startx_length 1, 4
+ 0x0000000000401189 <foo+0x29>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 56, Index: 4a
+ startx_length 4, 6
+ 0x0000000000401181 <foo+0x21>..
+ 0x0000000000401186 <foo+0x26>
+ [ 0] reg5
+ startx_length 1, 4
+ 0x0000000000401189 <foo+0x29>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 61, Index: 55
+ startx_length 4, c
+ 0x0000000000401181 <foo+0x21>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 67, Index: 5b
+ startx_length 2, 6
+ 0x000000000040118d <foo+0x2d>..
+ 0x0000000000401192 <foo+0x32>
+ [ 0] reg5
+ end_of_list
+
+ Offset: 6d, Index: 61
+ startx_length 9, f
+ 0x00000000004011a0 <baz>..
+ 0x00000000004011ae <baz+0xe>
+ [ 0] reg5
+ startx_length 5, 2
+ 0x00000000004011af <baz+0xf>..
+ 0x00000000004011b0 <baz+0x10>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 7b, Index: 6f
+ startx_length 9, 10
+ 0x00000000004011a0 <baz>..
+ 0x00000000004011af <baz+0xf>
+ [ 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 <main>..
+ 0x0000000000401073 <main+0x13>
+ [ 0] reg5
+ startx_length 4, c
+ 0x0000000000401074 <main+0x14>..
+ 0x000000000040107f <main+0x1f>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 36, Index: 2a
+ startx_length 2, 18
+ 0x0000000000401060 <main>..
+ 0x0000000000401077 <main+0x17>
+ [ 0] reg4
+ startx_length 7, 6
+ 0x0000000000401078 <main+0x18>..
+ 0x000000000040107d <main+0x1d>
+ [ 0] entry_value:
+ [ 0] reg4
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 44, Index: 38
+ startx_length 3, 7
+ 0x0000000000401071 <main+0x11>..
+ 0x0000000000401077 <main+0x17>
+ [ 0] reg0
+ end_of_list
+
+ Offset: 4a, Index: 3e
+ startx_length d, 8
+ 0x00000000004011c0 <calc>..
+ 0x00000000004011c7 <calc+0x7>
+ [ 0] reg5
+ startx_length e, 23
+ 0x00000000004011c8 <calc+0x8>..
+ 0x00000000004011ea <calc+0x2a>
+ [ 0] entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ end_of_list
+
+ Offset: 58, Index: 4c
+ startx_length f, b
+ 0x00000000004011d8 <calc+0x18>..
+ 0x00000000004011e2 <calc+0x22>
+ [ 0] reg0
+ end_of_list
+
+ Offset: 5e, Index: 52
+ startx_length f, 2
+ 0x00000000004011d8 <calc+0x18>..
+ 0x00000000004011d9 <calc+0x19>
+ [ 0] reg1
+ startx_length 10, 5
+ 0x00000000004011da <calc+0x1a>..
+ 0x00000000004011de <calc+0x1e>
+ [ 0] reg5
+ startx_length 0, 4
+ 0x00000000004011df <calc+0x1f>..
+ 0x00000000004011e2 <calc+0x22>
+ [ 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 <calc+0x18>..
+ 0x00000000004011d9 <calc+0x19>
+ [ 0] reg1
+ startx_length 10, 9
+ 0x00000000004011da <calc+0x1a>..
+ 0x00000000004011e2 <calc+0x22>
+ [ 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 <foo>
+ [ 0] range 401160, 40116a
+ 0x0000000000401160 <foo>..
+ 0x0000000000401169 <foo+0x9>
+ [ 0] reg5
+ range 40116a, 401194
+ 0x000000000040116a <foo+0xa>..
+ 0x0000000000401193 <foo+0x33>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 16] range 40117b, 40118d
+ 0x000000000040117b <foo+0x1b>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] GNU_addr_index [18] 0x404038 <m>
+ [ 21] range 40117b, 401181
+ 0x000000000040117b <foo+0x1b>..
+ 0x0000000000401180 <foo+0x20>
+ [ 0] reg5
+ [ 2b] range 40117b, 401187
+ 0x000000000040117b <foo+0x1b>..
+ 0x0000000000401186 <foo+0x26>
+ [ 0] reg5
+ range 401189, 40118d
+ 0x0000000000401189 <foo+0x29>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] reg5
+ [ 3e] range 401181, 401187
+ 0x0000000000401181 <foo+0x21>..
+ 0x0000000000401186 <foo+0x26>
+ [ 0] reg5
+ range 401189, 40118d
+ 0x0000000000401189 <foo+0x29>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] reg5
+ [ 51] range 401181, 40118d
+ 0x0000000000401181 <foo+0x21>..
+ 0x000000000040118c <foo+0x2c>
+ [ 0] reg5
+ [ 5b] range 40118d, 401193
+ 0x000000000040118d <foo+0x2d>..
+ 0x0000000000401192 <foo+0x32>
+ [ 0] reg5
+ [ 65] range 4011a0, 4011af
+ 0x00000000004011a0 <baz>..
+ 0x00000000004011ae <baz+0xe>
+ [ 0] reg5
+ range 4011af, 4011b1
+ 0x00000000004011af <baz+0xf>..
+ 0x00000000004011b0 <baz+0x10>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 7b] range 4011a0, 4011b0
+ 0x00000000004011a0 <baz>..
+ 0x00000000004011af <baz+0xf>
+ [ 0] reg5
+
+testfile-world4.dwo:
+
+
+DWARF section [ 3] '.debug_loc.dwo' at offset 0x225:
+
+ CU [ b] base: 000000000000000000
+ [ 0] range 401060, 401074
+ 0x0000000000401060 <main>..
+ 0x0000000000401073 <main+0x13>
+ [ 0] reg5
+ range 401074, 401080
+ 0x0000000000401074 <main+0x14>..
+ 0x000000000040107f <main+0x1f>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 16] range 401060, 401078
+ 0x0000000000401060 <main>..
+ 0x0000000000401077 <main+0x17>
+ [ 0] reg4
+ range 401078, 40107e
+ 0x0000000000401078 <main+0x18>..
+ 0x000000000040107d <main+0x1d>
+ [ 0] GNU_entry_value:
+ [ 0] reg4
+ [ 3] stack_value
+ [ 2c] range 401071, 401078
+ 0x0000000000401071 <main+0x11>..
+ 0x0000000000401077 <main+0x17>
+ [ 0] reg0
+ [ 36] range 4011c0, 4011c8
+ 0x00000000004011c0 <calc>..
+ 0x00000000004011c7 <calc+0x7>
+ [ 0] reg5
+ range 4011c8, 4011eb
+ 0x00000000004011c8 <calc+0x8>..
+ 0x00000000004011ea <calc+0x2a>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ [ 4c] range 4011d8, 4011e3
+ 0x00000000004011d8 <calc+0x18>..
+ 0x00000000004011e2 <calc+0x22>
+ [ 0] reg0
+ [ 56] range 4011d8, 4011da
+ 0x00000000004011d8 <calc+0x18>..
+ 0x00000000004011d9 <calc+0x19>
+ [ 0] reg1
+ range 4011da, 4011df
+ 0x00000000004011da <calc+0x1a>..
+ 0x00000000004011de <calc+0x1e>
+ [ 0] reg5
+ range 4011df, 4011e3
+ 0x00000000004011df <calc+0x1f>..
+ 0x00000000004011e2 <calc+0x22>
+ [ 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 <calc+0x18>..
+ 0x00000000004011d9 <calc+0x19>
+ [ 0] reg1
+ range 4011da, 4011e3
+ 0x00000000004011da <calc+0x1a>..
+ 0x00000000004011e2 <calc+0x22>
+ [ 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 <main>
+ 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 <main+0x2f>
+ 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 <popcount>
+ 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 <popcount>
+ 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 <popcount>
+ [ 0] range 0, 9
+ 0x0000000000401180 <popcount>..
+ 0x0000000000401188 <popcount+0x8>
+ [ 0] reg5
+ range 9, 1b
+ 0x0000000000401189 <popcount+0x9>..
+ 0x000000000040119a <popcount+0x1a>
+ [ 0] reg1
+ range 1b, 1d
+ 0x000000000040119b <popcount+0x1b>..
+ 0x000000000040119c <popcount+0x1c>
+ [ 0] breg1 0
+ [ 2] lit1
+ [ 3] shr
+ [ 4] stack_value
+ range 1d, 21
+ 0x000000000040119d <popcount+0x1d>..
+ 0x00000000004011a0 <popcount+0x20>
+ [ 0] reg1
+ [ 60] range 0, 9
+ 0x0000000000401180 <popcount>..
+ 0x0000000000401188 <popcount+0x8>
+ [ 0] lit0
+ [ 1] stack_value
+ range 9, 20
+ 0x0000000000401189 <popcount+0x9>..
+ 0x000000000040119f <popcount+0x1f>
+ [ 0] reg0
+ range 20, 21
+ 0x00000000004011a0 <popcount+0x20>..
+ 0x00000000004011a0 <popcount+0x20>
+ [ 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 <main>..
+ 0x000000000040106d <main+0x1d>
+ [ 0] reg5
+ range 40106e, 401086
+ 0x000000000040106e <main+0x1e>..
+ 0x0000000000401085 <main+0x35>
+ [ 0] reg12
+ range 401086, 401095
+ 0x0000000000401086 <main+0x36>..
+ 0x0000000000401094 <main+0x44>
+ [ 0] GNU_entry_value:
+ [ 0] reg5
+ [ 3] stack_value
+ range 401095, 40109c
+ 0x0000000000401095 <main+0x45>..
+ 0x000000000040109b <main+0x4b>
+ [ 0] reg5
+ [ 28] range 401050, 40106e
+ 0x0000000000401050 <main>..
+ 0x000000000040106d <main+0x1d>
+ [ 0] reg4
+ range 40106e, 401095
+ 0x000000000040106e <main+0x1e>..
+ 0x0000000000401094 <main+0x44>
+ [ 0] GNU_entry_value:
+ [ 0] reg4
+ [ 3] stack_value
+ range 401095, 40109c
+ 0x0000000000401095 <main+0x45>..
+ 0x000000000040109b <main+0x4b>
+ [ 0] reg4
+ [ 47] range 401050, 40106e
+ 0x0000000000401050 <main>..
+ 0x000000000040106d <main+0x1d>
+ [ 0] lit0
+ [ 1] stack_value
+ range 401086, 40108e
+ 0x0000000000401086 <main+0x36>..
+ 0x000000000040108d <main+0x3d>
+ [ 0] breg12 0
+ [ 2] breg6 0
+ [ 4] plus
+ [ 5] stack_value
+ range 40108e, 401095
+ 0x000000000040108e <main+0x3e>..
+ 0x0000000000401094 <main+0x44>
+ [ 0] reg0
+ range 401095, 40109c
+ 0x0000000000401095 <main+0x45>..
+ 0x000000000040109b <main+0x4b>
+ [ 0] lit0
+ [ 1] stack_value
+ [ 73] range 401050, 40106e
+ 0x0000000000401050 <main>..
+ 0x000000000040106d <main+0x1d>
+ [ 0] reg5
+ range 40106e, 401090
+ 0x000000000040106e <main+0x1e>..
+ 0x000000000040108f <main+0x3f>
+ [ 0] reg6
+ range 401095, 40109c
+ 0x0000000000401095 <main+0x45>..
+ 0x000000000040109b <main+0x4b>
+ [ 0] reg5
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 <http://www.gnu.org/licenses/>.
+
+. $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 <main>
+ [ 0] range 0, 2
+ 0x0000000000400480 <main>..
+ 0x0000000000400481 <main+0x1>
+ range 5, d
+ 0x0000000000400485 <main+0x5>..
+ 0x000000000040048c <main+0xc>
+
+ CU [ e0] base: 0x00000000004004a0 <say>
+ [ 30] range d, f
+ 0x00000000004004ad <say+0xd>..
+ 0x00000000004004ae <say+0xe>
+ range 12, 1a
+ 0x00000000004004b2 <say+0x12>..
+ 0x00000000004004b9 <say+0x19>
+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 <calc+0x13>
+ offset_pair 0, 2
+ 0x0000000000400583 <calc+0x13>..
+ 0x0000000000400584 <calc+0x14>
+ offset_pair 5, 15
+ 0x0000000000400588 <calc+0x18>..
+ 0x0000000000400597 <calc+0x27>
+ end_of_list
+
+ Offset: 1c, Index: 10
+ start_length 0x400570, 2b
+ 0x0000000000400570 <calc>..
+ 0x000000000040059a <calc+0x2a>
+ start_length 0x400410, 20
+ 0x0000000000400410 <main>..
+ 0x000000000040042f <main+0x1f>
+ 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 <calc+0x13>..
+ 0x0000000000400584 <calc+0x14>
+ range 400588, 400598
+ 0x0000000000400588 <calc+0x18>..
+ 0x0000000000400597 <calc+0x27>
+ [ 30] range 400570, 40059b
+ 0x0000000000400570 <calc>..
+ 0x000000000040059a <calc+0x2a>
+ range 400410, 400430
+ 0x0000000000400410 <main>..
+ 0x000000000040042f <main+0x1f>
+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 <calc+0x13>
+ offset_pair 0, 2
+ 0x00000000004011d3 <calc+0x13>..
+ 0x00000000004011d4 <calc+0x14>
+ offset_pair 5, 15
+ 0x00000000004011d8 <calc+0x18>..
+ 0x00000000004011e7 <calc+0x27>
+ end_of_list
+
+ Offset: 24, Index: 18
+ start_length 0x4011c0, 2b
+ 0x00000000004011c0 <calc>..
+ 0x00000000004011ea <calc+0x2a>
+ start_length 0x401060, 20
+ 0x0000000000401060 <main>..
+ 0x000000000040107f <main+0x1f>
+ 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 <foo>
+ 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 <calc+0x13>..
+ 0x00000000004011d4 <calc+0x14>
+ range 4011d8, 4011e8
+ 0x00000000004011d8 <calc+0x18>..
+ 0x00000000004011e7 <calc+0x27>
+
+ CU [ 3f] base: 000000000000000000
+ [ 30] range 4011c0, 4011eb
+ 0x00000000004011c0 <calc>..
+ 0x00000000004011ea <calc+0x2a>
+ range 401060, 401080
+ 0x0000000000401060 <main>..
+ 0x000000000040107f <main+0x1f>
+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 <http://www.gnu.org/licenses/>.
+
+. $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 <caller>
+ [ 0] range 34, 35
+ 0x000000000040049c <main>..
+ 0x000000000040049c <main>
+ [ 0] breg7 -8
+ range 35, 46
+ 0x000000000040049d <main+0x1>..
+ 0x00000000004004ad <main+0x11>
+ [ 0] breg7 0
+ range 46, 47
+ 0x00000000004004ae <main+0x12>..
+ 0x00000000004004ae <main+0x12>
+ [ 0] breg7 -8
+
+testfile14:
+
+
+DWARF section [33] '.debug_loc' at offset 0xca9:
+
+ CU [ b] base: 0x0000000000400468 <caller>
+ [ 0] range 34, 35
+ 0x000000000040049c <main>..
+ 0x000000000040049c <main>
+ [ 0] breg7 -8
+ range 35, 46
+ 0x000000000040049d <main+0x1>..
+ 0x00000000004004ad <main+0x11>
+ [ 0] breg7 0
+ range 46, 47
+ 0x00000000004004ae <main+0x12>..
+ 0x00000000004004ae <main+0x12>
+ [ 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 <http://www.gnu.org/licenses/>.
+
+. $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 <main>
+ high_pc (data8) 11 (0x00000000004005bb)
+ stmt_list (sec_offset) 0
+ [ 29] subprogram abbrev: 9
+ external (flag_present) yes
+ name (strp) "main"
+ decl_file (data1) <stdin> (1)
+ decl_line (data1) 1
+ type (ref4) [ 46]
+ low_pc (addr) 0x00000000004005b0 <main>
+ 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) <stdin> (1)
+ decl_line (data1) 1
+ type (ref_sig8) {18763953736e2de0}
+ external (flag_present) yes
+ location (exprloc)
+ [ 0] addr 0x601030 <a>
+ [ 64] variable abbrev: 11
+ name (string) "b"
+ decl_file (data1) <stdin> (1)
+ decl_line (data1) 1
+ type (ref_sig8) {7cf9bbf793fcaf13}
+ external (flag_present) yes
+ location (exprloc)
+ [ 0] addr 0x601031 <b>
+
+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) <stdin> (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) <stdin> (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) <stdin> (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 <http://www.gnu.org/licenses/>.
+
+. $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 - <<EOF
+ byte_size (exprloc)
+ [ 0] push_object_address
+ [ 1] deref_size 1
+ [ 3] call4 [ 95]
+ [ 8] plus_uconst 7
+ [10] const1s -4
+ [12] and
+EOF
+
+exit 0
diff --git a/tests/run-readelf-zdebug-rel.sh b/tests/run-readelf-zdebug-rel.sh
index 1232d63b..3f20078c 100755
--- a/tests/run-readelf-zdebug-rel.sh
+++ b/tests/run-readelf-zdebug-rel.sh
@@ -51,7 +51,7 @@ DWARF section [ 4] '.debug_info' at offset 0x58:
[Offset]
Compilation unit at offset 0:
Version: 4, Abbreviation section offset: 0, Address size: 8, Offset size: 4
- [ b] compile_unit
+ [ b] compile_unit abbrev: 1
producer (strp) "GNU C11 5.3.1 20151207 (Red Hat 5.3.1-2) -mtune=generic -march=x86-64 -g -Og"
language (data1) C99 (12)
name (strp) "testfile-zdebug-rel.c"
@@ -59,60 +59,60 @@ DWARF section [ 4] '.debug_info' at offset 0x58:
low_pc (addr) 000000000000000000
high_pc (data8) 24 (0x0000000000000018)
stmt_list (sec_offset) 0
- [ 2d] subprogram
+ [ 2d] subprogram abbrev: 2
external (flag_present) yes
name (strp) "main"
- decl_file (data1) 1
+ decl_file (data1) testfile-zdebug-rel.c (1)
decl_line (data1) 4
prototyped (flag_present) yes
type (ref4) [ 80]
low_pc (addr) 000000000000000000
high_pc (data8) 24 (0x0000000000000018)
frame_base (exprloc)
- [ 0] call_frame_cfa
+ [ 0] call_frame_cfa
GNU_all_call_sites (flag_present) yes
sibling (ref4) [ 80]
- [ 4e] formal_parameter
+ [ 4e] formal_parameter abbrev: 3
name (strp) "argc"
- decl_file (data1) 1
+ decl_file (data1) testfile-zdebug-rel.c (1)
decl_line (data1) 4
type (ref4) [ 80]
location (sec_offset) location list [ 0]
- [ 5d] formal_parameter
+ [ 5d] formal_parameter abbrev: 4
name (strp) "argv"
- decl_file (data1) 1
+ decl_file (data1) testfile-zdebug-rel.c (1)
decl_line (data1) 4
type (ref4) [ 87]
location (exprloc)
- [ 0] reg4
- [ 6a] variable
+ [ 0] reg4
+ [ 6a] variable abbrev: 5
name (string) "a"
- decl_file (data1) 1
+ decl_file (data1) testfile-zdebug-rel.c (1)
decl_line (data1) 6
type (ref4) [ 9a]
- const_value (sdata) -9
- [ 74] variable
+ const_value (sdata) 18446744073709551607 (-9)
+ [ 74] variable abbrev: 6
name (string) "b"
- decl_file (data1) 1
+ decl_file (data1) testfile-zdebug-rel.c (1)
decl_line (data1) 7
type (ref4) [ 9a]
location (exprloc)
- [ 0] reg5
- [ 80] base_type
+ [ 0] reg5
+ [ 80] base_type abbrev: 7
byte_size (data1) 4
encoding (data1) signed (5)
name (string) "int"
- [ 87] pointer_type
+ [ 87] pointer_type abbrev: 8
byte_size (data1) 8
type (ref4) [ 8d]
- [ 8d] pointer_type
+ [ 8d] pointer_type abbrev: 8
byte_size (data1) 8
type (ref4) [ 93]
- [ 93] base_type
+ [ 93] base_type abbrev: 9
byte_size (data1) 1
encoding (data1) signed_char (6)
name (strp) "char"
- [ 9a] base_type
+ [ 9a] base_type abbrev: 9
byte_size (data1) 8
encoding (data1) unsigned (7)
name (strp) "long unsigned int"
@@ -127,12 +127,17 @@ cat info.out | testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=i
cat > loc.out << \EOF
DWARF section [ 7] '.debug_loc' at offset 0x185:
- [ 0] 000000000000000000..0x0000000000000003 [ 0] reg5
- 0x0000000000000003..0x0000000000000010 [ 0] breg5 -42
- [ 2] stack_value
- 0x0000000000000010..0x0000000000000018 [ 0] GNU_entry_value:
- [ 0] reg5
- [ 3] stack_value
+
+ 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 <http://www.gnu.org/licenses/>.
+
+. $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-nothing.sh b/tests/run-strip-nothing.sh
index e80bd906..914fdfbf 100755
--- a/tests/run-strip-nothing.sh
+++ b/tests/run-strip-nothing.sh
@@ -23,7 +23,7 @@
tempfiles a.out strip.out debug.out
# Create no-debug a.out.
-echo "int main() { return 1; }" | gcc -xc -
+echo "int main() { return 1; }" | gcc -s -xc -
# strip to file
testrun ${abs_top_builddir}/src/strip -g -o strip.out ||
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 <http://www.gnu.org/licenses/>.
+
+. $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 <http://www.gnu.org/licenses/>.
+
+. $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'
+ <no value>
+ [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/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
--- /dev/null
+++ b/tests/splitdwarf4-not-split4.dwo.bz2
Binary files differ
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index a765db63..09f428d1 100644
--- a/tests/test-subr.sh
+++ b/tests/test-subr.sh
@@ -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,32 @@ 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()
{
diff --git a/tests/testfile-ada-variant.bz2 b/tests/testfile-ada-variant.bz2
new file mode 100644
index 00000000..459774d6
--- /dev/null
+++ b/tests/testfile-ada-variant.bz2
Binary files differ
diff --git a/tests/testfile-addrx_constx-4.bz2 b/tests/testfile-addrx_constx-4.bz2
new file mode 100755
index 00000000..cf10fbb1
--- /dev/null
+++ b/tests/testfile-addrx_constx-4.bz2
Binary files differ
diff --git a/tests/testfile-addrx_constx-5.bz2 b/tests/testfile-addrx_constx-5.bz2
new file mode 100755
index 00000000..eb2a1f17
--- /dev/null
+++ b/tests/testfile-addrx_constx-5.bz2
Binary files differ
diff --git a/tests/testfile-bpf-reloc.expect.bz2 b/tests/testfile-bpf-reloc.expect.bz2
new file mode 100644
index 00000000..0ff8cc4c
--- /dev/null
+++ b/tests/testfile-bpf-reloc.expect.bz2
Binary files differ
diff --git a/tests/testfile-bpf-reloc.o.bz2 b/tests/testfile-bpf-reloc.o.bz2
new file mode 100644
index 00000000..295634f9
--- /dev/null
+++ b/tests/testfile-bpf-reloc.o.bz2
Binary files differ
diff --git a/tests/testfile-const-values.debug.bz2 b/tests/testfile-const-values.debug.bz2
new file mode 100755
index 00000000..167da166
--- /dev/null
+++ b/tests/testfile-const-values.debug.bz2
Binary files differ
diff --git a/tests/testfile-dwarf-4.bz2 b/tests/testfile-dwarf-4.bz2
new file mode 100755
index 00000000..fd3aaea5
--- /dev/null
+++ b/tests/testfile-dwarf-4.bz2
Binary files 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 <stddef.h>
+#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 <stdlib.h>
+
+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
--- /dev/null
+++ b/tests/testfile-dwarf-5.bz2
Binary files differ
diff --git a/tests/testfile-hello4.dwo.bz2 b/tests/testfile-hello4.dwo.bz2
new file mode 100644
index 00000000..fe02d65c
--- /dev/null
+++ b/tests/testfile-hello4.dwo.bz2
Binary files differ
diff --git a/tests/testfile-hello5.dwo.bz2 b/tests/testfile-hello5.dwo.bz2
new file mode 100644
index 00000000..e911375e
--- /dev/null
+++ b/tests/testfile-hello5.dwo.bz2
Binary files differ
diff --git a/tests/testfile-only-debug-line.bz2 b/tests/testfile-only-debug-line.bz2
new file mode 100644
index 00000000..a931bcd4
--- /dev/null
+++ b/tests/testfile-only-debug-line.bz2
Binary files differ
diff --git a/tests/testfile-ppc64-min-instr.bz2 b/tests/testfile-ppc64-min-instr.bz2
new file mode 100755
index 00000000..85bef57b
--- /dev/null
+++ b/tests/testfile-ppc64-min-instr.bz2
Binary files differ
diff --git a/tests/testfile-ranges-hello.dwo.bz2 b/tests/testfile-ranges-hello.dwo.bz2
new file mode 100644
index 00000000..fac24672
--- /dev/null
+++ b/tests/testfile-ranges-hello.dwo.bz2
Binary files differ
diff --git a/tests/testfile-ranges-hello5.dwo.bz2 b/tests/testfile-ranges-hello5.dwo.bz2
new file mode 100644
index 00000000..5e6e9e21
--- /dev/null
+++ b/tests/testfile-ranges-hello5.dwo.bz2
Binary files differ
diff --git a/tests/testfile-ranges-world.dwo.bz2 b/tests/testfile-ranges-world.dwo.bz2
new file mode 100644
index 00000000..27ad06d5
--- /dev/null
+++ b/tests/testfile-ranges-world.dwo.bz2
Binary files differ
diff --git a/tests/testfile-ranges-world5.dwo.bz2 b/tests/testfile-ranges-world5.dwo.bz2
new file mode 100644
index 00000000..6bde196b
--- /dev/null
+++ b/tests/testfile-ranges-world5.dwo.bz2
Binary files differ
diff --git a/tests/testfile-sizes3.o.bz2 b/tests/testfile-sizes3.o.bz2
index 7fa6a8a5..86333826 100644
--- a/tests/testfile-sizes3.o.bz2
+++ b/tests/testfile-sizes3.o.bz2
Binary files differ
diff --git a/tests/testfile-sizes4.o.bz2 b/tests/testfile-sizes4.o.bz2
new file mode 100644
index 00000000..046e0a23
--- /dev/null
+++ b/tests/testfile-sizes4.o.bz2
Binary files 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
--- /dev/null
+++ b/tests/testfile-splitdwarf-4.bz2
Binary files differ
diff --git a/tests/testfile-splitdwarf-5.bz2 b/tests/testfile-splitdwarf-5.bz2
new file mode 100755
index 00000000..27ff3bd6
--- /dev/null
+++ b/tests/testfile-splitdwarf-5.bz2
Binary files 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
--- /dev/null
+++ b/tests/testfile-splitdwarf4-not-split4.debug.bz2
Binary files differ
diff --git a/tests/testfile-stridex.bz2 b/tests/testfile-stridex.bz2
new file mode 100755
index 00000000..ff909f4a
--- /dev/null
+++ b/tests/testfile-stridex.bz2
Binary files differ
diff --git a/tests/testfile-world4.dwo.bz2 b/tests/testfile-world4.dwo.bz2
new file mode 100644
index 00000000..297fe5fa
--- /dev/null
+++ b/tests/testfile-world4.dwo.bz2
Binary files differ
diff --git a/tests/testfile-world5.dwo.bz2 b/tests/testfile-world5.dwo.bz2
new file mode 100644
index 00000000..d5c852c3
--- /dev/null
+++ b/tests/testfile-world5.dwo.bz2
Binary files differ
diff --git a/tests/testfile11-debugframe.bz2 b/tests/testfile11-debugframe.bz2
new file mode 100644
index 00000000..5c07d16a
--- /dev/null
+++ b/tests/testfile11-debugframe.bz2
Binary files differ
diff --git a/tests/testfile12-debugframe.bz2 b/tests/testfile12-debugframe.bz2
new file mode 100644
index 00000000..b8cc19c3
--- /dev/null
+++ b/tests/testfile12-debugframe.bz2
Binary files differ
diff --git a/tests/testfileaarch64-debugframe.bz2 b/tests/testfileaarch64-debugframe.bz2
new file mode 100755
index 00000000..e77494a1
--- /dev/null
+++ b/tests/testfileaarch64-debugframe.bz2
Binary files differ
diff --git a/tests/testfilearm-debugframe.bz2 b/tests/testfilearm-debugframe.bz2
new file mode 100755
index 00000000..51ce2d37
--- /dev/null
+++ b/tests/testfilearm-debugframe.bz2
Binary files differ
diff --git a/tests/testfileppc32-debugframe.bz2 b/tests/testfileppc32-debugframe.bz2
new file mode 100755
index 00000000..b6ae4ea6
--- /dev/null
+++ b/tests/testfileppc32-debugframe.bz2
Binary files differ
diff --git a/tests/testfileppc64-debugframe.bz2 b/tests/testfileppc64-debugframe.bz2
new file mode 100755
index 00000000..85c80ac6
--- /dev/null
+++ b/tests/testfileppc64-debugframe.bz2
Binary files differ
diff --git a/tests/testfileranges4.debug.bz2 b/tests/testfileranges4.debug.bz2
new file mode 100755
index 00000000..67ba573d
--- /dev/null
+++ b/tests/testfileranges4.debug.bz2
Binary files differ
diff --git a/tests/testfileranges5.debug.bz2 b/tests/testfileranges5.debug.bz2
new file mode 100755
index 00000000..ef28efc1
--- /dev/null
+++ b/tests/testfileranges5.debug.bz2
Binary files differ
diff --git a/tests/testfilesplitranges4.debug.bz2 b/tests/testfilesplitranges4.debug.bz2
new file mode 100755
index 00000000..df8e3ac4
--- /dev/null
+++ b/tests/testfilesplitranges4.debug.bz2
Binary files differ
diff --git a/tests/testfilesplitranges5.debug.bz2 b/tests/testfilesplitranges5.debug.bz2
new file mode 100755
index 00000000..5796cbf0
--- /dev/null
+++ b/tests/testfilesplitranges5.debug.bz2
Binary files 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 <http://www.gnu.org/licenses/>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <dwarf.h>
+#include ELFUTILS_HEADER(dw)
+#include <stdio.h>
+#include <inttypes.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+/* 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..25124399 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
@@ -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 ("<no location>"); // 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 ("<constant value>"); // 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 ("<no location>"); // 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 (&param));
assert (expr->number == dwarf_cuoffset (&param));
- assert (dwarf_tag (&param) == DW_TAG_formal_parameter);
+ if (dwarf_tag (&param) != 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;
}