Re: [PATCH v4 binutils] Add BPF support to binutils...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/1/17 8:49 PM, Alexei Starovoitov wrote:
On 4/30/17 9:07 AM, David Miller wrote:
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@xxxxxxxxxxxxx>

dwarf on little endian works now :)

Yonghong fixed llvm bug with big-endian dwarf [1]
and binutils worked out of the box :)

$ ./bin/clang -O2 -target bpfeb -c -g test.c
$ /w/binutils-gdb/bld/binutils/objdump -S test.o

test.o:     file format elf64-bpfbe

Disassembly of section .text:
0000000000000000 <bpf_prog1>:
int bpf_prog1(void *ign)
{
  volatile unsigned long t = 0x8983984739ull;
   0:	18 10 00 00 83 98 47 39 	ldimm64	r1, 590618314553
   8:	00 00 00 00 00 00 00 89
  10:	7b a1 ff f8 00 00 00 00 	stdw	[r10+-8], r1
  return *(unsigned long *)((0xffffffff8fff0002ull) + t);
  18:	79 1a ff f8 00 00 00 00 	lddw	r1, [r10+-8]

[1]
https://reviews.llvm.org/rL302265



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux