1 1.1 christos /* This reloc does nothing. */ 2 1.1 christos BPF_HOWTO (R_BPF_NONE, /* type */ 3 1.1 christos 0, /* rightshift */ 4 1.1 christos 0, /* size */ 5 1.1 christos 0, /* bitsize */ 6 1.1 christos false, /* pc_relative */ 7 1.1 christos 0, /* bitpos */ 8 1.1 christos complain_overflow_dont, /* complain_on_overflow */ 9 1.1 christos bpf_elf_generic_reloc, /* special_function */ 10 1.1 christos "R_BPF_NONE", /* name */ 11 1.1 christos false, /* partial_inplace */ 12 1.1 christos 0, /* src_mask */ 13 1.1 christos 0, /* dst_mask */ 14 1.1 christos false) /* pcrel_offset */ 15 1.1 christos 16 1.1 christos /* 64-immediate in LDDW instruction. */ 17 1.1 christos BPF_HOWTO (R_BPF_64_64, /* type */ 18 1.1 christos 0, /* rightshift */ 19 1.1 christos 8, /* size */ 20 1.1 christos 64, /* bitsize */ 21 1.1 christos false, /* pc_relative */ 22 1.1 christos 32, /* bitpos */ 23 1.1 christos complain_overflow_signed, /* complain_on_overflow */ 24 1.1 christos bpf_elf_generic_reloc, /* special_function */ 25 1.1 christos "R_BPF_64_64", /* name */ 26 1.1 christos true, /* partial_inplace */ 27 1.1 christos MINUS_ONE, /* src_mask */ 28 1.1 christos MINUS_ONE, /* dst_mask */ 29 1.1 christos true) /* pcrel_offset */ 30 1.1 christos 31 1.1 christos /* 32-bit data. */ 32 1.1 christos BPF_HOWTO (R_BPF_64_ABS32, /* type */ 33 1.1 christos 0, /* rightshift */ 34 1.1 christos 4, /* size */ 35 1.1 christos 32, /* bitsize */ 36 1.1 christos false, /* pc_relative */ 37 1.1 christos 0, /* bitpos */ 38 1.1 christos complain_overflow_bitfield, /* complain_on_overflow */ 39 1.1 christos bpf_elf_generic_reloc, /* special_function */ 40 1.1 christos "R_BPF_64_ABS32", /* name */ 41 1.1 christos true, /* partial_inplace */ 42 1.1 christos 0xffffffff, /* src_mask */ 43 1.1 christos 0xffffffff, /* dst_mask */ 44 1.1 christos true) /* pcrel_offset */ 45 1.1 christos 46 1.1 christos /* 64-bit data. */ 47 1.1 christos BPF_HOWTO (R_BPF_64_ABS64, /* type */ 48 1.1 christos 0, /* rightshift */ 49 1.1 christos 8, /* size */ 50 1.1 christos 64, /* bitsize */ 51 1.1 christos false, /* pc_relative */ 52 1.1 christos 0, /* bitpos */ 53 1.1 christos complain_overflow_bitfield, /* complain_on_overflow */ 54 1.1 christos bpf_elf_generic_reloc, /* special_function */ 55 1.1 christos "R_BPF_64_ABS64", /* name */ 56 1.1 christos true, /* partial_inplace */ 57 1.1 christos 0, /* src_mask */ 58 1.1 christos MINUS_ONE, /* dst_mask */ 59 1.1 christos true) /* pcrel_offset */ 60 1.1 christos 61 1.1 christos /* 32-bit PC-relative address in call instructions. */ 62 1.1 christos BPF_HOWTO (R_BPF_64_32, /* type */ 63 1.1 christos 0, /* rightshift */ 64 1.1 christos 4, /* size */ 65 1.1 christos 32, /* bitsize */ 66 1.1 christos true, /* pc_relative */ 67 1.1 christos 32, /* bitpos */ 68 1.1 christos complain_overflow_signed, /* complain_on_overflow */ 69 1.1 christos bpf_elf_generic_reloc, /* special_function */ 70 1.1 christos "R_BPF_64_32", /* name */ 71 1.1 christos true, /* partial_inplace */ 72 1.1 christos 0xffffffff, /* src_mask */ 73 1.1 christos 0xffffffff, /* dst_mask */ 74 1.1 christos true) /* pcrel_offset */ 75 1.1 christos 76 1.1 christos /* 16-bit PC-relative address in load instructions. */ 77 1.1 christos BPF_HOWTO (R_BPF_GNU_64_16, /* type */ 78 1.1 christos 0, /* rightshift */ 79 1.1 christos 2, /* size */ 80 1.1 christos 16, /* bitsize */ 81 1.1 christos true, /* pc_relative */ 82 1.1 christos 16, /* bitpos */ 83 1.1 christos complain_overflow_signed, /* complain_on_overflow */ 84 1.1 christos bpf_elf_generic_reloc, /* special_function */ 85 1.1 christos "R_BPF_GNU_64_16", /* name */ 86 1.1 christos true, /* partial_inplace */ 87 1.1 christos 0xffff, /* src_mask */ 88 1.1 christos 0xffff, /* dst_mask */ 89 1.1 christos true) /* pcrel_offset */ 90 1.1 christos 91 1.1 christos /* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM. 92 1.1 christos We provide an entry here so that tools like strip can safely handle BPF 93 1.1 christos binaries generated by other tools. 94 1.1 christos R_BPF_64_NODYLD32 should be fixed at linker like a R_BPF_64_ABS32. 95 1.1 christos The difference to ABS32 is that LLVM execution engine does not resolve 96 1.1 christos R_BPF_64_NODYLD32 relocations. */ 97 1.1 christos BPF_HOWTO (R_BPF_64_NODYLD32, /* type */ 98 1.1 christos 0, /* rightshift */ 99 1.1 christos 4, /* size */ 100 1.1 christos 32, /* bitsize */ 101 1.1 christos false, /* pc_relative */ 102 1.1 christos 0, /* bitpos */ 103 1.1 christos complain_overflow_bitfield, /* complain_on_overflow */ 104 1.1 christos bpf_elf_generic_reloc, /* special_function */ 105 1.1 christos "R_BPF_64_NODYLD32", /* name */ 106 1.1 christos true, /* partial_inplace */ 107 1.1 christos 0xffffffff, /* src_mask */ 108 1.1 christos 0xffffffff, /* dst_mask */ 109 1.1 christos true) /* pcrel_offset */ 110