https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107480
Bug ID: 107480 Summary: bpf: add __builtin_preserve_type_info Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: david.faust at oracle dot com Target Milestone: --- LLVM supports a BPF builtin: __builtin_preserve_type_info (param, flag) which is used to generate additional relocations for the Compile Once - Run Everywhere (CO-RE) mechanism. This builtin produces a relocation recording the information about the type of 'param', such as it's size or whether or not it exists on the host kernel, according to 'flag'. This information is returned to the program and patched by the eBPF loader during loading. We should support this functionality in GCC. These are the relevant changes in LLVM: https://reviews.llvm.org/D83878 https://reviews.llvm.org/D83242