xref: /netbsd-src/external/gpl3/binutils.old/dist/include/elf/bpf.h (revision c42dbd0ed2e61fe6eda8590caa852ccf34719964)
1867d70fcSchristos /* Linux eBPF support for BFD.
2*c42dbd0eSchristos    Copyright (C) 2019-2022 Free Software Foundation, Inc.
3867d70fcSchristos 
4867d70fcSchristos    Contributed by Oracle, Inc.
5867d70fcSchristos 
6867d70fcSchristos    This file is part of BFD, the Binary File Descriptor library.
7867d70fcSchristos 
8867d70fcSchristos    This program is free software; you can redistribute it and/or modify
9867d70fcSchristos    it under the terms of the GNU General Public License as published by
10867d70fcSchristos    the Free Software Foundation; either version 3 of the License, or
11867d70fcSchristos    (at your option) any later version.
12867d70fcSchristos 
13867d70fcSchristos    This program is distributed in the hope that it will be useful,
14867d70fcSchristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
15867d70fcSchristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16867d70fcSchristos    GNU General Public License for more details.
17867d70fcSchristos 
18867d70fcSchristos    You should have received a copy of the GNU General Public License
19867d70fcSchristos    along with this program; if not, write to the Free Software Foundation,
20867d70fcSchristos    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
21867d70fcSchristos 
22867d70fcSchristos #ifndef _ELF_BPF_H
23867d70fcSchristos #define _ELF_BPF_H
24867d70fcSchristos 
25867d70fcSchristos #include "elf/reloc-macros.h"
26867d70fcSchristos 
27867d70fcSchristos /* Relocations.  */
28867d70fcSchristos START_RELOC_NUMBERS (elf_bpf_reloc_type)
29867d70fcSchristos   RELOC_NUMBER (R_BPF_NONE,		0)
30867d70fcSchristos   RELOC_NUMBER (R_BPF_INSN_64,		1)
31867d70fcSchristos   RELOC_NUMBER (R_BPF_INSN_32,		2)
32867d70fcSchristos   RELOC_NUMBER (R_BPF_INSN_16,          3)
33867d70fcSchristos   RELOC_NUMBER (R_BPF_INSN_DISP16,	4)
34867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_8_PCREL,	5)
35867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_16_PCREL,	6)
36867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_32_PCREL,	7)
37867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_8,		8)
38867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_16,		9)
39867d70fcSchristos   RELOC_NUMBER (R_BPF_INSN_DISP32,	10)
40867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_32,		11)
41867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_64,		12)
42867d70fcSchristos   RELOC_NUMBER (R_BPF_DATA_64_PCREL,	13)
43867d70fcSchristos END_RELOC_NUMBERS (R_BPF_max)
44867d70fcSchristos 
45867d70fcSchristos #endif /* _ELF_BPF_H  */
46