aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-intl.h
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2025-04-25 20:49:26 +0100
committerNick Alcock <nick.alcock@oracle.com>2025-04-25 21:23:07 +0100
commit7bea1097ecb81cbd6fd95420798c979688acb33c (patch)
tree7618fb2b0c5d792d1b3ecd9e5cbaa923c50f4b1d /libctf/ctf-intl.h
parentf38832b3985d6a91c5ca51d46f3e6ce468f188a0 (diff)
downloadbinutils-7bea1097ecb81cbd6fd95420798c979688acb33c.zip
binutils-7bea1097ecb81cbd6fd95420798c979688acb33c.tar.gz
binutils-7bea1097ecb81cbd6fd95420798c979688acb33c.tar.bz2
libctf: dedup: conflicting CU names and merging into the parent
The last two dedup changes are, firstly, to use ctf_add_conflicting() to arrange that conflicting types that are hidden because they are added to the same dict as the types they conflict with (e.g. conflicting types in modules) are properly marked with the CU name that the type comes from. This could of course not be done with the old non-root flag, but now that we have proper prefix types, we can record it, and consumers can find out what CU any type comes from via ctf_type_conflicting (or, for non-kernel CTF generated by GNU ld, via the ctf_cuname of the per-cu dict). Secondly, we add a new kind of CU mapping for cu-mapped (two-stage) links (as a reminder, these carry out a second stage of dedupping in which they squash specific CUs down to a named set of child dicts, fusing named inputs into particular named outputs: the kernel linker uses this to make child dicts that represent modules rather than translation units). You can now map any CU name to "" (the null string). This indicates that types that would land in the CU in question should not be emitted into any sort of per-module dict but should instead just be emitted into the shared dict, possibly being marked conflicting as they do so. The usual popcount mechanism will be used to pick the type which is left unhidden. The usual forwarding stubs you would expect to find for conflicting structs and unions will not be emitted: instead, real structs and unions will take their place. Consumers must take care when chasing parent types that point to tagged structs to make sure that there isn't a correspondingly-named struct in the child they're looking at (but this is generally a problem with type chasing in children anyway, which I have a TODO open to find some sort of solution to: this should be being done automatically, and isn't).
Diffstat (limited to 'libctf/ctf-intl.h')
0 files changed, 0 insertions, 0 deletions