From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EB7E243884; Wed, 10 Jan 2024 17:58:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D6D804064C; Wed, 10 Jan 2024 17:58:17 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AF8084064C for ; Wed, 10 Jan 2024 17:58:15 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id DBC4220B3CC1; Wed, 10 Jan 2024 08:58:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com DBC4220B3CC1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1704905894; bh=YzjmrO5dPc/2OCX9gjjDGtLaYjdZfB9T3xjKHhzi6pw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D5PUI/L10hdmiLDpf/8MCZ9s7K4NOujtMsnWKj+BscwWSRMvq+y1gkEFVOHCVa4jg aj4QqoHWqo0zQGtVYPkY+3PFWnOopZnMV9DE8fhy2yzIDBYhe03vUcESlJh1pTkLpW n3YS+YT0N9OSC6E1/lV1FrNXU2foHz7VCG1CKRo0= Date: Wed, 10 Jan 2024 08:58:14 -0800 From: Tyler Retzlaff To: Bruce Richardson Cc: dev@dpdk.org Subject: Re: [PATCH] build: fix linker warnings about undefined symbols Message-ID: <20240110165814.GA25069@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240110150103.529080-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240110150103.529080-1-bruce.richardson@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Jan 10, 2024 at 03:01:03PM +0000, Bruce Richardson wrote: > The default behaviour of "ld.lld" has changed, so it now prints out > warnings about entries in the version.map file which don't exist in > the current build. Since we use our version.map file simply to filter > out the functions we don't want made public, we include in it all > functions across all OS's and builds that we want public if present. > This causes these ld warnings to be emitted, e.g. on BSD, which is > missing functionality found on Linux. For example: > > * hpet functions in EAL > * regexdev enqueue and dequeue burst > * eventdev event_timer functions > > Easiest solution, without major rework of how we use our version.map > files, and without dynamically generating them per-build, is to pass > the --undefined-version flag to the linker, to restore the old > behaviour. > > Signed-off-by: Bruce Richardson > --- Acked-by: Tyler Retzlaff i don't know if has ever been discussed but a way to achieve a similar outcome would be to introduce a visibility macro allowing the data and function symbols to be explicitly made visible while making the build default hidden. https://gcc.gnu.org/wiki/Visibility on windows symbols are hidden by default (opposite of gnu toolchain) and allowing the symbols that are intended to be public be annotated in code with a macro instead of a separate map/def file would arguably appear more consistent. additionally, the current process of converting a map file to a def file for windows has limitations with respect to things like marking the type of symbol being exported. ty