From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 341F5385842B for ; Wed, 27 Oct 2021 23:37:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 341F5385842B Received: by mail-pf1-x434.google.com with SMTP id v193so4204068pfc.4 for ; Wed, 27 Oct 2021 16:37:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uVoXiQKy0PPVHudOyHHf5bKUwUXwBHPtDMvmwW0d1Cw=; b=bVnzwxv7iHy/OtPki3Ewzi7oU0VUE9ZyKqnJcdSVVARh8ig1xvtCZ+WmRzkFdFjA1F g6cjED0N/qKWDqKH9x9CINCT0knNdDRaUunbnf1hTtbk2qFisUV1aPivHnMton7lBYl1 TsEt3T3LRECezBE5FLJLcK9EITTpPR5Ozo+w+PK0MAUkfS6lq2x+qHAxHpK0M8e3Llns xQCeBzFupqoacd5NlcWVWSIHypEB/AcJ0R1xHxX1gMdpp8IST8odGAoJmHyN9ZbM2+UT lnkLmcIMoC+RKWKxRJUP+zdNuRX3Q5FuNYZ4L0S6w4J7ACyWK/etohXSA9Jl3U0OULRc m6Ig== X-Gm-Message-State: AOAM531MVKBoA+Tk59rhmXykBwHTu6SrEoflecxtl/Et2o+VoyKnxK/u tNVjx68Mp7yZXo/Lvbj2w791Z5FwWJmiog== X-Google-Smtp-Source: ABdhPJyehOm5se1sqDwpTDQqaCCjXXaoQt3zWuhwaKLDHrtkDymUnD/5dltJu+PIYqyMRXGrl7O2Lw== X-Received: by 2002:a05:6a00:c81:b029:30e:21bf:4c15 with SMTP id a1-20020a056a000c81b029030e21bf4c15mr833260pfv.70.1635377854145; Wed, 27 Oct 2021 16:37:34 -0700 (PDT) Received: from google.com ([2620:15c:2ce:200:5bee:97c3:491b:d4cf]) by smtp.gmail.com with ESMTPSA id b16sm1028381pfm.58.2021.10.27.16.37.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 16:37:33 -0700 (PDT) Date: Wed, 27 Oct 2021 16:37:31 -0700 From: Fangrui Song To: Tulio Magno Quites Machado Filho Cc: Adhemerval Zanella , libc-alpha@sourceware.org Subject: Re: [PATCH 0/3] Improve lld support and current status Message-ID: <20211027233731.2nphydkpzrxr7v35@google.com> References: <20211026200346.3371750-1-adhemerval.zanella@linaro.org> <20211026203327.6b2o5k4cmkuzzm6j@google.com> <87lf2ejdnw.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <87lf2ejdnw.fsf@linux.ibm.com> X-Spam-Status: No, score=-18.9 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH, FSL_HELO_FAKE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_BLACK, USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL 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: 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: Wed, 27 Oct 2021 23:37:36 -0000 On 2021-10-27, Tulio Magno Quites Machado Filho wrote: >Fangrui Song via Libc-alpha writes: > >> On 2021-10-26, Adhemerval Zanella wrote: >>>The powerpc64le fails at libc.so start: >>> >>> (gdb) bt >>> #0 0x00007ffff7f2a980 in __gep_setup___vmx__sigjmp_save () >>> from >>> /home/azanella/glibc/build/powerpc64le-linux-gnu-power9-lld/libc.so.6 >>> #1 0x00007ffff7d7ac5c in __libc_start_call_main () >>> from >>> /home/azanella/glibc/build/powerpc64le-linux-gnu-power9-lld/libc.so.6 > >This is a local call from libc.so to libc.so. >It should be using the local entry point for __vmx__sigjmp_save. > >>> #2 0x00007ffff7d7ae90 in __libc_start_main_impl () >>> from >>> /home/azanella/glibc/build/powerpc64le-linux-gnu-power9-lld/libc.so.6 >>> #3 0x0000000000000000 in ?? () >>> (gdb) disas >>> Dump of assembler code for function __gep_setup___vmx__sigjmp_save: >>> => 0x00007ffff7f2a980 <+0>: .long 0x613ffe6 >>> 0x00007ffff7f2a984 <+4>: li r12,-1280 > >This is a pla, but this GDB isn't able to disassemble it. This instruction >shouldn't be used unless when configuring glibc using --with-cpu=power10. > >>>And powerpc64-linux-gnu fails on dynamic loaders start: >>> >>> (gdb) bt >>> #0 0x00007ffff7ffa9a8 in _start () >>> (gdb) disas >>> Dump of assembler code for function _start: >>> => 0x00007ffff7ffa9a8 <+0>: .long 0x0 >>> 0x00007ffff7ffa9ac <+4>: .long 0x0 >>> 0x00007ffff7ffa9b0 <+8>: .long 0x0 >>> 0x00007ffff7ffa9b4 <+12>: .long 0x0 > >I've been told that LLD doesn't support the powerpc ELFv1 yet. You are right:) The incomplete PowerPC64 ELF v1 support was removed by https://reviews.llvm.org/D46316 (2018-05). Is there remaining ELF v1 usage for powerpc64le in glibc? (I only know some 64-bit ELF v2 and some 32-bit, but know really little about 64-bit ELF v1.) Legacy ELF v1 is also the issue that powerpc64 big-endian Linux kernel cannot be linked with LLD (https://github.com/ClangBuiltLinux/linux/issues/602). There is little benefit retroactively adding ELF v1 support to LLD, so migration to ELF v2 will be nice :) >> CCed the powerpc maintainer. > >Thanks! > >-- >Tulio Magno