xref: /netbsd-src/external/gpl3/gdb/dist/include/elf/bpf.h (revision 02f41505626a9ceb584d30d0789203495760ac88)
18dffb485Schristos /* Linux eBPF support for BFD.
2*02f41505Schristos    Copyright (C) 2019-2024 Free Software Foundation, Inc.
38dffb485Schristos 
48dffb485Schristos    Contributed by Oracle, Inc.
58dffb485Schristos 
68dffb485Schristos    This file is part of BFD, the Binary File Descriptor library.
78dffb485Schristos 
88dffb485Schristos    This program is free software; you can redistribute it and/or modify
98dffb485Schristos    it under the terms of the GNU General Public License as published by
108dffb485Schristos    the Free Software Foundation; either version 3 of the License, or
118dffb485Schristos    (at your option) any later version.
128dffb485Schristos 
138dffb485Schristos    This program is distributed in the hope that it will be useful,
148dffb485Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
158dffb485Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
168dffb485Schristos    GNU General Public License for more details.
178dffb485Schristos 
188dffb485Schristos    You should have received a copy of the GNU General Public License
198dffb485Schristos    along with this program; if not, write to the Free Software Foundation,
208dffb485Schristos    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
218dffb485Schristos 
228dffb485Schristos #ifndef _ELF_BPF_H
238dffb485Schristos #define _ELF_BPF_H
248dffb485Schristos 
258dffb485Schristos #include "elf/reloc-macros.h"
268dffb485Schristos 
278dffb485Schristos /* Relocations.  */
288dffb485Schristos START_RELOC_NUMBERS (elf_bpf_reloc_type)
298dffb485Schristos   RELOC_NUMBER (R_BPF_NONE,			0)
30*02f41505Schristos   RELOC_NUMBER (R_BPF_64_64,       		1)
31*02f41505Schristos   RELOC_NUMBER (R_BPF_64_ABS64,    		2)
32*02f41505Schristos   RELOC_NUMBER (R_BPF_64_ABS32,    		3)
33*02f41505Schristos /* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM.
34*02f41505Schristos    It is kept in this file to remind that the value is already taken.  */
35*02f41505Schristos   RELOC_NUMBER (R_BPF_64_NODYLD32, 		4)
36*02f41505Schristos   RELOC_NUMBER (R_BPF_64_32,      		10)
37*02f41505Schristos   RELOC_NUMBER (R_BPF_GNU_64_16,                256)
388dffb485Schristos END_RELOC_NUMBERS (R_BPF_max)
398dffb485Schristos 
40*02f41505Schristos /* Processor specific flags for the ELF header e_flags field.  */
41*02f41505Schristos 
42*02f41505Schristos /* Version of the BPF ISA used in the file.  */
43*02f41505Schristos #define EF_BPF_CPUVER 0x0000000f
44*02f41505Schristos 
458dffb485Schristos #endif /* _ELF_BPF_H  */
46