From 5dba6f05b7ba3d0e1c99da54592815564c782b39 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Fri, 5 Jun 2020 23:18:06 +0100 Subject: ld: new options --ctf-variables and --ctf-share-types libctf recently changed to make it possible to not emit the CTF variables section. Make this the default for ld: the variables section is a simple name -> type mapping, and the names can be quite voluminous. Nothing in the variables section appears in the symbol table, by definition, so GDB cannot make use of them: special-purpose projects that implement their own analogues of symbol table lookup can do so, but they'll need to tell the linker to emit the variables section after all. The new --ctf-variables option does this. The --ctf-share-types option (valid values "share-duplicated" and "share-unconflicted") allow the caller to specify the CTF link mode. Most users will want share-duplicated, since it allows for more convenient debugging: but very large projects composed of many decoupled components may want to use share-unconflicted mode, which places types that appear in only one TU into per-TU dicts. (They may also want to relink the CTF using the ctf_link API and cu-mapping, to make their "components" larger than a single TU. Right now the linker does not expose the CU-mapping machinery. Perhaps it should in future to make this use case easier.) For now, giving the linker the ability to emit share-duplicated CTF lets us add testcases for that mode to the testsuite. ld/ * ldlex.h (option_values) : New. * ld.h (ld_config_type) : New fields. * ldlang.c (lang_merge_ctf): Use them. * lexsup.c (ld_options): Add ctf-variables, no-ctf-variables, ctf-share-types. (parse_args) : New cases. * ld.texi: Document new options. * NEWS: Likewise. --- ld/NEWS | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ld/NEWS') diff --git a/ld/NEWS b/ld/NEWS index eb2cff1..0fea911 100644 --- a/ld/NEWS +++ b/ld/NEWS @@ -1,5 +1,15 @@ -*- text -*- +* The linker now deduplicates the types in .ctf sections. The new + command-line option --ctf-share-types describes how to do this: + its default value, share-unconflicted, produces the most compact + output. + +* The linker now omits the "variable section" from .ctf sections by + default, saving space. This is almost certainly what you want + unless you are working on a project that has its own analogue + of symbol tables that are not reflected in the ELF symtabs. + Changes in 2.35: * X86 NaCl target support is removed. -- cgit v1.1