binutils-gdb/ld/testsuite/ld-ctf
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
..
A-2.c
A.c
array-char.c
array-int.c
array.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
B-2.c
B.c
C-2.c
C.c
child-float.c
child-int.c
conflicting-cycle-1.B-1.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-1.B-2.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-1.parent.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-2.A-1.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-2.A-2.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-2.parent.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-3.C-1.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-3.C-2.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-cycle-3.parent.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-enums.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
conflicting-typedefs.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
cross-tu-1.c
cross-tu-2.c
cross-tu-conflicting-2.c
cross-tu-cyclic-1.c
cross-tu-cyclic-2.c
cross-tu-cyclic-3.c
cross-tu-cyclic-4.c
cross-tu-cyclic-conflicting.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
cross-tu-cyclic-nonconflicting.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
cross-tu-into-cycle.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
cross-tu-noncyclic.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
ctf.exp Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
cycle-1.c
cycle-1.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
cycle-2.A.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
cycle-2.B.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
cycle-2.C.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
data-func-1.c ld, ctf: new and adjusted CTF tests due to func info / object data sections 2020-11-20 13:34:10 +00:00
data-func-2.c libctf, ld: fix data symbol test with newer GCC 2021-01-19 12:45:18 +00:00
data-func-conflicted.d libctf, ld: fix data symbol test with newer GCC 2021-01-19 12:45:18 +00:00
diag-ctf-version-0.d
diag-ctf-version-0.s
diag-ctf-version-2-unsupported-feature.d
diag-ctf-version-2-unsupported-feature.s
diag-ctf-version-f.d binutils, ld: dequote libctf error messages 2020-08-27 13:16:39 +01:00
diag-ctf-version-f.s
diag-cttname-invalid.d binutils, ld: dequote libctf error messages 2020-08-27 13:16:39 +01:00
diag-cttname-invalid.s
diag-cttname-null.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
diag-cttname-null.s
diag-cuname.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
diag-cuname.s
diag-decompression-failure.d binutils, ld: dequote libctf error messages 2020-08-27 13:16:39 +01:00
diag-decompression-failure.s
diag-parlabel.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
diag-parlabel.s
diag-parname.d binutils, ld: dequote libctf error messages 2020-08-27 13:16:39 +01:00
diag-parname.s
diag-unsupported-flag.d binutils, ld: dequote libctf error messages 2020-08-27 13:16:39 +01:00
diag-unsupported-flag.s
diag-wrong-magic-number-mixed.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
diag-wrong-magic-number.d binutils, ld: dequote libctf error messages 2020-08-27 13:16:39 +01:00
diag-wrong-magic-number.s
enum-2.c
enum-forward.c libctf, ld: fix formatting of forwards to unions and enums 2021-01-05 14:53:40 +00:00
enum-forward.d libctf, ld: fix formatting of forwards to unions and enums 2021-01-05 14:53:40 +00:00
enum.c
enums.c libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
enums.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
forward.c libctf, ld: prohibit getting the size or alignment of forwards 2021-01-05 14:53:39 +00:00
forward.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
function.c
function.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
slice.c libctf: support encodings for enums 2021-03-18 12:40:41 +00:00
slice.d libctf: support encodings for enums 2021-03-18 12:40:41 +00:00
super-sub-cycles.c
super-sub-cycles.d libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
typedef-int.c
typedef-long.c
union-1.c