aboutsummaryrefslogtreecommitdiff
path: root/include/elf
diff options
context:
space:
mode:
authorCupertino Miranda <cupertino.miranda@oracle.com>2023-03-16 08:39:52 +0000
committerCupertino Miranda <cupertino.miranda@oracle.com>2023-03-16 09:11:09 +0000
commit5e4c7a839d1c0d68a4a518cf2dc8e87925575e58 (patch)
treee063d731af82e3e76b3ed441fc0d46b505bbc213 /include/elf
parent6752dd75f76457902729a5f03d09fa28ec5d68c3 (diff)
downloadgdb-5e4c7a839d1c0d68a4a518cf2dc8e87925575e58.zip
gdb-5e4c7a839d1c0d68a4a518cf2dc8e87925575e58.tar.gz
gdb-5e4c7a839d1c0d68a4a518cf2dc8e87925575e58.tar.bz2
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.
Diffstat (limited to 'include/elf')
-rw-r--r--include/elf/bpf.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/include/elf/bpf.h b/include/elf/bpf.h
index e52f481..fb19360 100644
--- a/include/elf/bpf.h
+++ b/include/elf/bpf.h
@@ -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 */