binutils-gdb/ld/testsuite/ld-ctf
Nick Alcock ae064303ef libctf, ld: fix test results for upstream GCC
The tests currently in binutils are aimed at the original GCC-based
implementation of CTF, which emitted CTF directly from GCC's internal
representation.  The approach now under review emits CTF from DWARF,
with an eye to eventually doing this for all non-DWARF debuginfo-like
formats GCC supports.  It also uses a different flag to enable
CTF emission (-gctf rather than -gt).

Adjust the testsuite accordingly.

Given that the ld testsuite results are dependent on type ordering,
which we do not guarantee at all, it's amazing how little changes. We
see a few type ordering differences, slices change because the old GCC
was buggy (slices were emitted "backwards", from the wrong end of the
machine word) and its expected results were wrong, and GCC now emits the
underlying integral type for enumerated types, though CTF has no way to
record this yet (coming in v4).

GCC also now emits even hidden symbols into the symtab (and thus
symtypetab), so one symtypetab test changes its expected results
slightly to compensate.

Also add tests for the CTF_K_UNKNOWN nonrepresentable type: this
couldn't be done before now since the only GCC that emits CTF_K_UNKNOWN
for nonrepresentable types is the new one.

ld/ChangeLog
2021-05-06  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/ld-ctf/ctf.exp: Use -gctf, not -gt.
	* testsuite/lib/ld-lib.exp: Likewise.
	* testsuite/ld-ctf/nonrepresentable-1.c: New test for nonrepresentable types.
	* testsuite/ld-ctf/nonrepresentable-2.c: Likewise.
	* testsuite/ld-ctf/nonrepresentable.d: Likewise.
	* testsuite/ld-ctf/array.d: Larger type section.
	* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
	* testsuite/ld-ctf/enums.d: Likewise.
	* testsuite/ld-ctf/conflicting-enums.d: Don't compare types.
	* testsuite/ld-ctf/cross-tu-cyclic-conflicting.d: Changed type order.
	* testsuite/ld-ctf/cross-tu-noncyclic.d: Likewise.
	* testsuite/ld-ctf/slice.d: Adjust for improved slice emission.

libctf/ChangeLog
2021-05-06  Nick Alcock  <nick.alcock@oracle.com>

	* testsuite/lib/ctf-lib.exp: Use -gctf, not -gt.
	* testsuite/libctf-regression/nonstatic-var-section-ld-r.lk:
	Hidden symbols now get into the symtypetab anyway.
2021-05-06 09:31:31 +01:00
..
A-2.c
A.c
array-char.c
array-int.c
array.d libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01: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: fix test results for upstream GCC 2021-05-06 09:31:31 +01: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: fix test results for upstream GCC 2021-05-06 09:31:31 +01: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: fix test results for upstream GCC 2021-05-06 09:31:31 +01:00
ctf.exp libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01:00
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
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 test results for upstream GCC 2021-05-06 09:31:31 +01: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
diag-ctf-version-f.s
diag-cttname-invalid.d
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
diag-decompression-failure.s
diag-parlabel.d ld: do not rely on the exact size of the CTF symtypetabs in test results 2021-03-25 16:32:53 +00:00
diag-parlabel.s
diag-parname.d
diag-parname.s
diag-unsupported-flag.d
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
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: fix test results for upstream GCC 2021-05-06 09:31:31 +01: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 ld: do not rely on the exact size of the CTF symtypetabs in test results 2021-03-25 16:32:53 +00:00
nonrepresentable-1.c libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01:00
nonrepresentable-2.c libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01:00
nonrepresentable.d libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01:00
slice.c libctf: support encodings for enums 2021-03-18 12:40:41 +00:00
slice.d libctf, ld: fix test results for upstream GCC 2021-05-06 09:31:31 +01: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