aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'libctf/ctf-impl.h')
-rw-r--r--libctf/ctf-impl.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h
index 214f265..5a6b081 100644
--- a/libctf/ctf-impl.h
+++ b/libctf/ctf-impl.h
@@ -313,6 +313,17 @@ typedef struct ctf_dedup
pair identifying the corresponding datasec row. */
ctf_dynhash_t *cd_var_datasec;
+ /* Maps the type hash values of things with linkages (vars, functions) to the
+ intended final linkage of that type, accumulated from all types with that
+ ID across all inputs (so far). Subject to hash replacement (see below). */
+ ctf_dynhash_t *cd_linkages;
+
+ /* Maps from the type hash values of hashes that should be considered
+ "replaced" with the hash values that replace them. Used to merge types
+ together at conflict-marking and emission time. Only works for some type
+ kinds: right now, CTF_K_VAR. */
+ ctf_dynhash_t *cd_replacing_hashes;
+
/* Maps type hash values to a set of hash values of the types that cite them:
i.e., pointing backwards up the type graph. Used for recursive conflict
marking. Citations from tagged structures, unions, and forwards do not
@@ -432,12 +443,14 @@ struct ctf_dict
uint32_t *ctf_sxlate; /* Translation table for unindexed symtypetab
entries. */
unsigned long ctf_nsyms; /* Number of entries in symtab xlate table. */
- uint32_t *ctf_txlate; /* Translation table for type IDs. */
+ ctf_type_t **ctf_txlate; /* Translation table for type IDs. */
uint32_t *ctf_ptrtab; /* Translation table for pointer-to lookups. */
size_t ctf_ptrtab_len; /* Num types storable in ptrtab currently. */
uint32_t *ctf_pptrtab; /* Parent types pointed to by child dicts. */
size_t ctf_pptrtab_len; /* Num types storable in pptrtab currently. */
uint32_t ctf_pptrtab_typemax; /* Max child type when pptrtab last updated. */
+ ctf_type_t *ctf_void_type; /* void type, if dynamically constructed. (More
+ space allocated, due to vlen.) */
ctf_dynset_t *ctf_conflicting_enums; /* Tracks enum constants that conflict. */
uint32_t *ctf_funcidx_names; /* Name of each function symbol in symtypetab
(if indexed). */
@@ -566,7 +579,11 @@ typedef struct ctf_next_hkv
struct ctf_next
{
void (*ctn_iter_fun) (void);
- ctf_id_t ctn_type;
+ union
+ {
+ ctf_id_t ctn_type;
+ ctf_id_t ctn_idx;
+ } i;
size_t ctn_size;
ssize_t ctn_increment;
const ctf_type_t *ctn_tp;
@@ -619,7 +636,7 @@ extern ctf_id_t ctf_index_to_type (const ctf_dict_t *, uint32_t);
#define LCTF_INDEX_TO_TYPEPTR(fp, i) \
((i > fp->ctf_stypes) ? \
ctf_dtd_lookup (fp, ctf_index_to_type (fp, i))->dtd_data : \
- (ctf_type_t *)((uintptr_t)(fp)->ctf_buf + (fp)->ctf_txlate[(i)]))
+ (fp)->ctf_txlate[(i)])
/* The non *INFO variants of these macros acquire the relevant info from the
suffixed type, if the type is prefixed. (Internally to libctf, all types
@@ -828,6 +845,7 @@ extern char *ctf_str_append (char *, const char *);
extern char *ctf_str_append_noerr (char *, const char *);
extern ctf_id_t ctf_type_resolve_unsliced (ctf_dict_t *, ctf_id_t);
+extern ctf_id_t ctf_type_resolve_unrepresentable (ctf_dict_t *, ctf_id_t, int allow_zero);
extern int ctf_type_kind_unsliced (ctf_dict_t *, ctf_id_t);
extern int ctf_type_kind_unsliced_tp (ctf_dict_t *, const ctf_type_t *);
extern int ctf_type_kind_tp (ctf_dict_t *, const ctf_type_t *);