From: Aaron Conole <aconole@bytheb.org>
To: David Miller <davem@davemloft.net>
Cc: ast@fb.com, daniel@iogearbox.net, netdev@vger.kernel.org,
xdp-newbies@vger.kernel.org
Subject: Re: [PATCH v2 binutils] Add BPF support to binutils...
Date: Fri, 28 Apr 2017 13:09:17 -0400 [thread overview]
Message-ID: <f7tfugssblu.fsf@redhat.com> (raw)
In-Reply-To: <20170428.120457.408834081300892396.davem@davemloft.net> (David Miller's message of "Fri, 28 Apr 2017 12:04:57 -0400 (EDT)")
David Miller <davem@davemloft.net> writes:
> From: Aaron Conole <aconole@bytheb.org>
> Date: Fri, 28 Apr 2017 11:57:36 -0400
>
>> I'll get an arm board up and running to do some testing there. As a
>> teaser:
>
> Great.
>
> I started working on some more relocation stuff, so more of the
> generic gas tests pass.
>
> For example, stuff like this now works properly:
>
> [davem@dhcp-10-15-49-210 build-bpf]$ cat gas/y.s
> .data
> .globl foo
> foo: .xword bar
> [davem@dhcp-10-15-49-210 build-bpf]$ gas/as-new -o gas/y.o gas/y.s
> [davem@dhcp-10-15-49-210 build-bpf]$ binutils/objdump -r gas/y.o
>
> gas/y.o: file format elf64-bpfle
>
> RELOCATION RECORDS FOR [.data]:
> OFFSET TYPE VALUE
> 0000000000000000 R_BPF_DATA_64 bar
>
>
> [davem@dhcp-10-15-49-210 build-bpf]$
>
> It turned out that I needed to separate the R_BPF_* relocations into
> data vs. insn ones.
>
> Another idea I am thinking about pursuing is adding BPF simulator
> support under sim/ so that people can use gdb to step through BPF
> programs.
>
> I hope we can make it work in a way that we can even step through
> XDP programs and feed them simple test packets, stuff like that.
>
> Anyways, quick relative live patch against v2 from my tree for the
> reloc stuff:
>
> diff --git a/bfd/elf64-bpf.c b/bfd/elf64-bpf.c
> index 9944bb4..1be285d 100644
> --- a/bfd/elf64-bpf.c
> +++ b/bfd/elf64-bpf.c
> @@ -1,8 +1,89 @@
> #include "sysdep.h"
> #include "bfd.h"
> +#include "bfdlink.h"
> #include "libbfd.h"
> +#include "libiberty.h"
> #include "elf-bfd.h"
> +#include "elf/bpf.h"
> #include "opcode/bpf.h"
> +#include "objalloc.h"
> +#include "elf64-bpf.h"
I get a compile error here. I guess this file wasn't included.
next prev parent reply other threads:[~2017-04-28 17:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 21:09 [PATCH v2 binutils] Add BPF support to binutils David Miller
2017-04-27 21:09 ` David Miller
2017-04-28 15:57 ` Aaron Conole
2017-04-28 16:04 ` David Miller
2017-04-28 17:09 ` Aaron Conole [this message]
2017-04-28 17:33 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f7tfugssblu.fsf@redhat.com \
--to=aconole@bytheb.org \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=xdp-newbies@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.