Re: [[RESEND & PING]PATCH V3 0/1] Add C-SKY support

2019-07-10 Thread Mark Wielaard
Hi Mao Han, On Mon, 2019-06-03 at 16:16 +0800, Mao Han wrote: > test binary: > https://github.com/c-sky/test-result/blob/master/elfutils/divzero > https://github.com/c-sky/test-result/blob/master/elfutils/core I was looking at these, but they seem to have a wrong e_machine value of EM_RCE, not EM

Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY

2019-07-10 Thread Mark Wielaard
Hi Mao Han, On Mon, 2019-06-03 at 16:16 +0800, Mao Han wrote: > +const char * > +csky_section_type_name (int type, > + char *buf __attribute__ ((unused)), > + size_t len __attribute__ ((unused))) > +{ > + if (type == SHT_CSKY_ATTRIBUTES) > +return "CS

Re: [[RESEND & PING]PATCH V3 0/1] Add C-SKY support

2019-07-11 Thread Mark Wielaard
On Thu, 2019-07-11 at 11:11 +0800, Mao Han wrote: > On Wed, Jul 10, 2019 at 11:33:23PM +0200, Mark Wielaard wrote: > > On Mon, 2019-06-03 at 16:16 +0800, Mao Han wrote: > > > test binary: > > > https://github.com/c-sky/test-result/blob/master/elfutils/divzero > >

Re: [[RESEND & PING]PATCH V3 0/1] Add C-SKY support

2019-07-12 Thread Mark Wielaard
On Fri, 2019-07-12 at 19:22 +0800, Mao Han wrote: > I've generated binaries/core with an upstream toolchain, however the > divzero testcase doesn't cause any coredump, so I used a zeroptr > testcase instead. > https://github.com/c-sky/test-result/blob/master/elfutils/zeroptr > https://github.com/c-

Re: [[RESEND & PING]PATCH V3 0/1] Add C-SKY support

2019-07-12 Thread Mark Wielaard
On Mon, 2019-06-03 at 16:16 +0800, Mao Han wrote: > 5. run-reverse-sections-self.sh > elfcopy --reverse-offs dose not work properly on C-SKY object file, > seems not related to arch specific code. > size.o before copy: > https://github.com/c-sky/test-result/blob/master/elfutils/size.o > size.o.rev

Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY

2019-07-12 Thread Mark Wielaard
On Mon, 2019-06-03 at 16:16 +0800, Mao Han wrote: > diff --git a/backends/csky_reloc.def b/backends/csky_reloc.def > new file mode 100644 > index 000..1108f0c > --- /dev/null > +++ b/backends/csky_reloc.def > @@ -0,0 +1,86 @@ > +/* List the relocation types for csky. -*- C -*- > + Copyright

0.178 release next week

2019-07-12 Thread Mark Wielaard
Hi, In another thread I said I would like to do a release end of this week with the csky backend and the elfclassify tool integrated. But I didn't make enough time for reviews, so that moves to next week. Sorry. I should have enough time next week. But we will have to see if we can polish the csk

Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY

2019-07-14 Thread Mark Wielaard
On Thu, 2019-07-11 at 11:19 +0800, Mao Han wrote: > On Thu, Jul 11, 2019 at 12:11:17AM +0200, Mark Wielaard wrote: > > As far as I can see this is like a SHT_GNU_ATTRIBUTES or > > SHT_ARM_ATTRIBUTES section. If so, you will also want something > > like: > > > >

Re: 0.17(8 -> 7) release next week

2019-07-15 Thread Mark Wielaard
On Sat, 2019-07-13 at 00:36 +0200, Mark Wielaard wrote: > In another thread I said I would like to do a release end of this week > with the csky backend and the elfclassify tool integrated. But I didn't > make enough time for reviews, so that moves to next week. Sorry. > >

Re: [[RESEND & PING]PATCH V3 1/1] Add backend support for C-SKY

2019-07-15 Thread Mark Wielaard
at present. OK. It is fine as is then. Just wanted to make sure it was as intended. > > On Thu, 2019-07-11 at 11:19 +0800, Mao Han wrote: > > > On Thu, Jul 11, 2019 at 12:11:17AM +0200, Mark Wielaard wrote: > > > > As far as I can see this is like a SHT_GNU_ATTRIBUTES o

Re: [PATCH V4 0/1] Add C-SKY support

2019-07-16 Thread Mark Wielaard
On Tue, 2019-07-16 at 19:14 +0800, Mao Han wrote: > > > The ELF_ARCH was defined as 39 inside linux kernel(before 4.20), > > > so > > > the the core file generated was EM_RCE. > > > I'v regenerated the core file with ELF_ARCH defined as 252: > > > https://github.com/c-sky/test-result/blob/master/el

Re: [PATCH V4 0/1] Add C-SKY support

2019-07-17 Thread Mark Wielaard
Hi Mao Han, On Wed, 2019-07-17 at 09:19 +0800, Mao Han wrote: > > The new patch looks really good. Thanks. The addition of the testcases > > really helps showing things look good. I can make that one small fix > > s/gnu/csky/ in csky_attrs.c if you agree that is what was intended. > > Then I'll pu

Re: [PATCH] elfclassify tool

2019-07-19 Thread Mark Wielaard
Hi, Sorry, this took way too long. But I really like this code. On Thu, 2019-04-18 at 13:17 +0200, Florian Weimer wrote: > * Florian Weimer: > > > > BTW. Florian, the extra options are certainly not required for you to > > > implement to get eu-elfclassify accepted. They are just suggestions, >

Re: [PATCH] elfclassify tool

2019-07-19 Thread Mark Wielaard
Hi, Some answers to this older discussion to explain some of my recent commits suggested for elfclassify. On Tue, 2019-04-16 at 13:38 +0200, Florian Weimer wrote: > * Mark Wielaard: > > --elf PATH return 0 whenever the file can be opened and a minimal ELF > > header can be read (

Re: [PATCH] elfclassify tool

2019-07-19 Thread Mark Wielaard
On Sat, Jul 20, 2019 at 12:23:08AM +0300, Dmitry V. Levin wrote: > On Fri, Jul 19, 2019 at 11:00:49PM +0200, Florian Weimer wrote: > > * Dmitry V. Levin: > > > > >> So, I don't think the code is wrong. We might want to tweak the comment > > >> a bit though, to make it less definitive? > > > > > >

Re: [PATCH] elfclassify tool

2019-07-20 Thread Mark Wielaard
On Fri, Jul 19, 2019 at 02:47:09PM +0200, Mark Wielaard wrote: > The individual commits can be found here: > https://code.wildebeest.org/git/user/mjw/elfutils/log/?h=elfclassify > > Please let me know if any of this looks bad or unusual. > > I'll write some testcases. And

Re: [PATCH] elfclassify tool

2019-07-20 Thread Mark Wielaard
On Sat, Jul 20, 2019 at 01:57:27AM +0300, Dmitry V. Levin wrote: > On Fri, Jul 19, 2019 at 11:36:53PM +0200, Mark Wielaard wrote: > > > If the ELF type is ET_DYN and the object is not marked as DF_1_PIE, > > > could we come up with a more reliable heuristics than DT_SONAME

[PATCH] elfclassify: Add --library classification.

2019-07-25 Thread Mark Wielaard
> Maybe you are looking for another goal/classification? For example I > added --program which does classify those special files as programs > (even though --shared also says they are shared libraries). Maybe you > are looking for a different classification similar/dual to that. Say > --library?

Re: [PATCH] elfclassify tool

2019-07-26 Thread Mark Wielaard
sion Print program version Signed-off-by: Mark Wielaard --- src/ChangeLog |9 +- src/Makefile.am |4 +- src/elfclassify.c | 1047 + tests/ChangeLog |9 + tests/Makefile.am |7

Re: [PATCH] elfclassify tool

2019-07-27 Thread Mark Wielaard
On Sat, Jul 27, 2019 at 02:04:48AM +0300, Dmitry V. Levin wrote: > On Sat, Jul 20, 2019 at 11:51:16PM +0200, Mark Wielaard wrote: > > On Sat, Jul 20, 2019 at 01:57:27AM +0300, Dmitry V. Levin wrote: > [...] > > > btw, I think it would be appropriate to move the has_dynamic c

Re: [PATCH] elfclassify tool

2019-07-29 Thread Mark Wielaard
On Mon, Jul 29, 2019 at 10:43:56AM +0200, Florian Weimer wrote: > * Mark Wielaard: > > > + if (elf == NULL) > > +{ > > + /* This likely means it just isn't an ELF file, probably not a > > +real issue, but warn if verbose reporting. */ > >

Re: [PATCH] elfclassify tool

2019-07-29 Thread Mark Wielaard
On Mon, Jul 29, 2019 at 11:16:31AM +0200, Florian Weimer wrote: > * Mark Wielaard: > > > +/* Called to process standard input if flag_stdin is not no_stdin. */ > > +static void > > +process_stdin (int *status) > > +{ > > + char delim; > > + if (fla

Re: [PATCH] elfclassify tool

2019-07-29 Thread Mark Wielaard
On Mon, Jul 29, 2019 at 11:22:13AM +0200, Florian Weimer wrote: > * Mark Wielaard: > > > Signed-off-by: Mark Wielaard > > Does elfutils use DCO? Then yoy have my signoff as well: > > Signed-off-by: Florian Weimer Thanks. Yes, elfutils uses a Developer Certificat

Re: [PATCH] libdwfl: Fix fd leak/closing wrong fd after dwfl_core_file_report()

2019-08-09 Thread Mark Wielaard
Hi Omar, On Mon, 2019-08-05 at 03:40 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > dwfl_segment_report_module() (used only by dwfl_core_file_report()) > opens a file descriptor and/or an Elf handle, reports a module, and > assigns mod->main.elf. However, it doesn't assign mod->main.fd, s

Re: [PATCH] elfclassify tool

2019-08-11 Thread Mark Wielaard
On Mon, 2019-07-29 at 16:24 +0200, Mark Wielaard wrote: > On Mon, Jul 29, 2019 at 10:43:56AM +0200, Florian Weimer wrote: > > * Mark Wielaard: > > > > > + if (elf == NULL) > > > +{ > > > + /* This likely means it just isn't an ELF file,

Re: [PATCH] elfclassify tool

2019-08-12 Thread Mark Wielaard
On Mon, Aug 12, 2019 at 10:14:20AM +0200, Florian Weimer wrote: > * Mark Wielaard: > > > What do you think about this change to dwelf_elf_begin? > > The change would make it possible to detect real errors in the > > elfclassify code, whether elf_begin or dwelf_elf_begin w

Re: [PATCH] elfclassify tool

2019-08-13 Thread Mark Wielaard
On Mon, Jul 29, 2019 at 04:38:17PM +0200, Florian Weimer wrote: > > On Mon, Jul 29, 2019 at 11:16:31AM +0200, Florian Weimer wrote: > > So the test should be: > > > > diff --git a/src/elfclassify.c b/src/elfclassify.c > > index ebd42c1d5..b17d14d45 100644 > > --- a/src/elfclassify.c > > +++ b/src/e

Re: [PATCH] elfclassify tool

2019-08-13 Thread Mark Wielaard
ian Weimer Signed-off-by: Mark Wielaard --- src/ChangeLog |9 +- src/Makefile.am |4 +- src/elfclassify.c | 1046 + tests/ChangeLog |9 + tests/Makefile.am |7 +- tests/run-elfclass

Re: 0.17(8 -> 7) release next (week -> month) [Tomorrow]

2019-08-13 Thread Mark Wielaard
On Mon, Jul 15, 2019 at 12:17:36PM +0200, Mark Wielaard wrote: > On Sat, 2019-07-13 at 00:36 +0200, Mark Wielaard wrote: > > In another thread I said I would like to do a release end of this week > > with the csky backend and the elfclassify tool integrated. But I didn't >

elfutils 0.177 released

2019-08-14 Thread Mark Wielaard
file an ELF handle of type ELF_K_NONE is returned. backends: Add support for C-SKY. * GIT SHORTLOG * Florian Weimer (1): elfclassify: New tool to analyze ELF objects. Mao Han (2): libelf: Sync elf.h from glibc Add backend support for C-SKY Mark Wielaard (42): libelf: Handle

Re: [PATCH] config/elfutils.spec.in: package eu-elfclassify

2019-08-15 Thread Mark Wielaard
Hi Dmitry, On Wed, Aug 14, 2019 at 11:45:56PM +0300, Dmitry V. Levin wrote: > Package the new tool introduced by commit elfutils-0.177~1. > > Signed-off-by: Dmitry V. Levin > --- > > I have no idea whether this file is actually used as a specfile. > If not, let's add eu-elfclassify there for co

(lfedora1) Re: Buildbot failure in Wildebeest Builder on whole buildset

2019-08-15 Thread Mark Wielaard
On Thu, Aug 15, 2019 at 08:28:25AM +, 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/10/builds/349 > > Buildbot URL

[PATCH] readelf: Add optional "SECTION" argument for --notes.

2019-08-21 Thread Mark Wielaard
There are multiple sections that can contain ELF Notes. It is sometimes nice to just list the notes from a specific section. -n, --notes[=SECTION] Display the ELF notes Signed-off-by: Mark Wielaard --- src/ChangeLog | 7 +++ src/readelf.c | 13 - 2 files changed, 19

Re: Accepting GNU Free Documentation Licensed content

2019-08-21 Thread Mark Wielaard
Hi Ben, On Tue, 2019-08-20 at 12:18 -0700, Ben Coyote Woodard wrote: > What do you guys think of accepting derived works based upon GNU Free > Documentation Licensed content? https://www.gnu.org/licenses/fdl-1.3.en.html > > As far as I can tell, allowing a project like elfutils the freedom to >

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-21 Thread Mark Wielaard
Hi Jonathon and Srđan, On Fri, 2019-08-16 at 14:24 -0500, Jonathon Anderson wrote: > For parallel applications that need the information in the DIEs, the > Dwarf_Abbrev hash table et al. become a massive data race. This fixes > that by: > > 1. Adding atomics & locks to the hash table to manage c

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-21 Thread Mark Wielaard
ble-valgrind-annotations > + * configure.ac: Add new --with-valgrind (headers only) > + > 2019-08-13 Mark Wielaard > > * configure.ac: Set version to 0.177. > diff --git a/configure.ac b/configure.ac > index c443fa3b..c5406b44 100644 > --- a/configure.ac > +++ b/configu

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-21 Thread Mark Wielaard
On Wed, 2019-08-21 at 23:50 +0200, Mark Wielaard wrote: > On Fri, 2019-08-16 at 14:24 -0500, Jonathon Anderson wrote: > > @@ -668,6 +697,7 @@ AC_MSG_NOTICE([ > >OTHER FEATURES > > Deterministic archives by default : > > ${default_ar_deterministic} >

Re: [PATCH] Begin adding some docs to elfutils

2019-08-23 Thread Mark Wielaard
Hi Ben, On Thu, 2019-08-22 at 07:47 -0700, Ben Woodard wrote: > - Added doc/README > - Updated doc/ChangeLog > - Added a eu-readelf manpage based on the one from binutils. > - Added a brand new manpage for eu-elfclassify the new utility added > in 0.177 > - Add some new files in the doc directory

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-23 Thread Mark Wielaard
Hi, On Wed, 2019-08-21 at 09:08 -0500, Jonathon Anderson wrote: > On Wed, Aug 21, 2019 at 6:16 AM, Mark Wielaard > wrote:On Fri, 2019-08-16 at 14:24 -0500, Jonathon Anderson wrote: > > > For parallel applications that need the information in the DIEs, the > > > Dwarf

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-23 Thread Mark Wielaard
On Wed, 2019-08-21 at 09:20 -0500, Jonathon Anderson wrote: > First message failed to send, hopefully this one works... Just for the record, the mailinglist did reject HTML messages/attachments. It should have been changed now to simply strip the HTML. Cheers, Mark

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-23 Thread Mark Wielaard
On Wed, 2019-08-21 at 17:21 -0500, Jonathon Anderson wrote: > > P.S. It looks like something decided to add some line breaks in the > > patch so that it doesn't easily apply. It isn't hard to fixup, but you > > might want to consider submitting using git send-email or attaching > > the result of g

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-24 Thread Mark Wielaard
Hi, On Fri, Aug 16, 2019 at 02:24:28PM -0500, Jonathon Anderson wrote: > 2. Adding a lock & array structure to the memory manager (pseudo-TLS) > (libdwP.h, libdw_alloc.c) Specifically concentrating on this part. > diff --git a/libdw/ChangeLog b/libdw/ChangeLog > index bf1f4857..87abf7a7 100644

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-25 Thread Mark Wielaard
Hi Jonathon, On Sat, 2019-08-24 at 20:10 -0500, Jonathon Anderson wrote: > On Sat, Aug 24, 2019 at 6:24 PM, Mark Wielaard wrote: > > But what if realloc moves the block? > > Then all dbg->mem_tails[thread_id] pointers become invalid. > > And this function drops the

Re: [PATCH] readelf: Add optional "SECTION" argument for --notes.

2019-08-26 Thread Mark Wielaard
Hi, On Wed, 2019-08-21 at 12:32 +0200, Mark Wielaard wrote: > There are multiple sections that can contain ELF Notes. It is sometimes > nice to just list the notes from a specific section. > > -n, --notes[=SECTION] Display the ELF notes Pushed to master.

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-26 Thread Mark Wielaard
les changed, 5 insertions(+) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index bf1f4857..1d3586f0 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,7 @@ +2019-08-25 Jonathon Anderson + + * dwarf_getcfi.c (dwarf_getcfi): Set default_same_value to false. + 2019-08-12 Mark Wielaard

Re: [RFC PATCH 0/2] elfutils: don't use dlopen() for libebl modules

2019-08-26 Thread Mark Wielaard
Hi Omar, On Tue, 2019-07-09 at 12:25 -0700, Omar Sandoval wrote: > On Tue, Jul 09, 2019 at 09:14:03PM +0200, Mark Wielaard wrote: > > Then after the release, somewhere next week, we'll apply your patches > > first and can then deal with any fallout and followups. I am thinkin

Re: [PATCH] V2 Begin adding some docs to elfutils

2019-08-27 Thread Mark Wielaard
Hi Ben, On Fri, 2019-08-23 at 13:42 -0700, Ben Woodard wrote: > - Added doc/README I like this one. If only because it says we would like to move to sphinx :) I must admit I am not a fan of raw nroff. But of course it is better than nothing. > - Updated doc/ChangeLog Thanks. You don't really ha

[PATCH] readelf: Actually dump hex or strings when -p or -x get section number.

2019-08-27 Thread Mark Wielaard
The readelf code did parse section numbers, but then failed to actually dump the section found. Fixed by actually calling the dump function (either the hex or string variant). Add testcase for readelf -x num. Signed-off-by: Mark Wielaard --- src/ChangeLog | 5 + src/readelf.c

[PATCH] config: Add manpages to spec file.

2019-08-27 Thread Mark Wielaard
Now that we have manpages lets also package them. Signed-off-by: Mark Wielaard --- config/ChangeLog| 5 + config/elfutils.spec.in | 2 ++ 2 files changed, 7 insertions(+) diff --git a/config/ChangeLog b/config/ChangeLog index 12a141b2..f4d80224 100644 --- a/config/ChangeLog +++ b

Re: [PATCH] config: Add manpages to spec file.

2019-08-28 Thread Mark Wielaard
On Wed, 2019-08-28 at 00:34 +0200, Mark Wielaard wrote: > Now that we have manpages lets also package them. > > +2019-08-28 Mark Wielaard > + > + * elfutils.spec.in (%files): Add man1/eu-*.1*. > + (%files libelf-devel): Add man3/elf_*.3*. That clearly isn't eno

Re: [PATCH] Add elfclassify to .gitignore

2019-08-28 Thread Mark Wielaard
On Mon, 2019-08-26 at 10:58 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > The tool was just added, but it's missing the ignore entry. Thanks, applied to master.

Re: [PATCH v2 1/4] libebl: remove unnecessary variable in Makefile.am

2019-08-28 Thread Mark Wielaard
On Mon, 2019-08-26 at 10:51 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > gen_SOURCES is assigned to libebl_a_SOURCES and never used again. Get > rid of it. Thanks for the cleanup. Applied to master.

Re: [PATCH v2 2/4] libcpu: merge libcpu_{i386,x86_64,bpf} into one library

2019-08-28 Thread Mark Wielaard
On Mon, 2019-08-26 at 10:51 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > In preparation for combining the libebl backend modules, > combine all of the libcpu backends into libcpu.a. Another nice cleanup. Pushed to master. Thanks, Mark

Re: [PATCH v2 3/4] Add PIC and non-PIC variants of libcpu and libebl

2019-08-28 Thread Mark Wielaard
On Mon, 2019-08-26 at 10:51 -0700, Omar Sandoval wrote: > From: Omar Sandoval > > Currently, libcpu and libebl are always compiled as PIC. An upcoming > change will add the objects from libcpu.a and libebl.a to libdw.a, > which > should not be PIC unless configured that way. So, make libcpu.a and

Re: Buildbot failure in Wildebeest Builder on whole buildset

2019-08-28 Thread Mark Wielaard
Cheers, Mark From ab415cea199547ee06c50aa82eebe9c58307576f Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 28 Aug 2019 23:55:24 +0200 Subject: [PATCH] libasm: Link against libebl_pic.a. Signed-off-by: Mark Wielaard --- libasm/ChangeLog | 4 libasm/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1

Re: [PATCH v2 4/4] Don't use dlopen() for libebl modules

2019-08-29 Thread Mark Wielaard
Hi Omar, On Mon, 2019-08-26 at 10:51 -0700, Omar Sandoval wrote: > Currently, architecture-specific code for libebl exists in separate > libebl_$ARCH.so libraries which libebl loads with dlopen() at runtime. > This makes it impossible to have standalone, statically-linked binaries > which use libd

[PATCH 1/3] Add some supporting framework for C11-style atomics.

2019-08-29 Thread Mark Wielaard
From: Jonathon Anderson Uses the stdatomic.h provided by FreeBSD when GCC doesn't (ie. GCC < 4.9) Signed-off-by: Jonathon Anderson Signed-off-by: Srđan Milaković --- configure.ac | 12 ++ lib/ChangeLog| 6 + lib/Makefile.am | 3 +- lib/atomics.h| 37 li

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-08-29 Thread Mark Wielaard
Hi Jonathan, On Mon, 2019-08-26 at 22:52 -0500, Jonathon Anderson wrote: > Just finished some modifications to the patch series, git request- > pull output below. This rebases onto the latest master and does a > little diff cleaning, the major change is that I swapped out the > memory management t

[PATCH 2/3] libdw: Rewrite the memory handler to be thread-safe.

2019-08-29 Thread Mark Wielaard
From: Jonathon Anderson Signed-off-by: Jonathon Anderson --- libdw/ChangeLog | 8 ++ libdw/Makefile.am | 4 +-- libdw/dwarf_begin_elf.c | 12 - libdw/dwarf_end.c | 7 ++--- libdw/libdwP.h | 59 ++--- libdw/libdw_all

[PATCH 3/3] lib + libdw: Add and use a concurrent version of the dynamic-size hash table.

2019-08-29 Thread Mark Wielaard
From: Srđan Milaković Signed-off-by: Srđan Milaković --- lib/ChangeLog| 5 + lib/Makefile.am | 4 +- lib/dynamicsizehash_concurrent.c | 522 +++ lib/dynamicsizehash_concurrent.h | 118 +++ libdw/ChangeLog

Re: Buildbot failure in Wildebeest Builder on whole buildset

2019-08-29 Thread Mark Wielaard
of the self test files with smaller executables/libraries as attached. Hopefully that will reduce the make check runtime under valgrind so builder don't time out. Cheers, Mark From bb106065dc6962fabf1c163f18c932650dac6580 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 29 Aug 2019

Re: Buildbot failure in Wildebeest Builder on whole buildset

2019-08-29 Thread Mark Wielaard
On Thu, Aug 29, 2019 at 04:23:24PM +0200, Mark Wielaard wrote: > I am replacing some of the self test files with smaller > executables/libraries as attached. Hopefully that will reduce the make > check runtime under valgrind so builder don't time out. That was interesting. It did

Re: [PATCH] readelf: Actually dump hex or strings when -p or -x get section number.

2019-08-29 Thread Mark Wielaard
On Tue, Aug 27, 2019 at 04:12:35PM +0200, Mark Wielaard wrote: > The readelf code did parse section numbers, but then failed to actually > dump the section found. Fixed by actually calling the dump function > (either the hex or string variant). Add testcase for readelf -x num. Pushed to master.

Re: [PATCH] config: Add manpages to spec file.

2019-08-29 Thread Mark Wielaard
On Wed, Aug 28, 2019 at 12:32:17PM +0200, Mark Wielaard wrote: > On Wed, 2019-08-28 at 00:34 +0200, Mark Wielaard wrote: > > Now that we have manpages lets also package them. > > > > +2019-08-28 Mark Wielaard > > + > > + * elfutils.spec.in (%files): Add man

[PATCH] libebl: Don't install libebl.a, libebl.h and remove backends from spec.

2019-08-29 Thread Mark Wielaard
All archive members from libebl.a are now in libdw.a. We don't generate separate backend shared libraries anymore. So remove them from the elfutils.spec file. Signed-off-by: Mark Wielaard --- config/ChangeLog| 7 +++ config/elfutils.spec.in | 10 ++ libebl/Chan

[PATCH] readelf: Add --dyn-sym option.

2019-09-02 Thread Mark Wielaard
testcase to show --symbols=.dynsym and --dyn-sym produce the same output. Signed-off-by: Mark Wielaard --- doc/ChangeLog | 5 + doc/readelf.1 | 9 +++-- src/ChangeLog | 8 src/readelf.c | 14 +- tests/ChangeLog| 4

Re: [PATCH] readelf: Add --dyn-sym option.

2019-09-03 Thread Mark Wielaard
On Tue, 2019-09-03 at 09:44 +0200, Florian Weimer wrote: > * Mark Wielaard: > > > It is already possible to select the symbol table to print by name, > > using --symbols=SECTION. This allows printing the dynamic symbol table > > with --symbols=.dynsym. binutils readelf

Re: Buildbot failure in Wildebeest Builder on whole buildset

2019-09-07 Thread Mark Wielaard
35303c Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 7 Sep 2019 21:35:10 +0200 Subject: [PATCH] tests: Add new riscv64 test files to EXTRA_DIST Signed-off-by: Mark Wielaard --- tests/ChangeLog | 5 + tests/Makefile.am | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff

Re: RISC-V disassembler

2019-09-07 Thread Mark Wielaard
Hi Ulrich, On Sat, Sep 07, 2019 at 11:18:42AM +0200, Ulrich Drepper wrote: > I'll check in the attached patch which implements a disassembler for > RISC-V. It also fixes a problem in the x86 disassember, exposed through > the additions needed for RISC-V. This is awesome. Thanks. > Since aside r

Re: [PATCH] libebl: Don't install libebl.a, libebl.h and remove backends from spec.

2019-09-10 Thread Mark Wielaard
On Thu, 2019-08-29 at 23:43 +0200, Mark Wielaard wrote: > All archive members from libebl.a are now in libdw.a. We don't generate > separate backend shared libraries anymore. So remove them from the > elfutils.spec file. Pushed to master.

Re: [PATCH] readelf: Add --dyn-sym option.

2019-09-10 Thread Mark Wielaard
On Tue, 2019-09-03 at 00:10 +0200, Mark Wielaard wrote: > It is already possible to select the symbol table to print by name, > using --symbols=SECTION. This allows printing the dynamic symbol table > with --symbols=.dynsym. binutils readelf allows printing just the > dynamic symbol t

Re: line info

2019-09-12 Thread Mark Wielaard
Hi Sasha, On Wed, Sep 11, 2019 at 09:52:23PM +, Sasha Da Rocha Pinheiro wrote: > how do we get the line info range end address for a given line and file? I am not sure I understand your question competely. What are you using to get at the line and file? In theory there is no "range end addr

Re: line info

2019-10-02 Thread Mark Wielaard
Hi Sasha, Sorry for the late reply. On Thu, 2019-09-12 at 15:22 +, Sasha Da Rocha Pinheiro wrote: > For my knowledge about it, this information is not encoded in the > dwarf_line state machine instructions. Right? Would you know how to > get it? > > I know that the state machine will shift l

Re: What not as assembler and it's debugger?

2019-10-04 Thread Mark Wielaard
On Sun, Sep 15, 2019 at 09:14:01AM +0530, Mayuresh Kathe wrote: > Since the elfutils project provides a Linux-only tuned edition of ELF binary > management toolkit, why does it not also include an assembler and it's > associated debugger? > > I understand that the AT&T mnemonics are something of a

Re: [PATCH] elflint, readelf: enhance error diagnostics

2019-10-04 Thread Mark Wielaard
On Mon, Sep 30, 2019 at 02:39:50PM +0300, Dmitry V. Levin wrote: > When an input file cannot be opened, include its name > into the error diagnostics. Looks very sensible. Pushed to master. Thanks, Mark

Re: [PATCH 2/3] libdw: Rewrite the memory handler to be thread-safe.

2019-10-21 Thread Mark Wielaard
Hi, Finally back to this patch series. On Thu, 2019-08-29 at 15:16 +0200, Mark Wielaard wrote: > diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c > index 29795c10..fc573cb3 100644 > --- a/libdw/dwarf_end.c > +++ b/libdw/dwarf_end.c > @@ -94,14 +94,15 @@ dwarf_end (Dwarf *dwarf)

Re: [PATCH 2/3] libdw: Rewrite the memory handler to be thread-safe.

2019-10-21 Thread Mark Wielaard
Hi, On Mon, 2019-10-21 at 11:28 -0500, Jonathon Anderson wrote: > On Mon, Oct 21, 2019 at 18:13, Mark Wielaard wrote: > > Does that look reasonable? > > It does, although I would prefer: > > diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c > index 9ca17212..6da9e

Re: [PATCH 1/3] Add some supporting framework for C11-style atomics.

2019-10-22 Thread Mark Wielaard
On Thu, 2019-08-29 at 15:16 +0200, Mark Wielaard wrote: > From: Jonathon Anderson > > Uses the stdatomic.h provided by FreeBSD when GCC doesn't (ie. GCC < > 4.9) > > Signed-off-by: Jonathon Anderson > Signed-off-by: Srđan Milaković > > diff --git a/li

Re: [PATCH 2/3] libdw: Rewrite the memory handler to be thread-safe.

2019-10-24 Thread Mark Wielaard
Hi, On Mon, 2019-10-21 at 20:00 +0200, Mark Wielaard wrote: > I think we cannot use the atomic_load () function, but have to use > atomic_load_explicit. So it would become: > > diff --git a/libdw/dwarf_end.c b/libdw/dwarf_end.c > index fc573cb3..a2e94436 100644 > --- a/libdw/d

Re: [PATCH 3/3] lib + libdw: Add and use a concurrent version of the dynamic-size hash table.

2019-10-25 Thread Mark Wielaard
Hi, Sorry this took so long to review. But it is pretty complex code. I think I got how it works mostly. It is hard to proof correct though. How did you convince yourself that the code is correct? For example I am not sure I can proof that in resize_worker() this always holds: assert(GET_STATE(re

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-10-26 Thread Mark Wielaard
On Sat, 2019-10-26 at 12:54 +0200, Florian Weimer wrote: > * Jonathon Anderson: > > > Just finished some modifications to the patch series, git request-pull > > output below. This rebases onto the latest master and does a little > > diff cleaning, the major change is that I swapped out the memor

Re: Buildbot failure in Wildebeest Builder on whole buildset

2019-10-26 Thread Mark Wielaard
On Sat, 2019-10-26 at 02:47 +, 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/10/builds/376 > It looks like the s390

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-10-26 Thread Mark Wielaard
hen parsing all of the linux kernel debug data we are talking about ~535000 allocations, a bit less than half (~233000) are of the same small size, 24bytes. > On Sat, Oct 26, 2019 at 18:14, Florian Weimer wrote: > > * Mark Wielaard: > > > > > I'll see if I can cre

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-10-26 Thread Mark Wielaard
Hi, On Sat, 2019-10-26 at 18:50 +0200, Florian Weimer wrote: > * Jonathon Anderson: > > > > This assumes that memory allocation > > > is actually a performance problem, otherwise you could let malloc > > > handle the details. > > > > In our (Dyninst + HPCToolkit) work, we have found that malloc

Re: [PATCH 3/3] lib + libdw: Add and use a concurrent version of the dynamic-size hash table.

2019-10-27 Thread Mark Wielaard
On Fri, 2019-10-25 at 23:11 -0500, Jonathon Anderson wrote: > On Sat, Oct 26, 2019 at 01:50, Mark Wielaard wrote: > > For example I am not sure I can proof that in resize_worker() this > > always holds: assert(GET_STATE(resize_state) != NO_RESIZING); > > In genera

Re: [PATCH] libdw: add thread-safety to dwarf_getabbrev()

2019-10-28 Thread Mark Wielaard
On Sat, 2019-10-26 at 19:56 -0500, Jonathon Anderson wrote: > On Sun, Oct 27, 2019 at 00:50, Mark Wielaard wrote: > > > > I see that getconf PTHREAD_KEYS_MAX gives 1024 on my machine. > > Is this tunable in any way? > > From what I can tell, no. A quick google sear

Re: [PATCH 3/3] lib + libdw: Add and use a concurrent version of the dynamic-size hash table.

2019-10-28 Thread Mark Wielaard
On Sun, 2019-10-27 at 12:49 -0500, Jonathon Anderson wrote: > In theory (if the system isn't overloaded) the threads should finish > their individual work at around the same time, so the amount of waiting > any one thread would do (should be) very short. Also, this is only once > per resize, whi

Re: [PATCH 3/3] lib + libdw: Add and use a concurrent version of the dynamic-size hash table.

2019-10-28 Thread Mark Wielaard
On Sun, 2019-10-27 at 17:13 +0100, Mark Wielaard wrote: > On Fri, 2019-10-25 at 23:11 -0500, Jonathon Anderson wrote: > > A quick grep -r shows that ITERATE and REVERSE are used for the > > asm_symbol_tab. If iteration and insertion are not concurrent we can > > eas

Re: [PATCH 1/5] libdwfl: don't bother freeing frames outside of dwfl_thread_getframes

2019-10-29 Thread Mark Wielaard
Hi Omar, On Mon, 2019-10-07 at 02:05 -0700, Omar Sandoval wrote: > dwfl_thread_getframes always frees the state before returning, so > dwfl_getthreads and getthread don't need to do it. I am not sure I follow. dwfl_getthreads can be used independently from its (indirect) usage from dwfl_thread_ge

Re: [PATCH 1/5] libdwfl: don't bother freeing frames outside of dwfl_thread_getframes

2019-10-29 Thread Mark Wielaard
On Tue, 2019-10-29 at 09:17 -0700, Omar Sandoval wrote: > Unless I missed something, the only place we allocate the state is > from dwfl_thread_getframes, and we always free it before returning from > that function. So if you're not using dwfl_thread_getframes, dwfl_getthreads > won't have anything

Re: [PATCH 0/2] libdw: Rewrite the memory handler to be more robust

2019-10-29 Thread Mark Wielaard
Hi Jonathon, On Tue, Oct 29, 2019 at 01:55:25PM -0500, Jonathon Anderson wrote: > This is (revived and rebased) version of the libdw memory manager that isn't > affected by the PTHREAD_KEYS_MAX limit. There are some downsides, in > particular if an application spawns many short-lived threads that

[PATCH 2/2] libdw: Rewrite the memory handler to be more robust.

2019-10-29 Thread Mark Wielaard
From: Jonathon Anderson Pthread's thread-local variables are highly limited, which makes it difficult to use many Dwarfs. This replaces that with a less efficient (or elegant) but more robust method. Signed-off-by: Jonathon Anderson --- lib/atomics.h | 2 ++ libdw/ChangeLog

[PATCH 1/2] Add configure options for Valgrind annotations.

2019-10-29 Thread Mark Wielaard
From: Jonathon Anderson Signed-off-by: Jonathon Anderson --- ChangeLog| 5 + configure.ac | 30 ++ 2 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 911cf354..433a5f3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-08-

Re: [PATCH 2/5] libdwfl: only use thread->unwound for initial frame

2019-10-29 Thread Mark Wielaard
Hi Omar, On Mon, Oct 07, 2019 at 02:05:36AM -0700, Omar Sandoval wrote: > thread->unwound is only used for set_initial_registers (via > dwfl_thread_state_registers, dwfl_thread_state_register_pc, and a > special case in core_set_initial_registers). At that point, > thread->unwound is always the in

Re: patch 0/2 debuginfod submission

2019-10-30 Thread Mark Wielaard
Hi Frank, Hi Aaron, On Mon, 2019-10-28 at 15:04 -0400, Frank Ch. Eigler wrote: > Aaron Merey and I would like to propose debuginfod for merge into > elfutils mainline, after a couple of months of work. As a reminder, > this is an http server (written in C++11) for debuginfo-related > artifacts (e

Re: [PATCH 3/5] libdwfl: add interface for attaching to/detaching from threads

2019-10-30 Thread Mark Wielaard
Hi Omar, On Mon, 2019-10-07 at 02:05 -0700, Omar Sandoval wrote: > libdwfl has implementations of attaching to/detaching from threads > and > unwinding stack traces. However, that functionality is only available > through the dwfl_thread_getframes interface, which isn't very flexible. > This adds

Re: [PATCH 4/5] libdwfl: cache Dwfl_Module and Dwarf_Frame for Dwfl_Frame

2019-10-30 Thread Mark Wielaard
Hi Omar, On Mon, 2019-10-07 at 02:05 -0700, Omar Sandoval wrote: > The next change will need to have the Dwarf_Frame readily available, so > rather than finding it again every time, let's cache it for reuse. The > CFI frame can also be useful to clients of libdwfl, so add > dwfl_frame_dwarf_frame

Re: [PATCH 5/5] libdwfl: add interface for evaluating DWARF expressions in a frame

2019-10-30 Thread Mark Wielaard
Hi Omar, On Mon, 2019-10-07 at 02:05 -0700, Omar Sandoval wrote: > libdwfl can evaluate DWARF expressions in order to unwind the stack, > but this functionality isn't exposed to clients of the library. Now that > the pieces are in place, add dwfl_frame_eval_expr to provide this feature. I think t

Re: patch 0/2 debuginfod submission

2019-10-30 Thread Mark Wielaard
Hi Frank, On Wed, 2019-10-30 at 09:40 -0400, Frank Ch. Eigler wrote: > OK, sure, IMO don't even bother with a guard. It's just a dlopen/dlsym, > which is portable. Will update the first patch on the branch with that. Thanks. > > Also I think you should cache a negative result for > > fp_debugi

Re: patch 0/2 debuginfod submission

2019-10-31 Thread Mark Wielaard
Hi Frank, On Wed, 2019-10-30 at 14:11 -0400, Frank Ch. Eigler wrote: > Revised code to look like this (libdwfl/find-debuginfo.c): > > 00404 /* NB: this is slightly thread-unsafe */ > 00405 static __typeof__ (debuginfod_find_debuginfo) > *fp_debuginfod_find_debuginfo; > 00406 > 00407

<    10   11   12   13   14   15   16   17   18   19   >