Ananyev, Konstantin via llvm-dev
2019-Apr-10 18:37 UTC
[llvm-dev] BPF_PSEUDO_CALL question
Hi everyone, wtih clang 6.0 and onwards, for the following code: $ cat t6.c #include <stdint.h> extern int ffx1(const void *p); uint64_t entry(const void *p) { return ffx1(p); } clang -O2 -target bpfel -c t6.c generates for the call BPF_PSEUDO_CALL instruction: entry: 0: 85 10 00 00 ff ff ff ff call -1 1: 67 00 00 00 20 00 00 00 r0 <<= 32 2: c7 00 00 00 20 00 00 00 r0 s>>= 32 3: 95 00 00 00 00 00 00 00 exit Is there any way to force clang to generate proper BPF_CALL instruction, i.e: 85 00 00 00 ff ff ff ff (as it did in older versions)? Thanks Konstantin