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 11:57:36 -0400 [thread overview]
Message-ID: <f7td1bwtthr.fsf@redhat.com> (raw)
In-Reply-To: <20170427.170934.891283291562287326.davem@davemloft.net> (David Miller's message of "Thu, 27 Apr 2017 17:09:34 -0400 (EDT)")
Hi David,
David Miller <davem@davemloft.net> writes:
> Here is what I have after today's work. I think I sorted out the
> endianness issues.
>
> gas can be controlled explicitly using "-EB" and "-EL" options. The
> default is whatever endianness the host has. The elf names for the
> two variants are "elf64-bpfbe" and "elf64-bpfle".
>
> I fleshed out all the rest of the assembler parsing for instructions
> and added many entries to the gas testsuite.
>
> They are all explicitly in little endian, although I should add big
> endian versions too of course.
>
> If someone is looking for a way to help, could you please verify the
> testsuite output to make sure the opcode and fields are correctly
> set in the testsuite. Just look in:
>
> gas/testsuite/gas/bpf/
>
> and there are two files for every test. One is the "foo.s" file which
> gets built using gas into an object file "foo.o". Then there is a
> dump file named "foo.d" which specifies optionally how to run gas and
> with what options, and then what to dump with (usually "objdump -dr")
> then there is text which the testsuite compares with the dump of
> the resulting "foo.o" file.
>
> The testsuite is driven by bpf.exp which has pretty straightforward
> syntax.
>
> Anyways, enjoy. I'll keep cracking on this tomorrow.
I'll get an arm board up and running to do some testing there. As a
teaser:
Test run by aconole on Fri Apr 28 11:52:18 2017
Target is bpf-linux-elf
Host is x86_64-pc-linux-gnu
=== gas tests ===
...
Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/bfin/error.exp ...
Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/bpf/bpf.exp ...
Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/cfi/cfi.exp ...
...
And also:
11:56:08 aconole {master} ~/git/binutils-gdb$ ./binutils/objdump -dr move.o
move.o: file format elf64-bpfle
Disassembly of section .text:
0000000000000000 <.text>:
0: bf 12 00 00 00 00 00 00 mov r1, r2
8: b7 10 00 00 ef 00 00 00 mov r1, 239
10: bc 12 00 00 00 00 00 00 mov32 r1, r2
18: b4 10 00 00 ef 00 00 00 mov32 r1, 239
20: bf 36 00 00 00 00 00 00 mov r3, r6
28: bf 63 00 00 00 00 00 00 mov r6, r3
30: bf 89 00 00 00 00 00 00 mov r8, r9
38: bf a1 00 00 00 00 00 00 mov r10, r1
40: bf 73 00 00 00 00 00 00 mov r7, r3
48: b7 50 00 00 02 00 00 00 mov r5, 2
This is on an intel i7 (so not terribly exotic)
-Aaron
next prev parent reply other threads:[~2017-04-28 15:57 UTC|newest]
Thread overview: 5+ 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-28 15:57 ` Aaron Conole [this message]
2017-04-28 16:04 ` David Miller
2017-04-28 17:09 ` Aaron Conole
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=f7td1bwtthr.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 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 NNTP newsgroup(s).