From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 4B8293858020 for ; Fri, 31 Mar 2023 07:18:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B8293858020 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3F28221A3B; Fri, 31 Mar 2023 07:18:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1680247091; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nQLUHc4aArnCwf/u5N+4j5Sr2vqyoF25H659VCaxnFM=; b=lAHWlaR4NmlrjEYCEZUAtYW626KRAWKpHIwjR8kWabWiRoJu8r0eEVCyYBdnqIqBFYAldE I9GsuQ5Kyba5XXOjRreq638gkDfQ1y/0GJKxDI+lXZZmoT9Hb7ieANgVe+XuosYUGjwW5M hXpDGkzZfhlotGypR1nkq9deQnw1NtA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1680247091; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nQLUHc4aArnCwf/u5N+4j5Sr2vqyoF25H659VCaxnFM=; b=DD+vC3d9TYPadWG340dPb/h+3NC0yFKCGcIyrEtivP0b2xaXYccsKex8fSL6932cw+jh5C dn5LBHsBgV7wJFAA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2F570134F7; Fri, 31 Mar 2023 07:18:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pXKVCjOJJmQ8cwAAMHmgww (envelope-from ); Fri, 31 Mar 2023 07:18:11 +0000 Message-ID: <43a92d49-9272-8ef3-9250-cabe487f72fa@suse.cz> Date: Fri, 31 Mar 2023 09:18:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [Bug binutils/30281] error: multiple definition of `pwrite@GLIBC_2.2'; on i586-linux-gnu To: Vladimir Mezentsev , "binutils@sourceware.org" References: <62d98d2e-05a9-0d84-3a1b-36a2b80388be@oracle.com> Content-Language: en-US From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <62d98d2e-05a9-0d84-3a1b-36a2b80388be@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP 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 3/29/23 18:43, Vladimir Mezentsev via Binutils wrote: > > > On 3/29/23 05:24, mliska at suse dot cz wrote: >> https://sourceware.org/bugzilla/show_bug.cgi?id=30281 >> >> Martin Liska changed: >> >>             What    |Removed                     |Added >> ---------------------------------------------------------------------------- >>                   CC|                            |hjl.tools at gmail dot com >>             Assignee|vladimir.mezentsev at oracle dot c |unassigned at sourceware dot org >>                     |om                          | >>               Status|ASSIGNED                    |NEW >>            Component|gprofng                     |binutils >> >> --- Comment #3 from Martin Liska --- >> Great, thank you Vladimir. I was able to isolate that and reduce it. It started >> with 20ea3acc727f3be6322dfbd881e506873535231d and it's regression since >> 20ea3acc727f3be6322dfbd881e506873535231d. >> >> $ cat iotrace.i >> extern __inline __attribute__((__gnu_inline__)) void open64(int, ...) {} >> int __attribute__((__symver__("open64@GLIBC_2.2"))) __collector_open64_2_2() {} >> void open64(int, ...) {} >> >> $ cat libgprofng.ver >> GLIBC_2.2 { >>    global: >>      open64; >> }; >> >> $ gcc iotrace.i -shared -fPIC -O2 -Wl,--version-script,libgprofng.ver >> -flto-partition=max -flto=auto -B ~/Programming/binutils/objdir/ld -fuse-ld=bfd >> /usr/bin/ld.bfd: /tmp/ccLS2iVj.ltrans1.ltrans.o: in function `open64': >> :(.text+0x0): multiple definition of `open64@GLIBC_2.2'; >> /tmp/ccLS2iVj.ltrans0.ltrans.o::(.text+0x0): first defined here >> collect2: error: ld returned 1 exit status >> >> while -fuse-ld=mold or -fuse-ld=lld works fine. gold is also affected. >> >> @H.J. Can you please take a look? >> Hello. (It seems the email hasn't reached bugzilla for some reason) > >  How do you configure a build to set  -fuse-ld=lld ? Build of binutils? You should be able to add (-fuse-ld=lld)to C{,CXX}FLAGS. > > On Ol9, a build is configured with the -flto option. How can I turn it off ? A build of binutils? Martin > > Thank you, > -Vladimir > >