aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2021-03-02 15:10:05 +0000
committerNick Alcock <nick.alcock@oracle.com>2021-03-02 15:10:05 +0000
commit8915c559d40186064d0be75229f9b4e5ac649b16 (patch)
tree1e64aa681aafe4ec0deaa22ce1362cf6db2d4aff /include
parentfd12633780a9f5a5541e0999749c67b562ee9a16 (diff)
downloadgdb-8915c559d40186064d0be75229f9b4e5ac649b16.zip
gdb-8915c559d40186064d0be75229f9b4e5ac649b16.tar.gz
gdb-8915c559d40186064d0be75229f9b4e5ac649b16.tar.bz2
libctf, include: remove the nondeduplicating CTF linker
The nondeduplicating CTF linker was kept around when the deduplicating one was added so that people had something to fall back to in case the deduplicating linker turned out to be buggy. It's now much more stable than the nondeduplicating linker, in addition to much faster, using much less memory and producing much better output. In addition, while libctf has a linker flag to invoke the nondeduplicating linker, ld does not expose it: the only way to turn it on within ld is an intentionally- undocumented environment variable. So we can remove it without any ABI or user-visibility concerns (the only thing we leave around is the CTF_LINK_NONDEDUP flag, which can easily be interpreted as "deduplicate less", though right now it does nothing). This lets us remove a lot of complexity associated with tracking filenames and CU names separately (something the deduplcating linker never bothered with, since the cunames are always reliable and ld never hands us useful filenames anyway) The biggest lacuna left behind is the ctf_type_mapping machinery, which slows down deduplicating links quite a lot. We can't just ditch it because ctf_add_type uses it: removing the slowdown from the deduplicating linker is a job for another commit. include/ChangeLog 2021-03-02 Nick Alcock <nick.alcock@oracle.com> * ctf-api.h (CTF_LINK_SHARE_DUPLICATED): Note that this might merely change how much deduplication is done. libctf/ChangeLog 2021-03-02 Nick Alcock <nick.alcock@oracle.com> * ctf-link.c (ctf_create_per_cu): Drop FILENAME now that it is always identical to CUNAME. (ctf_link_deduplicating_one_symtypetab): Adjust. (ctf_link_one_type): Remove. (ctf_link_one_input_archive_member): Likewise. (ctf_link_close_one_input_archive): Likewise. (ctf_link_one_input_archive): Likewise. (ctf_link): No longer call it. Drop CTF_LINK_NONDEDUP path. Improve header comment a bit (dicts, not files). Adjust ctf_create_per_cu call. (ctf_link_deduplicating_variables): Simplify. (ctf_link_in_member_cb_arg_t) <cu_name>: Remove. <in_input_cu_file>: Likewise. <in_fp_parent>: Likewise. <done_parent>: Likewise. (ctf_link_one_variable): Turn uses of in_file_name to in_cuname.
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog5
-rw-r--r--include/ctf-api.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index 16c14d9..d287b78 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2021-03-02 Nick Alcock <nick.alcock@oracle.com>
+
+ * ctf-api.h (CTF_LINK_SHARE_DUPLICATED): Note that this might
+ merely change how much deduplication is done.
+
2021-03-01 Alan Modra <amodra@gmail.com>
Fangrui Song <maskray@google.com>
diff --git a/include/ctf-api.h b/include/ctf-api.h
index ce764df..25dbe9e 100644
--- a/include/ctf-api.h
+++ b/include/ctf-api.h
@@ -94,7 +94,8 @@ typedef struct ctf_link_sym
/* Share only types that are used by multiple inputs. */
#define CTF_LINK_SHARE_DUPLICATED 0x1
-/* Do a nondeduplicating link. */
+/* Do a nondeduplicating link, or otherwise deduplicate "less hard", trading off
+ CTF output size for link time. */
#define CTF_LINK_NONDEDUP 0x2
/* Create empty outputs for all registered CU mappings even if no types are