tc-bpf.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* tc-bpf.h -- Header file for tc-ebpf.c.
  2. Copyright (C) 2019-2022 Free Software Foundation, Inc.
  3. Contributed by Oracle, Inc.
  4. This file is part of GAS, the GNU Assembler.
  5. GAS is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3, or (at your option)
  8. any later version.
  9. GAS is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with GAS; see the file COPYING. If not, write to the Free
  15. Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
  16. 02110-1301, USA. */
  17. #define TC_BPF
  18. #define LISTING_HEADER "BPF GAS "
  19. /* The target BFD architecture. */
  20. #define TARGET_ARCH bfd_arch_bpf
  21. #define TARGET_MACH 0 /* The default. */
  22. #define TARGET_FORMAT \
  23. (target_big_endian ? "elf64-bpfbe" : "elf64-bpfle")
  24. /* This is used to set the default value for `target_big_endian'. */
  25. #ifndef TARGET_BYTES_BIG_ENDIAN
  26. #define TARGET_BYTES_BIG_ENDIAN 0
  27. #endif
  28. /* .-foo gets turned into PC relative relocs. */
  29. #define DIFF_EXPR_OK 1
  30. #define GAS_CGEN_PCREL_R_TYPE(R_TYPE) gas_cgen_pcrel_r_type (R_TYPE)
  31. /* Call md_pcrel_from_section(), not md_pcrel_from(). */
  32. #define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from_section (FIXP, SEC)
  33. /* We don't need to handle .word strangely. */
  34. #define WORKING_DOT_WORD
  35. /* Values passed to md_apply_fix don't include the symbol value. */
  36. #define MD_APPLY_SYM_VALUE(FIX) 0
  37. /* The Linux kernel verifier expects NOPs to be encoded in this way;
  38. a jump to offset 0 means jump to the next instruction. */
  39. #define md_single_noop_insn "ja 0"