Re: [PATCH] backends,bpf: add proper relocation support

2018-06-16 Thread Mark Wielaard
Hi, I added Richard to the CC, who added the original BPF support. Who might remember where the R_BPF_MAP_FD comes from (see at the end). On Fri, 2018-06-15 at 15:40 -0700, Yonghong Song wrote: > Due to libdw does not have proper BPF relocation support, > the pahole cannot display filenames corre

[PATCH v2] backends,bpf: add proper relocation support

2018-06-16 Thread Yonghong Song
Due to libdw does not have proper BPF relocation support, the pahole cannot display filenames correctly for objects with default llvm options. So we have to invent a special option "llc -march=bpf -mattr=dwarfris" to prevent llvm from generating cross-section dwarf relocation records (https://revie

Re: [PATCH] libdw: Make __libdw_dieabbrev more robust on failure.

2018-06-16 Thread Mark Wielaard
On Thu, 2018-06-14 at 00:42 +0200, Mark Wielaard wrote: > Make sure to always set die->abbrev to DWARF_END_ABBREV on failure. > DWARF_END_ABBREV is also what the function reports on failure. And it > will prevent trying to lookup the abbrev ever again. Pushed to master.

Re: [PATCH] readelf: Make sure print_form_data always consumes DW_FORM_strx[1234] data.

2018-06-16 Thread Mark Wielaard
On Thu, 2018-06-14 at 01:10 +0200, Mark Wielaard wrote: > Found by afl-fuzz. When printing DW_FORM_strx[1234] data eu-readelf didn't > increase readp which meant eu-readelf would keep printing the same line > dirs or files encoded with strx[1234] names. This meant that for insane > large dir or fil

Re: [PATCH] readelf: Check there are at least 4 bytes available for DWARF_FORM_block4.

2018-06-16 Thread Mark Wielaard
On Thu, 2018-06-14 at 01:24 +0200, Mark Wielaard wrote: > Found by afl-fuzz. When printing a DWARF_FORM_block4 we checked there > were only 2 bytes available (copy/paste from DW_FORM_block2 right > before). Obviously we need at least 4 bytes to read the length of a > DW_FORM_block4. Pushed to mast