Re: [PATCH bpf-next v2] bpftool: make libbfd optional

Stanislav Fomichev
2018-11-17T15:22:21Z

On 11/16, Alexei Starovoitov wrote:
> On Fri, Nov 16, 2018 at 08:52:23PM -0800, Stanislav Fomichev wrote:
> > I actually wanted to follow up with a v2 when
> > https://lkml.org/lkml/2018/11/16/243 reaches bpf-next (I got an ack
> > already).
>
> it will go via perf tree, so not related.
My understanding was that you periodically merge whatever goes to Linus
back to bpf-next, so my plan was to wait for that event and propose a
v3.

> > Alternatively, I can follow up with another patch on top of that to fix
> > libbfd feature detection (it's semi broken on ubuntu/fedora now).
>
> I think you'd need to wait until all trees merge.
Sure, that's no problem. I'll follow up with another patch whenever that
happens.

> pls don't top post.
Sorry, Gmail :-/

> > On Fri, Nov 16, 2018 at 8:47 PM Alexei Starovoitov <
> > alexei.starovoitov@gmail.com> wrote:
> >
> > > On Mon, Nov 12, 2018 at 1:44 PM Stanislav Fomichev <sdf@google.com> wrote:
> > > >
> > > > Make it possible to build bpftool without libbfd. libbfd and libopcodes
> > > are
> > > > typically provided in dev/dbg packages (binutils-dev in debian) which we
> > > > usually don't have installed on the fleet machines and we'd like a way
> > > to have
> > > > bpftool version that works without installing any additional packages.
> > > > This excludes support for disassembling jit-ted code and prints an error
> > > if
> > > > the user tries to use these features.
> > > >
> > > > Tested by:
> > > > cat > FEATURES_DUMP.bpftool <<EOF
> > > > feature-libbfd=0
> > > > feature-disassembler-four-args=1
> > > > feature-reallocarray=0
> > > > feature-libelf=1
> > > > feature-libelf-mmap=1
> > > > feature-bpf=1
> > > > EOF
> > > > FEATURES_DUMP=$PWD/FEATURES_DUMP.bpftool make
> > > > ldd bpftool | grep libbfd
> > > >
> > > > Signed-off-by: Stanislav Fomichev <sdf@google.com>
> > >
> > > applied, thanks
> > >