| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| |/
|
|
|
| |
Test: make
Change-Id: Ia66b73a4087b3e50689b212f85d78c0c7f8c53e1
|
| |\ |
|
| |/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
elfutils 0.181 release
* tag 'elfutils-0.181':
Prepare for 0.181
libdw,readelf: Recognize DW_CFA_AARCH64_negate_ra_state
libebl: Handle aarch64 bti, pac bits in gnu property note
readelf: base address entry can be first
backends: Implement aarch64_dynamic_tag_name and aarch64_dynamic_tag_check
libelf: Sync elf.h from glibc.
elflint: Handle .debug_line_str as .debug_str
libdw: Remove duplicate local wildcards from map file.
libdwfl: do not dlopen libdebuginfod.so in --disable-libdebuginfod mode
readelf: It is not an error if there are no line number statements
libdw: Rename check_constant_offset to is_constant_offset.
libelf: Fixup SHF_COMPRESSED sh_addralign in elf_update if necessary.
Only typedef Ebl once.
elfclassify: Handle fwrite to stdout failing.
configure.ac: Set -DBAD_FTS=1 also for CXXFLAGS.
libdwfl, src: Replace some asserts with proper check or error messages.
libasm: Make libasm.h include work without relying on any other include.
debuginfod: DEBUGINFOD_URLS should accept scheme-free urls
debuginfod: Add --disable-libdebuginfod and --enable-libdebuginfod=dummy.
PR26195: adapt debuginfod to API change in libmicrohttpd-0.9.71
libdwfl: read_address should use increasing address in intuit_kernel_bounds
debuginfod: Make sure handle_data can be allocated and is always freed.
debuginfod: Fix build_id hexadecimal length check.
debuginfod: Make sure suffix can place zero terminator when copying filename
debuginfod: Handle not being able to fopen interval_path.
ar, ranlib: Call fchown before fchmod, explicitly check and ignore errors.
libdwfl: Flag an error if CIE return_address_register is invalid.
libdwfl: When we find a compressed image, use that, don't search for others
elflint: Explicitly check and ignore elf_compress error.
libdw: Add missing FALLTHROUGH in execute_cfi.
backends: Make the reloc_nametable zero element an one char array.
tests: Use #/usr/bin/env bash in scripts that use bash
elfutils/configure.ac: use $READELF, not readelf
tests: Add GCOV flags when necessary.
Change-Id: Ib7924b2a9bb8b26207e11bd1439d03ca59c87fc0
Signed-off-by: Matthias Maennich <maennich@google.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Set version to 0.181.
Update NEWS and elfutils.spec.in.
Regenerate po/*.po files.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
DW_CFA_AARCH64_negate_ra_state is used on aarch64 to indicate whether
or not the return address is mangled or not. This has the same value
as the DW_CFA_GNU_window_save. So we have to pass around the e_machine
value of the process or core we are inspecting to know which one to
use.
Note that it isn't actually implemented yet. It needs ARMv8.3 hardware.
If we don't have such hardware it is enough to simply ignore the
DW_CFA_AARCH64_negate_ra_state (and not confuse it with
DW_CFA_GNU_window_save) to get backtraces to work on aarch64.
Add a testcase for eu-readelf --debug-dump=frames to show the value
is correctly recognized. Also don't warn we cannot find any DWARF
if we are just dumping frames (those will come from .eh_frame if
there is no .debug_frame).
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When building with gcc -mbranch-protection= we might get a gnu property
note indicating BTI (Branch Target Identification) and/or PAC (Pointer
Authentication Code) is being used.
Add a small testcase to show eu-readelf -n now properly lists those
bits in the gnu property note.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
In both debug_ranges and debug_loc a base address entry can be the
first in the range or loc list. If so print the offset and set first
to false. Otherwise don't print the entry list offset, but do set
first to false.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| | |
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| | |
Gets us DT_AARCH64_BTI_PLT and DT_AARCH64_PAC_PLT.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| | |
The new DWARF5 .debug_line_str is identical to the .debug_str section.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| | |
We only need one local: * entry to capture all private local symbols.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
debuginfod-client.c used to try to dlopen libdebuginfod.so even if
libdebuginfod was completely disabled using --disable-libdebuginfod.
Fix this by disabling build of debuginfod-client.c and disabling all
__libdwfl_debuginfod_* invocations in --disable-libdebuginfod mode.
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It can happen that there are no line number statements at the end of
a debug line section. So don't check that there are any more bytes
after the last file entry. And print "No line number statements."
libdw already got this corner case correct.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The check_constant_offset code in dwarf_getlocation.c code is not very
intuitive, rename it to is_constant_offset and update the documentation.
https://sourceware.org/bugzilla/show_bug.cgi?id=26321
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In elf_getdata.c we have the following to compensate for possibly
bad sh_addralign values of compressed sections:
/* Compressed data has a header, but then compressed data.
Make sure to set the alignment of the header explicitly,
don't trust the file alignment for the section, it is
often wrong. */
if ((flags & SHF_COMPRESSED) != 0)
{
entsize = 1;
align = __libelf_type_align (elf->class, ELF_T_CHDR);
}
Which makes sure the d_data alignment is correct for the Chdr struct
at the start of the compressed section.
But this means that if a user just reads such a compressed section
without changing it, and then tries to write it out again using
elf_update they get an error message about d_align and sh_addralign
being out of sync.
We already correct obviously incorrect sh_entsize fields.
Do the same for the sh_addralign field of a SHF_COMPRESSED section.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit 287a18452 libasm.h defines an opague Ebl handle.
This is fine, except for (internal) code that also includes libebl.h.
Since C11 having multiple typedefs for the same thing is fine, but we
do build using GNU/C99. This also allows multiple same typedefs, except
for (very) old GCCs.
This only affects internal code, since libebl.h isn't a public header.
For internal code, only add the typedef in libebl.h when libasm.h
hasn't been included. Make sure all code that includes both headers
includes libasm.h first.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| | |
In theory an fwrite can fail, if so, signal it by calling issue ().
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| | |
debuginfod.cxx checks whether or not BAD_FTS is defined.
This only matters on old 32bit arches.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
library code really shouldn't assert and for utilities a proper
error message is better than crashing with an assert.
https://sourceware.org/bugzilla/show_bug.cgi?id=26176
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The public headers should be usable when includes as is.
libasm.h wasn't because it was using gelf.h data structures without
include gelf.h. Include it now in libasm.h.
Add a new testcase run-test-includes.sh to test all public headers
can be included "standalone".
https://sourceware.org/bugzilla/show_bug.cgi?id=26176
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check scheme instead of effective url so that user may abbreviate
DEBUGINFOD_URL. Add one test for scheme free http url.
Notice that libcurl does not provide an almighty scheme free url
support, /path/to/something without FILE:// can not be recognized
in most circumstances, therefore for the neatness of our code
structure, DEBUGINFOD_ URL of scheme "FILE" must be input as URI.
Signed-off-by: Alice Zhang <alizhang@redhat.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make it possible to build just the debuginfod client or to create a
dummy libdebuginfod that doesn't link against libcurl. The dummy library
can be used for bootstrapping. For testing purposes you can also build
debuginfod against the dummy libdebuginfod but then the debuginfod
server will not be able to do delegation.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
To make our code build with -Werror as well as against older libmicrohttpd,
we must conditionalize the data type (int vs. enum) returned by callbacks
and some mhd functions.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In kernels from 4.14 up to 4.19 in /proc/kallsyms there are special
__entry_SYSCALL_64_trampoline symbols. The problem is that they come
after the last kernel address, but before the module addresses.
And they are (much) smaller than the start address we found. This
confuses intuit_kernel_bounds and makes it fail.
Make sure to check read_address returns an increasing address when
searching for the end.
https://sourceware.org/bugzilla/show_bug.cgi?id=26177
Reported-by: Vitaly Chikunov <vt@altlinux.org>
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
When allocating handle_data we should check for out of memory failures.
Also when the allocation has succeeded make sure we always clean up by
going to out1 on any future errors. So move the curl_multi_init call
earlier, because that goes to out0 on failure.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When is debuginfod_query_server is given an hexadecimal string as
build-id build_id_len will be zero. We were checking the size of
the build_id_bytes destination string instead of the string length
of build_id input string. Make sure the input string is not too
big or strcpy might overwrite then end of the build_id_bytes array.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We need to make sure that we can always place a zero terminator at
the end of suffix when we are copying the filename. So add one more
char to the suffix array. And make sure that we can always add an
extra escape character when we need to escape the current character.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Although we check for and/or create the interval_path right before,
there is still a possibility that the fopen call fails. Handle that
as if the file is unreadable.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In ar and ranlib we don't mind if the fchown call fails (it normally
would, then the file simply gets own by the current user). We used to
call fchown before fchmod, but that might ignore (or reset) some mode
flags, so call fchown first, then try fchmod (like we already do in
elfcompress). Also explicitly test and then ignore any errors for
chown. We used to do some asm trick, but that confuses some static
analyzers (and it is somewhat unreadable). Also split out the giant
if statements to make them a little bit more understandable.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| | |
If the CIE return address register is invalid (unknown) for the
architecture immediately flag an error and return.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
We try to find a compressed vmlinux image ending with either .gz, bz2 or
xz. Stop searching if we find one. Otherwise we will leak a file descriptor
for an earlier one we opened.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We just want to make sure that any section data is decompressed before
use, if the section was already decompressed that is fine, so just ignore
any errors. The make this more clear, explicitly check for errors, then
don't do anything. This is better than silently ignoring since everywhere
else in the code we do explicitly check for errors.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| | |
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
We are using the reloc_nametable zero element as an char array.
So make that element an actual array (we are actually after one
of the next string arrays in the table).
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| | |
Some systems don't have bash in /bin.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow user to specify own readelf. Use detected readelf,
not 'readelf'.
Noticed when was building elfutils on tuple-prefixed toolchain:
```
checking whether the compiler generates build-ids...
./configure: line 5197: readelf: command not found
no
```
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
| | |
| |
| |
| |
| |
| |
| | |
The nlist-test has a special compile rule, make sure it gets the
GCOV flags when configuring with --enable-gcov.
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
| |\ \ |
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
libdw depends on libelf which is disabled for Darwin.
Test: Darwin build no longer complains about missing dependencies.
Bug: 169112496
Change-Id: I1e5cb572ef125dfd3a144de7b12dcda92aca0c00
|
| |\ \ |
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds build description for more elfutils libraries in order support
users that require libdw, such as pahole and libabigail.
While the remaining libraries could be considered standalone, they are
not really suitable to be built standalone in soong as they have
circular dependencies and are usually anyway built as one unit. Hence
only build libdw and include all libraries into it. This then works as
an extension for libelf.
The generated files in libcpu are now all generated from sources. No
really significant generated file is now checked in. Left are config.h
and version.h, which are generated at update time via post_update.sh.
The build rules for the generated files have been reverse engineered
from the autotools build. This mostly making m4, bison and flex work
what we want them to, but builtin rules in soong made that possible
without being overly verbose. An additional library - libeu - needed to
be added as a generator dependency. In order to not overload the main
Android.bp with all the little generator details, subpackages have been
reintroduced and visibility adjusted accordingly.
Bug: 159682555
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I32e6523b3d604de0ead354b9b325fa492b680cec
|
| |\ \
| | |
| | |
| | |
| | |
| | | |
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1415108
Change-Id: I757b4f82bf44e836a2b3090ececae0e9f1ce1a54
|
| | |\ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit f95012c7844c6d5864e66c560acdb98ceef5060b.
Bug: 166815863
Reason for revert: Broken Build: aosp-master on full-eng
Change-Id: I01da25db2d823956166cdfb886e1099d77ae8b5e
|
| |\| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1346247
Change-Id: Ied84473132346382df6d510bc7dc916834c9377e
|
| | |\| | |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This adds build description for more elfutils libraries in order support
users that require libdw, such as pahole and libabigail.
While the remaining libraries could be considered standalone, they are
not really suitable to be built standalone in soong as they have
circular dependencies and are usually anyway built as one unit. Hence
only build libdw and include all libraries into it. This then works as
an extension for libelf.
The generated files in libcpu are now all generated from sources. No
really significant generated file is now checked in. Left are config.h
and version.h, which are generated at update time via post_update.sh.
The build rules for the generated files have been reverse engineered
from the autotools build. This mostly making m4, bison and flex work
what we want them to, but builtin rules in soong made that possible
without being overly verbose. An additional library - libeu - needed to
be added as a generator dependency. In order to not overload the main
Android.bp with all the little generator details, subpackages have been
reintroduced and visibility adjusted accordingly.
Bug: 159682555
Change-Id: Ie6f0713812f10b5b12f4e0bdfca27d0369bb71a4
Signed-off-by: Matthias Maennich <maennich@google.com>
|
| |\| |
| | |
| | |
| | |
| | |
| | | |
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1360841
Change-Id: I237cdf59d6b8a2d161cbe2153e34b231b8a1761b
|
| | |\ \
| | | |
| | | |
| | | |
| | | |
| | | | |
Original change: https://android-review.googlesource.com/c/platform/external/elfutils/+/1360841
Change-Id: Icf351f4ef9f1f67be98355741d14a83bbffc3da9
|