History log of /external/elfutils/libdwfl/libdwflP.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/libdwflP.h
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/libdwflP.h
879850950bd56255cb5796c86b62bf3bdedd4fb9 07-Sep-2015 Mark Wielaard <mjw@redhat.com> libdwfl: Make dwfl_linux_proc_attach work even without any Dwfl_Modules.

dwfl_linux_proc_attach depended on a Dwfl_Module with the correct
ELF header already being available. That isn't really necessary since
when we attach we have the main exe ELF file available. Just use that
to make dwfl_linux_proc_attach always work.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
6d48bbf406851b56920582b8ce29db13ad4f4e2e 26-Sep-2014 Jan Kratochvil <jan.kratochvil@redhat.com> Support note NT_FILE for locating files.

Martin Milata:
------------------------------------------------------------------------------
RFE: dwfl_core_file_report: use NT_FILE core note if the link_map chain is broken
https://bugzilla.redhat.com/show_bug.cgi?id=1129777

The dwfl_core_file_report function follows dynamic linker's link_map chain in
order to determine the shared libraries used by the executable. As this data
structure is located in writable memory it can be overwritten by garbage, which
is sometimes the case.
https://github.com/abrt/satyr/issues/127#issuecomment-46957546

Since version 3.7 (commit 2aa362c49), Linux kernel adds NT_FILE note to core
files which contains the files mapped by the process, including shared
libraries.
------------------------------------------------------------------------------

dwfl_core_file_report now tries to fall back on NT_FILE if the link_map chain
is broken.

elfutils would already find the appropriate binary file from
/usr/lib/debug/.build-id/ symbolic links. But those symbolic links do not have
to be present on the system while NT_FILE still points to the correct binaries.

Filenames from the note NT_FILE are used only if link_map filenames failed to
locate matching binaries.

tests/test-core.core.bz2 had to have its NT_FILE disabled as run-unstrip-n.sh
otherwise FAILs:
FAIL: 0x7f67f2aaf000+0x202000 - . - /home/jkratoch/redhat/elfutils-libregr/test-core-lib.so
PASS: 0x7f67f2aaf000+0x202000 - . - test-core-lib.so
As test-core-lib.so is found in link_map but it is not present on the disk
elfutils now chooses the more reliable filename from NT_FILE (although that
filename is also not found on the disk). Updating the expected text would be
also sufficient.

libdwfl/
2014-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>

Support NT_FILE for locating files.
* core-file.c (dwfl_core_file_report): New variables note_file and
note_file_size, set them and pass them to dwfl_segment_report_module.
* dwfl_segment_report_module.c: Include common.h and fcntl.h.
(buf_has_data, buf_read_ulong, handle_file_note): New functions.
(invalid_elf): New function from code of dwfl_segment_report_module.
(dwfl_segment_report_module): Add parameters note_file and
note_file_size. New variables elf and fd, clean them up in finish.
Move some code to invalid_elf. Call handle_file_note, if it found
a name verify the file by invalid_elf. Protect elf and fd against
cleanup by finish if we found the file for new Dwfl_Module.
* libdwflP.h (dwfl_segment_report_module): Add parameters note_file and
note_file_size.

tests/
2014-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>

Support NT_FILE for locating files.
* Makefile.am (TESTS): Add run-linkmap-cut.sh.
(EXTRA_DIST): Add run-linkmap-cut.sh, linkmap-cut-lib.so.bz2,
linkmap-cut.bz2 and linkmap-cut.core.bz2 .
* linkmap-cut-lib.so.bz2: New file.
* linkmap-cut.bz2: New file.
* linkmap-cut.core.bz2: New file.
* run-linkmap-cut.sh: New file.
* run-unstrip-n.sh: Update its expected output.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
6097c00a539873e9baa22e10f9387b9c36c4fa25 09-Sep-2014 Jan Kratochvil <jan.kratochvil@redhat.com> Add is_executable to Dwfl_Module.

Next patch will find module names from NT_FILE note so that main executable
will no longer necessarily have the name "[exe]" or "[pie]".
-e|--executable still should be able to override such module.

libdwfl/
2014-09-18 Jan Kratochvil <jan.kratochvil@redhat.com>

* dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE.
* dwfl_segment_report_module.c (dwfl_segment_report_module): Set
IS_EXECUTABLE.
* libdwflP.h (struct Dwfl_Module): New field is_executable.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
14beac3b6f22b8d7a054980f74c4f8d33b969fc4 11-Jun-2014 Mark Wielaard <mjw@redhat.com> libdwfl: Record dwfl_attach_state error and return it on failure.

When dwfl_attach_state fails functions that need the process state should
return the error that caused the attach to fail. Use this in the backtrace
test to signal any attach failure. This makes sure that architectures that
don't provide unwinder support get properly detected (and the tests SKIPs)
Also don't assert when trying to attach a non-core ELF file, but return an
error to indicate failure.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
df85bf99021119fcbb2ced66dd69f1cceafb180c 01-May-2014 Mark Wielaard <mjw@redhat.com> libdwfl: Move dwz alt multi file searching to find_debuginfo callback.

Don't hard code the Dwarf dwz alt multi file search but allow the user
to override it through the standard Dwfl_Callbacks. Also move ownership
completely to the user of dwarf_setalt by removing free_alt from Dwarf
and adding alt, fd and elf fields to Dwfl_Module. Add a relative .dwz
file test case.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
9380297e130e6ccc829c8d56d701fb539b27bb0f 11-Apr-2014 Mark Wielaard <mjw@redhat.com> libdwelf: New DWARF ELF Low-level Functions. Add dwelf_elf_gnu_debuglink.

New public header elfutils/libdwelf.h for low-level DWARF/ELF helper
functions. The new function dwelf_elf_gnu_debuglink returns the name and
crc as found in the .gnu_debuglink section of an ELF file.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
4b9e1433d2272f5f68b3227abdd9cf6817a0afd3 04-Mar-2014 Mark Wielaard <mjw@redhat.com> libdwfl: dwfl_linux_proc_find_elf use elf_from_remote_memory for (deleted).

If a module has a "(deleted)" main ELF file, then try to read it from
remote memory if the Dwfl has process state attached by reusing the ptrace
mechanism from linux-pid-attach.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
19108019192ab273c53ae324be448d29dac806ca 30-Dec-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Add dwfl_core_file_attach and dwfl_linux_proc_attach.

Rewrite __libdwfl_attach_state_for_pid and __libdwfl_attach_state_for_core
as public functions and don't call them from dwfl_linux_proc_report and
dwfl_core_file_report anymore. This lets the user attach state explicitly
independ from how the dwfl modules have been reported. Since attaching
state is an explicit action now the error can be returned directly and we
don't need to keep track of process_attach_error. dwfl_linux_proc_attach
lets the user can tell libdwfl whether caller takes care of ptrace
attaching and stopping the threads under inspection, or whether the
callback needs to take care of that and detaching again.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
e962ec3bcbe8eccdcded36aaafee7bec41fa1bc4 20-Dec-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Add dwfl_getthread_frames.

dwfl_getthread_frames is a convenience function for when the user is only
interested in one specific thread id of a process. It can be implemented by
a simple wrapper function that removes an extra callback layer just to
filter on thread id. But it also provides an optimized path to getting
access to just one particular Dwfl_Thread of the Dwfl process by providing
and (optional) new callback for the state provider. The pid_thread_callbacks
now provide an (optional) pid_getthread that doesn't need to travers all
threads anymore. Which is implemented for the linux-pid-attach provider.

stack now uses this to implement a new '-1' option that shows just one
specific thread of a process.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
159ac52b061c60947a943c102298cd692223274f 18-Dec-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Introduce dwfl_module_getsym_info and dwfl_module_addrinfo.

Some arches like ppc64 use function descriptor values instead of function
addresses causing matching of names and addresses to fail when using
dwfl_module_getsym or dwfl_module_addrsym.

Add ebl hook to resolve any function descriptor values found in non-ET_REL
modules.

The new function dwfl_module_getsym_info doesn't adjust the symbol value
in any way, but returns the adjusted and/or resolved address associated
with the symbol separately. The new function dwfl_module_addrinfo resolves
against both the address associated with the symbol (which could be the
function entry address) value and the adjusted st_value. So that it is
easy to resolve and match either function descriptors and/or function
entry addresses.

Since these new functions also return more information they replace the
dwfl_module_getsym_elf and dwfl_module_addrsym_elf functions that never
made it into a released elfutils version.

addr2line and readelf now use the new functions when looking up functions
names. addr2line will now also display the section the address was found
in when given -x.

Extra testcases were added for both addr2line and the dwflsyms testscase.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
14c2d9e614cb0e3fd50ad757eaba686b37699580 16-Dec-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Add dwfl_module_getsymtab_first_global.

New function that provides the index after the last non-local symbol as
returned by dwfl_module_getsym and dwfl_module_getsym_info. Allows users to
first search through all global symbols before searching the local symbols
in the table like dwfl_module_addrsym and dwfl_module_addrsym_info do as
optimization.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
5ef96c979ca45d0bf8c44f082df4da6b780010db 30-Nov-2013 Jan Kratochvil <jan.kratochvil@redhat.com> Introduce process_attach_error.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
819c349f6339512d6961a6172c539fdf2c2f1328 27-Nov-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Add dwfl_module_addrsym_elf and dwfl_module_getsym_elf.

Introduce two new functions that also return the elf associated with a
symbol to make symbol section indexing work for non-special sections.
Simplify code by removing dwfl_file where appropriate and just track Elf
directly. Document limitations of shndx with existing dwfl_module_addrsym
and dwfl_module_getsym. Extend dwflsyms testcase to check some more symbol
and section (index) properties.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
954a7b0f64346339ef12fb9c04cd2912b72c749d 13-Nov-2013 Jan Kratochvil <jan.kratochvil@redhat.com> Provide __libdwfl_module_getsym to get dwfl_file *

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
0b867460075c9f02cb305abc91a0e12b90017583 30-May-2013 Jan Kratochvil <jan.kratochvil@redhat.com> Unwinder for x86*.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
744fc6f97f1c32fbab0f2a124bfa053e88fc3697 23-Jul-2013 Jan Kratochvil <jan.kratochvil@redhat.com> __libdwfl_elf_address_range: Add missing internal_function keyword.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
8af254a19665c3baf6074a36ba2618413b80d169 19-Jul-2013 Jan Kratochvil <jan.kratochvil@redhat.com> __libdwfl_find_elf_build_id: Add missing internal_function keyword.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
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/libdwflP.h
5083a70d3b64946fa47ea5766943a15a3ecc6891 16-Jan-2013 Mark Wielaard <mjw@redhat.com> libdwfl: Add minisymtab support.

Add an auxiliary symbol table dwfl_file aux_sym to Dwfl_Module if all we
have is the dynsym table. The main file might contain a .gnu_debugdata
section. The .gnu_debugdata section is a compressed embedded ELF file
that contains the text (code) section symbols from the symtab table
that are not in the main file dynsym table. dwfl_module_getsymtab (),
dwfl_module_addrsym () and dwfl_module_getsym () will use the auxiliary
symbol table when available (and no full symtab is available from the
debug file).

* libdwflP.h (struct Dwfl_Module): Add aux_sym, aux_symdata,
aux_syments, aux_symstrdata, aux_symxndxdata and aux_first_global.
(dwfl_adjusted_aux_sym_addr): New function.
(dwfl_deadjust_aux_sym_addr): Likewise.
(dwfl_adjusted_st_value): Take and check symfile argument.
(dwfl_deadjust_st_value): Likewise.
* dwfl_module_getdwarf.c (find_prelink_address_sync): Take and
use dwfl_file as argument to set address_sync.
(find_debuginfo): Call find_prelink_address_sync with debug file.
(find_aux_sym): New function.
(find_symtab): Use find_aux_sym if all we have is the dynsym table
and fill in aux DwflModule fields.
(dwfl_module_getsymtab): Return syments plus aux_syments.
(load_symtab): Always set first_global.
* dwfl_module_addrsym.c (dwfl_module_addrsym): Check symfile
when using same_section. Calculate first_global based on both
mod->first_global and mod->aux_first_global.
* dwfl_module.c (__libdwfl_module_free): Free aux_sym.
* dwfl_module_getsym.c (dwfl_module_getsym): Use auxsym table
to retrieve symbol and name if necessary, making sure all locals
from any table come before any globals.
* dwfl_module_info.c (dwfl_module_info): Call dwfl_adjusted_st_value
with symfile.
* relocate.c (resolve_symbol): Likewise.

https://fedoraproject.org/wiki/Features/MiniDebugInfo

Signed-off-by: Mark Wielaard <mjw@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
d5784afaf49cd59b9286e766cd9b1cf00cb43553 18-Oct-2012 Jan Kratochvil <jan.kratochvil@redhat.com> libdwfl/
* argp-std.c: Update Copyright year.
(offline_find_elf): New function.
(offline_callbacks): Use it for find_elf.
(struct parse_opt): New.
(parse_opt): New key ARGP_KEY_INIT. In other make hook struct
parse_opt pointer from former Dwfl pointer. Delay 'e and OPT_COREFILE
processing till ARGP_KEY_SUCCESS. Initialize state->input already from
ARGP_KEY_SUCCESS. Modify the cleanup in ARGP_KEY_ERROR. Make the
final state->input initialization optional.
* dwfl_end.c: Update Copyright year.
(dwfl_end): Free executable_for_core.
* libdwflP.h: Update Copyright year.
(struct Dwfl): New field executable_for_core.

tests/
* run-addrname-test.sh: New test for PIE relocation.
* testfile70.core.bz2: New file.
* testfile70.exec.bz2: New file.
* Makefile.am (EXTRA_DIST): Add testfile70.core.bz2 and
testfile70.exec.bz2 .

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
ef431cd30b8a1a6b12a8783516fc95da88a9a636 31-Oct-2011 Mark Wielaard <mjw@redhat.com> Use index of first global symbol to speed up dwfl_module_addrsym search.

Cache the index of the first global symbol in the module's symbol table,
or -1 when unknown. All symbols with local binding come first in the
symbol table before the global symbols. Use this information to speed
up dwfl_module_addrsym search.
/external/elfutils/libdwfl/libdwflP.h
5ad466d544bdca479626d07d65288b2cc2638b4a 11-Jan-2011 Roland McGrath <roland@redhat.com> libdwfl: Rejigger address synchronization using .gnu.prelink_undo information.
/external/elfutils/libdwfl/libdwflP.h
2c7d0ddfb8a08b8c450d0d3a5e297ec5d624661d 05-Jan-2011 Roland McGrath <roland@redhat.com> libdwfl: Enhance address_sync calculation to handle more prelink permutations.
/external/elfutils/libdwfl/libdwflP.h
1743d7f010bead5e869d097e23ce840583913381 13-Nov-2010 Roland McGrath <roland@redhat.com> libdwfl: Revamp bias bookkeeping, account correctly for prelink REL->RELA segment inflation.
/external/elfutils/libdwfl/libdwflP.h
ed431ddb74331f24add8c6d932ebed129c4385d8 06-May-2010 Roland McGrath <roland@redhat.com> libdwfl: Refuse to fall back to an ELF file opened by name when that mismatches the module build ID.
/external/elfutils/libdwfl/libdwflP.h
8068e06dd70d08789fafd8d6d22bbb42adbd2e7d 11-Mar-2010 Roland McGrath <roland@redhat.com> Export dwfl_core_file_report.
/external/elfutils/libdwfl/libdwflP.h
6bb90710916169e242ce39b12831c5a22a57fcd4 27-Aug-2009 Roland McGrath <roland@redhat.com> Rewrite kernel image support: use calculation instead of brute force, support uncompressed payloads.
/external/elfutils/libdwfl/libdwflP.h
241696467caa087278576291cb3b89693668df0b 26-Aug-2009 Roland McGrath <roland@redhat.com> libdwfl: Support automatic decompression of files in XZ format.
/external/elfutils/libdwfl/libdwflP.h
3c84db3b4b610bf636c4363abb6d3dac5ae020f9 25-Jun-2009 Roland McGrath <roland@redhat.com> CFI support: lookup by PC and translate into DWARF location per register
/external/elfutils/libdwfl/libdwflP.h
fe8b42e6131b74829fe31d15f31349cade566a59 08-Jul-2009 Roland McGrath <roland@redhat.com> Reorder some libdwflP.h struct members for optimal packing.
/external/elfutils/libdwfl/libdwflP.h
a605a3c8f354895f4cca56aca8f8aa468b506fdf 20-Apr-2009 Roland McGrath <roland@redhat.com> Break out __libdwfl_getelf internal function.
/external/elfutils/libdwfl/libdwflP.h
5453abf2ab7626daeab2506ebc6ed067f5063eb4 11-Feb-2009 Roland McGrath <roland@redhat.com> Omit module sanity checks on offline modules.
/external/elfutils/libdwfl/libdwflP.h
bca43152aa0bcb31b9442c407bf2b86379761c50 06-Jan-2009 Roland McGrath <roland@redhat.com> libdwfl automagic decompression support
/external/elfutils/libdwfl/libdwflP.h
b4d6f0f8064f2b706ea9035ef0393d8299671390 26-Aug-2008 Roland McGrath <roland@redhat.com> Fix up bogon and missing log entries from .pmachata.threads branch.
/external/elfutils/libdwfl/libdwflP.h
d11f9cbecac4a5ac3848a68597028d1924f3ff6b 26-Mar-2008 Roland McGrath <roland@redhat.com> libdwfl/
* dwfl_module_getdwarf.c (load_symtab): Don't return success for
SHT_DYNSYM, just set *SYMSCN like the comment says.
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
b597dfad924980dede10d7c19d87900b6172e599 16-Oct-2007 Ulrich Drepper <drepper@redhat.com> merge of '92c36bfdbc6468d1711c043b530e0dfe5abb6dec'
and 'c22c8c43f8f68b0bffd4d5ccdb2282c958268742'
/external/elfutils/libdwfl/libdwflP.h
59ea7f33f781e6e3f8c9d81d457e5d99eee8f1ce 04-Oct-2007 Roland McGrath <roland@redhat.com> src/
2007-10-04 Roland McGrath <roland@redhat.com>

* readelf.c (print_archive_index): New variable.
(options, parse_opt): Accept -c/--archive-index to set it.
(dump_archive_index): New function.
(process_file): Take new arg WILL_PRINT_ARCHIVE_INDEX.
Call dump_archive_index on archives if set.
(main): Update caller.
(any_control_option): Give it file scope, moved out of ...
(parse_opt): ... here.

tests/
2007-10-04 Roland McGrath <roland@redhat.com>

* run-readelf-test4.sh: New file.
* Makefile.am (TESTS, EXTRA_DIST): Add it.
/external/elfutils/libdwfl/libdwflP.h
55d34a5ac854be02fa10186182bc22685923c703 09-Jun-2007 Roland McGrath <roland@redhat.com> 2007-06-08 Roland McGrath <roland@frob.com>

* libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
/external/elfutils/libdwfl/libdwflP.h
6258e7486eb3eed6e50005946795c5fbf73aa106 13-Mar-2007 Ulrich Drepper <drepper@redhat.com> propagate from branch 'com.redhat.elfutils.roland.pending' (head e0c7abd450c9e49093cfae30af8a22782a74a403)
to branch 'com.redhat.elfutils' (head 2c784d50eee72e33972c333138a3a28df304da63)
/external/elfutils/libdwfl/libdwflP.h
a1cee0760dceaeca52aff9498b144978537d5a16 15-Aug-2006 Roland McGrath <roland@redhat.com> libdwfl/
2006-08-14 Roland McGrath <roland@redhat.com>

* linux-kernel-modules.c (try_kernel_name): If the call to
dwfl_standard_find_debuginfo produces no results, try it again
with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.

* find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
* libdwflP.h: ... to here.
* linux-kernel-modules.c (try_kernel_name): Skip manual open if it
repeats the first thing dwfl_standard_find_debuginfo will try.

* linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
(dwfl_linux_kernel_module_section_address): If a /sys file is missing
and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
section name.
/external/elfutils/libdwfl/libdwflP.h
e1812e1d90090450e3d93be56a487e2f11affced 12-Jul-2006 Ulrich Drepper <drepper@redhat.com> propagate from branch 'com.redhat.elfutils.roland.pending' (head 1ac619debea0e3ecfd2704e8bdc803c6c893b62a)
to branch 'com.redhat.elfutils' (head 830d38d0a2ce24911160a871963f093209e69d9e)
/external/elfutils/libdwfl/libdwflP.h
1e9ef50681e20ef14c2ba38aef37a71ff148be08 05-Apr-2006 Ulrich Drepper <drepper@redhat.com> Fix FSF address. No exception for libdwarf.
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
1656bc00ae97fa16a941a8cefacc4e01488d0e8a 23-Dec-2005 Roland McGrath <roland@redhat.com> 2005-12-22 Roland McGrath <roland@redhat.com>

* argp-std.c (parse_opt): Call dwfl_end in failure cases.

* linux-proc-maps.c (proc_maps_report): New function, broken out of ...
(dwfl_linux_proc_report): ... here. Call it.
(dwfl_linux_proc_maps_report): New function.
* libdwfl.h: Declare it.
* libdwflP.h: Add INTDECL.
* argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
/external/elfutils/libdwfl/libdwflP.h
994b4899278199fc4d307780dac0ea50b238bc74 05-Dec-2005 Roland McGrath <roland@redhat.com> merge of 2cc527e6d8c8ff19dab478f7d12e58f1cfa6d6f5
and 7b542932f3e2947183b45bdbf39d448f457da9fd
/external/elfutils/libdwfl/libdwflP.h
e47ab76f02c2a4f4d802ec298969ba67956435fe 17-Nov-2005 Roland McGrath <roland@redhat.com> Update new test after merge.
/external/elfutils/libdwfl/libdwflP.h
07d4f2fc1cb53f170a71bc13617bbdd9cb1c3c60 28-Oct-2005 Roland McGrath <roland@redhat.com> libdw/
Fixes to last changes.

tests/
2005-10-27 Roland McGrath <roland@redhat.com>

* run-find-prologues.sh: New file.
* Makefile.am (TESTS, EXTRA_DIST): Add it.
/external/elfutils/libdwfl/libdwflP.h
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/libdwflP.h
d2c5996f70844ae7816034b56e769ce163251718 11-Aug-2005 Roland McGrath <roland@redhat.com> 2005-08-10 Roland McGrath <roland@redhat.com>

* relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
use it instead of MOD->debug.file.
* libdwflP.h: Update decl.
* dwfl_module_getdwarf.c (load_dw): Update caller.
Fixes bug #165598.
/external/elfutils/libdwfl/libdwflP.h
4959bf89d92b59ba72bea5786d7b3f9b5564f750 09-Aug-2005 Roland McGrath <roland@redhat.com> libdw/
2005-08-09 Roland McGrath <roland@redhat.com>

* dwarf_end.c: Add INTDEF.
* dwarf_error.c (dwarf_errmsg): Likewise.
* libdwP.h (dwarf_end, dwarf_errmsg): Add INTDECLs.

libdwfl/
2005-08-09 Roland McGrath <roland@redhat.com>

* libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
* cu.c: Use INTUSE on dwarf_* calls.
* dwfl_error.c: Likewise.
* dwfl_module.c: Likewise.
* dwfl_module_getdwarf.c: Likewise.
* dwfl_module_getsrc_file.c: Likewise.
* lines.c: Likewise.
/external/elfutils/libdwfl/libdwflP.h
18618fd74777576cc20dce341bb71be327f9ed48 28-Jul-2005 Ulrich Drepper <drepper@redhat.com> Merge all of libdwfl.a into libdw.a. libdwfl.a is not installed.

Fix building of libdwfl. libdwfl.a must not depend on libwu.a
since the latter is not available after installation. Add copies
of the crc32 files to libdwfl.
/external/elfutils/libdwfl/libdwflP.h
b08d5a8fb42f4586d756068065186b5af7e48dad 26-Jul-2005 Ulrich Drepper <drepper@redhat.com> Adjust for monotone.
/external/elfutils/libdwfl/libdwflP.h