]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gas/config/tc-bpf.h
bpf: include, bfd, opcodes: add EF_BPF_CPUVER ELF header flags
[thirdparty/binutils-gdb.git] / gas / config / tc-bpf.h
CommitLineData
f8861f5d 1/* tc-bpf.h -- Header file for tc-ebpf.c.
d87bef3a 2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
f8861f5d
JM
3 Contributed by Oracle, Inc.
4
5 This file is part of GAS, the GNU Assembler.
6
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to the Free
19 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20 02110-1301, USA. */
21
22#define TC_BPF
23
24#define LISTING_HEADER "BPF GAS "
25
26/* The target BFD architecture. */
27#define TARGET_ARCH bfd_arch_bpf
28#define TARGET_MACH 0 /* The default. */
29
30#define TARGET_FORMAT \
31 (target_big_endian ? "elf64-bpfbe" : "elf64-bpfle")
32
33/* This is used to set the default value for `target_big_endian'. */
34#ifndef TARGET_BYTES_BIG_ENDIAN
35#define TARGET_BYTES_BIG_ENDIAN 0
36#endif
37
38/* .-foo gets turned into PC relative relocs. */
39#define DIFF_EXPR_OK 1
f8861f5d
JM
40
41/* Call md_pcrel_from_section(), not md_pcrel_from(). */
42#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
f8861f5d
JM
43
44/* We don't need to handle .word strangely. */
45#define WORKING_DOT_WORD
46
47/* Values passed to md_apply_fix don't include the symbol value. */
48#define MD_APPLY_SYM_VALUE(FIX) 0
49
6db99906
DF
50/* The Linux kernel verifier expects NOPs to be encoded in this way;
51 a jump to offset 0 means jump to the next instruction. */
52#define md_single_noop_insn "ja 0"
ff5a51b3 53
d218e7fe
JM
54#define TC_EQUAL_IN_INSN(c, s) bpf_tc_equal_in_insn ((c), (s))
55extern bool bpf_tc_equal_in_insn (int, char *);
1e18ffc9
JM
56
57#define elf_tc_final_processing bpf_elf_final_processing
58extern void bpf_elf_final_processing (void);