aboutsummaryrefslogtreecommitdiff
path: root/libctf
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2020-06-05 22:52:41 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-07-22 18:02:19 +0100
commite3e8411bec4ef30d331d6185bd2650a3fc56ea09 (patch)
tree7c79ce6453f66ff3c446e0802b6ab73c617dc8e4 /libctf
parent0f0c11f7fc9f0ab6bd63fc5f8a4cee7367a81849 (diff)
downloadgdb-e3e8411bec4ef30d331d6185bd2650a3fc56ea09.zip
gdb-e3e8411bec4ef30d331d6185bd2650a3fc56ea09.tar.gz
gdb-e3e8411bec4ef30d331d6185bd2650a3fc56ea09.tar.bz2
libctf, link: add CTF_LINK_OMIT_VARIABLES_SECTION
This flag (not used anywhere yet) causes the variables section to be omitted from the output CTF dict. include/ * ctf-api.h (CTF_LINK_OMIT_VARIABLES_SECTION): New. libctf/ * ctf-link.c (ctf_link_one_input_archive_member): Check CTF_LINK_OMIT_VARIABLES_SECTION.
Diffstat (limited to 'libctf')
-rw-r--r--libctf/ChangeLog5
-rw-r--r--libctf/ctf-link.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 58eb2f6..4ec7442 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,5 +1,10 @@
2020-07-22 Nick Alcock <nick.alcock@oracle.com>
+ * ctf-link.c (ctf_link_one_input_archive_member): Check
+ CTF_LINK_OMIT_VARIABLES_SECTION.
+
+2020-07-22 Nick Alcock <nick.alcock@oracle.com>
+
* ctf-impl.h (ctf_type_id_key): New, the key in the
cd_id_to_file_t.
(ctf_dedup): New, core deduplicator state.
diff --git a/libctf/ctf-link.c b/libctf/ctf-link.c
index 886106c..043d6a2 100644
--- a/libctf/ctf-link.c
+++ b/libctf/ctf-link.c
@@ -685,7 +685,8 @@ ctf_link_one_input_archive_member (ctf_file_t *in_fp, const char *name, void *ar
arg->in_fp = in_fp;
if ((err = ctf_type_iter_all (in_fp, ctf_link_one_type, arg)) > -1)
- err = ctf_variable_iter (in_fp, ctf_link_one_variable, arg);
+ if (!(in_fp->ctf_link_flags & CTF_LINK_OMIT_VARIABLES_SECTION))
+ err = ctf_variable_iter (in_fp, ctf_link_one_variable, arg);
arg->in_input_cu_file = 0;