From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by sourceware.org (Postfix) with ESMTPS id 6308B3858C35 for ; Wed, 28 Feb 2024 00:32:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6308B3858C35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6308B3858C35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::f29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709080346; cv=none; b=q8ebLdOn5zSvetuKhR9UHbHs2V8Pp0lBq8d9h612YLno456PR0ZqEuEkSx+A/ECEXvD53MjdRdYVQGiYHuXrj/AESP5yixyHBVuNWvvFnLoG0LJNx1emJ4xBRleSJVftxohD8DJ3o6pSFJiekJhD9hTcunT0FvVHjtV3LdwAQpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709080346; c=relaxed/simple; bh=/L34wxdnYh+l43+LwIgFjcvPT9DNR9GXcR5yPdTl020=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=UgF+q9Md+enzTdDj7vPGkEqluAMBHz/7+cixgedHMs9qZT8xwP4VQyGL6gT1ehBGSYFINQp3o8bmA9118590Oz2z/jKGRZvh4LSgI+iWbNigLS4X1VA2fIh4mLL7q39d1u4ELYDcc6BqUbmsb6jNqOkS/d8c8oWdvyvA6lE1qYY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-68f74fb38a8so19721856d6.3 for ; Tue, 27 Feb 2024 16:32:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709080343; x=1709685143; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7zhpknpM5YmnmYiHK3Vojmou6+jYzM2yEQnYNPJWWN0=; b=ShrVQwtMDWk7TRL5C9dRMWGbKhmbz1Fyw7kSLoKSuMjEkpWLeDmGDcRnJRYw6RWGp8 TuWiA2eoFMCXDnd1kFrkgQQkq77wnuamuQ1ZRozk/FPA7dVRWPnB3Dky5kPwDTd95dF6 t6OIdhaMeYty+nqVfkF5wr3mjwiQuDfSp/4/WYpzq9PyaHooow5eaN9Ul5OTqqHBkJ+n Vivlk3HqyuKT1rAh7QkZt5F8bsoUDz7qeCjhsjwZt3lSuQsgnR6kGrT2FWpyWMirwqP1 C6Cq2pqWr21NaAGkdP56bpwaIWjDjOXOXo1Mteb0UFtGgoFpgHukHKZdMbxwtKaVIvlq FbUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709080343; x=1709685143; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7zhpknpM5YmnmYiHK3Vojmou6+jYzM2yEQnYNPJWWN0=; b=SXAPxm8tbGB7K0/D24JIl1bCSTdsdHafmCM/eWYGYflaOUOQTq3BSRhJ7oivEjrCQO SdKLzCD8fOackVoOhPUJYtWFpZVgHCibsa6D0ecVMUJAkun1JdXAPOURAqBnnVHsHRMY 7eS911qZqGJrFqAHY1fsU3vbw1X9CJeUh1FasDm9y1JWDQymWYsW/pYWBuy20Ak9R4P3 yY5cJSat0WAaVq8F1TMjGCJjuewFZWzUHrA1kEPcSwZGf+13JmYpQeX/yRlV7n6lB8a0 UAKD+qQl9LreJWsWgiXBicmrxwT1q6YsMuoycpnHTZY5IIxxy1gLxrwWG7/dZz8jQBDZ tarA== X-Gm-Message-State: AOJu0YwmMq9ypsP2h6pPJOJNrFxtEvaj6/Kr38Kt7kqajU0Io+Xwa7a8 vUqqHdQmG2+37idVnO/jyXl5ofB/A3MmoulIygEZWb73VCgKWfiO9J9BjTVp X-Google-Smtp-Source: AGHT+IFRn3NXC7nm5r5d3quvgR3AuXgu9KRbqdWdIo5F/q+wjAlxxEPfmaBPxP42YRrs0h5PW+Dz+A== X-Received: by 2002:a0c:de08:0:b0:68f:f74f:4fbe with SMTP id t8-20020a0cde08000000b0068ff74f4fbemr3530255qvk.52.1709080343598; Tue, 27 Feb 2024 16:32:23 -0800 (PST) Received: from ?IPV6:2602:47:d95e:101:30df:e32b:e8d8:bce8? ([2602:47:d95e:101:30df:e32b:e8d8:bce8]) by smtp.gmail.com with ESMTPSA id a10-20020a0c8bca000000b0068fda83f293sm4756154qvc.121.2024.02.27.16.32.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Feb 2024 16:32:23 -0800 (PST) Message-ID: Date: Tue, 27 Feb 2024 19:32:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [binutils] libctf: Remove undefined functions from ver. map Content-Language: en-US To: Nick Alcock , Sam James Cc: binutils References: <87bk828z6q.fsf@gentoo.org> <877ciqvtgi.fsf@esperi.org.uk> From: Nicholas Vinson In-Reply-To: <877ciqvtgi.fsf@esperi.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2/27/24 10:05, Nick Alcock wrote: > On 27 Feb 2024, Sam James said: > >> Nicholas Vinson writes: >> >>> The functions ctf_label_set(), ctf_label_get(), ctf_arc_open(), ctf_fdopen(), >>> ctf_open(), ctf_bfdopen(), and ctf_bfdopen_ctfsect() are not defined. Their >>> inclusion in libctf/libctf.ver causes clang/llvm LTO optimizatiosn to fail with >>> error messages similar to > > This is definitely not right. They *are* defined, but only for some > libraries built from this version script. You can't just take them out. > Could you point me to the definitions for ctf_label_set() and ctf_label_get() ? Using `git log -G` I found the declarations, but no definitions, in the following commits: 139633c307eb6f5746ea04f94a0b6382e51bccb9 0b11474080800192797236e30857a42818f5560d 87279e3cef5b2c54f4a01962cf9dcea38664a336 6dbf2b734063522b4f3d7403ce7a2b436802b839 I do find definitions for the other so the other symbols, so I'll find a different way to handle those symbols in the version file. >>> Fixes Gentoo bug 914640 (https://bugs.gentoo.org/914640) >>> >>> Signed-off-by: Nicholas Vinson >>> --- >>> libctf/libctf.ver | 8 -------- >>> 1 file changed, 8 deletions(-) >> >> [CCing a possible reviewer.] >> >>> >>> diff --git a/libctf/libctf.ver b/libctf/libctf.ver >>> index 0ff825d033b..08e1b27341f 100644 >>> --- a/libctf/libctf.ver >>> +++ b/libctf/libctf.ver >>> @@ -80,9 +80,6 @@ LIBCTF_1.0 { >>> ctf_enum_name; >>> ctf_enum_value; >>> >>> - ctf_label_set; >>> - ctf_label_get; >>> - >>> ctf_label_topmost; >>> ctf_label_info; >> >> Can you explain each of these? Were they ever in binutils/libctf >> (possible typos) or did they get removed? > > The ctf_label things are historical artifacts from the Solaris days used > by their old stabs-based deduplicator. Some of the code remains, and I > have hopes of repurposing much of it and the unused CTF file format > section for a better way of encoding child dicts with conflicting types > in them in the future, but ctf_label_{set,get} appear to have been > nonexistent for as long as I've had anything to do with libctf. They > should be removed from ctf-api.h too. > >>> >>> @@ -139,7 +136,6 @@ LIBCTF_1.0 { >>> >>> ctf_arc_write; >>> ctf_arc_write_fd; >>> - ctf_arc_open; >>> ctf_arc_bufopen; >>> ctf_arc_close; >>> ctf_arc_open_by_name; >>> @@ -165,10 +161,6 @@ LIBCTF_1.0 { >>> ctf_link_shuffle_syms; >>> ctf_link_write; >>> >>> - ctf_fdopen; /* libctf only. */ >>> - ctf_open; /* libctf only. */ >>> - ctf_bfdopen; /* libctf only. */ >>> - ctf_bfdopen_ctfsect; /* libctf only. */ >>> local: >>> *; >>> }; > > These are definitely used, and exist -- as the comments note, some of > them exist only in libctf.so, not in libctf-nobfd.so. > > lld is not the first linker to complain about missing symbols: recent > Solaris linkers do as well, so we arranged to mark such symbols as > /* libctf only. */ so that they can be removed from the version script > used to link ctf-nobfd.so (see libctf/configure.ac for the code that > does that). But here too we have a bug: ctf_arc_open is in > ctf-open-bfd.c, thus is not found in libctf-nobfd.so: it should be at > the end of the version script like all other such symbols and marked as > /* libctf only. */ as well. > I'll take a look. Thanks, Nicholas Vinson