13 Star 0 Fork 10

ocs-bot/binutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
binutils-BPF-reloc-4.patch 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
diff -rup binutils.orig/bfd/bpf-reloc.def binutils-2.41/bfd/bpf-reloc.def
--- binutils.orig/bfd/bpf-reloc.def 2023-10-30 10:41:59.114273359 +0000
+++ binutils-2.41/bfd/bpf-reloc.def 2023-10-30 11:09:41.316109162 +0000
@@ -72,3 +72,20 @@
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true) /* pcrel_offset */
+
+ /* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM.
+ We provide an entry here so that tools like strip can safely handle BPF
+ binaries generated by other tools. */
+ BPF_HOWTO (R_BPF_64_NODYLD32, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bpf_elf_generic_reloc, /* special_function */
+ "R_BPF_64_NODYLD32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false) /* pcrel_offset */
diff -rup binutils.orig/include/elf/bpf.h binutils-2.41/include/elf/bpf.h
--- binutils.orig/include/elf/bpf.h 2023-10-30 10:41:59.332273599 +0000
+++ binutils-2.41/include/elf/bpf.h 2023-10-30 10:59:44.475368448 +0000
@@ -30,8 +30,8 @@ START_RELOC_NUMBERS (elf_bpf_reloc_type)
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. */
+/* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM.
+ 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)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ocs-bot/binutils.git
git@gitee.com:ocs-bot/binutils.git
ocs-bot
binutils
binutils
master

搜索帮助

Cb406eda 1850385 E526c682 1850385