diff options
author | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-03-16 08:39:52 +0000 |
---|---|---|
committer | Cupertino Miranda <cupertino.miranda@oracle.com> | 2023-03-16 09:11:09 +0000 |
commit | 5e4c7a839d1c0d68a4a518cf2dc8e87925575e58 (patch) | |
tree | e063d731af82e3e76b3ed441fc0d46b505bbc213 /gas/config/tc-bpf.c | |
parent | 6752dd75f76457902729a5f03d09fa28ec5d68c3 (diff) | |
download | binutils-gdb-5e4c7a839d1c0d68a4a518cf2dc8e87925575e58.tar.gz |
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 'gas/config/tc-bpf.c')
-rw-r--r-- | gas/config/tc-bpf.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/gas/config/tc-bpf.c b/gas/config/tc-bpf.c index aa701584470..1f8b0cc2ede 100644 --- a/gas/config/tc-bpf.c +++ b/gas/config/tc-bpf.c @@ -274,15 +274,8 @@ md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED, { switch (operand->type) { - case BPF_OPERAND_OFFSET16: - return BFD_RELOC_BPF_16; - case BPF_OPERAND_IMM32: - return BFD_RELOC_BPF_32; case BPF_OPERAND_IMM64: return BFD_RELOC_BPF_64; - case BPF_OPERAND_DISP16: - fixP->fx_pcrel = 1; - return BFD_RELOC_BPF_DISP16; case BPF_OPERAND_DISP32: fixP->fx_pcrel = 1; return BFD_RELOC_BPF_DISP32; |