From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from isrv.corpit.ru (isrv.corpit.ru [86.62.121.231]) by sourceware.org (Postfix) with ESMTPS id E28203858D28 for ; Sat, 26 Mar 2022 14:56:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E28203858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tls.msk.ru Authentication-Results: sourceware.org; spf=none smtp.mailfrom=tls.msk.ru Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id DA11F409C4; Sat, 26 Mar 2022 17:56:26 +0300 (MSK) Received: from [192.168.177.130] (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with ESMTP id 3DF8836F; Sat, 26 Mar 2022 17:52:39 +0300 (MSK) Message-ID: <75a1eb80-1f4d-5b7e-b9fd-18acfcc1daf0@msgid.tls.msk.ru> Date: Sat, 26 Mar 2022 17:56:24 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: puzzling ld behavior, failing to find symbols from .so after adding more .o file Content-Language: en-US To: Andrew Bell Cc: Binutils References: From: Michael Tokarev In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2022 14:56:28 -0000 26.03.2022 01:43, Andrew Bell wrote: > On Fri, Mar 25, 2022 at 4:16 PM Michael Tokarev > wrote: > > Hi! > > I've got a puzzling issue here which I need help with, > at least some pointers as of where to dig. > > ...deleted... > > I'm quite lost here. The question is: why after ecountering dbwrap_ctdb.o, > ld stops finding symbols in shared libraries which it were finding before, > but still being able to find symbols in static libs?  How to debug this, > maybe to make a test case? > > There is certainly the LD_DEBUG environment variable. Hm. LD_DEBUG seems to be something about ld.so (the runtime linker), not ld (the build-time linker). If I set LD_DEBUG when invoking ld, it will print how *ld* symbols are resolved, not how ld resolves symbols in the executable being build. Or am I wrong? Thank you! /mjt