Commit Graph

199 Commits

Author SHA1 Message Date
zhanghaibo e660ab2124 upgrade to v0.188
Signed-off-by: zhanghaibo <zhanghaibo0@huawei.com>
Change-Id: I83c8756f5ce0a464b037bc963cfdce43df82921b
2023-04-25 18:45:37 +08:00
Mark Wielaard 01747645a4 Prepare for 0.185
Set version to 0.185
Update NEWS and elfutils.spec.in
Regenerate po/*.po files

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-05-22 15:41:43 +02:00
Mark Wielaard 97b3f67682 Prepare for 0.184
Set version to 0.184
Update NEWS and elfutils.spec.in
Regenerate po/*.po files

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-05-10 14:13:53 +02:00
Frank Ch. Eigler 69fc2b3a5c debuginfod: Set child thread names via pthread_setname_np()
In order to assist problem diagnosis / monitoring, use this
gnu-flavoured pthread function to set purpose names to the various
child threads debuginfod starts.  libmicrohttpd already sets this for
its threads.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2021-03-30 13:22:43 -04:00
Timm Bäder 1645d4a7e6 build: Check for -Wno-packed-not-aligned support
Clang does not support this warning, so check for compiler support
before using it.

Signed-off-by: Timm Bäder <tbaeder@redhat.com>
2021-03-06 03:14:34 +01:00
Timm Bäder 00d92d0b6a build: Check for -Wtrampolines support
Clang does not support -Wtrampolines, so check if the compiler supports
it before using it.

Signed-off-by: Timm Bäder <tbaeder@redhat.com>
2021-03-06 03:05:51 +01:00
Mark Wielaard ae05738d35 Prepare for 0.183
Set version to 0.183
Update NEWS and elfutils.spec.in.
Set copyright year in configure.ac and printversion.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2021-02-05 22:55:10 +01:00
Érico Rolim 8db222e36a libdwfl: use GNU strerror_r only when available.
Some C libraries don't provide the GNU version of strerror_r, only the
XSI-compliant one. We use the GNU version when available, since it fits
the code better, and otherwise use the XSI-compliant one.

https://sourceware.org/bugzilla/show_bug.cgi?id=21010

Signed-off-by: Érico Rolim <erico.erc@gmail.com>
2021-02-05 15:36:25 +01:00
Dmitry V. Levin 2a16a0fc7e Add coverage target
Implement a target for capturing code coverage using lcov.
It is available when elfutils is configured using --enable-gcov.

Tested with
autoreconf -if && ./configure --enable-maintainer-mode --enable-gcov &&
make && make check && make coverage

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2021-01-12 09:09:25 +00:00
Dmitry V. Levin 05c232f7fd Split the top level .gitignore file
Move subdirectory parts of the top level .gitignore into appropriate
subdirectories.  This would be consistent with ChangeLog files,
currently one has to update the top level ChangeLog file when
the top level .gitignore file is changed in a way that affects
a specific subdirectory only.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-20 08:00:00 +00:00
Dmitry V. Levin 32ba0acfbc .gitignore: update
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-20 08:00:00 +00:00
Dmitry V. Levin dd52d2abaf Modernize gettext infrastructure
Switch to use AM_GNU_GETTEXT, AM_GNU_GETTEXT_VERSION, and
AM_GNU_GETTEXT_REQUIRE_VERSION, this allows to stop bundling gettext
infrastructure files and let autoreconf invoke autopoint which will set
the gettext infrastructure up.

Use this opportunity to create separate .gitignore files for m4/ and po/
directories.

Tested with
autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-16 10:01:52 +00:00
Dmitry V. Levin 5264bc07bd m4: remove unneeded Makefile.am
m4 files do not have to listed in EXTRA_DIST, in fact,
biarch.m4 has not been listed since its very beginning in 2013,
and nobody seems to have noticed so far.

Tested with
autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-15 20:43:17 +01:00
Dmitry V. Levin 5799bf7282 configure.ac: remove unneeded AC_CONFIG_MACRO_DIR([m4])
Makefile.am already contains "ACLOCAL_AMFLAGS = -I m4",
that is enough for autoreconf to do the right thing.

Tested with
autoreconf -if && ./configure --enable-maintainer-mode && make && make distcheck

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-15 20:36:35 +01:00
Dmitry V. Levin 98b69a9759 Fix spelling typos in NEWS, NOTES, TODO, and in comments of configure.ac
accidently -> accidentally
approriate -> appropriate
depencies -> dependencies
endianess -> endianness
funtions -> functions
indeces -> indices
indentified -> identified
ist -> is
mutliple -> multiple
nessesary -> necessary
optimze -> optimize
severly -> severely
suport -> support
tranformation -> transformation

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-12 18:06:28 +01:00
Dmitry V. Levin 441d2f09e1 Remove unused tests/configure.ac
tests/configure.ac was introduced 15 years ago by commit
d7f8d0caa7.  However, the ability to build
tests as a separate project was broken by the same author 4 years later
by commit 22359e2653, if not earlier.

An attempt to run autoreconf in tests would currently fail
with the following automake error:
automake: error: cannot open < config/eu.am: No such file or directory

Apparently, nobody builds tests as a separate project for more than 10
years, so cleanup the remains of that unused and broken code.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-11 12:47:54 +01:00
Dmitry V. Levin be084ccb55 configure.ac: simplify argp check
Rewrite argp check using the same AC_SEARCH_LIBS based method used
earlier in the fts check.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-11 12:30:09 +01:00
Dmitry V. Levin 8ffada54af configure.ac: fix typo in error diagnostics
Fixes: da855fc9c ("Support building when fts and obstack aren't part of libc")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-11 12:27:38 +01:00
Dmitry V. Levin fc5e808d54 debuginfod: export DEBUGINFOD_SONAME macro in debuginfod.h
Add DEBUGINFOD_SONAME macro to API for use by those of libdebuginfod
clients that would like to dlopen the library in the same way as
__libdwfl_debuginfod_init does.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
2020-12-09 20:38:07 +01:00
Érico Rolim da855fc9cd Support building when fts and obstack aren't part of libc.
- Make configure.ac test for fts and obstack availability;
- Add fts and obstack ldflags to all files that need them;
- Add missing argp ldflags to programs in debuginfod/.

Signed-off-by: Érico Rolim <erico.erc@gmail.com>
2020-11-03 01:11:06 +01:00
Mark Wielaard d4fd080420 Prepare for 0.182
Set version to 0.182.
Update NEWS and elfutils.spec.in.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2020-10-31 18:01:28 +01:00
Tom Tromey 70343f4844 Fix leb128 reading
PR 26773 points out that some sleb128 values are decoded incorrectly.

This version of the fix only examines the sleb128 conversion.
Overlong encodings are not handled, and the uleb128 decoders are not
touched.  The approach taken here is to do the work in an unsigned
type, and then rely on an implementation-defined cast to convert to
signed.

Signed-off-by: Tom Tromey <tom@tromey.com>
2020-10-29 23:59:25 +01:00
Frank Ch. Eigler 94708e9646 PR25461: add /etc/profile.d files for default $DEBUGINFOD_URLS
To give distros a simple knob to let their userbase enjoy debuginfod
services, we add a --enable-debuginfod-urls[=URLS] to the configury.
This propagates to $DEBUGINFOD_URLS environment variable settings
in /etc/profile.d/debuginfod.{sh,csh} files.

The default is nothing.  If simply enabled, the current prototype
public server is used.  If enabled with parameters, the builder/distro
can specify a default URL search path of their own.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2020-10-08 11:08:12 -04:00
Mark Wielaard 52536d7d21 libdwfl: Add ZSTD support.
Newer kernels might be compressed using ZSTD add support to libdwfl open
so we can can automatically read ZSTD compressed files and kernel images.

The support is very similar to the bzip2 and lzma support, but slightly
different. With a bit more macros it could maybe have used the gzip.c
USE_INFLATE code path. But I felt that the many macros didn't really help
understand the code. So the unzip routine has a slightly different code
path for ZSTD.

https://sourceware.org/bugzilla/show_bug.cgi?id=26632

Signed-off-by: Mark Wielaard <mark@klomp.org>
2020-09-21 15:17:00 +02:00
Mark Wielaard 41a17386a6 Prepare for 0.181
Set version to 0.181.
Update NEWS and elfutils.spec.in.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2020-09-08 12:56:07 +02:00
Dmitry V. Levin 4ced3010ad libdwfl: do not dlopen libdebuginfod.so in --disable-libdebuginfod mode
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>
2020-08-31 10:39:35 +02:00
Mark Wielaard ad7036f15e configure.ac: Set -DBAD_FTS=1 also for CXXFLAGS.
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>
2020-07-22 15:05:46 +02:00
Mark Wielaard f7f0cdc59a debuginfod: Add --disable-libdebuginfod and --enable-libdebuginfod=dummy.
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>
2020-07-04 01:30:07 +02:00
Sergei Trofimovich 9698a39929 elfutils/configure.ac: use $READELF, not readelf
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>
2020-06-15 11:11:00 +02:00
Mark Wielaard a2bc0214a5 Prepare for 0.180
Set version to 0.180.
Update NEWS and elfutils.spec.in.
Set copyright year in printversion.
Regenerate po/*.po files.
Update .gitignore.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2020-06-11 16:09:03 +02:00
Mark Wielaard 27a388bdd2 libebl: Remove Ebl struct size check and MODVERSION string.
We used to do several sanity checks when the ebl backend libraries
were loaded to make sure there was no version mismatch. When initializing
the backend we passed the current Ebl struct size so the library could
check it supported the given Ebl struct and we checked that the init
method returned the correct build time module version string. Neither
are necessary now that the backends are builtin.

Remove both the struct size check and the MODVERSION string (which
wasn't actually checked anymore). Make the init function return the
given Ebl handle or NULL on error (no init function currently indicates
any error).

Signed-off-by: Mark Wielaard <mark@klomp.org>
2020-06-10 21:01:33 +02:00
Mark Wielaard 3a77288084 Prepare for 0.179
Set version to 0.179.
Update NEWS and elfutils.spec.in.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2020-03-30 13:04:00 +02:00
Mark Wielaard a344b8ce0b Update mailinglist subscription info.
Signed-off-by: Mark Wielaard <mark@klomp.org>
2020-03-25 23:25:49 +01:00
Frank Ch. Eigler 9b0fb4440a ChangeLog catchup for two recent commits
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2020-02-03 14:21:15 -05:00
Omar Sandoval c435a33811 configure: Fix -D_FORTIFY_SOURCE=2 check when CFLAGS contains -Wno-error
If CFLAGS contains -Wno-error, then the check for -D_FORTIFY_SOURCE=2
won't fail when appropriate. E.g., compiling with:

  ./configure CFLAGS='-Wno-error -O0' &&

Results in a flood of "_FORTIFY_SOURCE requires compiling with
optimization (-O)" warnings.

Make sure we add -Werror after the user-defined CFLAGS.

Signed-off-by: Omar Sandoval <osandov@fb.com>
2019-12-12 12:08:51 +01:00
Mark Wielaard cf1b5fe170 Make sure to always build with build-ids.
We really need build-ids for various things.  If the system compiler
doesn't generate build-ids warn and generate them anyway for both the
binaries and the tests.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2019-12-11 14:22:15 +01:00
Mark Wielaard 6b13cb0009 Prepare for 0.178
Set version to 0.178.
Update NEWS and elfutils.spec.in.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2019-11-26 09:52:24 +01:00
Mark Wielaard 3f81dbd235 Fix BUILD_STATIC build and enable gcov for debuginfod.
libdw now always needs -lpthread and -ld even when BUILD_STATIC.
BUILD_STATIC is only used when doing a gcov enabled build.
Enable gcov coverage also for debuginfod.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2019-11-26 08:56:44 +01:00
Aaron Merey 288f6b199a debuginfod 1/2: client side
Introduce the debuginfod/ subdirectory, containing the client for a
new debuginfo-over-http service, in shared-library and command-line
forms.  Two functions in libdwfl make calls into the client library to
fetch elf/dwarf files by buildid, as a fallback.  Instead of normal
dynamic linking (thus pulling in a variety of curl dependencies),
the libdwfl hooks use dlopen/dlsym.  Server & tests coming in patch 2.

Signed-off-by: Aaron Merey <amerey@redhat.com>
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
2019-11-22 22:49:21 +01:00
Jonathon Anderson 5e2a8e25e2 Add configure options for Valgrind annotations.
Signed-off-by: Jonathon Anderson <jma14@rice.edu>
2019-11-08 17:03:53 +01:00
Omar Sandoval 4f937e24dc Don't use dlopen() for libebl modules
Currently, architecture-specific code for libebl exists in separate
libebl_$ARCH.so libraries which libebl loads with dlopen() at runtime.
This makes it impossible to have standalone, statically-linked binaries
which use libdwfl if they depend on any architecture-specific
functionality. Additionally, when these libraries cannot be found, the
failure modes are non-obvious. So, let's get rid of libebl_$arch.so and
move it all into libdw.so/libdw.a, which simplifies things considerably.

Signed-off-by: Omar Sandoval <osandov@fb.com>
2019-08-29 13:30:30 +02:00
Mark Wielaard 5643e037cb Prepare for 0.177
Set version to 0.177.
Update NEWS and elfutils.spec.in.
Use git --get user.name and user.email for spec changelog.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2019-08-13 23:57:23 +02:00
Mark Wielaard 89f5c7b57e Prepare for 0.176
Set version to 0.176.
Update NEWS and elfutils.spec.in.
Update GPG-KEY.
Regenerate po/*.po files.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2019-02-14 14:40:21 +01:00
Mark Wielaard b63007ed58 configure: Add new --enable-install-elfh option.
We explicitly test (with system-elf-libelf) that our include headers
work with the system elf.h header. But it might be helpful to install
the elf.h file for a private install. Our elf.h header really is just
a copy of the latest glibc elf.h. But it might be newer and include
more constants than the system installed elf.h.

Add a new configure option --enable-install-elfh to install elf.h.
But warn when it is enabled for the default /usr or /usr/local prefix
because it might clash with the glibc/system elf.h header in that case.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2019-01-31 23:51:17 +01:00
Ross Burton d612684109 Require gawk in maintainer mode
gawk is required to build known_dwarf.h, so check for it in configure.ac.

Signed-off-by: Ross Burton <ross.burton@intel.com>
2018-07-05 20:09:30 +02:00
Mark Wielaard 7a1fd63a74 Prepare for 0.172.
It has been only 10 days since the previous release and there are
no functional changes compared to 0.171. The speedup of eu-readelf -N
is pretty nice. And ~25 patches fix various bugs (hangs and crashes)
in dealing with bad DWARF5 data. Most have been found by running the
afl fuzzer on eu-readelf and various testcases.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2018-06-11 19:02:20 +02:00
Mark Wielaard cf65ca1428 Prepare for 0.171.
Set version to 0.171. Update po/*.po files.
Mention DWARF5, split dwarf and GNU DebugFission support in NEWS.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2018-06-01 21:16:56 +02:00
Mark Wielaard afffdff292 libdwfl: Use process_vm_readv when available.
If possible use process_vm_readv to read 4K blocks instead of fetching
each word individually with ptrace. For unwinding this often means we
only have to do one process_vm_readv of the stack instead of dozens of
ptrace calls. There is one 4K cache per process, cleared whenever a
thread is detached.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2018-03-28 16:30:27 +02:00
Joshua Watt 555e15ebe8 Use fallthrough attribute.
Use __attribute__ ((fallthrough)) to indicate switch case fall through
instead of a comment. This ensures that the fallthrough warning is not
triggered even if the file is pre-processed (hence stripping the
comments) before it is compiled.

The actual fallback implementation is hidden behind a FALLBACK macro in
case the compiler doesn't support it.

Finally, the -Wimplict-fallthrough warning was upgraded to only allow
the attribute to satisfy it; a comment alone is no longer sufficient.

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
2018-02-10 03:19:26 +01:00
Mark Wielaard a5c72418f5 lib: Remove md5 and sha1 implementations.
Only the testcase md5-sha1-test used them. So also remove that testcase.

Signed-off-by: Mark Wielaard <mark@klomp.org>
2017-10-20 13:51:02 +02:00