Revert "libctf: fix linking of non-root-visible types"

This reverts commit 87b2f67310.

It is based on a misconception, that hidden types in the deduplicator
input should always be hidden in the output.  For cu-mapped links,
and final links following cu-mapped links, this is not true: we want
to hide inputs if they were conflicting on the output and no more.

We will reintroduce the testcase once a better fix is found.

libctf/
	PR libctf/33047
	* ctf-dedup.c (ctf_dedup_emit_type): Don't respect the nonroot flag.
	* testsuite/libctf-writable/ctf-nonroot-linking.c: Removed.
	* testsuite/libctf-writable/ctf-nonroot-linking.lk: Removed.
This commit is contained in:
Nick Alcock
2025-05-30 15:31:36 +01:00
parent 246fe7c335
commit 75e514cfa5
3 changed files with 2 additions and 132 deletions

View File

@@ -2639,7 +2639,7 @@ ctf_dedup_emit_type (const char *hval, ctf_dict_t *output, ctf_dict_t **inputs,
int input_num = CTF_DEDUP_GID_TO_INPUT (id);
int output_num = (uint32_t) -1; /* 'shared' */
int cu_mapped = *(int *)arg;
int isroot;
int isroot = 1;
int is_conflicting;
ctf_next_t *i = NULL;
@@ -2708,11 +2708,9 @@ ctf_dedup_emit_type (const char *hval, ctf_dict_t *output, ctf_dict_t **inputs,
}
name = ctf_strraw (real_input, tp->ctt_name);
isroot = LCTF_INFO_ISROOT (real_input, tp->ctt_info);
/* Hide conflicting types, if we were asked to: also hide if a type with this
name already exists and is not a forward, or if this type is hidden on the
input. */
name already exists and is not a forward. */
if (cu_mapped && is_conflicting)
isroot = 0;
else if (name