]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ctf: Add definitions for CTFv3
authorMark Johnston <markj@FreeBSD.org>
Mon, 7 Mar 2022 13:44:02 +0000 (08:44 -0500)
committerMark Johnston <markj@FreeBSD.org>
Mon, 18 Apr 2022 16:38:22 +0000 (12:38 -0400)
commit6e6983ee2b722a4d931bc1829870a22e5853951d
treeb4d4cf87b345367ec4e31bdb95fb79f9e5ae881f
parent30700bc80e8e156672acec9f880b09825a1ebb05
ctf: Add definitions for CTFv3

These are based on definitions added to binutils' libctf.  Specifically:
- Type IDs are now encoded in 32 bits rather than 16, changing the
  layout of ctf_type_t, ctf_array_t, ctf_member_t and ctf_lmember_t.
- Type info is encoded in 32 bits rather than 16.  The type "kind" is
  extended from 5 bits to 6, and the type "vlen" is extended from 10
  bits to 25.

The main upside is that we remove the current limit, imposed by CTFv2,
of 2^{15} distinct types in the main kernel executable.  Other limits,
such as that on the number of elements in an enum, imposed by the vlen
limit, are also raised.

This change adds v2 and v3 flavours of macros and type definitions which
differ between the two versions.  Compatibility is preserved for now by
having generic names refer to the v2 definitions, so, e.g., ctf_type_t
is still a v2 type.

No functional change intended.

Approved by: re (gjb)
Reviewed by: Domagoj Stolfa
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 994297b01b98816bea1abf45ae4bac1bc69ee7a0)
(cherry picked from commit 9818e5ebf3376ee5dbd01afe24e9972d9201633e)
cddl/contrib/opensolaris/lib/libctf/common/ctf.5
sys/sys/ctf.h