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 CEC893857364 for ; Tue, 12 Jul 2022 11:01:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CEC893857364 Received: by mail-oi1-x22c.google.com with SMTP id v187so2080013oie.7 for ; Tue, 12 Jul 2022 04:01:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:cc:references:organization:in-reply-to :content-transfer-encoding; bh=/QpBdaGzPuRokCWvINDthLhH3qewSBTab3/UQTYMMOQ=; b=Kzl2T79/YtjymfziptoNOAfEYfkOa6TwE8KjDNSjq2FyLNRzicX52TVGfUCtfq4mQc Ay+fYC7p20XmBjpucHt7W/F0f9RL4EQXLwybRohWyPOPe/+qjPDWtBTxLcu84RqPAKX2 Di5BL/vlQ5IYEeciCBJv+7oJj2MXZpEpj1kTF+slJo755j/jn8qsoLLdC2Yt2tT7hlUq /Ilvzs9IbvtHGRyU3zs3vU8mVHUrrR2dKUpuaqULS5Rbo3b3VWoBBuFQ8z49JRVqXab8 dnBLpbi6/KPcVqIGFLqcdVhkP4kUYJwkUowng2krZmDjeu4LvCP9XyvWzw7+INKqWmJA yJDw== X-Gm-Message-State: AJIora8mgAM1e6seF4te9jtpOjBb77sCju4n2V2zu5IFE/kAWjbGlDEi gIj6oLGxJ0Wvzetk5J/RlFht/A== X-Google-Smtp-Source: AGRyM1ukZ6/8OZcprxaymKcPIft8CQhDNu0lQAWGCae3o4ciuDlcHD/iAKn328Mz97Sra4kYeaA96Q== X-Received: by 2002:a05:6808:1202:b0:322:dc37:2c3b with SMTP id a2-20020a056808120200b00322dc372c3bmr1471670oil.298.1657623707151; Tue, 12 Jul 2022 04:01:47 -0700 (PDT) Received: from [12.18.8.156] ([201.46.27.6]) by smtp.gmail.com with ESMTPSA id w12-20020a4ab6cc000000b00431003ca076sm3521872ooo.44.2022.07.12.04.01.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Jul 2022 04:01:46 -0700 (PDT) Message-ID: <74d08933-d426-c25d-8496-5bd1c76c396b@linaro.org> Date: Tue, 12 Jul 2022 08:01:42 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: glibc 2.36 - Slushy freeze (3 weeks to release) Content-Language: en-US From: Adhemerval Zanella Netto To: Xi Ruoyao , WANG Xuerui , Fangrui Song , Alan Modra Cc: Carlos O'Donell , libc-alpha , binutils@sourceware.org, caiyinyu , liuzhensong References: <7aba5486-ac02-2088-221e-513a6892817a@linaro.org> <612c015a-8d77-d0ee-773a-c51e9cb1d239@linaro.org> Organization: Linaro In-Reply-To: <612c015a-8d77-d0ee-773a-c51e9cb1d239@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Tue, 12 Jul 2022 11:01:53 -0000 On 12/07/22 07:21, Adhemerval Zanella Netto wrote: > > > On 12/07/22 06:24, Xi Ruoyao wrote: >> On Tue, 2022-07-12 at 14:42 +0800, WANG Xuerui wrote: >> >>> It's generally nice to be able to remove dubious/superfluous/unused >>> code, but doing so must not negatively affect users. I'm personally in >>> support of removing such code, but as others have pointed out, it's >>> unfortunate that the LoongArch port turns out to have "inherited" the >>> wart from elsewhere, so the removal should not be done lightly (and >>> break users' systems). >> >> I can live with either >> >> (1) Fix Binutils-2.39 ASAP and remove R_LARCH_NONE handling in Glibc. >> And document "To build Glibc-2.36 or any code link to Glibc-2.36 for >> LoongArch, Binutils >= 2.39 is needed." >> (2) Work around R_LARCH_NONE in Glibc rtld code. >> >> The advantage of (1) is we can get rid of "some stupid code" and make >> some marginal performance gain.  The disadvantage is we are too close to >> the deadline (glibc-2.36 and binutils-2.39 due date) and if we fail >> we'll wait for another 6 months to upstream Glibc. >> >> But, "just remove R_LARCH_NONE in Glibc rtld and tell everyone to build >> Glibc-2.36 (and everything link to it) for LoongArch with >> /path/to/not/reviewed/binutils.git/some-fancy-branch" is not acceptable >> to me. > > So from a reviewer perspective, what should I use to actually build a > working toolchain where I can actually run the loader and libc using > qemu? > > I am currently using git branch of gcc 12, binutils 2.38, and qemu > master and I still can't get the loader to work correctly with > qemu user.  This is not really a blocker, but it would be good to > have some validation that current port is actually working somehow > and not dependent on further fixes or backports. It seems the issues I am having is indeed the extra R_LARCH_NONE being generated by binutils 2.38 which prevents loader bootstrap. This makes current port pretty unusable, so we will need to either? * Fix the R_LARCH_NONE generation and backport it to 2.38, or bump the minimum required version to 2.39. This will hold any inclusion on glibc until binutils is fixed. * Add R_LARCH_NONE handling in boostraping. This is a simpler solution and although it might hinder some possible bugs in static linker, I think for current port status it the best option.