binutils-gdb/libctf
Nick Alcock 4983bb052d
libctf: don't run tests requiring deduplicating linker unless one is in use
Before now, we were relying on gcc -B to repoint GCC at our freshly-built
linker, and assuming we could use this to run tests that do linker dedup.

This is, alas, not reliable (building --with-ld=/an/absolute/path bypasses
-B searches for the linker), and we would like the libctf tests in
particular to not fail if the compiler uses a linker that cannot deduplicate
(simply skipping such tests).

Add a new testsuite function that tries to link one of the lookup tests'
testcases (which is known to produce conflicting types, i.e. a dict with
per-translation-unit children) and then does an objdump and greps it for
signs of the per-translation-unit children.  If there are none, the linker
probably just concatenated the sections: i.e., it is not a linker that
can deduplicate CTF.

libctf/
	PR libctf/33162
	* testsuite/config/default.exp (objdump): Introduce.
	(OBJDUMPFLAGS): Likewise.
	* testsuite/lib/ctf-lib.exp (check_ctf_linker_dedup): New.
	* testsuite/libctf-lookup/lookup.exp: Use it.
	* testsuite/libctf-regression/libctf-repeat-cu.exp: Likewise.
	* testsuite/libctf-regression/regression.exp: Likewise.
2025-07-23 13:06:16 +01:00
..
doc libctf: doc: add __float128 and SIMD vector classification to spec. 2025-07-01 15:54:27 +01:00
testsuite libctf: don't run tests requiring deduplicating linker unless one is in use 2025-07-23 13:06:16 +01:00
.gitignore libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
aclocal.m4 mmap: Avoid the sanitizer configure check failure 2024-04-10 03:57:46 -07:00
ChangeLog Add markers for 2.45 branch 2025-07-13 08:35:45 +01:00
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 libctf: get libctf-nobfd.ver from the right place with Solaris ld 2025-07-23 13:06:12 +01:00
configure.ac libctf: get libctf-nobfd.ver from the right place with Solaris ld 2025-07-23 13:06:12 +01:00
ctf-archive.c libctf: archive, open: when opening, always set errp to something 2025-05-23 12:34:35 +01:00
ctf-create.c libctf: create: check the right root-visible flag when adding enumerands 2025-07-01 15:54:27 +01:00
ctf-decl.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-decls.h Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-dedup.c libctf, dedup: reclaim space wasted by duplicate hidden types 2025-06-04 12:51:28 +01:00
ctf-dump.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-endian.h Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-error.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-hash.c libctf: dedup: preserve non-root flag across normal links 2025-06-04 12:51:25 +01:00
ctf-impl.h libctf: use __attribute__((__gnu_printf__)) where appropriate 2025-06-04 12:51:29 +01:00
ctf-inlines.h Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-intl.h Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-labels.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-link.c libctf: dedup: preserve non-root flag across normal links 2025-06-04 12:51:25 +01:00
ctf-lookup.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-open-bfd.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-open.c libctf: archive, open: when opening, always set errp to something 2025-05-23 12:34:35 +01:00
ctf-qsort_r.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-serialize.c libctf: exclude always-emitted Solaris symbols from the symtypetab 2025-07-23 13:06:14 +01:00
ctf-sha1.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-sha1.h Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-string.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-subr.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
ctf-types.c libctf: fix cv-qualified unnamed struct/union field lookup 2025-02-28 14:16:42 +00:00
ctf-util.c Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
elf.h Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
libctf.ver Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
Makefile.am Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +10:30
Makefile.in Update year range in copyright notice of binutils files 2025-01-01 18:29:57 +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 2025-01-01 18:29:57 +10:30