aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-intl.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2025-04-25 13:01:21 +0100
committerNick Alcock <nick.alcock@oracle.com>2025-04-25 18:07:44 +0100
commitdb9897214528ad4fef682b5fba79e6b8aea40c35 (patch)
tree61437d2b7905d6b855a1c234130af1a85135a678 /libctf/ctf-intl.h
parent5ec23dfb74b1962e4a306031776a07c92d18c18a (diff)
downloadbinutils-db9897214528ad4fef682b5fba79e6b8aea40c35.zip
binutils-db9897214528ad4fef682b5fba79e6b8aea40c35.tar.gz
binutils-db9897214528ad4fef682b5fba79e6b8aea40c35.tar.bz2
libctf: serialize: check the type section for BTF-incompatible types
We add a new ctf_type_sect_is_btf function (internal to ctf-serialize.c) to check the type section against the write prohibitions list and (after write-suppression) against the set of types allowed in BTF, and determine whether this type section contains any types BTF does not allow. CTF-specific type kinds like CTF_K_FLOAT are obviously prohibited in BTF, as are CTF-specific prefixes, except that CTF_K_BIG is allowed if and only if both its ctt_size and vlen are still zero: in that case it will be elided by type section writeout and will never appear in the BTF at all. Structs are checked to make sure they don't use any nameless padding members and that (if they are bitfields) all their offsets will still fit after conversion from CTF_K_BIG gap-between-struct-members representation (if they are not bitfields, we know they will fit, but for bitfields, they might be too big).
Diffstat (limited to 'libctf/ctf-intl.h')
0 files changed, 0 insertions, 0 deletions