e3bfee665f696003df3c638dbe5d57d1139a1950 |
|
17-Nov-2015 |
Chih-Hung Hsieh <chh@google.com> |
Move nested functions check64 and check32 in link_map.c to file scope. * In libdwfl/link_map.c, nested functions check64, check32, are moved to file scope to compile with clang. Signed-off-by: Chih-Hung Hsieh <chh@google.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
69d68dd50282469ddc45fc462a2506176b8f3289 |
|
01-Dec-2015 |
Mark Wielaard <mjw@redhat.com> |
libdwfl: Fix memory leak in link_map.c dwfl_link_map_report. The phdrs buffer could come from the core file or through the executable. dwfl_link_map_report would leak the buffer if it came from the executable. Track where the buffer came from and free appropriately. Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
355b408bb9aa49703544fa4086e1ae463737fcf6 |
|
01-Dec-2015 |
Mark Wielaard <mjw@redhat.com> |
libdwfl: Don't leak core Elf and core file descriptor from argp-std. Our argp helper would leak the core Elf and core file descriptor when given by the user. Store both in the Dwfl as a new Dwfl_User_Core so they get cleaned up by dwfl_end. Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
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/link_map.c
|
7eff36d5daa6ebca5e6399638a7643af105ae5b0 |
|
07-Oct-2015 |
Chih-Hung Hsieh <chh@google.com> |
Do without union of variable length arrays. Prepare to compile with clang. A union like { T32 a32[n]; T64 a64[n]; } u; is expanded to size_t nbytes = n * MAX(sizeof(T32), sizeof(T64)); void *data = malloc(nbytes); T32 (*a32)[n] = data; T64 (*a64)[n] = data; Signed-off-by: Chih-Hung Hsieh <chh@google.com>
/external/elfutils/libdwfl/link_map.c
|
616489da5005c63fe572df422f1936529c4743f5 |
|
31-May-2015 |
Mark Wielaard <mjw@redhat.com> |
libdwfl: Don't assume auxv or r_debug data is properly aligned in link_map. core file data isn't guaranteed to be alligned properly. Use read_(4|8)ubyte_unaligned_noncvt to read values, types and addresses. Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
f592035ea1e52328f0e14a3ddd5c4086cca6c775 |
|
22-May-2015 |
Mark Wielaard <mjw@redhat.com> |
libdwfl: Don't allocate phdrs and dyn on stack in link_map. Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
712c8faddc08844fb1f2814c8b6e817f03b0698e |
|
22-Nov-2014 |
Mark Wielaard <mjw@redhat.com> |
Use elf_getphdrnum instead of accessing ehdr->e_phnum directly. Using elf_getphdrnum lets us handle ELF files that use more than PN_XNUM phdrs. And guards against some corrupt files. Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
475849fdb25265706772905b856cd7028c566a71 |
|
24-Jul-2014 |
Jan Kratochvil <jan.kratochvil@redhat.com> |
Fix report_r_debug for prelinked libraries Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
99a29497c673871040fed2382938eb5bd06befdd |
|
21-Nov-2013 |
Jan Kratochvil <jan.kratochvil@redhat.com> |
Fix non-build-id core files on build-id system Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
463e983e20fdb945b11bb175ca71e23b31146d8e |
|
21-Nov-2013 |
Jan Kratochvil <jan.kratochvil@redhat.com> |
link_map: Use proper bias, not l_addr Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
35d95f378d2f2732055523abcbbfd58f7a404dcd |
|
07-Nov-2013 |
Jan Kratochvil <jan.kratochvil@redhat.com> |
dwfl_core_file_report: Fix core files for re-prelink-ed files Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/link_map.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/link_map.c
|
24b26ec1aaf4dc87d274f1786a1ad83b3ec2ba25 |
|
05-Jun-2013 |
Mark Wielaard <mjw@redhat.com> |
libdwfl: link_map.c (report_r_debug) always release memory_callback buffer. If the buffer isn't released after getting a valid build-id from the memory_callback the first run-unstrip-n.sh testcase will fail on systems where there is a matching librt.so file for which dwfl_addrsegment returns a valid segment index in the Dwfl (but where the build-id doesn't match). Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
8ff862960efb648cdff647d7fad1be5acffe9b11 |
|
30-May-2013 |
Jan Kratochvil <jan.kratochvil@redhat.com> |
Use DT_DEBUG library search first. libdwfl/ 2013-05-30 Jan Kratochvil <jan.kratochvil@redhat.com> * argp-std.c (parse_opt) <ARGP_KEY_SUCCESS> <opt->core> <opt->e>: Set executable_for_core before calling dwfl_core_file_report. * core-file.c (clear_r_debug_info): New function. (dwfl_core_file_report): Move raw segments reporting lower. New variable r_debug_info, pass it to dwfl_segment_report_module. Call clear_r_debug_info in the end. Return sum of LISTED and SNIFFED. * dwfl_module_build_id.c (check_notes): Move into __libdwfl_find_elf_build_id. (__libdwfl_find_build_id): Rename to ... (__libdwfl_find_elf_build_id): ... here. Add parameters build_id_bits, build_id_elfaddr and build_id_len. Verify MOD vs. ELF. (__libdwfl_find_elf_build_id) (check_notes): Remove parameters mod and set, rename data_vaddr to data_elfaddr. Do not call found_build_id. (__libdwfl_find_elf_build_id): Update the check_notes caller, do not adjust its data_elfaddr parameter. (__libdwfl_find_build_id): New wrapper of __libdwfl_find_elf_build_id. * dwfl_segment_report_module.c (dwfl_segment_report_module): New parameter r_debug_info. New variable name_is_final. Adjust addresses according to R_DEBUG_INFO->MODULE. Check conflicts against DWFL. Do not overwrite NAME by SONAME if NAME_IS_FINAL. * libdwflP.h (__libdwfl_find_elf_build_id): New declaration. (struct r_debug_info_module, struct r_debug_info): New definitions. (dwfl_segment_report_module, dwfl_link_map_report): Add parameter r_debug_info. * link_map.c: Include fcntl.h. (report_r_debug): Add parameter r_debug_info, describe it in the function comment. Delete dwfl_addrmodule call and its dependent code. Verify build-id before calling dwfl_report_elf, also supply executable_for_core to it. Store r_debug_info->module info when appropriate. (dwfl_link_map_report): Add parameter r_debug_info. New variable in_ok. Try to read IN from EXECUTABLE_FOR_CORE. Update report_r_debug caller parameters. tests/ 2013-05-30 Jan Kratochvil <jan.kratochvil@redhat.com> * Makefile.am (EXTRA_DIST): Add test-core-lib.so.bz2, test-core.core.bz2 and test-core.exec.bz2. * run-addrname-test.sh: New test for these files. * run-unstrip-n.sh: Update expected output. New test for these files. * test-core-lib.so.bz2: New file. * test-core.core.bz2: New file. * test-core.exec.bz2: New file. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/link_map.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/link_map.c
|
9efa9e6803992567576963f381fbd9cd6a7b9b86 |
|
27-Apr-2013 |
Mark Wielaard <mjw@redhat.com> |
libdwfl/link_map.c: #include system.h. Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
1704baf67698c269bc81fbaec0483e53d9709702 |
|
26-Apr-2013 |
Jan Kratochvil <jan.kratochvil@redhat.com> |
Unify {BE,LE}{32,64} in lib/system.h. lib/ * system.h (LE64, BE64): Move here the definitions from libdwfl/link_map.c. libdwfl/ * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move them to lib/system.h. Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/link_map.c
|
3999ce14663c26bcddc2cf4d4bb9b61c7ad29ac3 |
|
07-Jan-2013 |
Roland McGrath <roland@hack.frob.com> |
dwfl_link_map_report: Handle unaligned auxv data. Signed-off-by: Roland McGrath <roland@hack.frob.com>
/external/elfutils/libdwfl/link_map.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/link_map.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/link_map.c
|
7503c89a9539c46c910e6e737c2a98d3b7c177ac |
|
18-Aug-2010 |
Roland McGrath <roland@redhat.com> |
Don't suppress full file names found in core-file link_map.
/external/elfutils/libdwfl/link_map.c
|
d05c596d2a97326259b4f91861487feed63d4946 |
|
05-May-2010 |
Roland McGrath <roland@redhat.com> |
dwfl_link_map_report: Handle PIE-generated core.
/external/elfutils/libdwfl/link_map.c
|
be1393031d9db8504d7d651c1da514be3766e7fa |
|
14-Apr-2010 |
Roland McGrath <roland@redhat.com> |
Prevent infinite iteration on link_map list clobbered into circularity.
/external/elfutils/libdwfl/link_map.c
|
5ea349b66b627ee31be93826f1357f88a7a26aff |
|
06-Apr-2010 |
Roland McGrath <roland@redhat.com> |
Fix auxv scanning in core-file grokking.
/external/elfutils/libdwfl/link_map.c
|
6229eb57c2708ed0e9b6555cc4301aa496649228 |
|
05-Nov-2009 |
Roland McGrath <roland@redhat.com> |
Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure.
/external/elfutils/libdwfl/link_map.c
|
cdb48e066a4cd6bd487ff8f53a8f8d5bc221a1a8 |
|
05-Nov-2009 |
Roland McGrath <roland@redhat.com> |
Ignore link_map entries with l_ld==0.
/external/elfutils/libdwfl/link_map.c
|
fa25326f44d65e0b1ee849cbd0da99c2808e1089 |
|
14-Apr-2009 |
Roland McGrath <roland@redhat.com> |
Fix RHBZ#494858: fix bad address checks in core file support.
/external/elfutils/libdwfl/link_map.c
|
45c01cd45fde155a91bcfe3533437946afa041ad |
|
11-Feb-2009 |
Roland McGrath <roland@redhat.com> |
Remove assert depending on confluence of guesses without anomaly.
/external/elfutils/libdwfl/link_map.c
|
b4d6f0f8064f2b706ea9035ef0393d8299671390 |
|
26-Aug-2008 |
Roland McGrath <roland@redhat.com> |
Fix up bogon and missing log entries from .pmachata.threads branch.
/external/elfutils/libdwfl/link_map.c
|