Re: [PATCH v2] backends: allocate enough stace for null terminator

2024-07-18 Thread Sergei Trofimovich
On Thu, 18 Jul 2024 18:49:54 +0200 Mark Wielaard wrote: > Hi Sergei, > > On Wed, 2024-07-17 at 23:03 +0100, Sergei Trofimovich wrote: > > `gcc-15` added a new warning in https://gcc.gnu.org/PR115185: > > > > i386_regs.c:88:11: error: initializer-string for array

[PATCH v2] backends: allocate enough stace for null terminator

2024-07-17 Thread Sergei Trofimovich
* backends/i386_regs.c (i386_register_info): Initialize the array bytewise to fix gcc-15 warning. * backends/x86_64_regs.c (x86_64_register_info): Ditto. Signed-off-by: Sergei Trofimovich --- backends/i386_regs.c | 10 +- backends/x86_64_regs.c | 9 - 2 files chan

[PATCH] backends: allocate enough stace for null terminator

2024-07-15 Thread Sergei Trofimovich
rminator. * backends/i386_regs.c (i386_register_info): Add extra byte per entry to fix gcc-15 warning. * backends/x86_64_regs.c (x86_64_register_info): Ditto. Signed-off-by: Sergei Trofimovich --- backends/i386_regs.c | 2 +- backends/x86_64_regs.c | 2 +- 2 files cha

[PATCH] tests: fix build against upcoming `gcc-14` (`-Werror=calloc-transposed-args`)

2023-12-21 Thread Sergei Trofimovich
argument and not in the later argument [-Werror=calloc-transposed-args] 450 | newscnbufs = calloc (sizeof (void *), newshnums); |^~~~ elfstrmerge.c:450:32: note: earlier argument should specify number of elements, later size of each element Sig

[PATCH] libelf/elf_newscn.c: fix build failure against gcc-14 (-Walloc-size)

2023-11-02 Thread Sergei Trofimovich
:12: error: allocation of insufficient size «1» for type «Elf_ScnList» with size «16» [-Werror=alloc-size] 97 | newp = calloc (sizeof (Elf_ScnList) |^ The change swaps arguments to pass larger value as a member size. Signed-off-by: Sergei Trofimovich

Re: [PATCH v2] tests: do not fail on zero sized DIEs (binutils-2.39 compatible)

2022-10-13 Thread Sergei Trofimovich via Elfutils-devel
On Thu, 13 Oct 2022 16:40:36 +0200 Mark Wielaard wrote: > Hi, > > On Mon, 2022-08-08 at 01:17 +0200, Mark Wielaard wrote: > > On Sun, Aug 07, 2022 at 07:31:38PM +0100, Sergei Trofimovich via > > Elfutils-devel wrote: > > > binutils started producing 0-sized

[PATCH v2] tests: do not fail on zero sized DIEs (binutils-2.39 compatible)

2022-08-07 Thread Sergei Trofimovich via Elfutils-devel
w_high_pc.sh (exit status: 255) To work it around let's allow lowpc == highpc special case. https://sourceware.org/bugzilla/show_bug.cgi?id=29450 Signed-off-by: Sergei Trofimovich --- tests/ChangeLog | 4 tests/low_high_pc.c | 8 +--- 2 files changed, 9 insertions(+), 3 deletions

[PATCH] tests: run-low_high_pc.sh: drop redundant 'lx' suffix

2022-08-06 Thread Sergei Trofimovich via Elfutils-devel
Noticed when debugged test failure: lowpc: 8049000, highpc: 8049000lx ../sysdeps/i386/crti.S: [2def] '_init' highpc <= lowpc Signed-off-by: Sergei Trofimovich --- tests/ChangeLog | 4 tests/low_high_pc.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)

[PATCH] tests: do not fail on zero sized DIEs (binutils-2.39 compatible)

2022-08-06 Thread Sergei Trofimovich via Elfutils-devel
w_high_pc.sh (exit status: 255) To work it around let's allow lowpc == highpc special case. https://sourceware.org/bugzilla/show_bug.cgi?id=29450 Signed-off-by: Sergei Trofimovich --- tests/ChangeLog | 4 tests/low_high_pc.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/

[PATCH v2] elflint: fix undefined 'buffer_left' reference

2021-06-07 Thread Sergei Trofimovich via Elfutils-devel
inition (either inline or out-of-line). Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/794601 Signed-off-by: Sergei Trofimovich Fixes: e95d1fbb ("elflint: Pull left() in file scope") --- Change since v1 suggested by Dmitry: - fixed changelog to spell 'static' correctl

[PATCH] elflint: fix undefined 'buffer_left' reference

2021-06-06 Thread Sergei Trofimovich via Elfutils-devel
inition (either inline or out-of-line). Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/794601 Signed-off-by: Sergei Trofimovich --- src/ChangeLog | 5 + src/elflint.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2c7be185..

[PATCH] tests: use ${CC} instead of 'gcc' in tests

2021-01-31 Thread Sergei Trofimovich via Elfutils-devel
Sarubbo found a few test failures that use hardcoded 'gcc' instead of expected ${CC}. The change propagates detected ${CC} at configure time to test scripts. Signed-off-by: Sergei Trofimovich --- tests/ChangeLog| 10 ++ tests/Makefile.am | 6 -- t

Re: [PATCH] src/elflint.c: add debug print for GNU_RETAIN and others

2021-01-12 Thread Sergei Trofimovich via Elfutils-devel
On Tue, 12 Jan 2021 10:14:55 +0100 Mark Wielaard wrote: > Hi Sergei, > > On Thu, 2020-12-31 at 12:11 +0000, Sergei Trofimovich via Elfutils-devel > wrote: > > --- > > src/elflint.c | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > >

[PATCH] src/elflint.c: fix printing of unknown flags

2020-12-31 Thread Sergei Trofimovich via Elfutils-devel
before the change section_flags_string() ignored unknown section flags: snprintf() did write numeric value int obuffer, but "*cp = '\0'" hegated the effect. The change advances the 'cp' pointer'. While at it add a '|' separator between known and unkn

[PATCH] src/elflint.c: add debug print for GNU_RETAIN and others

2020-12-31 Thread Sergei Trofimovich via Elfutils-devel
--- src/elflint.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/elflint.c b/src/elflint.c index b3cbaade..7b7f7937 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -2789,7 +2789,10 @@ section_flags_string (GElf_Word flags, char *buf, size_t len) NEWFLAG (OS_N

[PATCH] elfutils/configure.ac: use $READELF, not readelf

2020-06-14 Thread Sergei Trofimovich via Elfutils-devel
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 T