[PATCH] Allow elf header to be used when __BEGIN_DECLS and __END_DECLS aren't defined.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim The elf/elf.h header is shared, verbatim, by the elfutils project. However, elfutils can be used on systems with libcs other than glibc, making the presence of __BEGIN_DECLS and __END_DECLS in the file something that downstream distros have to add patches for. Per https://sourc

[RFC][PATCH] * bits/confname.h: Define _CS_POSIX_V7_THREADS_CFLAGS, _CS_POSIX_V7_THREADS_LDFLAGS

2020-10-26 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim I would like to add these enums in order to conform to the POSIX specification: https://www.man7.org/linux/man-pages/man0/unistd.h.0p.html This change also helps musl-libc, since they want to have these defines with the same values as glibc. I tried to add them for the bits/co

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Rich Felker
On Mon, Oct 26, 2020 at 11:32:23PM +0100, Mark Wielaard wrote: > Hi Max, > > On Mon, 2020-10-26 at 13:54 -0400, Max Rees via Elfutils-devel wrote: > > On Mon Oct 26 01:28 PM, Érico Nogueira wrote: > > > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > > > On Mon, 2020-10-26 at 12:03 -0

Re: [PATCH] Fix leb128 reading

2020-10-26 Thread Tom Tromey
>> In this patch, I chose to try to handle weird leb128 encodings by >> preserving their values when possible; or returning the maximum value >> on overflow. It isn't clear to me that this is necessarily the best >> choice. Mark> I think it is a good thing to accept "padded" leb128 numbers, but M

Re: [PATCH] Don't use locale functions when libintl header isn't included.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
On Mon Oct 26, 2020 at 3:22 PM -03, Frank Ch. Eigler wrote: > Hi - > > > On Mon, 2020-10-26 at 01:11 -0300, Érico Nogueira via Elfutils-devel wrote: > > > debuginfod.cxx used the bindtextdomain() and textdomain() functions > > > despite not including any translated output. These functions were als

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Mark Wielaard
Hi Max, On Mon, 2020-10-26 at 13:54 -0400, Max Rees via Elfutils-devel wrote: > On Mon Oct 26 01:28 PM, Érico Nogueira wrote: > > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils- > > > devel > > > wrote: > > > > Do elfut

Re: [PATCH] Don't use __BEGIN_DECLS macros from glibc.

2020-10-26 Thread Mark Wielaard
Hi, On Mon, 2020-10-26 at 18:34 -0300, Érico Nogueira via Elfutils-devel wrote: > On Mon Oct 26, 2020 at 8:58 PM -03, Dmitry V. Levin wrote: > > On Mon, Oct 26, 2020 at 05:44:24PM -0300, Érico Nogueira via > > Elfutils-devel wrote: > > > --- > > > libelf/elf.h | 10 ++ > > > 1 file change

Re: [PATCH] Don't use locale functions when libintl header isn't included.

2020-10-26 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > On Mon, 2020-10-26 at 01:11 -0300, Érico Nogueira via Elfutils-devel wrote: > > debuginfod.cxx used the bindtextdomain() and textdomain() functions > > despite not including any translated output. These functions were also > > used without including the libintl.h header. > > debuginfod do

Re: [PATCH] Don't use locale functions when libintl header isn't included.

2020-10-26 Thread Mark Wielaard
On Mon, 2020-10-26 at 15:53 -0300, Érico Nogueira via Elfutils-devel wrote: > I had talked with fche on #elfutils, and it was suggested that I could > remove the locale functions from debuginfod.cxx. If you think it makes > more sense to simply include the header (which is what I did initially > fo

Re: [PATCH] debuginfod: Translate CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.

2020-10-26 Thread Mark Wielaard
Hi Frank, On Mon, 2020-10-26 at 08:15 -0400, Frank Ch. Eigler via Elfutils-devel wrote: > > > Sure - or could use something like -EPROTO "Protocol error". > > > > Do you believe the caller should be able to detect how the connection > > was refused? And if so, is EPROTO the most appropriate erro

Re: [PATCH v2] libdw: dwarf_frame_register takes an array of at least 3 Dwarf_Ops

2020-10-26 Thread Mark Wielaard
On Mon, 2020-10-19 at 11:27 +0200, Mark Wielaard wrote: > Forgot the ChangeLog entries in the first version. > > GCC11 will warn about a mismatch in the declaration of dwarf_frame_register: > > dwarf_frame_register.c:37:61: error: argument 3 of type ‘Dwarf_Op *’ > declared as a pointer [-Werror

Re: [PATCH] backends: Remove tilegx backend.

2020-10-26 Thread Mark Wielaard
On Mon, 2020-10-19 at 10:57 +0200, Mark Wielaard wrote: > Support for the Tilera TILE-Gx processor has been removed or deprecated > in gcc and binutils already. There are no users and there is no way to > test it. Pushed.

Re: [PATCH] libebl: Remove unused ebl_syscall_abi.

2020-10-26 Thread Mark Wielaard
On Mon, 2020-10-19 at 10:47 +0200, Mark Wielaard wrote: > GCC11 -Warray-parameter warned about ebl_syscall_abi being inconsistently > declared (once with a pointer to int, once with an array of 6 int elements). > Since ebl_syscall_abi isn't actually used and was only implemented for > 3 backends wi

Re: [PATCH] Don't use __BEGIN_DECLS macros from glibc.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
On Mon Oct 26, 2020 at 8:58 PM -03, Dmitry V. Levin wrote: > On Mon, Oct 26, 2020 at 05:44:24PM -0300, Érico Nogueira via > Elfutils-devel wrote: > > From: Érico Rolim > > > > These macros are mostly internal to glibc and require the inclusion of > > (here included indirectly via ), which isn't

Re: [PATCH] Don't use __BEGIN_DECLS macros from glibc.

2020-10-26 Thread Dmitry V. Levin
On Mon, Oct 26, 2020 at 05:44:24PM -0300, Érico Nogueira via Elfutils-devel wrote: > From: Érico Rolim > > These macros are mostly internal to glibc and require the inclusion of > (here included indirectly via ), which isn't a > standard header. > > Since they are only required once, replacing

[PATCH] Don't use __BEGIN_DECLS macros from glibc.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim These macros are mostly internal to glibc and require the inclusion of (here included indirectly via ), which isn't a standard header. Since they are only required once, replacing them with their definition is simple. Signed-off-by: Érico Rolim --- libelf/elf.h | 10 ++-

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Rich Felker
On Mon, Oct 26, 2020 at 02:28:59PM -0300, Érico Nogueira wrote: > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > Hi Érico, > > > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel > > wrote: > > > Do elfutils program actually depend on the extra functionality > > >

Re: [PATCH] Don't use locale functions when libintl header isn't included.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
On Mon Oct 26, 2020 at 4:46 PM -03, Mark Wielaard wrote: > Hi Érico, > > On Mon, 2020-10-26 at 01:11 -0300, Érico Nogueira via Elfutils-devel > wrote: > > debuginfod.cxx used the bindtextdomain() and textdomain() functions > > despite not including any translated output. These functions were also >

Re: [RFC] [PATCH] Use numeric permissions directly.

2020-10-26 Thread Mark Wielaard
Hi Érico, On Mon, 2020-10-26 at 01:29 -0300, Érico Nogueira via Elfutils-devel wrote: > musl doesn't define ALLPERMS and ACESSPERMS macros, and the code already > uses literals for these same values in some place. This commit applies > the same style to the whole project. > > Signed-off-by: Érico

Re: [PATCH] Don't use locale functions when libintl header isn't included.

2020-10-26 Thread Mark Wielaard
Hi Érico, On Mon, 2020-10-26 at 01:11 -0300, Érico Nogueira via Elfutils-devel wrote: > debuginfod.cxx used the bindtextdomain() and textdomain() functions > despite not including any translated output. These functions were also > used without including the libintl.h header. debuginfod doesn't di

[PATCH v2] Stop depending on strndupa.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim This functon has inherent safety issues, since a long enough path can lead to memory clobbering. Instead, limit the path length to PATH_MAX. As a bonus, this improves musl compatibility, since musl doesn't include the strndupa macro for now. Also add braces around while loop.

Re: [musl] Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Max Rees via Elfutils-devel
On Mon Oct 26 01:28 PM, Érico Nogueira wrote: > On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > > Hi Érico, > > > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel > > wrote: > > > Do elfutils program actually depend on the extra functionality > > > enabled by > > >

Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Érico Nogueira via Elfutils-devel
On Mon Oct 26, 2020 at 3:10 PM -03, Mark Wielaard wrote: > Hi Érico, > > On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel > wrote: > > Do elfutils program actually depend on the extra functionality > > enabled by > > FNM_EXTMATCH? Is changing the flag to have no effect a "bug"?

Re: [QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Mark Wielaard
Hi Érico, On Mon, 2020-10-26 at 12:03 -0300, Érico Nogueira via Elfutils-devel wrote: > Do elfutils program actually depend on the extra functionality > enabled by > FNM_EXTMATCH? Is changing the flag to have no effect a "bug"? Yes. The extended wildcard pattern is relied upon by both eu-strip wi

[QUESTION] Which fnmatch() functionality does elfutils depend on?

2020-10-26 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim Hi! Musl currently doesn't support the FNM_EXTMATCH extension to fnmatch(), leading most musl-based distros to patch the elfutils build to define FNM_EXTMATCH to 0. Do elfutils program actually depend on the extra functionality enabled by FNM_EXTMATCH? Is changing the flag to

Re: [PATCH] Stop depending on strndupa.

2020-10-26 Thread Dmitry V. Levin
On Mon, Oct 26, 2020 at 11:51:21AM -0300, Érico Nogueira via Elfutils-devel wrote: [...] > +error (EXIT_FAILURE, 0, _("path is too long '%s'"), path); I suggest the following alternative: error (EXIT_FAILURE, ENAMETOOLONG, "%s", path); -- ldv

Re: [PATCH] Support building when fts and obstack aren't part of libc.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
On Mon Oct 26, 2020 at 9:32 AM -03, Dmitry V. Levin wrote: > On Sun, Oct 25, 2020 at 11:41:12PM -0300, Érico Nogueira via > Elfutils-devel wrote: > > diff --git a/configure.ac b/configure.ac > > index 973409f1..628e7a74 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -542,6 +542,60 @@ e

[PATCH] Stop depending on strndupa.

2020-10-26 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim This functon has inherent safety issues, since a long enough path can lead to memory clobbering. Instead, limit the path length to PATH_MAX. As a bonus, this improves musl compatibility, since musl doesn't include the strndupa macro for now. Also add braces around while loop.

Re: [PATCH] debuginfod: Translate CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.

2020-10-26 Thread Frank Ch. Eigler via Elfutils-devel
Hi - > > Sure - or could use something like -EPROTO "Protocol error". > > Do you believe the caller should be able to detect how the connection > was refused? And if so, is EPROTO the most appropriate error code, or > should it be something like ENOKEY? I don't think it really matters to a debug

Re: [PATCH] debuginfod: Translate CURLE_PEER_FAILED_VERIFICATION to ECONNREFUSED.

2020-10-26 Thread Mark Wielaard
On Sun, 2020-10-25 at 16:43 -0400, Frank Ch. Eigler wrote: > > When a file couldn't be retrieved because of an bad HTTPS > > certificate > > find-debuginfod currently says: > > Server query failed: No such file or directory > > With this patch it will say: > > Server query failed: Connection refuse

Re: [PATCH] Support building when fts and obstack aren't part of libc.

2020-10-26 Thread Dmitry V. Levin
On Sun, Oct 25, 2020 at 11:41:12PM -0300, Érico Nogueira via Elfutils-devel wrote: > - 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 > -

Writing core files to contain buildids

2020-10-26 Thread Paul Smith
Hi all; I'm maintaining a fork of the old Google coredumper code: Original: https://github.com/anatol/google-coredumper My fork: https://github.com/madscientist/google-coredumper We use this for various reasons rather than relying on the Linux kernel coredumper and it's worked well for us for ma