forked from Imagelibrary/binutils-gdb
BPF relocations review / refactoring
- Removed not needed relocations. - Renamed relocations to match llvm and linux kernel. Relocation changes: R_BPF_INSN_64 => R_BPF_64_64 R_BPF_INSN_DISP32 => R_BPF_64_32 R_BPF_DATA_32 => R_BPF_64_ABS32 R_BPF_DATA_64 => R_BPF_64_ABS64 ChangeLog: * bfd/bpf-reloc.def: Created file with BPF_HOWTO macro entries. * bfd/reloc.c: Removed non needed relocations. * bfd/bfd-in2.h: regenerated. * bfd/libbfd.h: regenerated. * bfd/elf64-bpf.c: Changed relocations. * include/elf/bpf.h: Adapted relocation values/names. * gas/config/tc-bpf.c: Changed relocation mapping.
This commit is contained in:
@@ -26,20 +26,14 @@
|
||||
|
||||
/* Relocations. */
|
||||
START_RELOC_NUMBERS (elf_bpf_reloc_type)
|
||||
RELOC_NUMBER (R_BPF_NONE, 0)
|
||||
RELOC_NUMBER (R_BPF_INSN_64, 1)
|
||||
RELOC_NUMBER (R_BPF_INSN_32, 2)
|
||||
RELOC_NUMBER (R_BPF_INSN_16, 3)
|
||||
RELOC_NUMBER (R_BPF_INSN_DISP16, 4)
|
||||
RELOC_NUMBER (R_BPF_DATA_8_PCREL, 5)
|
||||
RELOC_NUMBER (R_BPF_DATA_16_PCREL, 6)
|
||||
RELOC_NUMBER (R_BPF_DATA_32_PCREL, 7)
|
||||
RELOC_NUMBER (R_BPF_DATA_8, 8)
|
||||
RELOC_NUMBER (R_BPF_DATA_16, 9)
|
||||
RELOC_NUMBER (R_BPF_INSN_DISP32, 10)
|
||||
RELOC_NUMBER (R_BPF_DATA_32, 11)
|
||||
RELOC_NUMBER (R_BPF_DATA_64, 12)
|
||||
RELOC_NUMBER (R_BPF_DATA_64_PCREL, 13)
|
||||
RELOC_NUMBER (R_BPF_NONE, 0)
|
||||
RELOC_NUMBER (R_BPF_64_64, 1)
|
||||
RELOC_NUMBER (R_BPF_64_ABS64, 2)
|
||||
RELOC_NUMBER (R_BPF_64_ABS32, 3)
|
||||
/* R_BPF_64_NODYLD32 is not used by GNU tools.
|
||||
* It is kept in this file to remind that the value is already taken. */
|
||||
RELOC_NUMBER (R_BPF_64_NODYLD32, 4)
|
||||
RELOC_NUMBER (R_BPF_64_32, 10)
|
||||
END_RELOC_NUMBERS (R_BPF_max)
|
||||
|
||||
#endif /* _ELF_BPF_H */
|
||||
|
||||
Reference in New Issue
Block a user