* [PATCH v2 0/2] Add support for BPF
@ 2016-06-21 22:10 Richard Henderson
0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2016-06-21 22:10 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 2273 bytes --]
Changes since v2:
(1) We've got an official number for EM_BPF,
(2) A disassembly test case,
(3) Added a configure test for <linux/bpf.h>,
(4) Byte swapping of bpf_insns during disassembly,
(5) ChangeLog entries.
I've tested 2-4 with a ppc64 Fedora 20 host, which doesn't natively
have <linux/bpf.h>. I then forced configure to find the header I
copied over to the machine and re-tested to see that the little-endian
disassembly test case works properly with the big-endian host.
r~
Richard Henderson (2):
Sync elf.h from glibc
Add support for BPF
ChangeLog | 4 +
backends/ChangeLog | 9 ++
backends/Makefile.am | 10 +-
backends/bpf_init.c | 60 ++++++++
backends/bpf_regs.c | 64 +++++++++
backends/bpf_reloc.def | 31 ++++
backends/common-reloc.c | 7 +-
configure.ac | 4 +
libasm/ChangeLog | 4 +
libasm/disasm_cb.c | 4 +-
libcpu/ChangeLog | 7 +
libcpu/Makefile.am | 6 +
libcpu/bpf_disasm.c | 288 +++++++++++++++++++++++++++++++++++++
libcpu/i386_disasm.c | 3 +-
libebl/ChangeLog | 5 +
libebl/ebl-hooks.h | 2 +-
libebl/eblopenbackend.c | 1 +
libelf/ChangeLog | 4 +
libelf/elf.h | 281 +++++++++++++++++++++++++-----------
src/ChangeLog | 4 +
src/elflint.c | 2 +-
tests/ChangeLog | 9 ++
tests/Makefile.am | 7 +-
tests/run-disasm-bpf.sh | 63 ++++++++
tests/testfile-bpf-dis1.expect.bz2 | Bin 0 -> 1497 bytes
tests/testfile-bpf-dis1.o.bz2 | Bin 0 -> 737 bytes
26 files changed, 786 insertions(+), 93 deletions(-)
create mode 100644 backends/bpf_init.c
create mode 100644 backends/bpf_regs.c
create mode 100644 backends/bpf_reloc.def
create mode 100644 libcpu/bpf_disasm.c
create mode 100755 tests/run-disasm-bpf.sh
create mode 100644 tests/testfile-bpf-dis1.expect.bz2
create mode 100644 tests/testfile-bpf-dis1.o.bz2
--
2.5.5
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] Add support for BPF
@ 2016-06-28 18:15 Mark Wielaard
0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2016-06-28 18:15 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
On Wed, 2016-06-22 at 08:57 -0700, Richard Henderson wrote:
> On 06/22/2016 07:54 AM, Mark Wielaard wrote:
> > Lets push this with that small tweak as soon as the glibc elf.h lands.
>
> Ok.
Pushed!
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] Add support for BPF
@ 2016-06-22 15:57 Richard Henderson
0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2016-06-22 15:57 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 437 bytes --]
On 06/22/2016 07:54 AM, Mark Wielaard wrote:
> Only the disasm hook (which is already guarded) depends on cpu_bpf.
> Since that is only build when we have bpf.h this also needs a guard:
>
> if HAVE_LINUX_BPF_H
> cpu_bpf = ../libcpu/libcpu_bpf.a
> else
> cpu_bpf =
> endif
Good catch. Not sure why I didn't see a problem with that...
> Lets push this with that small tweak as soon as the glibc elf.h lands.
Ok.
r~
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] Add support for BPF
@ 2016-06-22 14:54 Mark Wielaard
0 siblings, 0 replies; 4+ messages in thread
From: Mark Wielaard @ 2016-06-22 14:54 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]
On Tue, 2016-06-21 at 15:10 -0700, Richard Henderson wrote:
> Changes since v2:
> (1) We've got an official number for EM_BPF,
> (2) A disassembly test case,
> (3) Added a configure test for <linux/bpf.h>,
> (4) Byte swapping of bpf_insns during disassembly,
> (5) ChangeLog entries.
This all looks very good. Only one small build infrastructure thingy:
diff --git a/backends/Makefile.am b/backends/Makefile.am
> @@ -118,6 +118,11 @@ m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c \
> libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
> am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
>
> +bpf_SRCS = bpf_init.c bpf_regs.c
> +cpu_bpf = ../libcpu/libcpu_bpf.a
> +libebl_bpf_pic_a_SOURCES = $(bpf_SRCS)
> +am_libebl_bpf_pic_a_OBJECTS = $(bpf_SRCS:.c=.os)
Only the disasm hook (which is already guarded) depends on cpu_bpf.
Since that is only build when we have bpf.h this also needs a guard:
if HAVE_LINUX_BPF_H
cpu_bpf = ../libcpu/libcpu_bpf.a
else
cpu_bpf =
endif
Lets push this with that small tweak as soon as the glibc elf.h lands.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-28 18:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-21 22:10 [PATCH v2 0/2] Add support for BPF Richard Henderson
2016-06-22 14:54 Mark Wielaard
2016-06-22 15:57 Richard Henderson
2016-06-28 18:15 Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).