netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 v4 binutils] Add BPF support to binutils...
Date: Mon, 01 May 2017 13:22:00 -0400	[thread overview]
Message-ID: <f7ttw541ohz.fsf@redhat.com> (raw)
In-Reply-To: <20170430.120750.651845251226226775.davem@davemloft.net> (David Miller's message of "Sun, 30 Apr 2017 12:07:50 -0400 (EDT)")

[-- Attachment #1: Type: text/plain, Size: 871 bytes --]

David Miller <davem@davemloft.net> writes:

> This is mainly a synchronization point, I still need to look
> more deeply into Alexei's -g issue.
>
> New in this version from v3:
>  - Remove tailcall from opcode table
>  - Rearrange relocations so that numbers match with LLVM ones
>  - Emit relocs properly so that dwarf2 debug info tests pass
>  - Handle negative load/store offsets properly, add tests
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---

Latest results from x86-64 and aarch64:

Both are little endian.  The only difference is for x86-64, I'm off of
commit 750eaa47f10f ("x86: Check plt_got before using .plt.got") and
for aarch64 I'm off of ee7e95efb981 ("merge_gnu_build_notes reloc
deletion").  I don't think that should matter.

I've also got a small incremental to fix some trailing whitespace, and
s/SPARC/BPF/ in one file, attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: incremental patch for git apply --]
[-- Type: text/x-patch, Size: 3060 bytes --]

diff --git a/bfd/elf64-bpf.c b/bfd/elf64-bpf.c
index a42f768..b04fdfb 100644
--- a/bfd/elf64-bpf.c
+++ b/bfd/elf64-bpf.c
@@ -39,7 +39,7 @@ _bfd_bpf_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
     {
     case BFD_RELOC_NONE:
       return &_bfd_bpf_elf_howto_table[R_BPF_NONE];
-     
+
     case BFD_RELOC_BPF_WDISP16:
       return &_bfd_bpf_elf_howto_table[R_BPF_WDISP16];
 
diff --git a/gas/config/tc-bpf.c b/gas/config/tc-bpf.c
index 36393b7..d78f06f 100644
--- a/gas/config/tc-bpf.c
+++ b/gas/config/tc-bpf.c
@@ -1,4 +1,4 @@
-/* tc-bpf.c -- Assemble for the SPARC
+/* tc-bpf.c -- Assemble for BPF
    Copyright (C) 2017 Free Software Foundation, Inc.
    This file is part of GAS, the GNU Assembler.
 
@@ -153,7 +153,7 @@ output_insn (struct bpf_it *theinsn)
   valueT opc = theinsn->opcode;
   char *toP = frag_more (theinsn->imm64 ? 16 : 8);
   char code, regs;
-  
+
   code = opc >> (64 - 8);
   regs = opc >> (64 - (8 + 8));
 
@@ -317,7 +317,7 @@ md_assemble (char *str ATTRIBUTE_UNUSED)
 		      if (c != '0' || mask != 1)
 			goto error;
 		      mask = 10;
-		    }			  
+		    }
 		  the_insn.opcode |= (mask << 52);
 		  continue;
 		}
@@ -337,7 +337,7 @@ md_assemble (char *str ATTRIBUTE_UNUSED)
 		      if (c != '0' || mask != 1)
 			goto error;
 		      mask = 10;
-		    }			  
+		    }
 		  the_insn.opcode |= (mask << 48);
 		  continue;
 		}
diff --git a/gas/testsuite/gas/bpf/bpf.exp b/gas/testsuite/gas/bpf/bpf.exp
index 363fd2c..5a8d54c 100644
--- a/gas/testsuite/gas/bpf/bpf.exp
+++ b/gas/testsuite/gas/bpf/bpf.exp
@@ -4,15 +4,15 @@
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
 # BPF assembler testsuite
 
diff --git a/gdb/bpf-tdep.c b/gdb/bpf-tdep.c
index 6629f73..9cca3bc 100644
--- a/gdb/bpf-tdep.c
+++ b/gdb/bpf-tdep.c
@@ -192,7 +192,7 @@ bpf_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   tdep = XNEW (struct gdbarch_tdep);
   gdbarch = gdbarch_alloc (&info, tdep);
-  
+
   tdep->xxx = 0;
 
   set_gdbarch_num_regs (gdbarch, BPF_NUM_REGS);
diff --git a/opcodes/bpf-dis.c b/opcodes/bpf-dis.c
index 39656bf..e15acc1 100644
--- a/opcodes/bpf-dis.c
+++ b/opcodes/bpf-dis.c
@@ -79,7 +79,7 @@ print_insn_bpf (bfd_vma memaddr, disassemble_info *info)
     {
       getword = bfd_getl32;
       gethalf = bfd_getl16;
-    }  
+    }
 
   code = buffer[0];
   dest = (buffer[1] & 0xf0) >> 4;
-- 
2.9.3


[-- Attachment #3: Type: text/plain, Size: 376 bytes --]


x86-64:
  Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/bpf/bpf.exp ...
  FAIL: jump
  FAIL: call
  FAIL: imm64a
  Running /home/aconole/git/binutils-gdb/gas/testsuite/gas/cfi/cfi.exp ...

aarch64 (pine64 board):
  Running /root/aarch64/git/binutils-gdb/gas/testsuite/gas/bpf/bpf.exp ...
  Running /root/aarch64/git/binutils-gdb/gas/testsuite/gas/cfi/cfi.exp ...


  reply	other threads:[~2017-05-01 17:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 16:07 [PATCH v4 binutils] Add BPF support to binutils David Miller
2017-05-01 17:22 ` Aaron Conole [this message]
2017-05-01 17:42   ` David Miller
2017-05-01 17:52   ` David Miller
2017-05-01 18:39     ` Aaron Conole
2017-05-01 18:50       ` David Miller
2017-05-02  3:49 ` Alexei Starovoitov
2017-05-02  3:51   ` David Miller
2017-05-05 19:43     ` David Miller
2017-05-05 18:24   ` Alexei Starovoitov
2017-05-05 18:53     ` 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=f7ttw541ohz.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).