[PATCH 1/4] Consistently define _(Str) using dgettext ("elfutils", Str)

2020-12-16 Thread Dmitry V. Levin
Move the definition of _(Str) macro to lib/eu-config.h which already provides a definition of N_(Str) macro. Since lib/eu-config.h is appended to config.h, it is included into every compilation unit and therefore both macros are now universally available. Remove all other definitions of N_(Str) a

[PATCH 2/4] lib: consistently use _(Str) instead of gettext(Str)

2020-12-16 Thread Dmitry V. Levin
eu-config.h defines _(Str) to dgettext ("elfutils", Str) instead of a simple gettext (Str) for a reason: the library might be indirectly used by clients that called bindtextdomain with a domain different from "elfutils". The change was made automatically using the following command: $ git grep -l

[PATCH 3/4] libcpu: consistently use _(Str) instead of gettext(Str)

2020-12-16 Thread Dmitry V. Levin
eu-config.h defines _(Str) to dgettext ("elfutils", Str) instead of a simple gettext (Str) for a reason: the library might be indirectly used by clients that called bindtextdomain with a domain different from "elfutils". The change was made automatically using the following command: $ git grep -l

[COMMITTED] libelf: Make sure we have at least a full ELF header available.

2020-12-16 Thread Mark Wielaard
When elf_memory is called we could get a slightly too small image that doesn't contain a full ELF header (but does contain at least the e_ident values). Require the full header before even validating the rest of the ELF header fields. https://sourceware.org/bugzilla/show_bug.cgi?id=27076 Signed-o

[Bug libelf/27076] heap-buffer-overflow when calling file_read_elf function in elf_begin.c in libelf

2020-12-16 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=27076 Mark Wielaard changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

Re: [PATCH 1/2] libelf: Sync elf.h from glibc.

2020-12-16 Thread Dmitry V. Levin
On Sat, Dec 12, 2020 at 11:38:54PM +0100, Mark Wielaard wrote: > Adds SHF_GNU_RETAIN. This is obviously OK. -- ldv

Re: [PATCH 2/2] Handle SHF_GNU_RETAIN in eu-readelf and eu-elflint.

2020-12-16 Thread Dmitry V. Levin
On Sat, Dec 12, 2020 at 11:38:55PM +0100, Mark Wielaard wrote: > readelf -S now shows 'R' when SHF_GNU_RETAIN is set. > elflint accepts SHF_GNU_RETAIN when set on section in --gnu mode. > > Signed-off-by: Mark Wielaard > --- > src/ChangeLog | 5 > src/elflint.c

Re: Q: splitting the top level .gitignore file

2020-12-16 Thread Mark Wielaard
Hi Dmitry, On Wed, 2020-12-16 at 02:46 +0300, Dmitry V. Levin wrote: > By the way, what do you think about moving subdirectory parts of the top > level .gitignore file into subdirectories? This would be consistent with > ChangeLog files, currently one has to update the top level ChangeLog file >

Re: [PATCH] Modernize gettext infrastructure

2020-12-16 Thread Mark Wielaard
Hi Dmitry, On Wed, 2020-12-16 at 02:40 +0300, Dmitry V. Levin wrote: > 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 infrastruc

Re: [PATCH] libebl: consistently use _(Str) instead of gettext(Str)

2020-12-16 Thread Mark Wielaard
Hi Dmitry, On Wed, 2020-12-16 at 04:48 +0300, Dmitry V. Levin wrote: > libeblP.h defines _(Str) to dgettext ("elfutils", Str) instead of > a simple gettext (Str) for a reason: the library might be indirectly > used by clients that called bindtextdomain with a domain different > from "elfutils". T

Re: [PATCH] Modernize gettext infrastructure

2020-12-16 Thread Dmitry V. Levin
Hi Mark, On Wed, Dec 16, 2020 at 03:05:54PM +0100, Mark Wielaard wrote: > Hi Dmitry, > > On Wed, 2020-12-16 at 02:40 +0300, Dmitry V. Levin wrote: > > Switch to use AM_GNU_GETTEXT, AM_GNU_GETTEXT_VERSION, and > > AM_GNU_GETTEXT_REQUIRE_VERSION, this allows to stop bundling gettext > > infrastruct

Re: [PATCH] Modernize gettext infrastructure

2020-12-16 Thread Mark Wielaard
Hi Dmitry, On Wed, 2020-12-16 at 17:59 +0300, Dmitry V. Levin wrote: > > I don't know if all the > > buildbot workers have it installed, so when you do check it in please > > keep an eye on > > https://builder.wildebeest.org/buildbot/#/builders?tags=elfutils > > Is there a way to find it out bef

Re: [PATCH 1/2] libelf: Sync elf.h from glibc.

2020-12-16 Thread Mark Wielaard
On Wed, Dec 16, 2020 at 01:44:44PM +0300, Dmitry V. Levin wrote: > On Sat, Dec 12, 2020 at 11:38:54PM +0100, Mark Wielaard wrote: > > Adds SHF_GNU_RETAIN. > > This is obviously OK. Thanks, pushed.

Re: [PATCH 2/2] Handle SHF_GNU_RETAIN in eu-readelf and eu-elflint.

2020-12-16 Thread Mark Wielaard
On Wed, Dec 16, 2020 at 01:49:30PM +0300, Dmitry V. Levin wrote: > On Sat, Dec 12, 2020 at 11:38:55PM +0100, Mark Wielaard wrote: > > readelf -S now shows 'R' when SHF_GNU_RETAIN is set. > > elflint accepts SHF_GNU_RETAIN when set on section in --gnu mode. > > > > Signed-off-by: Mark Wielaard > >

[PATCH] libcpu: linking i386_gendis requires obstack.

2020-12-16 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim --- Noticed while building from master today. libcpu/ChangeLog | 4 libcpu/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index 781c8f41..af7ea96c 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLo

[PATCH] libdwfl: use XSI-compliant strerror_r.

2020-12-16 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim The Linux man pages recommend this version of the function for portable applications. --- This change could be made into its own tiny compat source file, if we want to keep _GNU_SOURCE undefined for the smallest piece of code. I'm okay with either approach. I ran the testsuite

[PATCH] src/readelf: use qsort instead of qsort_r.

2020-12-16 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim This program is single threaded, so using qsort with a global variable isn't a danger. The interface for qsort_r isn't standardized (and diverges between glibc and FreeBSD, for example), which makes usage of qsort, where possible, preferrable. --- FreeBSD's qsort_r can be seen

Re: [PATCH] libcpu: linking i386_gendis requires obstack.

2020-12-16 Thread Mark Wielaard
On Wed, Dec 16, 2020 at 03:56:14PM -0300, Érico Nogueira via Elfutils-devel wrote: > Noticed while building from master today. Yes, you are right. i386_parse.y uses obstacks. Thanks for the ChangeLog entry. Next time please do use a Signed-off-by line. See CONTRIBUTING. Pushed, Mark

Re: [PATCH] libcpu: linking i386_gendis requires obstack.

2020-12-16 Thread Érico Nogueira via Elfutils-devel
On Wed Dec 16, 2020 at 6:48 PM -03, Mark Wielaard wrote: > On Wed, Dec 16, 2020 at 03:56:14PM -0300, Érico Nogueira via > Elfutils-devel wrote: > > Noticed while building from master today. > > Yes, you are right. i386_parse.y uses obstacks. Thanks for the > ChangeLog entry. Next time please do use

[PATCH v2 2/2] src/readelf: use qsort instead of qsort_r.

2020-12-16 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim This program is single threaded, so using qsort with a global variable isn't a danger. The interface for qsort_r isn't standardized (and diverges between glibc and FreeBSD, for example), which makes usage of qsort, where possible, preferrable. Signed-off-by: Érico Rolim --- O

[PATCH v2 1/2] libdwfl: use XSI-compliant strerror_r.

2020-12-16 Thread Érico Nogueira via Elfutils-devel
From: Érico Rolim The Linux man pages recommend this version of the function for portable applications. Signed-off-by: Érico Rolim --- Only difference from the initial patch is that this includes the Signed-off-by line. libdwfl/ChangeLog| 4 libdwfl/dwfl_error.c | 11 ++- 2

Buildbot failure in Wildebeest Builder on whole buildset

2020-12-16 Thread buildbot
The Buildbot has detected a failed build on builder whole buildset while building elfutils. Full details are available at: https://builder.wildebeest.org/buildbot/#builders/11/builds/634 Buildbot URL: https://builder.wildebeest.org/buildbot/ Worker for this Build: fedora-ppc64le Build Reaso

Re: Buildbot failure in Wildebeest Builder on whole buildset

2020-12-16 Thread Mark Wielaard
Hi, Don't worry... On Wed, Dec 16, 2020 at 11:54:16PM +, build...@builder.wildebeest.org wrote: > The Buildbot has detected a failed build on builder whole buildset while > building elfutils. > Full details are available at: > https://builder.wildebeest.org/buildbot/#builders/11/builds/6

Re: [PATCH v2 1/2] libdwfl: use XSI-compliant strerror_r.

2020-12-16 Thread Dmitry V. Levin
On Wed, Dec 16, 2020 at 07:30:11PM -0300, Érico Nogueira via Elfutils-devel wrote: > From: Érico Rolim > > The Linux man pages recommend this version of the function for portable > applications. > > Signed-off-by: Érico Rolim I'd rather not do it this way because __xpg_strerror_r in glibc is

Re: [PATCH v2 1/2] libdwfl: use XSI-compliant strerror_r.

2020-12-16 Thread Érico Nogueira via Elfutils-devel
On Wed Dec 16, 2020 at 9:08 PM -03, Dmitry V. Levin wrote: > On Wed, Dec 16, 2020 at 07:30:11PM -0300, Érico Nogueira via > Elfutils-devel wrote: > > From: Érico Rolim > > > > The Linux man pages recommend this version of the function for portable > > applications. > > > > Signed-off-by: Érico R