binutils-gdb/libctf
Nick Alcock 0e28ade476 libctf, ld: properly deduplicate function types
Some type kinds in CTF (functions, arrays, pointers, slices, and
cvr-quals) are intrinsically nameless: the ctt_name field in the CTF
is always zero, and the libctf API provides no way to set a name.
But the compiler can and does sometimes set names for some of these
kinds: in particular, the name it sets on CTF_K_FUNCTION types is the
means it uses to force the name of the function into the string table
so that it can point at it from the function info section.

So null out the name at hashing time so that the deduplicator can
correctly detect that e.g. function types identical but for name should
be considered truly identical, since they will not have a name when the
deduplicator re-emits them into the output.

ld/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/ld-ctf/data-func-conflicted.d: Shrink the expected
	size of the type section now that function types are being
	deduplicated properly.

libctf/ChangeLog
2020-11-20  Nick Alcock  <nick.alcock@oracle.com>

	* ctf-dedup.c (ctf_dedup_rhash_type): Null out the names of nameless
	type kinds, just in case the input has named them.
2020-11-20 13:34:10 +00:00
..
.gitignore libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
aclocal.m4 libctf, dedup: add new configure option --enable-libctf-hash-debugging 2020-07-22 18:02:19 +01:00
ChangeLog libctf, ld: properly deduplicate function types 2020-11-20 13:34:10 +00:00
config.h.in libctf, dedup: add deduplicator 2020-07-22 18:02:19 +01:00
configure libctf, binutils: initial work towards libctf gettextization 2020-08-27 13:14:10 +01:00
configure.ac libctf, binutils: initial work towards libctf gettextization 2020-08-27 13:14:10 +01:00
ctf-archive.c bfd, include, ld, binutils, libctf: CTF should use the dynstr/sym 2020-11-20 13:34:07 +00:00
ctf-create.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-decl.c libctf, include, binutils, gdb, ld: rename ctf_file_t to ctf_dict_t 2020-11-20 13:34:04 +00:00
ctf-decls.h libctf, dedup: add deduplicator 2020-07-22 18:02:19 +01:00
ctf-dedup.c libctf, ld: properly deduplicate function types 2020-11-20 13:34:10 +00:00
ctf-dump.c libctf: adjust dumper for symtypetab changes 2020-11-20 13:34:09 +00:00
ctf-endian.h
ctf-error.c libctf, include, binutils, gdb, ld: rename ctf_file_t to ctf_dict_t 2020-11-20 13:34:04 +00:00
ctf-hash.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-impl.h libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-inlines.h libctf, include, binutils, gdb, ld: rename ctf_file_t to ctf_dict_t 2020-11-20 13:34:04 +00:00
ctf-intl.h libctf, binutils: initial work towards libctf gettextization 2020-08-27 13:14:10 +01:00
ctf-labels.c libctf, include, binutils, gdb, ld: rename ctf_file_t to ctf_dict_t 2020-11-20 13:34:04 +00:00
ctf-link.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-lookup.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-open-bfd.c bfd, include, ld, binutils, libctf: CTF should use the dynstr/sym 2020-11-20 13:34:07 +00:00
ctf-open.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-qsort_r.c
ctf-sha1.c libctf: add SHA-1 support for libctf 2020-07-22 18:02:18 +01:00
ctf-sha1.h libctf: add SHA-1 support for libctf 2020-07-22 18:02:18 +01:00
ctf-string.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-subr.c libctf, include, binutils, gdb, ld: rename ctf_file_t to ctf_dict_t 2020-11-20 13:34:04 +00:00
ctf-types.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
ctf-util.c libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
elf.h
libctf.ver libctf: symbol type linking support 2020-11-20 13:34:08 +00:00
Makefile.am Remove libctf/mkerrors.sed 2020-10-21 11:52:17 -06:00
Makefile.in Remove libctf/mkerrors.sed 2020-10-21 11:52:17 -06:00
swap.h libctf, elfcpp, gold: do not assume that <byteswap.h> contains bswap_* 2020-06-26 15:56:39 +01:00