https://sourceware.org/bugzilla/show_bug.cgi?id=33103
--- Comment #6 from Mark Wielaard ---
Note that a followup commit was necessary to fix building one testcase that
broke make check:
commit 65d383a7e653524388ff2ea382be3eac1d04061f (HEAD -> main)
Author: Mark Wielaard
Date: Thu Jun 26
DEFAULT_INCLUDES includes -I. which is needed for compiling the
testcases with -DMAIN_CHECK=1.
This fixes make check after commit 76bd5f6bea9b "config: Adjust
AM_CPPFLAGS for srcdir and .. path includes"
* libdw/Makefile.am (CHECK_DEF_FLAGS): Add DEFAULT_INCLUDES.
Signed-of
https://sourceware.org/bugzilla/show_bug.cgi?id=33103
Mark Wielaard changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution
ed header files.
* config/eu.am (AM_CPPFLAGS): Use -iquote for $(srcdir) and
replace -I.. with -I$(abs_top_builddir).
* libdw/libdwP.h: Include "libdw.h" and "dwarf.h" instead of
the system headers and .
https://sourceware.org/bugzilla/show_bu
https://sourceware.org/bugzilla/show_bug.cgi?id=33103
--- Comment #3 from Mark Wielaard ---
I don't understand why this is only a problem with srcdir == builddir.
But maybe we can extend the original solution to use -iquote for srcdir. And
only have -I for lib and the top builddir (for )?
https://sourceware.org/bugzilla/show_bug.cgi?id=33103
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
--- Comment #1
https://sourceware.org/bugzilla/show_bug.cgi?id=33099
Mark Wielaard changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution
(validate_strdata): New
function taking Elf_Data and restricting d_size to last zero
char.
(translate_offs): Call validate_strdata.
(find_symtab): Likewise for both symstrdata and aux_symstrdata.
https://sourceware.org/bugzilla/show_bug.cgi?id=33099
Signed-off-by: Mark
https://sourceware.org/bugzilla/show_bug.cgi?id=33099
Mark Wielaard changed:
What|Removed |Added
Status|NEW |ASSIGNED
--- Comment #4 from Mark
https://sourceware.org/bugzilla/show_bug.cgi?id=33099
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
Hi Aaron,
On Mon, Jun 09, 2025 at 12:24:39PM -0400, Aaron Merey wrote:
> Signed-off-by: Aaron Merey
> ---
> doc/Makefile.am| 1 +
> doc/elf_getarsym.3 | 91 ++
> 2 files changed, 92 insertions(+)
> create mode 100644 doc/elf_getarsym.3
>
> diff
Hi Aaron,
On Mon, Jun 09, 2025 at 12:24:38PM -0400, Aaron Merey wrote:
> Signed-off-by: Aaron Merey
> ---
> doc/Makefile.am| 1 +
> doc/elf_getarhdr.3 | 76 ++
> 2 files changed, 77 insertions(+)
> create mode 100644 doc/elf_getarhdr.3
>
> diff
Hi Aaron,
On Mon, 2025-06-09 at 12:24 -0400, Aaron Merey wrote:
> Signed-off-by: Aaron Merey
> ---
> doc/Makefile.am| 1 +
> doc/elf_getaroff.3 | 55 ++
> 2 files changed, 56 insertions(+)
> create mode 100644 doc/elf_getaroff.3
>
> diff --git a
Hi Aaron,
On Mon, 2025-06-09 at 12:24 -0400, Aaron Merey wrote:
> diff --git a/doc/Makefile.am b/doc/Makefile.am
> index 1ced7858..fbfebfe0 100644
> --- a/doc/Makefile.am
> +++ b/doc/Makefile.am
> @@ -61,6 +61,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \
> elf_hash.3 \
>
https://sourceware.org/bugzilla/show_bug.cgi?id=33062
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
--- Comment #1
r)
> static void
> print_ops (Dwfl_Module *dwflmod, Dwarf *dbg, int indent, int indentrest,
> unsigned int vers, unsigned int addrsize, unsigned int offset_size,
> -struct Dwarf_CU *cu, Dwarf_Word len, const unsigned char *data)
> +struct Dwarf_CU *cu, Dwarf_Word len, const unsigned char *data,
> +FILE *out)
> {
> + if (out == NULL)
> +out = stdout;
> +
Or here. I cannot find any invocation of print_ops with out being NULL.
Everything else looks obviously correct.
Thanks,
Mark
next here, but not ...
> +.SH SEE ALSO
> +.BR mmap (2),
> +.BR elf_clone (3),
> +.BR elf_end (3),
> +.BR elf_rand (3),
> +.BR libelf (3),
> +.BR elf (5)
... here.
Cheers,
Mark
then
> we must make sure to handle it before handling any other debug
> section. Various other sections depend on the CU DIEs being
> @@ -12239,15 +12375,24 @@ print_debug (Dwfl_Module *dwflmod, Ebl *ebl,
> GElf_Ehdr *ehdr)
> && strcmp (&name[14], debug_sections[n].name) == 0)
> )
> {
> - if ((print_debug_sections | implicit_debug_sections)
> - & debug_sections[n].bitmask)
> - debug_sections[n].fp (dwflmod, ebl, ehdr, scn, shdr, dbg);
> + if (((print_debug_sections | implicit_debug_sections)
> +& debug_sections[n].bitmask))
> + schedule_job (jdata, num_jobs++, debug_sections[n].fp,
> + dwflmod, ebl, ehdr, scn, shdr, dbg);
> +
> + assert (num_jobs <= shnum);
> break;
> }
> }
> }
> }
OK.
> +#ifdef USE_LOCKS
> + /* If max_threads == 1, then jobs were immediately run in schedule_job. */
> + if (max_threads > 1)
> +run_jobs (max_threads - 1);
> +#endif
> +
>dwfl_end (skel_dwfl);
>free (skel_name);
Why max_threads - 1 ?
Cheers,
Mark
ef _THREADLIB_H
> +#define _THREADLIB_H 1
> +
> +/* Add a job to the job queue. When the job is run using run_job, it will
> + consist of start_routine called with ARG as well as a FILE *. The
> + contents of the FILE will be printed to stdout once start_routine
> + finishes. */
> +extern void add_job (void *(*start_routine)(void *, FILE *), void *arg);
> +
> +/* Run all jobs that have been added by add_job. Jobs run concurrently
> + using at most MAX_THREADS threads.
> +
> + run_jobs returns when all jobs have finished and any output from the
> + jobs has been printed to stdout. Output from each job is printed in
> + the order which jobs were added using add_job. */
> +extern void run_jobs (int max_threads);
> +
> +#endif /* threadlib.h */
Looks good. Maybe clarify add_job cannot be called after run_jobs has
been called?
Cheers,
Mark
ead_output_stream (output_stream_t *stream)
> +{
> + /* fclose may update stream->buf. */
> + if (fclose (stream->file) != 0)
> +error (1, 0, _("cannot close thread output stream"));
> +
> + printf ("%s", stream->buf);
> + free (stream->buf);
> +}
I think it would be slightly more efficient to use fwrite here. printf
"%s" has to first look for the end of buf. And you do have the stream-
>sizeloc already.
Sorry for stopping the review here suddenly. Will continue later, but
hopefully this is already helpful.
Cheers,
Mark
Hi Aaron,
On Mon, 2025-06-02 at 21:22 -0400, Aaron Merey wrote:
> Signed-off-by: Aaron Merey
> ---
> doc/elf_begin.3 | 104
> 1 file changed, 79 insertions(+), 25 deletions(-)
>
> diff --git a/doc/elf_begin.3 b/doc/elf_begin.3
> index 6a1d0c27..c
Debian stable only has valgrind 3.19.0 which doesn't have an openat2
syscall wrapper. This makes some elfutils tests fail under valgrind
since it uses openat2 explicitly now. So switch the build factory to
not use valgrind, but the gcc address (and undefined) sanitizer.
---
builder/master.cfg | 2
https://sourceware.org/bugzilla/show_bug.cgi?id=33006
Mark Wielaard changed:
What|Removed |Added
Resolution|--- |FIXED
Status|UNCONFIRMED
If some section doesn't match between the stripped and unstripped file
we invent a new one. Make sure to also update the shnum value.
* src/unstrip.c (copy_elided_sections): Update unstripped_shnum.
Signed-off-by: Mark Wielaard
---
src/unstrip.c | 1 +
1 file changed, 1 insertion(+)
https://sourceware.org/bugzilla/show_bug.cgi?id=33005
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
--- Comment #3
https://sourceware.org/bugzilla/show_bug.cgi?id=33006
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
--- Comment #2
ions. Without we just use a few extra bytes on
the stack (which aren't used afterwards, without any issue, even
though it is technically UB).
* libcpu/riscv_disasm.c (riscv_disasm): Extend char mnebuf
array to 50.
Signed-off-by: Mark Wielaard
---
libcpu/riscv_disasm.c | 5 -
https://sourceware.org/bugzilla/show_bug.cgi?id=33004
--- Comment #4 from Mark Wielaard ---
(In reply to Xudong Cao from comment #3)
> Thanks for the quick fix!
> I agree the files are malformed, but any out-of-bounds access caught by ASan
> is still considered a memory-safety defect
https://sourceware.org/bugzilla/show_bug.cgi?id=33004
Mark Wielaard changed:
What|Removed |Added
Resolution|--- |NOTABUG
Status
If there is only section zero that shouldn't count. Then we would
still try to work on an empty set of sections and give an obscure
error later.
* src/unstrip.c (copy_elided_sections): Check stripped_shnum <= 1.
Signed-off-by: Mark Wielaard
---
src/unstrip.c | 2 +-
1 file ch
https://sourceware.org/bugzilla/show_bug.cgi?id=33003
Mark Wielaard changed:
What|Removed |Added
Resolution|--- |NOTABUG
Status
https://sourceware.org/bugzilla/show_bug.cgi?id=33003
--- Comment #3 from Mark Wielaard ---
(In reply to Sam James from comment #2)
> (In reply to Mark Wielaard from comment #1)
> > Sorry, I cannot replicate.
> >
> > Building with AddressSanitizer seems to
https://sourceware.org/bugzilla/show_bug.cgi?id=33004
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
--- Comment #1
https://sourceware.org/bugzilla/show_bug.cgi?id=33003
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
--- Comment #1
__libdw_fde_by_offset is marked as an extern internal function in
libdw/cfi.h (a not public header file). But it is (now) only used in
libdw/fde.c, called from __libdw_find_fde. It was originally used for
dwarf_cfi_validate_fde, but that function was deleted and never made
public. So simplify thing
inline functions and move to eu-search.h.
> Simplify locking in is_constant_offset.
> In __libdw_findcu use eu_tfind instead of eu_tfind_nolock.
Thanks, this addresses all comments I had.
I'll see if my suggestion to make __libdw_fde_by_offset static makes
sense as a followup patch.
Thanks,
Mark
calling __libdw_intern_expression with Dwarf_CU members. */
> + mutex_define(, intern_lock);
> +
>/* Memory boundaries of this CU. */
>void *startp;
>void *endp;
Ack.
> @@ -949,8 +953,9 @@ extern int __libdw_visit_scopes (unsigned int depth,
>void *arg)
>__nonnull_attribute__ (2, 4) internal_function;
>
> -/* Parse a DWARF Dwarf_Block into an array of Dwarf_Op's,
> - and cache the result (via tsearch). */
> +/* Parse a DWARF Dwarf_Block into an array of Dwarf_Op's, and cache the
> + result (via tsearch). The owner of CACHE (typically a Dwarf_CU or
> + Dwarf_CFI_s) must hold a lock when calling this function. */
> extern int __libdw_intern_expression (Dwarf *dbg,
> bool other_byte_order,
> unsigned int address_size,
Nice docks.
> diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c
> index 0e4dcc37..21c8ed0e 100644
> --- a/libdw/libdw_findcu.c
> +++ b/libdw/libdw_findcu.c
> @@ -181,6 +181,7 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types)
>rwlock_init (newp->split_lock);
>mutex_init (newp->src_lock);
>mutex_init (newp->str_off_base_lock);
> + mutex_init (newp->intern_lock);
>
>/* v4 debug type units have version == 4 and unit_type == DW_UT_type. */
>if (debug_types)
Ack.
> @@ -240,8 +241,6 @@ struct Dwarf_CU *
> internal_function
> __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool v4_debug_types)
> {
> - mutex_lock (dbg->dwarf_lock);
> -
>search_tree *tree = v4_debug_types ? &dbg->tu_tree : &dbg->cu_tree;
>Dwarf_Off *next_offset
> = v4_debug_types ? &dbg->next_tu_offset : &dbg->next_cu_offset;
> @@ -250,6 +249,12 @@ __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool
> v4_debug_types)
>struct Dwarf_CU fake = { .start = start, .end = 0 };
>struct Dwarf_CU **found = eu_tfind (&fake, tree, findcu_cb);
>struct Dwarf_CU *result = NULL;
> + if (found != NULL)
> +return *found;
> +
> + mutex_lock (dbg->dwarf_lock);
> +
> + found = eu_tfind_nolock (&fake, tree, findcu_cb);
>if (found != NULL)
> {
>mutex_unlock (dbg->dwarf_lock);
OK, so the dwarf_lock has to be held to call __libdw_intern_next_unit
below. But why is it correct to call eu_tfind_nolock here without
holding the tree lock?
Thanks,
Mark
ment so we can easily look them up in the future.
Cheers,
Mark
> Signed-off-by: A. Wilcox
> ---
> backends/ppc_attrs.c | 12
> 1 file changed, 12 insertions(+)
>
> diff --git a/backends/ppc_attrs.c b/backends/ppc_attrs.c
> index 48d7129d..6b00bccd 100644
&g
This is actually v3, because I was nitpicking too much.
But this version is perfect I have nothing to nitpick anymore.
Thanks,
Mark
configure for maintainer mode:
AC_CHECK_PROG(HAVE_GAWK, gawk, yes, no)
if test "$HAVE_GAWK" = "no"; then
AC_MSG_ERROR([gawk needed in maintainer mode])
fi
I don't think it would be a problem to do that for non-maintainer-mode
too.
Cheers,
Mark
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention ar(1) and that elfutils libelf does not support COFF object
> files.
>
> On Thu, May 1, 2025 at 1:17 PM Mark Wielaard wrote:
> >
> > > +.SH SEE ALSO
> > > +.BR libelf (3),
>
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention use with SHT_HASH and clarify that only the lower 32 bits of
> the return value are used.
Looks good.
Thanks,
Mark
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention fill value only applies to new gaps and set Thread Safety
> atrribute to 'MT-Unsafe race'
Looks good.
Thanks,
Mark
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: mention that base offset returned is always 0 for non ELF_K_AR
> kinds. Also mention elf_getaroff and elf_rawelf.
Looks good.
Thanks,
Mark
Hi Aaron,
On Mon, 2025-05-12 at 20:33 -0400, Aaron Merey wrote:
> v2: Mention elf arg may be NULL.
Looks good.
> On Wed, Apr 30, 2025 at 1:18 PM Mark Wielaard wrote:
> >
> > So we do have a tiny elf_begin.3 man page, but it doesn't really
> > describe anything.
Hi Aaron,
Yes, please.
Thanks,
Mark
ost probably not generically. Especially not the container builders.
But you might make some deal with a specific direct hardware worker
admin?
Cheers,
Mark
Hi,
On Tue, May 06, 2025 at 11:50:12AM +0200, Mark Wielaard wrote:
> The testsuite relies on there being no files in the test directory
> after the test finishes. A test will fail if the test dir cannot be
> removed. But the test dir isn't really random, it uses the pid of the
>
the verdef_data to include the verdaux. */
> - verdef_data = elf_getdata_rawchunk (
> - ebl->elf, offs[i_verdef],
> - (addrs[i_verdefnum] + verdauxnum) * sizeof (GElf_Verdef), ELF_T_VDEF);
> + if (offs[i_verdef] != 0 && addrs[i_verdefnum] != 0)
> +verdef_data = elf_getdata_rawchunk (
> + ebl->elf, offs[i_verdef],
> + (addrs[i_verdefnum] + verdauxnum) * sizeof (GElf_Verdef), ELF_T_VDEF);
>
>unsigned int nsyms = (unsigned int)syments;
>process_symtab (ebl, nsyms, 0, 0, 0, symdata, versym_data, symstrdata,
Looks good.
Cheers,
Mark
those to define test_dir.
Signed-off-by: Mark Wielaard
---
tests/test-subr.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index ea80cbec3bc7..2a956b47de2f 100644
--- a/tests/test-subr.sh
+++ b/tests/test-subr.sh
@@ -23,7 +23,9 @@
s
https://sourceware.org/bugzilla/show_bug.cgi?id=32929
Mark Wielaard changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution
We want to test the program against the just build libelf.so not the
system installed one. So add an RPATH to ../libelf.
* libdw/Makefile.am (CHECK_DEF_FLAGS): Add -Wl,-rpath,../libelf.
https://sourceware.org/bugzilla/show_bug.cgi?id=32929
Signed-off-by: Mark Wielaard
---
libdw
https://sourceware.org/bugzilla/show_bug.cgi?id=32929
Mark Wielaard changed:
What|Removed |Added
CC||mark at klomp dot org
--- Comment #1
: normal
Priority: P2
Component: general
Assignee: unassigned at sourceware dot org
Reporter: mark at klomp dot org
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
elfutils 0.193 fails to build on debian hppa and m68k
https
w_str_offsets_base_off. */
>mutex_define(, str_off_base_lock);
>
> + /* Synchronize access to is_constant_offset. Should also be held
> + when calling __libdw_intern_expression with Dwarf_CU members. */
> + mutex_define(, intern_lock);
> +
Right. So maybe cross reference doc between here and Dwarf_CFI_s lock?
>/* Memory boundaries of this CU. */
>void *startp;
>void *endp;
> diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c
> index 0e4dcc37..59267343 100644
> --- a/libdw/libdw_findcu.c
> +++ b/libdw/libdw_findcu.c
> @@ -181,6 +181,7 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types)
>rwlock_init (newp->split_lock);
>mutex_init (newp->src_lock);
>mutex_init (newp->str_off_base_lock);
> + mutex_init (newp->intern_lock);
>
>/* v4 debug type units have version == 4 and unit_type == DW_UT_type. */
>if (debug_types)
Ack.
> @@ -240,8 +241,6 @@ struct Dwarf_CU *
> internal_function
> __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool v4_debug_types)
> {
> - mutex_lock (dbg->dwarf_lock);
> -
>search_tree *tree = v4_debug_types ? &dbg->tu_tree : &dbg->cu_tree;
>Dwarf_Off *next_offset
> = v4_debug_types ? &dbg->next_tu_offset : &dbg->next_cu_offset;
> @@ -250,6 +249,12 @@ __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool
> v4_debug_types)
>struct Dwarf_CU fake = { .start = start, .end = 0 };
>struct Dwarf_CU **found = eu_tfind (&fake, tree, findcu_cb);
>struct Dwarf_CU *result = NULL;
> + if (found != NULL)
> +return *found;
> +
> + mutex_lock (dbg->dwarf_lock);
> +
> + found = eu_tfind (&fake, tree, findcu_cb);
>if (found != NULL)
> {
>mutex_unlock (dbg->dwarf_lock);
OK, so in this case you do need the eu_tfind variant because both calls
need to be guarded. The second call just has one more extra lock around
it (the dwarf_lock) that also covers the possible eu_tsearch call.
Thanks,
Mark
ar format, should it? Or should we have an
ar.5 man page?
> +
> +.SH ATTRIBUTES
> +For an explanation of the terms used in this section, see
> +.BR attributes (7).
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +InterfaceAttribute Value
> +T{
> +.na
> +.nh
> +.BR elf_kind ()
> +T} Thread safety MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to or
> https://sourceware.org/bugzilla/.
Cheers,
Mark
explanation of the terms used in this section, see
> +.BR attributes (7).
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +InterfaceAttribute Value
> +T{
> +.na
> +.nh
> +.BR elf_hash ()
> +T} Thread safety MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to or
> https://sourceware.org/bugzilla/.
Cheers,
Mark
inter to the same offset to read from.
> +.SH ATTRIBUTES
> +For an explanation of the terms used in this section, see
> +.BR attributes (7).
> +
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +InterfaceAttribute Value
> +T{
> +.na
> +.nh
> +.BR elf_getbase ()
> +T} Thread safety MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to or
> https://sourceware.org/bugzilla/.
Cheers,
Mark
TE
Are you sure about it being MT-Safe. It is process wide and not bound
to any particular ELF. So I would say MT-Unsafe race or MT-Unsafe const
maybe?
> +.SH REPORTING BUGS
> +Report bugs to or
> https://sourceware.org/bugzilla/.
> +
Cheers,
Mark
> +.I elf
> +is NULL, then
> +.B elf_end
> +also returns 0.
Good.
> +.SH SEE ALSO
> +.BR elf_begin (3),
> +.BR libelf (3),
> +.BR elf (5)
Yes, but elf_begin (3) is currently somewhat useless.
> +.SH ATTRIBUTES
> +For an explanation of the terms used in this section, see
> +.BR attributes (7).
> +.TS
> +allbox;
> +lbx lb lb
> +l l l.
> +InterfaceAttribute Value
> +T{
> +.na
> +.nh
> +.BR elf_end ()
> +T} Thread safety MT-Safe
> +.TE
> +
> +.SH REPORTING BUGS
> +Report bugs to or
> https://sourceware.org/bugzilla/.
> +
Cheers,
Mark
Hi Anton,
On Thu, Feb 27, 2025 at 10:28:20PM +0100, Mark Wielaard wrote:
> > diff --git a/src/unstrip.c b/src/unstrip.c
> > index d70053de..35c04700 100644
> > --- a/src/unstrip.c
> > +++ b/src/unstrip.c
> > @@ -1974,6 +1974,9 @@ more sections in stripped file tha
Hi Anton,
On Thu, Feb 27, 2025 at 10:02:19PM +0100, Mark Wielaard wrote:
> On Thu, Feb 13, 2025 at 07:52:00PM +0300, Anton Moryakov wrote:
> > Static analyzer reported:
> > Return value of a function 'gelf_getehdr' is dereferenced at readelf.c:12443
> > witho
Hi Anton,
On Thu, Feb 27, 2025 at 06:12:36PM +0100, Mark Wielaard wrote:
> The subject isn't super helpful unless you know the specific
> terminology of the statuc analyzer you are using. It would be better to
> say something like:
>
> ar: check whether elf_getarhdr retur
ailman/listinfo/overseers
Please see https://sourceware.org/donate.html if you want to
financially support Sourceware.
Sourceware PLC,
Frank Ch. Eigler, Christopher Faylor, Ian Kelling, Ian Lance Taylor,
Tom Tromey, Jon Turney, Mark J. Wielaard, Elena Zannoni
of their patrons as thank you.
https://xeiaso.net/notes/2025/anubis-works/
https://xeiaso.net/patrons/
Cheers,
Mark
icitly also
check that (or file a bug report to check that in the future)?
Thanks,
Mark
> Suggested-by: Constantine Bytensky
> Signed-off-by: Aaron Merey
> ---
> src/readelf.c | 50 +++---
> 1 file changed, 31 insertions(+), 19 deletion
on't have to create a whole valid ELF/Dwarf file. But that proved
trickier than I thought. It does however seem pretty nice for these
kind of tests.
Cheers,
Mark
Hi Dmitry,
On Fri, Apr 04, 2025 at 04:07:26PM +0300, Dmitry V. Levin wrote:
> On Fri, Apr 04, 2025 at 01:55:48PM +0200, Mark Wielaard wrote:
> > So to be (pedantically) correct should we include the attached?
>
> Yes, this should be fine, along with
>
> --- a/lib/crc32.
Hi Dmitry,
On Fri, Apr 04, 2025 at 04:04:21PM +0300, Dmitry V. Levin wrote:
> On Fri, Apr 04, 2025 at 01:38:01PM +0200, Mark Wielaard wrote:
> > But maybe we should just use AC_CHECK_HEADERS([stdatomic.h]) and drop
> > the AC_COMPILE_IFELSE trick?
>
> Sure. And if we want
sten-local only (assuming that
makes sense).
Cheers,
Mark
> ---
> debuginfod/debuginfod.cxx | 115 ++
> doc/debuginfod.8 | 5 ++
> 2 files changed, 84 insertions(+), 36 deletions(-)
>
> diff --git a/debuginfod/debuginfod.cxx
Hi Dmitry,
On Thu, 2025-04-03 at 19:09 +0300, Dmitry V. Levin wrote:
> On Thu, Aug 29, 2019 at 03:16:12PM +0200, Mark Wielaard wrote:
> > From: Jonathon Anderson
> >
> > Uses the stdatomic.h provided by FreeBSD when GCC doesn't (ie. GCC < 4.9)
> >
&
't seen it fail in
armhf for a year, but in the last 9 days it has failed 3 times already
:{
https://builder.sourceware.org/buildbot/#/builders/elfutils-debian-armhf
H,
Mark
> of including config.h twice for all files that include both
> and "system.h".
So to be (pedantically) correct should we include the attached?
Thanks,
Mark
From f14c00adb24bf15059821ca972e5d20a58b893fa Mon Sep 17 00:00:00 2001
From: Mark Wielaard
Date: Fri, 4 Apr 2025 13:50:04 +02
https://sourceware.org/bugzilla/show_bug.cgi?id=29571
Mark Wielaard changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution
tests/run-readelf-z.sh: Add Key to Flags to expected output.
* tests/run-retain.sh: Likewise.
* tests/run-strip-remove-keep.sh: Likewise.
https://sourceware.org/bugzilla/show_bug.cgi?id=29571
Signed-off-by: Samuel Zeter
Cheers,
Mark
CHECK.
(main): Likewise.
Signed-off-by: Mark Wielaard
---
libdw/Makefile.am | 11
libdw/dwarf.h | 2 +
libdw/dwarf_default_lower_bound.c | 2 +
libdw/dwarf_srclang.c | 87 ++-
4 files changed, 101 insertions(
> doc/debuginfod.8 | 5 ++
> 2 files changed, 84 insertions(+), 36 deletions(-)
Looks good, pushed as is.
Thanks,
Mark
On Fri, Mar 14, 2025 at 01:40:42AM +0100, Mark Wielaard wrote:
> The Sourceware Project Leadership Committee would like to know who our
> users are, which hosted projects they feel part of, what services they
> rely on and what the priorities should be for new initiatives.
&
d-off-by line to show they have the right to and grand
others rights to use their contribution. See the CONTRIBUTING file:
https://sourceware.org/cgit/elfutils/tree/CONTRIBUTING#n15
Thanks,
Mark
en there are more places that might need extra guarding (or we have
to write better eu-search wrappers?)
Thanks,
Mark
> Signed-off-by: Aaron Merey
> ---
> libdw/libdw_findcu.c | 9 ++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/libdw/libdw_findcu
Using [[ is a bashism. We can just use [ since this is a simple
comparision.
* tests/thread-safety-subr.sh: Use if [ instead of if [[.
Signed-off-by: Mark Wielaard
---
tests/thread-safety-subr.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/thread-safety
Hi Michael,
On Thu, Mar 20, 2025 at 02:58:34PM +, Trapp, Michael wrote:
> > Am 19.03.2025 um 13:35 schrieb Mark Wielaard :
> > The code itself does look ok, although I think it could be simplified a
> > little if we go for something like --listen-local only (assuming th
looks good. I believe that means the whole series is
finally fully reviewed and approved. So please do push it.
Cheers,
Mark
Hi Aaron,
On Sun, 2025-03-16 at 21:51 -0400, Aaron Merey wrote:
> * libdw/dwarf_begin_elf.c (dwarf_begin_elf): Init macro_lock.
> * libdw/dwarf_end.c (cu_free): Free src_lock.
> (dwarf_end): Free macro_lock.
> * libdw/dwarf_getsrcfiles.c (dwarf_getsrcfiles): Use src_lock.
>
it
slightly more intuitive to use.
Cheers,
Mark
> * libdwfl/libdwfl.h (Dwfl_Process_Tracker): New struct.
> (dwfl_process_tracker_begin): New function.
> (dwfl_begin_with_tracker): New function.
> (dwfl_process_tracker_end): New function.
> * libdw/libdw.map: Add new functions.
libdwfl function with the above
changes, but I think it is simpler/less work to just make it an
internal libdwflP.h helper function.
Cheers,
Mark
Hi Serhei,
On Sun, Mar 16, 2025 at 07:14:11PM -0400, Serhei Makarov wrote:
> Since libebl is a private interface, subsequent patches in the series
> introduce another api wrapping the libebl perf register handling. In
> this patch, add an interface to access the preferred set of registers
> that
tch 01/13 (it could even
be folded into it.
Cheers,
Mark
> ---
> src/Makefile.am | 4 ++--
> src/stacktrace.c | 48 +---
> 2 files changed, 15 insertions(+), 37 deletions(-)
>
> diff --git a/src/Makefile.am b/src/Makefile.am
his is used by some backends, where the
> return_address_register actually contains the call address. */
> diff --git a/libebl/libeblP.h b/libebl/libeblP.h
> index c408ed97..29c2402d 100644
> --- a/libebl/libeblP.h
> +++ b/libebl/libeblP.h
> @@ -1,5 +1,5 @@
> /* Internal definitions for interface for libebl.
> - Copyright (C) 2000-2009, 2013, 2014 Red Hat, Inc.
> + Copyright (C) 2000-2009, 2013, 2014, 2025 Red Hat, Inc.
> This file is part of elfutils.
>
> This file is free software; you can redistribute it and/or modify
> @@ -60,6 +60,11 @@ struct ebl
> Ebl architecture can unwind iff FRAME_NREGS > 0. */
>size_t frame_nregs;
>
> + /* Preferred sample_regs_user mask to request from linux perf_events
> + to allow unwinding. Ebl architecture supports unwinding from
> + perf_events sample data iff PERF_FRAME_REGS_MASK > 0. */
> + uint32_t perf_frame_regs_mask;
> +
In all other places the mask is an uint64_t
Also the libebl interface is very verbose for this mask.
Clearly copied from how frame_nregs is done.
So fine for now. But we might want to look into something simpler for
both of these. Both fetching frame_nregs and perf_frame_regs_mask feel
very inefficient.
Cheers,
Mark
located the symbol and/or section
addresses (so whether you are reading the values from memory or on
disk).
Cheers,
Mark
(" L (link order), N (extra OS processing required), G (group), T
> (TLS),");
> + puts (" C (compressed), O (ordered), R (GNU retain), E (exclude)");
> +}
>
> /* Print the program header. */
> static void
The patch itself does look correct. These are the flags that print_shdr
prints if the corresponding shdr->sh_flags are set.
Cheers,
Mark
https://sourceware.org/bugzilla/show_bug.cgi?id=29571
--- Comment #7 from Mark Wielaard ---
(In reply to Sam Zeter from comment #6)
> I also noticed in libelf/elf.h that we define these flags but do not print
> them in readelf:
>
> #define SHF_MASKOS 0x0ff0 /*
that coding like this triggers -Werror=unused-parameter on non-x86.
> I plan to fix this in the next version of the patch.
In some other situations that is "solved" with marking the function
arguments with __attribute__ ((unused)) (which isn't true for x86_64,
but the compiler is fine with that).
Cheers,
Mark
your local
timezone: $ date -d "Fri Mar 14 16:00 UTC 2025"
Thanks,
Frank Ch. Eigler, Christopher Faylor, Ian Kelling, Ian Lance Taylor,
Tom Tromey, Jon Turney, Mark J. Wielaard, Elena Zannoni
.
* tests/Makefile.am (check_PROGRAMS): Add dwarf_language_lower_bound.
(TESTS): Likewise.
(dwarf_language_lower_bound_LDADD): New variable.
Signed-off-by: Mark Wielaard
---
NEWS | 2 +
libdw/dwarf_aggregate_size.c | 8 +-
libdw
.
(dwarf_srclang): If there is no DW_AT_language, try
DW_AT_language_name and DW_AT_language_version, use
language_to_srclang.
Signed-off-by: Mark Wielaard
---
libdw/dwarf_srclang.c | 221 +-
1 file changed, 218 insertions(+), 3 deletions
dwarf_lname_name.
* run-readelf-lnames.sh: New test.
* testfile-lnames.bz2: New testfile.
* tests/Makefile.am (TESTS): Add run-readelf-lnames.sh.
(EXTRA_DIST): Add run-readelf-lnames.sh and
testfile-lnames.bz2.
Signed-off-by: Mark Wielaard
---
libdw/dwarf.h
-dwarf.awk: Handle DW_LNAME.
* libdw/dwarf.h: Add DW_AT_language_name and DW_AT_language_version
plus all currently defined DW_LNAME constants. Add DW_LANG_V and
DW_LANG_Algol68.
* libdw/dwarf_default_lower_bound.c: Add DW_LANG_V and
DW_LANG_Algol68.
Signed-off-by: Mark Wielaard
https://sourceware.org/bugzilla/show_bug.cgi?id=31862
Mark Wielaard changed:
What|Removed |Added
Resolution|--- |FIXED
CC
v3 changes: Add --track-fds to valgrind_cmd when USE_HELGRIND is true.
Looks OK.
Once this is in we should add a buildbot with this enabled.
Thanks,
Mark
1 - 100 of 1300 matches
Mail list logo