1 /* Linux eBPF support for BFD. 2 Copyright (C) 2019-2024 Free Software Foundation, Inc. 3 4 Contributed by Oracle, Inc. 5 6 This file is part of BFD, the Binary File Descriptor library. 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 3 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software Foundation, 20 Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 21 22 #ifndef _ELF_BPF_H 23 #define _ELF_BPF_H 24 25 #include "elf/reloc-macros.h" 26 27 /* Relocations. */ 28 START_RELOC_NUMBERS (elf_bpf_reloc_type) 29 RELOC_NUMBER (R_BPF_NONE, 0) 30 RELOC_NUMBER (R_BPF_64_64, 1) 31 RELOC_NUMBER (R_BPF_64_ABS64, 2) 32 RELOC_NUMBER (R_BPF_64_ABS32, 3) 33 /* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM. 34 It is kept in this file to remind that the value is already taken. */ 35 RELOC_NUMBER (R_BPF_64_NODYLD32, 4) 36 RELOC_NUMBER (R_BPF_64_32, 10) 37 RELOC_NUMBER (R_BPF_GNU_64_16, 256) 38 END_RELOC_NUMBERS (R_BPF_max) 39 40 /* Processor specific flags for the ELF header e_flags field. */ 41 42 /* Version of the BPF ISA used in the file. */ 43 #define EF_BPF_CPUVER 0x0000000f 44 45 #endif /* _ELF_BPF_H */ 46