binutils-gdb/libctf
Bruce McCulloch 2af278f123 libctf: remove CTF_F_ARRNELEMS flag
This patch removes the constraint that a CTF_F_ARRNELEMS flag has to be
present in order to reverse the elements of an array when dumping. The
flag was never added to GCC, and having this requirement causes more
problems than it solves. A quick recap of the issue:

Given an array int foo[1][2][3], the expected graph is:
int foo[1][2][3] -> int foo[2][3] -> int foo[3] -> int foo

Prior to GCC PR114186, the emitted graph would be:
int foo[1][2][3] -> int foo[1][2] -> int foo[1] -> int foo

Following GCC PR114186, before the libctf fix, the output was:
int foo[3][2][1] -> int foo[3][2] -> int foo[3] -> int foo
So the underlying type graph was correct, but the ordering of elements
was incorrect.

With this fix, we emit correct ordering of the type graph, with no
requirements for the compiler to signal that it has GCC PR114186.

include/
	* ctf.h (CTF_F_ARRNELEMS): Delete.
	(CTF_F_MAX): Adjust.

libctf/
	* ctf-decl.c (ctf_decl_push): Act as if CTF_F_ARRNELEMS is
	always set.
	* ctf-dump.c (ctf_dump_header): No longer dump its value.
	* testsuite/libctf-lookup/multidim-array.c: No longer detect
	compilers not emitting this flag (none do).
2026-02-27 15:06:41 +00:00
..
doc Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
testsuite libctf: remove CTF_F_ARRNELEMS flag 2026-02-27 15:06:41 +00:00
.gitignore libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
aclocal.m4 Binutils: Add clang LTO support to AR and RANLIB 2025-09-25 12:30:13 +08:00
ChangeLog Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ChangeLog-2020 libctf: fix old ChangeLog typo 2021-01-05 14:53:40 +00:00
config.h.in libctf: suppress spurious failure of malloc-counting tests under valgrind 2024-06-18 13:20:32 +01:00
configure tidy m4 plugin config support 2025-11-03 10:59:50 +10:30
configure.ac Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-archive.c libctf: allow ctf_arc_bufpreamble to fail 2026-02-27 15:06:39 +00:00
ctf-create.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-decl.c libctf: remove CTF_F_ARRNELEMS flag 2026-02-27 15:06:41 +00:00
ctf-decls.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-dedup.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-dump.c libctf: remove CTF_F_ARRNELEMS flag 2026-02-27 15:06:41 +00:00
ctf-endian.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-error.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-hash.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-impl.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-inlines.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-intl.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-labels.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-link.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-lookup.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-open-bfd.c libctf: allow ctf_arc_bufpreamble to fail 2026-02-27 15:06:39 +00:00
ctf-open.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-qsort_r.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-serialize.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-sha1.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-sha1.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-string.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-subr.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-types.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
ctf-util.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
elf.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
libctf.ver Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
Makefile.am Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
Makefile.in Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
NEWS include, libctf, ld: extend variable section to contain functions too 2022-03-23 13:48:32 +00:00
swap.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30