binutils-gdb/libctf
Nick Alcock 69a284867c libctf: support encodings for enums
The previous commit started to error-check the lookup of
ctf_type_encoding for the underlying type that is internally done when
carrying out a ctf_type_encoding on a slice.

Unfortunately, enums have no encoding, so this has historically been
returning an error (which is ignored) and then populating the cte_format
with uninitialized data.  Now the error is not ignored, this is
returning an error, which breaks linking of CTF containing bitfields of
enumerated type.

CTF format v3 does not record the actual underlying type of a enum, but
we can mock up something that is not *too* wrong, and that is at any
rate better than uninitialized data.

ld/ChangeLog
2021-03-18  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/ld-ctf/slice.c: Check slices of enums too.
	* testsuite/ld-ctf/slice.d: Results adjusted.

libctf/ChangeLog
2021-03-18  Nick Alcock  <nick.alcock@oracle.com>

	* ctf-types.c (ctf_type_encoding): Support, after a fashion, for enums.
	* ctf-dump.c (ctf_dump_format_type): Do not report enums' degenerate
	encoding.
2021-03-18 12:40:41 +00:00
..
testsuite libctf: eliminate dtd_u, part 5: structs / unions 2021-03-18 12:40:40 +00:00
.gitignore
aclocal.m4
ChangeLog libctf: support encodings for enums 2021-03-18 12:40:41 +00:00
ChangeLog-2020
config.h.in
configure
configure.ac
ctf-archive.c libctf: fix GNU style for do {} while 2021-03-18 12:37:55 +00:00
ctf-create.c libctf: eliminate dtd_u, part 5: structs / unions 2021-03-18 12:40:40 +00:00
ctf-decl.c
ctf-decls.h
ctf-dedup.c libctf: a couple of small error-handling fixes 2021-03-18 12:40:41 +00:00
ctf-dump.c libctf: support encodings for enums 2021-03-18 12:40:41 +00:00
ctf-endian.h
ctf-error.c
ctf-hash.c libctf: do not corrupt strings across ctf_serialize 2021-03-18 12:40:40 +00:00
ctf-impl.h libctf: types: unify code dealing with small-vs-large struct members 2021-03-18 12:40:41 +00:00
ctf-inlines.h
ctf-intl.h
ctf-labels.c
ctf-link.c libctf: fix some tabdamage and move some code around 2021-03-18 12:37:52 +00:00
ctf-lookup.c libctf: fix GNU style for do {} while 2021-03-18 12:37:55 +00:00
ctf-open-bfd.c
ctf-open.c libctf: a couple of small error-handling fixes 2021-03-18 12:40:41 +00:00
ctf-qsort_r.c
ctf-serialize.c libctf: eliminate dtd_u, part 5: structs / unions 2021-03-18 12:40:40 +00:00
ctf-sha1.c
ctf-sha1.h
ctf-string.c libctf: eliminate dtd_u, part 4: enums 2021-03-18 12:40:40 +00:00
ctf-subr.c
ctf-types.c libctf: support encodings for enums 2021-03-18 12:40:41 +00:00
ctf-util.c
elf.h
libctf.ver
Makefile.am libctf: split serialization and file writeout into its own file 2021-03-18 12:37:53 +00:00
Makefile.in libctf: split serialization and file writeout into its own file 2021-03-18 12:37:53 +00:00
NEWS
swap.h libctf: fix GNU style for do {} while 2021-03-18 12:37:55 +00:00