From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ED5D93858410; Mon, 31 Oct 2022 20:27:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ED5D93858410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667248044; bh=cg51VjE00X2lAA868n7zAej1Q+vhnEHbdOrXty7Hwsg=; h=From:To:Subject:Date:From; b=pHzuQn5YpEdYxAiQPuoEq6/sCbqfAlHw4qArqgqi6Xz+3ok4IZvOx1TGup83FItQk Zjx5wTi4hlJds/VQDe5I5Y4pKppT+vcBScvl1xH/mGBMd32m1dXh4QIMN06rP/ydIQ wQDNQMUTLKm09XbaKYsIJP/RpDTE3FkXeYZHNg+w= From: "david.faust at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107480] New: bpf: add __builtin_preserve_type_info Date: Mon, 31 Oct 2022 20:27:24 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: david.faust at oracle dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107480 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=