From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 55E21385800F for ; Mon, 28 Dec 2020 21:12:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 55E21385800F Received: by mail-oi1-x22c.google.com with SMTP id s2so12750602oij.2 for ; Mon, 28 Dec 2020 13:12:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9r7GhCd/X/l26HjBsIbTAcSQEQoSL1fdOcESQMzm21o=; b=saNozkW0dAgCuWF0XtMT1+kp3mZ2nOF3b6HP5Ty7HSs3F2spwIkBXMS1Px7ugdX4vQ 1xr6UNwmYwnnjp0s11BGQcUeFql+TZpwTMHfZEsNXE/mlY6S1sh4MNmvIxd8f8vT4qHI eKFIy4qi2aHWCpxs1A4lMYN7zbxF7yIxkHWmXNersp4tpB9gdv8R9v6jp0sWouRxKnvm xykrfJYrTBuYzdKJIKSsJ6eDpej1w5TUhCgZzzgzikOgV/YcwL9XErdkkRbZuqZioqHe rMTEvz6ud+r/6f2nf0Vox9K/PNiVbRJOpxgcxb9ISbEec+5l7ffErYFWKiCbOCymwvKj FWWA== X-Gm-Message-State: AOAM530XFvdATAa+Yga66LYUUbvPOoeNG2IhRKvYwRdFhLo4k1d6niH4 rvSrSUe4aaWlmmyf6HUriPXAWbhr81qNGSSTNlQ= X-Google-Smtp-Source: ABdhPJw+JDU1LrDqSEXVcVPj9nJEukrfFwwWiGQX0VTei5NZhLQQ8y+55W26Ganoe72LXdrkDv1boZ1tsAuSR7uGNlY= X-Received: by 2002:aca:f456:: with SMTP id s83mr547082oih.58.1609189929742; Mon, 28 Dec 2020 13:12:09 -0800 (PST) MIME-Version: 1.0 References: <20201228194855.510315-1-maskray@google.com> In-Reply-To: <20201228194855.510315-1-maskray@google.com> From: "H.J. Lu" Date: Mon, 28 Dec 2020 13:11:33 -0800 Message-ID: Subject: Re: [PATCH 0/3] Make glibc build with LLD To: Fangrui Song Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3030.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 28 Dec 2020 21:12:11 -0000 On Mon, Dec 28, 2020 at 11:49 AM Fangrui Song via Libc-alpha wrote: > > I sent the first two in April. Resending in a patch series to be > clearer. > > install: Replace scripts/output-format.sed with objdump -f > > replaced https://sourceware.org/pipermail/libc-alpha/2020-April/112733.html > by leveraging objdump -f. > > With this patch series (available in https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/maskray/lld), > `make` with ld pointing to ld.lld (LLVM linker) works. I tried your branch with "LLD 11.0.0 (compatible with GNU linkers)" on Fedora 33/x86-64, "make check" generated: make[4]: *** [../Makerules:767: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-tlsmod2.so] Error 1 make[4]: *** [../Makerules:767: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-tlsmod4.so] Error 1 make[4]: *** [../Makerules:767: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-absolute-sym-lib.so] Error 1 make[4]: *** [../Makerules:767: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-absolute-zero-lib.so] Error 1 make[4]: *** [../Makerules:767: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-tlsmod6.so] Error 1 make[4]: *** [../Makerules:767: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-tlsmod5.so] Error 1 make[4]: *** [../Rules:226: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-audit16] Error 1 make[4]: *** [../Rules:226: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-audit14] Error 1 make[4]: *** [../Rules:226: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-audit15] Error 1 make[4]: *** [../Rules:226: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-tls1] Error 1 make[4]: *** [../Rules:226: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/ifuncmain5] Error 1 make[4]: *** [../Rules:226: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/ifuncmain1] Error 1 make[3]: *** [Makefile:479: elf/tests] Error 2 with error messages, like ld: error: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-tlsmod2.os has an STT_TLS symbol but doesn't have an SHF_TLS section ld: error: /export/users/hjl/build/gnu/tools-build/glibc-gitlab-lld/build-x86_64-linux/elf/tst-tlsmod4.os has an STT_TLS symbol but doesn't have an SHF_TLS section When glibc is configured with --enable-static-pie, I got [hjl@gnu-skx-1 build-x86_64-linux]$ ./elf/ldconfig Segmentation fault (core dumped) [hjl@gnu-skx-1 build-x86_64-linux]$ You need to fix lld first and give the working lld a proper version so that configure can check it. -- H.J.