History log of /external/elfutils/libdwfl/dwfl_report_elf.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3425454a10d307fae891fb667cf7969e945cde79 09-Oct-2015 Josh Stone <jistone@redhat.com> Trust AC_SYS_LARGEFILE to provide large file support

AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS in config.h if needed for
LFS, and this automatically maps things like open to open64. But quite
a few places used explicit 64-bit names, which won't work on platforms
like FreeBSD where off_t is always 64-bit and there are no foo64 names.
It's better to just trust that AC_SYS_LARGEFILE is doing it correctly.

But we can verify this too, as some file could easily forget to include
config.h. The new tests/run-lfs-symbols.sh checks all build targets
against lfs-symbols (taken from lintian) to make sure everything was
implicitly mapped to 64-bit variants when _FILE_OFFSET_BITS is set.

Signed-off-by: Josh Stone <jistone@redhat.com>
/external/elfutils/libdwfl/dwfl_report_elf.c
bafacacaf7659a4933604662daba26a480b29a8d 23-Apr-2015 Max Filippov <jcmvbkbc@gmail.com> Allow disabling symbol versioning at configure time

Due to missing symbol versioning support in uClibc calls to versioned
functions that internally call different version of themselves results
in infinite recursion.

Introduce macro SYMBOL_VERSIONING and use it instead of plain SHARED to
decide whether symbol versioning is needed. Control this macro
definition with new configure option --disable-symbol-versioning.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/dwfl_report_elf.c
596d430f23f85f3cd019bd0ac560ecd5371fc7e0 23-Jul-2013 Jan Kratochvil <jan.kratochvil@redhat.com> Fix false match of non-build-id disk library to build-id memory library.

this patch:
Use DT_DEBUG library search first.
8ff862960efb648cdff647d7fad1be5acffe9b11
[patch 2/2] Fix loading core files without build-ids
https://lists.fedorahosted.org/pipermail/elfutils-devel/2013-April/003031.html
[patch 2/2 v2] Fix loading core files without build-ids
https://lists.fedorahosted.org/pipermail/elfutils-devel/2013-May/003065.html

has PASS->FAIL regression on CentOS-5 for run-unstrip-n.sh:

-actual on CentOS-5
+expected by testcase

-0xf77b3000+0x822c - /lib/librt.so.1 - librt.so.1
-0xf7603000+0x15c5c4 - /lib/libc.so.6 - libc.so.6
-0xf75e9000+0x191e4 - /lib/libpthread.so.0 - libpthread.so.0
-0xf77d7000+0x1c670 - /lib/ld-linux.so.2 - ld-linux.so.2
0x8048000+0x2000 f1c600bc36cb91bf01f9a63a634ecb79aa4c3199@0x8048178 . - [exe]
+0xf75e9000+0x1a000 29a103420abe341e92072fb14274e250e4072148@0xf75e9164 - - libpthread.so.0
+0xf7603000+0x1b0000 0b9bf374699e141e5dfc14757ff42b8c2373b4de@0xf7603184 - - libc.so.6
+0xf77b3000+0x9000 c6c5b5e35ab9589d4762ac85b4bd56b1b2720e37@0xf77b3164 - - librt.so.1
0xf77d6000+0x1000 676560b1b765cde9c2e53f134f4ee354ea894747@0xf77d6210 . - linux-gate.so.1
+0xf77d7000+0x21000 6d2cb32650054f1c176d01d48713a4a5e5e84c1a@0xf77d7124 - - ld-linux.so.2

Therefore elfutils now incorrectly matches on-disk file without build-id to an
in-core (in-memory) file with build-id.

In fact due to its known FIXME:
This verification gives false positive if in-core ELF had
build-id but on-disk ELF does not have any. But we cannot
reliably find ELF header and/or the ELF build id just from
the link map (and checking core segments is also not
reliable). */

So it probably should not be so ignorable as I did, one may want to analyze
build-id core files on CentOS-5, not sure. In fact it can be fixed, when we
find in dwfl_segment_report_module a module with build-id with conflicts in
its address range with existing non-build-id dwfl_link_map_report module we
should prefer the build-id module instead.

The problem is that once Dwfl_Module is added to Dwfl it cannot be easily
removed.

Originally elfutils called dwfl_segment_report_module first and then
dwfl_link_map_report.

Currently the order is dwfl_link_map_report and then
dwfl_segment_report_module only for modules missing from dwfl_link_map_report.

Patch below unfortunately needs bidirectional negotiation between the two
functions, therefore dwfl_link_map_report now no longer adds Dwfl_Modules to
Dwfl but it only stores information about them to r_debug_info_module.
This information is filtered then by dwfl_segment_report_module and only
filtered r_debug_info_module entries get finally added to Dwfl
(in dwfl_core_file_report).

NT_FILE would make all this magic easy but it is true that on CentOS-5 it
definitely does not exist.

libdwfl/
2013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>

* core-file.c (clear_r_debug_info): Close also ELF and FD.
(dwfl_core_file_report): Call __libdwfl_report_elf for
R_DEBUG_INFO.MODULE.
* dwfl_report_elf.c (__libdwfl_elf_address_range): New function from
code of ...
(__libdwfl_report_elf): ... this function. Call it.
* dwfl_segment_report_module.c: Include unistd.h.
(dwfl_segment_report_module): Use basename for MODULE->NAME.
Clear MODULE if it has no build-id and we have segment with build-id.
Ignore this segment only if MODULE still contains valid ELF.
* libdwflP.h (__libdwfl_elf_address_range): New declaration.
(struct r_debug_info_module): New fields fd, elf, l_addr, start, end
and disk_file_has_build_id.
(dwfl_link_map_report): Extend the comment.
* link_map.c (report_r_debug): Extend the comment. Always fill in new
r_debug_info_module. Initialize also the new r_debug_info_module
fields. Remove one FIXME comment. Call __libdwfl_elf_address_range
instead of __libdwfl_report_elf when R_DEBUG_INFO is not NULL.

tests/
2013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>

* run-unstrip-n.sh (test-core.*): Ignore libc.so.6 entry and order of
the entries.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/dwfl_report_elf.c
904aec2c2f62b729a536c2259274fdd440b0d923 30-Apr-2013 Jan Kratochvil <jan.kratochvil@redhat.com> Add parameter add_p_vaddr to dwfl_report_elf.

libdwfl/
* dwfl_report_elf.c (__libdwfl_report_elf): Add parameter add_p_vaddr.
Set it to true for ET_EXEC and ET_CORE. Provide alternative
setup of START and BIAS if !ADD_P_VADDR. Set END from BIAS, not BASE.
(dwfl_report_elf): Add parameter add_p_vaddr. Pass it down. Add
NEW_VERSION.
(_compat_without_add_p_vaddr_dwfl_report_elf) <SHARED>: New, with
COMPAT_VERSION.
* libdwfl.h (dwfl_report_elf): Add parameter add_p_vaddr. Describe it.
* libdwflP.h (__libdwfl_report_elf): Add parameter add_p_vaddr.
* link_map.c (report_r_debug): Use true add_p_vaddr for dwfl_report_elf.
* linux-kernel-modules.c (report_kernel): Use false add_p_vaddr for
dwfl_report_elf.
* offline.c (process_elf): Use true add_p_vaddr for dwfl_report_elf.

tests/
* dwfl-report-elf-align.c: Use false add_p_vaddr for dwfl_report_elf.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/dwfl_report_elf.c
a1d44825ffc756ed6c0dca3a836c1ff9f0ec151f 19-Mar-2013 Jan Kratochvil <jan.kratochvil@redhat.com> Fix dwfl_report_elf BASE alignment

libdwfl/
* dwfl_report_elf.c (__libdwfl_report_elf): Remove BASE aligning.

tests/
* Makefile.am (check_PROGRAMS): Add dwfl-report-elf-align.
(TESTS): Add run-dwfl-report-elf-align.sh.
(EXTRA_DIST): Add run-dwfl-report-elf-align.sh and
testfile-dwfl-report-elf-align-shlib.so.bz2 .
(dwfl_report_elf_align_LDADD): New.
* dwfl-report-elf-align.c: New file.
* run-dwfl-report-elf-align.sh: New file.
* testfile-dwfl-report-elf-align-shlib.so.bz2: New file.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/dwfl_report_elf.c
ae81c70c997a87ffd2643dfc7818cff89bbba8f6 27-Oct-2012 Jan Kratochvil <jan.kratochvil@redhat.com> libdwfl/
* dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS
calculation.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/dwfl_report_elf.c
de2ed97f33139af5c7a0811e4ec66fc896a13cf2 05-Jun-2012 Mark Wielaard <mjw@redhat.com> Update name, license and contributor policy.

* Change name from "Red Hat elfutils" to "elfutils".
* Update license of standalone tools and test from GPLv2 to GPLv3+.
* Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+.
* Add Developer Certificate of Origin based contributor policy.

top-level:

- COPYING: Upgraded from GPLv2 to GPLv3.
- CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files.
- NEWS: Added note about new contribution and license policy.
- Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST.
- configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'.

backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf:

- All files updated to GPLv2/LGPLv3+. Except some very small files
(<5 lines) which didn't have any headers at all before, the linker
.maps files and the libcpu/defs files which only contain data and
libelf/elf.h which comes from glibc and is under LGPLv2+.

config:

- elfutils.spec.in: Add new License: headers and new %doc files.
- Update all license headers to GPLv2/LGPLv3+ for files used by libs.

src, tests:

- All files updated to GPLv3+. Except for the test bz2 data files, the
linker maps and script files and some very small files (<5 lines)
that don't have any headers.

Signed-off-by: Richard Fontana <rfontana@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/dwfl_report_elf.c
1743d7f010bead5e869d097e23ce840583913381 13-Nov-2010 Roland McGrath <roland@redhat.com> libdwfl: Revamp bias bookkeeping, account correctly for prelink REL->RELA segment inflation.
/external/elfutils/libdwfl/dwfl_report_elf.c
f95760aff004850544f83626404c134d6a07c630 08-Jan-2010 Roland McGrath <roland@redhat.com> Use elf_getphdrnum in libdw and libdwfl.
/external/elfutils/libdwfl/dwfl_report_elf.c
2256e360a13df88ae3d3e8697f1753dc19be70c0 18-Jun-2009 Mark Wielaard <mjw@redhat.com> __libdwfl_report_elf: Return NULL on overlap, don't (double) close elf.
/external/elfutils/libdwfl/dwfl_report_elf.c
5453abf2ab7626daeab2506ebc6ed067f5063eb4 11-Feb-2009 Roland McGrath <roland@redhat.com> Omit module sanity checks on offline modules.
/external/elfutils/libdwfl/dwfl_report_elf.c
e738ad2e9f2b5a95dfd86f986ee3ebc0fc41f46c 28-Jan-2009 Roland McGrath <roland@redhat.com> (__libdwfl_report_elf): Ignore trailing PT_LOAD with zero vaddr and memsz.
/external/elfutils/libdwfl/dwfl_report_elf.c
bca43152aa0bcb31b9442c407bf2b86379761c50 06-Jan-2009 Roland McGrath <roland@redhat.com> libdwfl automagic decompression support
/external/elfutils/libdwfl/dwfl_report_elf.c
e4c22ea004c02a58f5db5eb53794275344c17958 23-Oct-2007 Roland McGrath <roland@redhat.com> 2007-10-23 Roland McGrath <roland@redhat.com>

* linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
module to appear first.
/external/elfutils/libdwfl/dwfl_report_elf.c
b597dfad924980dede10d7c19d87900b6172e599 16-Oct-2007 Ulrich Drepper <drepper@redhat.com> merge of '92c36bfdbc6468d1711c043b530e0dfe5abb6dec'
and 'c22c8c43f8f68b0bffd4d5ccdb2282c958268742'
/external/elfutils/libdwfl/dwfl_report_elf.c
1e9ef50681e20ef14c2ba38aef37a71ff148be08 05-Apr-2006 Ulrich Drepper <drepper@redhat.com> Fix FSF address. No exception for libdwarf.
/external/elfutils/libdwfl/dwfl_report_elf.c
361df7da6dfecd817b27e62b91752ac316d7cdd4 04-Apr-2006 Ulrich Drepper <drepper@redhat.com> propagate from branch 'com.redhat.elfutils.roland.pending' (head 4f8fc821345feef58624f0aa5b470d4827577d8c)
to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
/external/elfutils/libdwfl/dwfl_report_elf.c
d17fac7e89666b47811581b10b5ca0d253a3a82d 23-Aug-2005 Roland McGrath <roland@redhat.com> 2005-08-23 Roland McGrath <roland@redhat.com>

* dwarf_attr_integrate.c (dwarf_attr_integrate): Treat
DW_AT_specification the same as DW_AT_abstract_origin.
/external/elfutils/libdwfl/dwfl_report_elf.c
b08d5a8fb42f4586d756068065186b5af7e48dad 26-Jul-2005 Ulrich Drepper <drepper@redhat.com> Adjust for monotone.
/external/elfutils/libdwfl/dwfl_report_elf.c