summaryrefslogtreecommitdiffstats
path: root/backends/ChangeLog
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2018-06-16 13:02:43 -0700
committerMark Wielaard <[email protected]>2018-06-21 20:33:32 +0200
commitc1990d36cfe37a30bcc49422c37a6767fd190559 (patch)
treefd16623796936526ef3de10feac44e50cdb47864 /backends/ChangeLog
parent3e4f78a7be8faec96f89da58ce9849a274aef0c4 (diff)
backends,bpf: add proper relocation support
Due to libdw does not have proper BPF relocation support, the pahole cannot display filenames correctly for objects with default llvm options. So we have to invent a special option "llc -march=bpf -mattr=dwarfris" to prevent llvm from generating cross-section dwarf relocation records (https://reviews.llvm.org/rL326505). The pahole related discussion is in linux netdev mailing list (http://lists.openwall.net/netdev/2018/06/15/38, etc.) We would like to add proper BPF relocation support to libdw so eventually we could retire the special llc bpf flag "-mattr=dwarfris". The bpf relocations are defined in llvm_repo:include/llvm/BinaryFormat/ELFRelocs/BPF.def: ELF_RELOC(R_BPF_NONE, 0) ELF_RELOC(R_BPF_64_64, 1) ELF_RELOC(R_BPF_64_32, 10) Removed the relocation type R_BPF_MAP_FD whoes name does not confirm to llvm definition and replaced it with R_BPF_64_64. The BPF object is just a relocatible object, not an executable or a shared library, so assign ELF type to REL only in bpf_reloc.def. Signed-off-by: Yonghong Song <[email protected]>
Diffstat (limited to 'backends/ChangeLog')
-rw-r--r--backends/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog
index e97e33d6..3fa0f198 100644
--- a/backends/ChangeLog
+++ b/backends/ChangeLog
@@ -1,3 +1,10 @@
+2018-06-16 Yonghong Song <[email protected]>
+
+ * Makefile.am (bpf_SRCS): Add bpf_symbol.c.
+ * bpf_init.c (bpf_init): Add reloc_simple_type HOOK.
+ * bpf_reloc.def: Add RELOC_TYPE 64_64 and 64_32.
+ * bpf_symbol.c: New file.
+
2018-06-21 Mark Wielaard <[email protected]>
* bpf_reloc.def: Remove MAP_FD.