RE: [PATCH v2 2/2] Hexagon: implement machine flag check

2024-04-02 Thread Brian Cain
> -Original Message- > From: Matheus Bernardino (QUIC) > Sent: Tuesday, April 2, 2024 2:56 PM > To: elfutils-devel@sourceware.org > Cc: Brian Cain ; Sid Manning ; > m...@klomp.org; Andrew Pinski (QUIC) ; > Matheus Bernardino (QUIC) > Subject: [PATCH v2 2/2] Hexagon: implement machine

[PATCH] segment: Fix memory leak in insert()

2024-04-02 Thread Maks Mishin
Dynamic memory, referenced by 'naddr', is allocated at segment.c:66 by calling function 'realloc' and lost at segment.c:92. Found by RASU JSC. Signed-off-by: Maks Mishin --- libdwfl/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libdwfl/segment.c b/libdwfl/segment.c index

[PATCH v2 1/2] Add support for Hexagon

2024-04-02 Thread Matheus Tavares Bernardino
This implements initial support for the Hexagon architecture. The Hexagon ABI spec can be seen at https://lists.llvm.org/pipermail/llvm-dev/attachments/20190916/21516a52/attachment-0001.pdf A hello_hexagon.ko test is also added. $ head tests/test-suite.log [...] # TOTAL: 275 # PASS: 269

[PATCH v2 0/2] Add initial support for Hexagon

2024-04-02 Thread Matheus Tavares Bernardino
v1: https://sourceware.org/pipermail/elfutils-devel/2024q1/006938.html Changes in v2: - Moved Hexagon constants to libelf/elf-knowledge.h - Added link to Hexagon ABI spec at commit message (i.e. https://lists.llvm.org/pipermail/llvm-dev/attachments/20190916/21516a52/attachment-0001.pdf) -

[PATCH v2 2/2] Hexagon: implement machine flag check

2024-04-02 Thread Matheus Tavares Bernardino
This fixes the "invalid machine flag" error from eu-elflint when passing hexagon binaries. Signed-off-by: Matheus Tavares Bernardino --- backends/hexagon_init.c | 1 + backends/hexagon_symbol.c | 8 2 files changed, 9 insertions(+) diff --git a/backends/hexagon_init.c

Re: [PATCH] libdw: dwarf_getsrcfiles should not imply dwarf_getsrclines

2024-04-02 Thread Mark Wielaard
Hi Aaron, On Thu, 2024-03-28 at 21:12 -0400, Aaron Merey wrote: > dwarf_getsrcfiles causes line data to be read in addition to file data. > This is wasteful for programs which only need file or directory names. > Debuginfod server is one such example. > > Fix this by moving the srcfile handling

Re: [PATCH] readelf: Fix division by zero in handle a relocation sections

2024-04-02 Thread Mark Wielaard
Hi Maks, On Sat, 2024-03-30 at 00:23 +0300, Maks Mishin wrote: > Variable 'sh_entsize', whose possible value set allows a zero value > by calling function 'gelf_fsize', is used as a denominator > in calculation of 'nentries' variable. > > Found by RASU JSC. Sorry, but I am going to stop