From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-2.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FSL_HELO_FAKE, MAILING_LIST_MULTI,PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_HI,RDNS_DYNAMIC, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 583551F8C6 for ; Wed, 28 Jul 2021 21:52:54 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E951C388F00C for ; Wed, 28 Jul 2021 21:52:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E951C388F00C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1627509172; bh=5RZF9DPHJJz0hkq9a02AnHEjUMJ+pEnAQ9OQ+FuNKT4=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=CiHG9fZpXYtE0gWRLlEDrmdhxlmpXDPR8iqf5aHzA37R/PhD//cf9m67jUNZskc/q 5vVlzfvH0/NOaLI9MBPlbjZXvn9feUyUnVSxmQO0/IIrtYyWVil3RE0qQSMTAC/f0o UolT4G0rPPsX/dQp6TJFTOsefwaAEMbbMvJdRZ9M= Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 60996383F423 for ; Wed, 28 Jul 2021 21:52:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 60996383F423 Received: by mail-pl1-x62a.google.com with SMTP id d17so4380405plh.10 for ; Wed, 28 Jul 2021 14:52:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5RZF9DPHJJz0hkq9a02AnHEjUMJ+pEnAQ9OQ+FuNKT4=; b=KhOGAJ77HiM4c2qZ2alheawGg8BLeijGQ382Ump95IX+ag2OlmTNr/h5SaImDqi6zO WPSGfwqsiCUS4dOve9+yCsc+zHCE/u7DMqK+M47vjA42YGQV9Axco5ZmS0gSc1JI1cRj ipUtX0LULUu6qfei1chpkm4YkSbHkplt+L5nqHAkMQqVmASycr2Me+SRtCIglGD9wJZg ocJP24hcovtwrzNVA265XraJH1l+LSs1cOTpYy8y1c17mCjJ8iX8YVM44XxPfITGEBcI WGGiKExmDxlghBlDPIq8jt1gs6lygrmA8s9lRHVfD+SEhL2MIduNi/e07dFMP+C5eDt5 09yQ== X-Gm-Message-State: AOAM532WMNcPEfZAfwAxaPwyRxjxDYyd6K2cMnw46zXdnCjPbVWajPmy 5pflaYHgiI1QHn9S5alVbJnMYg== X-Google-Smtp-Source: ABdhPJyuajDYVe9n3hUrI3DXqDF5z7G+WR50nKMYWc6yoP9VQAgdFngoNdVeGEwUBCRyOS3JQk+NAA== X-Received: by 2002:a65:4381:: with SMTP id m1mr899775pgp.115.1627509151673; Wed, 28 Jul 2021 14:52:31 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:d909:a67b:f0a0:a797]) by smtp.gmail.com with ESMTPSA id a22sm950719pfa.215.2021.07.28.14.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 14:52:31 -0700 (PDT) Date: Wed, 28 Jul 2021 14:52:27 -0700 To: "H.J. Lu" Subject: Re: [PATCH 0/3] Allow LLD 13.0.0 and improve compatibility with gold and clang Message-ID: <20210728215227.isyi523unti65q6e@google.com> References: <20210726035802.275992-1-maskray@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Fangrui Song via Libc-alpha Reply-To: Fangrui Song Cc: GNU C Library Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 2021-07-28, H.J. Lu wrote: >On Sun, Jul 25, 2021 at 8:58 PM Fangrui Song via Libc-alpha > wrote: >> >> The patches allow LLD 13.0.0 to build glibc. LLD's compatibility with >> GNU ld is generally better than gold's compatibility with GNU ld. >> >> The first two commits improve gold and clang compatibility as well. >> (There is still a long way for clang to build glibc.) >> >> About `make check` results: >> >> I can't configure glibc --enable-static-pie with gold, so I use >> --disable-static-pie with gold. >> >> * gold (--disable-static-pie) has 160 FAIL. >> * ld.bfd has 152 FAIL. >> * ld.lld has 159 FAIL. >> >> ## I have investigated a few failures. >> >> The tst-ifunc-isa-*.c failures are not ld.lld's fault. >> The lld linked tst-ifunc-isa-* work with LD_BIND_NOW=1. >> The tests happen to work with GNU ld because the IRELATIVE for foo_ifunc >> is placed after JUMP_SLOT in .repa.plt. The test needs to call >> __x86_get_cpuid_feature_leaf which is defined in a different TU. IMHO >> such ifunc does not guaranteed to work. >> >> For gmon/tst-gmon-gprof*, ld.lld linked tst-gmon-gprof has a f3 line, >> which appears more correct to me. But the test considers it a failure. >> >> % cat gmon/tst-gmon-gprof.out >> --- expected >> +++ actual >> @@ -1,2 +1,3 @@ >> f1 2000 >> f2 1000 >> +f3 1 >> FAIL >> >> >> For malloc/tst-compathooks-on, >> >> malloc/tst-compathooks-on: Symbol `__free_hook' has different size in shared object, consider re-linking >> >> the root cause is that lld's symbol versioning is different from GNU ld in an unusal case: >> >> __asm__ (".symver " "__free_hook" "," "__free_hook" "@" "GLIBC_2.2.5"); >> >> This leaves two symbols __free_hook and __free_hook@GLIBC_2.2.5. >> __free_hook is then attached a default version GLIBC_2.2.5. >> I think malloc/malloc-debug.c uses a fragile versioned symbol here. >> If the inline asm uses @@ the failure should go away. >> >> >> In summary, I think the failed tests touch some dark corners of the toolchain. >> These things do not really matter for real world applications. >> > >Please open a separate bug for each issue you are trying to fix and reference >the bug in your patch. > >Thanks. I filed: https://sourceware.org/bugzilla/show_bug.cgi?id=28151 elf: Some tst-audit* tests need ld --audit and --depaudit which do not work with gold or ld.lld https://sourceware.org/bugzilla/show_bug.cgi?id=28152 elf: clang integrated assembler and ld.lld do not support .tls_common https://sourceware.org/bugzilla/show_bug.cgi?id=28153 [test] gmon/tst-gmon-gprof* may have a f3 line when built with ld.lld https://sourceware.org/bugzilla/show_bug.cgi?id=28154 [test] sysdeps/x86/tst-ifunc-isa-* lazy binding failure with ld.lld If there is a need to amend patches, I'll attach the BZ numbers.