Re: windows patches

2017-05-05 Thread Mark Wielaard
ulib if we are going to use that anyway so other projects get the same portability benefits. And I do worry a bit about others, like the O_BINARY one for example that patches every open call. That seems impossible to properly maintain and is clearly intended for a platform that is really not even POSIX/Unix-like. Cheers, Mark

Re: don't run elfutils as root in ABRT

2017-05-08 Thread Mark Wielaard
as long as you only drop privileges to the user owning the process you should be able to open that file. Note that this code path should only be called if the ELF module couldn't be found on the file system. In that case it will try to slurp it from the process memory. Does that fallback path not work as intended for your setup? Cheers, Mark

Re: dwfl_module_addrdie fails for binaries built with clang++

2017-05-08 Thread Mark Wielaard
On Sat, 2017-05-06 at 13:30 +0200, Milian Wolff wrote: > On Freitag, 5. Mai 2017 15:06:48 CEST Mark Wielaard wrote: > > On Thu, 2017-05-04 at 18:05 +0200, Milian Wolff wrote: > > > I noticed that elfutils fails to handle clang binaries when we want to > > > find a DIE

Re: Problems with dwarf-getmacros test

2017-05-09 Thread Mark Wielaard
*ret) is for the returned valued in the returned section in the returned Dwarf. > However, the address is also not necessarily in dbg_ret at that point. > Checking dbg_ret in addition to dbg still fails sometimes, and also that > wouldn't explain the nondeterminism. The nondeterminism is weird indeed. Cheers, Mark

Re: don't run elfutils as root in ABRT

2017-05-09 Thread Mark Wielaard
Hi Adam, Please don't include HTML mail. The mailinglist will not accept it. (In this case it is your HTML avast signature that looks like an advertisement.) On Tue, 2017-05-09 at 10:49 +0200, Adam Šulc wrote: > On Mon, May 8, 2017 at 2:10 PM, Mark Wielaard wrote: > > On Fri, 20

[PATCH] ppc64: Add minimal fallback unwinder.

2017-05-24 Thread Mark Wielaard
h for some more complex situations like signal frames, but it is only used when we don't have CFI and seems to work nicely in the case of perf with libdw powerpc support: https://lkml.org/lkml/2017/5/18/998 Signed-off-by: Mark Wielaard --- backends/Makefile.am| 2 +- backends/ppc64_ini

Re: [PATCH] ppc64: Add minimal fallback unwinder.

2017-05-30 Thread Mark Wielaard
h plus a testcase (actual binaries removed from patch, but testcase documents how they were generated - precisely like for the other arches). Thanks, Mark From 1b2cd3f4dc581eed0fc1ee98f97aa492a19873b0 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sun, 21 May 2017 23:33:15 +0200 Subject: [

[PATCH] strip: Make sure old .shstrab is removed when eu-strip recreates it.

2017-06-07 Thread Mark Wielaard
). Regression introduced in commit elfutils-0.163-33-gdf7dfab. "Handle merged strtab/shstrtab string tables in strip and unstrip." Add extra testcase to explicitly check for this case. https://sourceware.org/bugzilla/show_bug.cgi?id=21525 Signed-off-by: Mark Wielaard --- src

[PATCH] strip: Don't generate empty output file when nothing to do.

2017-06-07 Thread Mark Wielaard
/show_bug.cgi?id=21522 Signed-off-by: Mark Wielaard --- src/ChangeLog | 6 + src/strip.c| 31 ++- tests/ChangeLog| 6 + tests/Makefile.am | 2 ++ tests/run-strip-nothing.sh | 62

Re: overflows in Dwfl_Thread_Callbacks::memory_read callback

2017-06-13 Thread Mark Wielaard
with a good way to write a MWE that reliably tests > this behavior... Is there maybe something in the elfutils source code repo > that I could use as a basis? I am not following the above trace completely, but what is going on seems to be that we have CFI and want to get a register value. So we call dwarf_frame_register to determine the DWARF expression operations that we need to execute to get the register value. dwarf_frame_register determines that that the register is described by a register offset value rule, so it generates operations saying see an the CFA (DW_OP_call_frame_cfa) plus some offset (DW_OP_plus_uconst) as a value (so read the value from cfa + offset, which is somewhere on the stack). But then the cfa comes out as 15? That is obviously bogus. But I don't really understand how that happened. It should be a value somewhere near the current stack. Then reading 15 - offset (16) clearly fails. Cheers, Mark

Re: How to debug broken unwinding?

2017-06-13 Thread Mark Wielaard
Maybe we should add a debug mode configuration that compiles in tracing output of the unwinder operations? Thanks, Mark

Re: How to debug broken unwinding?

2017-06-13 Thread Mark Wielaard
tivation; > >if (!dwfl_frame_pc(state, &pc)) { >pr_err("%s", dwfl_errmsg(-1)); >return DWARF_CB_ABORT; >} > >// report the module before we query for isactivation >report_module(pc, ui); > >if (!dwfl_frame_is_activation(state)) { >--pc; >} That is a good suggestion in any case. Maybe also introduce dwfl_frame_is_signal_frame () and dwfl_frame_is_initial_frame () in case the user wants to know the exact details. Thanks, Mark

Re: How to debug broken unwinding?

2017-06-14 Thread Mark Wielaard
On Tue, 2017-06-13 at 18:17 +0200, Mark Wielaard wrote: > The tricky case is that last case. If the previous frame is a signal > frame then this frame is also an activation (so you don't need to > subtract 1 to get the actual address that was executing). I am not sure > I fully u

Re: overflows in Dwfl_Thread_Callbacks::memory_read callback

2017-06-14 Thread Mark Wielaard
On Tue, 2017-06-13 at 18:15 +0200, Milian Wolff wrote: > > I am not following the above trace completely, but what is going on > > seems to be that we have CFI and want to get a register value. So we > > call dwarf_frame_register to determine the DWARF expression operations > > that we need to exec

Re: [PATCH] Support EM_PPC machine flags

2017-06-15 Thread Mark Wielaard
On Thu, Jun 15, 2017 at 02:14:50PM +0200, Andreas Schwab wrote: > This fixes the elflint self test when the compiler is configured for PIE > default. Thanks. Pushed to master.

Re: dwfl_module_addrinfo and @plt entries

2017-07-07 Thread Mark Wielaard
Hi Milian, First congrats on https://www.kdab.com/hotspot-gui-linux-perf-profiler/ Very cool. On Wed, 2017-07-05 at 15:34 +0200, Milian Wolff wrote: > On Friday, January 6, 2017 8:17:53 PM CEST Mark Wielaard wrote: > I have now looked into this issue again and have found a way to work

Re: File index given line (libdw)

2017-07-13 Thread Mark Wielaard
u want by having the Dwarf_Files index of the Dwarf_Line? Thanks, Mark

Re: File index given line (libdw)

2017-07-14 Thread Mark Wielaard
line_index (Dwarf_Line *line, size_t *idx) how exactly would you use it? What would be a good testcase for this new functionality? A small example program would help to see what the exact semantics should be. Thanks, Mark

[PATCH] strip: Add --keep-section=SECTION and --remove-section=SECTION.

2017-07-14 Thread Mark Wielaard
combinations of kept/removed sections pull the correct dependencies into the output and/or debug files. Signed-off-by: Mark Wielaard --- ChangeLog | 4 + NEWS | 4 + src/ChangeLog | 13 + src/strip.c| 111

Re: File index given line (libdw)

2017-07-15 Thread Mark Wielaard
between the DwarfLines and the Dwarf_Files. But currently that is an implementation detail. If we expose the Dwarf_Line filename index associated with the Dwarf_Files then it becomes a public interface. I am not really that opposed to exposing this information. It might be fine. But I would like to understand why you need/want this information. Cheers, Mark

Re: Dwarf_FDE (libdw)

2017-07-15 Thread Mark Wielaard
st. That is why you really should use Dwarf_CFI and Dwarf_Frame functions. Those use this low level data structures to decode all the information. Cheers, Mark

Re: [PATCH] strip: Add --keep-section=SECTION and --remove-section=SECTION.

2017-07-17 Thread Mark Wielaard
On Fri, 2017-07-14 at 12:24 -0700, Josh Stone wrote: > On 07/14/2017 08:28 AM, Mark Wielaard wrote: > > Adds two new output options: > > > > --keep-section=SECTION Keep the named section. SECTION is an extended > > wildcard pattern. May be g

Re: File index given line (libdw)

2017-07-17 Thread Mark Wielaard
ndex into. So maybe a function like: extern int * dwarf_line_files (Dwarf_Line *line, Dwarf_Files **files, size_t *idx); Where files and idx are returned in a way that make them useful with dwarf_filesrc. Would the above be helpful for your usecase? Cheers, Mark

Re: Dwarf_FDE (libdw)

2017-07-17 Thread Mark Wielaard
the information you need available through Dwarf_Frames. Cheers, Mark

[COMMITTED] backends: Swap sys/ptrace.h and asm/ptrace.h include order on s390.

2017-07-17 Thread Mark Wielaard
glibc 2.26 changed the sys/ptrace.h header so that it cannot be included after asm/ptrace.h. We still need to include the kernel asm/ptrace.h for the ptrace_area definition. Including it after sys/ptrace.h works against both old and new glibc. Signed-off-by: Mark Wielaard --- backends/ChangeLog

Re: [COMMITTED] backends: Swap sys/ptrace.h and asm/ptrace.h include order on s390.

2017-07-17 Thread Mark Wielaard
On Mon, 2017-07-17 at 19:29 +0300, Dmitry V. Levin wrote: > On Mon, Jul 17, 2017 at 05:44:54PM +0200, Mark Wielaard wrote: > > glibc 2.26 changed the sys/ptrace.h header so that it cannot be included > > after asm/ptrace.h. We still need to include the kernel asm/ptrace.h for >

Re: Dwarf_FDE (libdw)

2017-07-17 Thread Mark Wielaard
d FDE augmentation data also. > Libdw doesn't do this, am I correct? libdw handles both .debug_frame and .eh_frame data. And you can use the Dwarf_Frames to unwind. I believe the only thing not directly exposed are the lsda and personality pointers. Is that the functionality that you need for "catch blocks"? Cheers, Mark

Re: [COMMITTED] backends: Swap sys/ptrace.h and asm/ptrace.h include order on s390.

2017-07-17 Thread Mark Wielaard
s.fedoraproject.org//work/tasks/4924/20574924/build.log Cheers, Mark

[PATCH] backends: Don't depend on linux/bpf.h to compile bpf disassembler.

2017-07-18 Thread Mark Wielaard
We only need a few constants and one structure definition from linux/bpf. Just define those in a local lib/bpf.h file. This makes sure the bpf disassembler is always build and included even when elfutils is build on older GNU/Linux systems (and even on other platforms). Signed-off-by: Mark

[PATCH] strip: Deal with ARM data marker symbols pointing to debug sections.

2017-07-21 Thread Mark Wielaard
an ebl hook to recognize data marker symbols with implementations for arm and aarch64. Use it in strip to strip such symbols from the symbol table if they point to a debug section. Signed-off-by: Mark Wielaard --- backends/ChangeLog | 7 +++ backends/aarch64_init.c |

Re: File index given line (libdw)

2017-07-21 Thread Mark Wielaard
immediately and don't keep track of the original file name and directory name/path. You can only get the full file path (through dwarf_filesrc) but not the associated directory. I am cleaning that up while adding the DWARF5 support. And will add a more generic interface for access file and direc

Re: Dwarf_FDE (libdw)

2017-07-21 Thread Mark Wielaard
On Tue, 2017-07-18 at 16:50 +, Sasha Da Rocha Pinheiro wrote: > From: Mark Wielaard >> The thing is I need to get catch blocks, and eh_frame is not exactly >> > Dwarf format. That's why I need FDE augmentation data also. >> > Libdw doesn't do this, am

Re: FDE augmentation data

2017-07-21 Thread Mark Wielaard
how the decode the FDE. There is some code that does that in libdw/fde.c (which constructs the CFI cache which provides the Dwarf_Frames). Cheers, Mark

Re: [PATCH] ppc64: Add HTM SPRs support to readelf

2017-07-21 Thread Mark Wielaard
extended state using > xsave */ > #define NT_S390_HIGH_GPRS0x300 /* s390 upper register halves */ We normally keep elf.h in sync with glibc. Could you submit this elf.h change to libc-al...@sourceware.org? Then we resync elf.h from glibc to pull in the new constants. Thanks, Mark

Re: [PATCH v2] Unify linking of libasm, libelf, libdw, backends

2017-07-24 Thread Mark Wielaard
r will strip unneeded symbols, so linking it in won't hurt even if > none of the functions are used. This is a nice cleanup. Sorry it took so long to review. Applied to master. Thanks, Mark

Re: [PATCH] Write to /dev/null rather than /dev/zero

2017-07-24 Thread Mark Wielaard
On Thu, May 04, 2017 at 05:27:47PM +0200, Ulf Hermann wrote: > /dev/zero is meant for reading zeroes. /dev/null is for writing into > nirvana. Thanks, applied to master.

Re: [PATCH] backends: Don't depend on linux/bpf.h to compile bpf disassembler.

2017-07-24 Thread Mark Wielaard
On Tue, Jul 18, 2017 at 02:19:58PM +0200, Mark Wielaard wrote: > We only need a few constants and one structure definition from linux/bpf. > Just define those in a local lib/bpf.h file. This makes sure the bpf > disassembler is always build and included even when elfutils is build >

Re: [PATCH] strip: Deal with ARM data marker symbols pointing to debug sections.

2017-07-24 Thread Mark Wielaard
On Fri, Jul 21, 2017 at 12:17:40PM +0200, Mark Wielaard wrote: > ARM data marker symbols "$d" indicate the start of a sequence of data > items in a section. For data only sections no data marker symbol is > necessary, but may be put pointing to the start of the section. >

Re: [PATCH] ppc64: Add HTM SPRs support to readelf

2017-07-24 Thread Mark Wielaard
On Mon, Jul 24, 2017 at 11:54:34AM -0300, Gustavo Romero wrote: > On 21-07-2017 16:55, Mark Wielaard wrote: > > This patch looks perfect, thanks. > > Thanks for reviewing it! > > > We normally keep elf.h in sync with glibc. > > Could you submit this elf.h chang

Re: [PATCH] ppc64: Add HTM SPRs support to readelf

2017-07-25 Thread Mark Wielaard
On Mon, Jul 24, 2017 at 05:50:36PM -0300, Gustavo Romero wrote: > I'll ping it next week and follow-up. Thanks! Thanks. I pushed you commit to master already. Lets make sure to resync glibc elf.h next week. Cheers, Mark

Re: File index given line (libdw)

2017-07-26 Thread Mark Wielaard
On Fri, 2017-07-21 at 21:29 +0200, Mark Wielaard wrote: > But I was working on adding support for DWARF5 .debug_lines and since > files (and directories) can have arbitrary attributes in that version it > makes sense to go from Dwarf_Line to the associated Dwarf_Files/index. >

[PATCH 1/9] libdw: Add DWARF5 attributes.

2017-07-26 Thread Mark Wielaard
+. That way code that directly references them still compiles but they won't show up in known-dwarf.h. Signed-off-by: Mark Wielaard --- ChangeLog | 4 NEWS| 2 ++ libdw/ChangeLog | 6 ++ libdw/dwarf.h | 67 ++-

Some easy DWARF5 extensions

2017-07-26 Thread Mark Wielaard
to do a new one soon. It would be nice to at least handle these easy parts of DWARF5 with elfutils 0.170. Cheers, Mark

[PATCH 6/9] libdw: DWARF5 Add DW_CC_pass_by_reference and DW_CC_pass_by_reference.

2017-07-26 Thread Mark Wielaard
Signed-off-by: Mark Wielaard --- ChangeLog | 4 NEWS| 4 ++-- libdw/ChangeLog | 4 libdw/dwarf.h | 7 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25944f0..7748f13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5

[PATCH 7/9] Handle DWARF5 defaulted member function encodings.

2017-07-26 Thread Mark Wielaard
Add DW_DEFAULTED_no, DW_DEFAULTED_in_class and DW_DEFAULTED_out_of_class to dwarf.h. Print value (no, in_class or out_of_class) of DW_AT_defaulted in readelf. Signed-off-by: Mark Wielaard --- ChangeLog | 3 ++- NEWS| 4 ++-- libdw/ChangeLog | 5 + libdw/dwarf.h | 8

[PATCH 8/9] libdw: Handle DWARF5 immutable, packed and shared in dwarf_peel_type.

2017-07-26 Thread Mark Wielaard
n't peeled. Signed-off-by: Mark Wielaard --- ChangeLog | 4 NEWS| 1 + libdw/ChangeLog | 6 ++ libdw/dwarf_peel_type.c | 7 +-- libdw/libdw.h | 28 ++-- 5 files changed, 34 insertions(+), 12 deletions(-

[PATCH 9/9] libdw: Add DW_MACRO constants and DW_MACRO_GNU compatibility defines.

2017-07-26 Thread Mark Wielaard
_getmacros currently rejects the new formats. Signed-off-by: Mark Wielaard --- ChangeLog | 4 +++ NEWS| 4 ++- libdw/ChangeLog | 7 libdw/dwarf.h | 38 ++-- libdw/dwarf_getmacros.c | 27 +++--- src/ChangeLog

[PATCH 5/9] libdw: Add dwarf_default_lower_bound.

2017-07-26 Thread Mark Wielaard
Add dwarf_default_lower_bound to get the default lower bound for a language when not given as attribute for an subrange type. Implementation extracted from dwarf_aggregate_size. Add a test to check all known language codes are handled. Signed-off-by: Mark Wielaard --- ChangeLog

[PATCH 2/9] libdw: Add new DWARF5 tag constants.

2017-07-26 Thread Mark Wielaard
Add DW_TAG_coarray_type, DW_TAG_generic_subrange, DW_TAG_dynamic_type, DW_TAG_call_site, DW_TAG_call_site_parameter, DW_TAG_skeleton_unit, DW_TAG_immutable_type. Just the constants, no further interpretion yet. Signed-off-by: Mark Wielaard --- ChangeLog | 2 +- NEWS| 2

[PATCH 4/9] libdw: DWARF5 Add new DW_LANG codes and default lower array bound.

2017-07-26 Thread Mark Wielaard
Add DW_LANG_OpenCL, DW_LANG_Modula3, DW_LANG_C_plus_plus_03, DW_LANG_OCaml, DW_LANG_Rust, DW_LANG_Swift, DW_LANG_Julia, DW_LANG_Dylan, DW_LANG_RenderScript and DW_LANG_BLISS to dwarf.h. Update default language array lower bounds in dwarf_aggregate_size.c. Signed-off-by: Mark Wielaard

[PATCH 3/9] libdw: Add new DWARF5 character encodings.

2017-07-26 Thread Mark Wielaard
Add DW_ATE_UCS and DW_ATE_ASCII for Fortran 2003 string kinds ASCII (ISO/IEC 646:1991) and ISO_10646 (UCS-4 in ISO/IEC 10646:2000). Signed-off-by: Mark Wielaard --- ChangeLog | 3 ++- NEWS| 3 ++- libdw/ChangeLog | 4 libdw/dwarf.h | 2 ++ 4 files changed, 10 insertions

Re: [PATCH] libdwfl: Move nested functions in parse_opt to file scope.

2017-07-27 Thread Mark Wielaard
f whitespace issues (looks like tab versus space issues?) Could you sent again. Thanks, Mark

Re: [PATCH] libdwfl: Move nested functions in parse_opt to file scope.

2017-07-27 Thread Mark Wielaard
On Thu, Jul 27, 2017 at 09:35:29AM -0700, Yunlian Jiang wrote: > I attach the output of git format-patch and this should work. It does. Applied to master (with ChangeLog entry). Thanks, Mark

[PATCH] backends: sparc GOTDATA_OP[_HIX22|LOX10] can be used in ET_REL files.

2017-07-27 Thread Mark Wielaard
Tested on new GNU Compile Farm server gcc202. Signed-off-by: Mark Wielaard --- backends/ChangeLog | 5 + backends/sparc_reloc.def | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backends/ChangeLog b/backends/ChangeLog index 83710c1..a66e923 100644 --- a

Re: [PATCH] libdwfl: Move nested function in dwfl_segment_report_module.c

2017-07-31 Thread Mark Wielaard
e relevant state in struct (Elf, fd, Dwfl, Dwfl_Memory_Callback, callback_arg, buffer, buffer_available) that you pass by reference to the new static functions. Cheers, Mark

Re: Some easy DWARF5 extensions

2017-08-02 Thread Mark Wielaard
On Thu, 2017-07-27 at 00:07 +0200, Mark Wielaard wrote: > The following are all the easy DWARF5 extensions that a compiler might > emit in "non-strict" DWARF mode (when it uses tags, attributes or other > constants from a later version of DWARF). > > [PATCH 1/9] lib

Re: [PATCH] backends: sparc GOTDATA_OP[_HIX22|LOX10] can be used in ET_REL files.

2017-08-02 Thread Mark Wielaard
On Thu, 2017-07-27 at 23:19 +0200, Mark Wielaard wrote: > Tested on new GNU Compile Farm server gcc202. > > +2017-07-27 Mark Wielaard > + > + * sparc_reloc.def: GOTDATA_OP_HIX22, GOTDATA_OP_LOX10 and > + GOTDATA_OP can be used in ET_REL files. Pushed to master.

Prepare for elfutils 0.170

2017-08-02 Thread Mark Wielaard
It has been 3 months again so time for another update. I just pushed the version bump update and would like to do a release tomorrow unless some showstoppers are found. From 54ba4ce2973113d8f4315d4fc90e16a9b4476ea6 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 2 Aug 2017 18:30:07 +0200

Re: Prepare for elfutils 0.170

2017-08-02 Thread Mark Wielaard
On Wed, 2017-08-02 at 18:42 +0200, Mark Wielaard wrote: > It has been 3 months again so time for another update. > I just pushed the version bump update and would like to do a release > tomorrow unless some showstoppers are found. I tested current git master on Debian 8 amd64, Debia

Re: Prepare for elfutils 0.170

2017-08-02 Thread Mark Wielaard
le-maintainer-mode and then configure the same tree without and in between dwarf.h gets updated. Then it indeed doesn't get updated. Sorry about that. > PS: all 172 tests passed in sparc64-linux-gnu Great. Thanks for testing! Cheers, Mark

Re: Latest version of dwarflint?

2017-08-03 Thread Mark Wielaard
ere is a standalone version of dwlocstat here: https://github.com/pmachata/dwlocstat It should handle DW_OP_GNU_entry_value but is also a bit old so might not handle the latest DWARF extensions. Cheers, Mark

elfutils 0.170 released

2017-08-03 Thread Mark Wielaard
and --keep-section=SECTION. backends: The bpf disassembler is now always build on all platforms. * GIT SHORTLOG * Andreas Schwab (1): Support EM_PPC machine flags Gustavo Romero (1): ppc64: Add HTM SPRs support to readelf Mark Wielaard (19): ppc64: Add minimal fallback unwinder. strip

Re: [PATCH] tests: robustify run-strip-nothing.sh against unstripped libc_nonshared.a

2017-08-09 Thread Mark Wielaard
;gcc" > for producing objects without debug info. Thanks, I didn't know about gcc -s, but it is ideal for this testcase. Committed to master with a ChangeLog entry. Cheers, Mark

Re: [PATCH] ppc64: Add HTM SPRs support to readelf

2017-08-15 Thread Mark Wielaard
Hi Gustavo, On Tue, Aug 15, 2017 at 11:23:37AM -0300, Gustavo Romero wrote: > On 25-07-2017 07:34, Mark Wielaard wrote: > > On Mon, Jul 24, 2017 at 05:50:36PM -0300, Gustavo Romero wrote: > >> I'll ping it next week and follow-up. Thanks! > > > > Thanks. I

Re: [PATCH v3] Check for -z,defs, -z,relro, -fPIC, -fPIE before using them

2017-08-19 Thread Mark Wielaard
e target binary format enforces the same condition > already. Furthermore it is only a compile time sanity check. When it is > omitted, the same binary is produced. > > -z,relro instructs the loader to mark sections read-only after loading > the library, where possible. This is a

Re: [PATCH] Drop -rdynamic from deleted-lib.so link step

2017-08-19 Thread Mark Wielaard
uot;deleted" test program does link to deleted-lib.so, but > deleted-lib.so being a shared object, will automatically export the > (non-hidden) "libfunc" symbol anyway. Applied, libfunc is indeed the only relevant symbol in this case. Thanks, Mark

Re: [PATCH v2] On non-linux systems, don't use native signal numbers

2017-08-19 Thread Mark Wielaard
BUS could actually be a different constant depending on architecture. But that is an existing issue. We might have to make this code dependent on the EM machine value found in the core file. Cheers, Mark

Re: [PATCH v2] Check if gcc complains about __attribute__ (visibility(..))

2017-08-19 Thread Mark Wielaard
r symbols are prefixed with the library name, and "__" for > private ones, the chance of clashes is low anyway. Like the previous one, I have my doubts. But it actually makes the source code slightly more consistent. So applied. Thanks, Mark

Re: [PATCH v3] Cast pid_t to long long when printing

2017-08-19 Thread Mark Wielaard
long is as good as any other choice. I did tweak the patch a little so there is always a space after the cast and no line gets longer than 80 chars. Thanks, Mark >From 760925bc7b43814d30ee4e0396709fe8a3f66cd6 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 18 Aug 2017 17:20:02 +0200

Re: [PATCH v3] Detect if symbol versioning is supported

2017-08-19 Thread Mark Wielaard
heck for it. Applied. Thanks, Mark

Re: [PATCH v2] Make sure packed structs follow the gcc memory layout

2017-08-19 Thread Mark Wielaard
yed out differently but that we might map to some on-disk data structure? Cheers, Mark

Re: [PATCH v3] Check if rpath is supported and throw an error if not

2017-08-19 Thread Mark Wielaard
t would be good. What "external mechanism" are you using? Cheers, Mark

Re: [PATCH] Drop *_so_SOURCES from libasm, libdw, libelf Makefile.am

2017-08-19 Thread Mark Wielaard
pty. The change as proposed will break make dist (or make distcheck) because removing it seems to cause the default sources seem to be lib*.c. What warnings did it cause for you? I am not seeing any. Thanks, Mark

[COMMITTED] Internationalized messages should not contain the '\v' escape sequence.

2017-09-15 Thread Mark Wielaard
Replace horizontal tab '\v' with double line feed '\n\n' in doc strings. Regenerate .po files. Signed-off-by: Mark Wielaard --- po/ChangeLog | 4 + po/de.po | 754

[PATCH] ar: Check whether ar header values fit.

2017-09-15 Thread Mark Wielaard
make ar valgrind and ubsan clean and add a minimal sanity test. Reported-by: Matthias Klose Signed-off-by: Mark Wielaard --- src/ChangeLog | 9 src/ar.c | 66 ++- tests/ChangeLog | 6 + tests/Makefile.am | 4 ++-- te

Re: elfutils build and testing

2017-09-19 Thread Mark Wielaard
to > run the test suite? To my own surprise this isn't documented at all. I added the attached to the README. Hope that helps. Thanks, MarkFrom 04ecad6acd13e7120b171307aa57325b2ec08715 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 19 Sep 2017 16:05:49 +0200 Subject: [PATC

Re: Compile elfutils with Clang

2017-09-19 Thread Mark Wielaard
list archives to find various attempts. Including a discussion of replacing nested functions with blocks. Which wasn't accepted because nobody seemed to believe it actually improved the code. Cheers, Mark

Re: [PATCH 1/2] Initialize type_offset of fake_cu

2017-09-19 Thread Mark Wielaard
arf_Attribute *attributes; That really shouldn't be necessary. In a named struct field initializer omitted elements are initialized to zero. Are you sure it fixes a real bug? In that case it might be a compiler bug instead (which we would want to work around, but then lets make sure to report it and add a comment). Cheers, Mark

Re: [PATCH] ar: Check whether ar header values fit.

2017-09-20 Thread Mark Wielaard
On Fri, 2017-09-15 at 13:14 +0200, Mark Wielaard wrote: > When compiling with -O3 gcc finds an interesting error: > > src/ar.c: In function ‘do_oper_insert’: > src/ar.c:1077:56: error: ‘%-*ld’ directive output may be truncated > writing between 6 and 10 bytes into a region of siz

Re: [PATCH v2] Make sure packed structs follow the gcc memory layout

2017-09-20 Thread Mark Wielaard
ink we ever use structs that contain bit-fields to map from disk to memory. Applied to master now. Thanks, Mark

Re: Latest version of dwarflint?

2017-09-21 Thread Mark Wielaard
formal for code not directly going onto master. But having at least a Signed-off-by line on the patches makes sure we can eventually integrate them officially. Thanks, Mark

Re: Latest version of dwarflint?

2017-09-25 Thread Mark Wielaard
ned the original dwarlint? Or against current master (or the 0.170 release) branch? If you have them in a git branch and it is easy to extract them then using git send-email to this list would probably be easiest. Then we can create a new branch as base to apply them on top. Thanks, Mark

Re: Latest version of dwarflint?

2017-09-29 Thread Mark Wielaard
like the mailinglist didn't like the big zip file. So for now I have put it here: https://gnu.wildebeest.org/~mark/dwarflint_patches.zip > All of the patches can be applied on to elfutils-0.170 release. I have run > dwarflint test suites and all of the tests are PASS at this point. I hav

Re: Latest version of dwarflint?

2017-09-29 Thread Mark Wielaard
On Fri, Sep 29, 2017 at 01:58:43PM +0200, Mark Wielaard wrote: > On Thu, Sep 28, 2017 at 03:36:14PM +0200, Djordje Todorovic wrote: > > Please find attached compressed folder with dwarflint patches. I’m > > sending it in this way because I think changes are not that a small >

Re: Latest version of dwarflint?

2017-09-29 Thread Mark Wielaard
-Add-dwarflint-from-origin-dwarf-branch.patch > with 'git apply'? > Because, the 'patch' command would not include *bz2 files. Ah, right, doh. Got them. The real problem was that I build with srcdir != builddir. Will fix the check target to support that. Thanks, Mark

[PATCH] readelf: Print DIE offset in attribute reading error messages.

2017-10-03 Thread Mark Wielaard
When processing large files it is useful to know the DIE offset if printing of attributes fails (especially when redirecting the output). With this change the error message looks like: eu-readelf: DIE [2aeb8ef1] cannot get attribute value: invalid DWARF Signed-off-by: Mark Wielaard --- src

Re: failed reading "Smallest x86 ELF Hello World"

2017-10-04 Thread Mark Wielaard
   PhysAddr   FileSiz  MemSiz   Flg Align   LOAD   0x00 0x08048000 0x08048000 0xa2 0xa2 R E 0x1000   LOAD   0xa4 0x080490a4 0x080490a4 0x09 0x09  W  0x9007b900  Section to Segment mapping:   Segment Sections...    00     01  Maybe it could be improved a little more by adding a warning that 5 section [headers] were expected, but none could be read. But I leave it at this for now. Cheers, Mark

[PATCH 1/2] libelf: Add ELF_E_INVALID_ELF error value.

2017-10-04 Thread Mark Wielaard
Add ELF_E_INVALID_ELF which is set when the ELF file data is bad. This is different from ELF_E_INVALID_FILE which is set when the file could not be read. Signed-off-by: Mark Wielaard --- libelf/ChangeLog | 12 + libelf/elf_begin.c | 61

[PATCH 2/2] libelf: Don't error out when sanity checking e_shoff if scncnt is zero.

2017-10-04 Thread Mark Wielaard
We won't use the e_shoff value in that case because we will set elf->state.elf[64|32].scns.cnt to zero to indicate not to read any section header data from the file. Signed-off-by: Mark Wielaard --- libelf/ChangeLog | 5 + libelf/elf_begin.c | 4 ++-- 2 files changed, 7 insertio

Re: missing #include in libdw.h?

2017-10-04 Thread Mark Wielaard
ms better to just define this constant explicitly in libdw.h as the attached patch does. Does that make sense to you? Thanks, MarkFrom 251bb1c8c4a0a523791874c14826c391173bce4c Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 3 Oct 2017 23:08:01 +0200 Subject: [PATCH] libdw: Define LIBDW_

Re: missing #include in libdw.h?

2017-10-05 Thread Mark Wielaard
On Wed, 2017-10-04 at 19:07 +, Bill Williams wrote: > Works for me. This showed up on my desk from a broken configuration, > but I figured I’d best pass it upstream too. :) Thanks. I pushed this to master.

Re: Latest version of dwarflint?

2017-10-06 Thread Mark Wielaard
Hi, On Fri, 2017-09-29 at 13:58 +0200, Mark Wielaard wrote: > I haven't gotten them all applied yet. > I am adjusting the Makefile.in changes to the Makefile.am files, > so we don't have generated files in git. And since I am on RHEL7 > with an older g++ I had to add some a

Re: failed reading "Smallest x86 ELF Hello World"

2017-10-13 Thread Mark Wielaard
On Wed, 2017-10-04 at 20:55 +0200, Mark Wielaard wrote: > The first issue is indeed that almost anything that goes wrong when > setting up the initial Elf handle ends up being described as > ELF_E_INVALID_FILE. Which is not always the correct error code. So I > introduced ELF_E_INVAL

[PATCH] lib: sha1, md5, use memmove to move bytes inside buffer, not memcpy.

2017-10-16 Thread Mark Wielaard
At the end of {sha1,md5}_process_bytes we move the contents of ctx->buffer up to the start of the buffer. Since this means the source and destination overlap we should use memmove, not memcpy. Signed-off-by: Mark Wielaard --- lib/ChangeLog | 6 ++ lib/md5.c | 2 +- lib/sha1.c

[PATCH] libdwfl: When the kernel is found, but not the modules warn, don't fail.

2017-10-16 Thread Mark Wielaard
For -k the argp parser could fail to find the modules after the kernel itself was already found. Calling failure at this point closes the Dwfl, which isn't necessary. Just warn about the missing modules and continue with the kernel only Dwfl. Signed-off-by: Mark Wielaard --- libdwfl/Chan

Re: [PATCH] lib: sha1, md5, use memmove to move bytes inside buffer, not memcpy.

2017-10-16 Thread Mark Wielaard
On Mon, 2017-10-16 at 13:00 +0200, Mark Wielaard wrote: > At the end of {sha1,md5}_process_bytes we move the contents of > ctx->buffer up to the start of the buffer. Since this means the > source and destination overlap we should use memmove, not memcpy. I am retracting this patch sin

[PATCH] lib: Remove md5 and sha1 implementations.

2017-10-16 Thread Mark Wielaard
Only the testcase md5-sha1-test used them. So also remove that testcase. Signed-off-by: Mark Wielaard --- .gitignore| 1 - ChangeLog | 4 + lib/ChangeLog | 7 + lib/Makefile.am | 4 +- lib/md5.c | 438

Re: [PATCH] libdwfl: When the kernel is found, but not the modules warn, don't fail.

2017-10-20 Thread Mark Wielaard
On Mon, 2017-10-16 at 13:28 +0200, Mark Wielaard wrote: > For -k the argp parser could fail to find the modules after the kernel > itself was already found. Calling failure at this point closes the Dwfl, > which isn't necessary. Just warn about the missing modules and continue >

Re: [PATCH] lib: Remove md5 and sha1 implementations.

2017-10-20 Thread Mark Wielaard
On Mon, 2017-10-16 at 16:22 +0200, Mark Wielaard wrote: > Only the testcase md5-sha1-test used them. So also remove that > testcase. Pushed to master.

[PATCH] backends: Ignore GCC8 -Wpacked-not-aligned for m68k_corenote.c.

2017-10-24 Thread Mark Wielaard
The GCC8 -Wpacked-not-aligned warns if a structure field with explicit padding in a packed structure will be misaligned. m68k prstatus core notes are described by a packed structure which has such aligned structure fields. Signed-off-by: Mark Wielaard --- backends/ChangeLog | 4 backends

<    3   4   5   6   7   8   9   10   11   12   >