From 81982d20fac4ae6981097a2d609093e8698fd179 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Thu, 18 Mar 2021 12:37:52 +0000 Subject: libctf: eliminate dtd_u, part 3: functions One more member vanishes from the dtd_u, leaving only the member for struct/union/enum members. There's not much to do here, since as of commit afd78bd6f0a30ba5 we use the same representation (type sizes, etc) in the dtu_argv as we will use in the final vlen, with one exception: the vlen has alignment padding, and the dtu_argv did not. Simplify things by adding suitable padding in both cases. libctf/ChangeLog 2021-03-18 Nick Alcock * ctf-impl.h (ctf_dtdef_t) : Remove. * ctf-create.c (ctf_dtd_delete): No longer free it. (ctf_add_function): Use the dtd_vlen, not dtu_argv. Properly align. * ctf-serialize.c (ctf_emit_type_sect): Just copy the dtd_vlen. * ctf-types.c (ctf_func_type_info): Just use the vlen. (ctf_func_type_args): Likewise. --- libctf/ctf-impl.h | 1 - 1 file changed, 1 deletion(-) (limited to 'libctf/ctf-impl.h') diff --git a/libctf/ctf-impl.h b/libctf/ctf-impl.h index c1ce50b..7a4e418 100644 --- a/libctf/ctf-impl.h +++ b/libctf/ctf-impl.h @@ -196,7 +196,6 @@ typedef struct ctf_dtdef union { ctf_list_t dtu_members; /* struct, union, or enum */ - uint32_t *dtu_argv; /* function */ } dtd_u; } ctf_dtdef_t; -- cgit v1.1