mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
13dd94d4c3
Some BPF programs compiled on s390 fail to load, because s390 arch-specific linux headers contain float and double types. At the moment there is no BTF_KIND for floats and doubles, so the release version of LLVM ends up emitting type id 0 for them, which the in-kernel verifier does not accept. Introduce support for such types to libbpf by representing them using the new BTF_KIND_FLOAT. Reviewed By: yonghong-song Differential Revision: https://reviews.llvm.org/D83289
36 lines
1.0 KiB
C++
36 lines
1.0 KiB
C++
//===- BTF.def - BTF definitions --------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// Macros for BTF.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#if !defined(HANDLE_BTF_KIND)
|
|
#error "Missing macro definition of HANDLE_BTF_*"
|
|
#endif
|
|
|
|
HANDLE_BTF_KIND(0, UNKN)
|
|
HANDLE_BTF_KIND(1, INT)
|
|
HANDLE_BTF_KIND(2, PTR)
|
|
HANDLE_BTF_KIND(3, ARRAY)
|
|
HANDLE_BTF_KIND(4, STRUCT)
|
|
HANDLE_BTF_KIND(5, UNION)
|
|
HANDLE_BTF_KIND(6, ENUM)
|
|
HANDLE_BTF_KIND(7, FWD)
|
|
HANDLE_BTF_KIND(8, TYPEDEF)
|
|
HANDLE_BTF_KIND(9, VOLATILE)
|
|
HANDLE_BTF_KIND(10, CONST)
|
|
HANDLE_BTF_KIND(11, RESTRICT)
|
|
HANDLE_BTF_KIND(12, FUNC)
|
|
HANDLE_BTF_KIND(13, FUNC_PROTO)
|
|
HANDLE_BTF_KIND(14, VAR)
|
|
HANDLE_BTF_KIND(15, DATASEC)
|
|
HANDLE_BTF_KIND(16, FLOAT)
|
|
|
|
#undef HANDLE_BTF_KIND
|