Re: [RFC] libdw: prepend current directory in read_srclines

2017-05-03 Thread Torsten Polle
Hi Mark, > Am 29.03.2017 um 22:15 schrieb Torsten Polle : > > Hi Mark, > >> Am 27.03.2017 um 22:45 schrieb Mark Wielaard : >> >> Hi Torsten, >> >> On Sun, Mar 26, 2017 at 08:35:50PM +0200, Torsten Polle wrote: >>> I observed that readelf and elfutils sometimes report different results. >> >>

[PATCH] Add replacement endian.h and byteswap.h to libgnu

2017-05-03 Thread Ulf Hermann
Some systems don't provide endian.h and byteswap.h. The required functions are trivial to define using sys/param.h and gcc builtins, though. Also, include endian.h in dwelf_scn_gnu_compressed_size.c as that uses be64toh(). Signed-off-by: Ulf Hermann --- ChangeLog

[PATCH] If f(un)lockfile is unavailable define it away

2017-05-03 Thread Ulf Hermann
Sometimes _POSIX_THREAD_SAFE_FUNCTIONS is still set in this case, which in turn leads to build problems in getopt.c (which would define the functions to nop anyway if it knew they aren't present). Signed-off-by: Ulf Hermann --- lib/ChangeLog | 5 + lib/eu-config.h | 7 +++ 2 files chan

[PATCH] Add a "selfcontained" mode to provide missing headers on windows

2017-05-03 Thread Ulf Hermann
With MSVC there is no features.h, uid_t, gid_t, mode_t, and pid_t are not defined and there is also no elf.h. To make it possible to build other software against libelf and libdw, install our own version of elf.h, and a bare-bones features.h that provides exactly the above declarations. The feature

[PATCH] Drop __BEGIN_DECLS and __END_DECLS from elf.h

2017-05-03 Thread Ulf Hermann
We don't use those anywhere else and they are not guaranteed to be defined. Also, put the 'extern "C"' after the included headers. Signed-off-by: Ulf Hermann --- libelf/ChangeLog | 4 libelf/elf.h | 10 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libelf/C

[PATCH v2] Check if rpath is supported before setting it

2017-05-03 Thread Ulf Hermann
Some systems don't have rpath. In that case the backends need to be made available by some external mechanism. Provide a configure switch to explicitly turn off the setting of rpaths. Throw an error if that is not set and rpath is not supported. Signed-off-by: Ulf Hermann --- ChangeLog |

[PATCH v2] Detect if symbol versioning is supported (was "Disable symbol versioning if .symver doesn't work")

2017-05-03 Thread Ulf Hermann
If not, throw an error unless symbol versioning was explicitly disabled. Signed-off-by: Ulf Hermann --- ChangeLog| 4 configure.ac | 15 +++ 2 files changed, 19 insertions(+) diff --git a/ChangeLog b/ChangeLog index 01f88f3..22c46c6 100644 --- a/ChangeLog +++ b/ChangeLog @

Re: pending patches

2017-05-03 Thread Ulf Hermann
> - Check for -z,defs, -z,relro, -fPIC, -fPIE before using them > There are actually two versions, I haven't looked yet how they differ. There was a typo in tests/Makefile.am which I fixed in the second version. This change actually doesn't disable symbol versioning or rpath. It just condition

[PATCH] Make sure packed structs follow the gcc memory layout

2017-05-03 Thread Ulf Hermann
On windows gcc by default generates code that follows the MSVC layout. We don't want that as it adds extra padding. Signed-off-by: Ulf Hermann --- ChangeLog | 5 + backends/ChangeLog | 4 backends/linux-core-note.c | 2 +- configure.ac | 13

Re: pending patches

2017-05-03 Thread Ulf Hermann
> - Check for -z,defs, -z,relro, -fPIC, -fPIE before using them > There are actually two versions, I haven't looked yet how they differ. > - Check if gcc complains about __attribute__ (visibility(..)) > - Disable symbol versioning if .symver doesn't work > - Check if rpath is supported before set

pending patches

2017-05-03 Thread Mark Wielaard
Hi Ulf, Here are some short comments on the pending patches that I would like to deal with after the 0.169 release. I believe what we have now on master is a good set of fixes that look OK on Fedora 25/RHEL7 x86_64. I'll run some tests on other distros and supported Fedora/RHEL architectures in th

[PATCH] Check if gcc supports -rdynamic and don't use it if not

2017-05-03 Thread Ulf Hermann
On some platforms the symbols are automatically exported and -rdynamic will produce a warning. Signed-off-by: Ulf Hermann --- ChangeLog | 4 configure.ac | 11 +++ tests/ChangeLog | 5 + tests/Makefile.am | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-

[PATCH] Generate .lib files on PE platforms

2017-05-03 Thread Ulf Hermann
MSVC needs them to link against .dll files. gcc can do without, so we only need to do this when actually installing the files. There is a way to generate .lib files with dlltool, but most of the time MSVC won't cleanly link against the result, so we rather use lib.exe here. Signed-off-by: Ulf Herm

Re: [PATCH] Make elf section sorting more deterministic

2017-05-03 Thread Ulf Hermann
[...] How about the attached? Looks good to me. Ulf