From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 7EFA9382E288; Tue, 12 Jul 2022 00:48:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7EFA9382E288 Received: from [IPv6:240e:358:1190:c100:dc73:854d:832e:2] (unknown [IPv6:240e:358:1190:c100:dc73:854d:832e:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 64F48668A8; Mon, 11 Jul 2022 20:48:25 -0400 (EDT) Message-ID: Subject: Re: glibc 2.36 - Slushy freeze (3 weeks to release) From: Xi Ruoyao To: Adhemerval Zanella Netto , Carlos O'Donell , libc-alpha Cc: liuzhensong , Wang Xuerui , binutils@sourceware.org, Fangrui Song , caiyinyu Date: Tue, 12 Jul 2022 08:48:18 +0800 In-Reply-To: <7aba5486-ac02-2088-221e-513a6892817a@linaro.org> References: <7aba5486-ac02-2088-221e-513a6892817a@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FROM_SUSPICIOUS_NTLD, LIKELY_SPAM_FROM, PDS_OTHER_BAD_TLD, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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 00:48:35 -0000 On Mon, 2022-07-11 at 16:10 -0300, Adhemerval Zanella Netto wrote: >=20 >=20 > On 11/07/22 13:06, Xi Ruoyao via Binutils wrote: > > +binutils because we'll have to discuss binutils-related issues. > >=20 > > On Mon, 2022-07-11 at 11:20 -0400, Carlos O'Donell via Libc-alpha > > wrote: > >=20 > > > Desirable: > > >=20 > > > * GLIBC LoongArch PATCHES > > >=20 > > > The LoongArch patches are currently under review, but there looks > > > to be > > > some unresolved binutils issues. Just for clarity we expect a > > > glibc port > > > to have committed patches for the linux kernel, gcc, and binutils > > > before > > > inclusion in glibc. > >=20 > > GCC is mostly fine.=C2=A0 There are some "outstanding" bugs in 12.1 but > > AFAIK > > they don't cause issues building glibc.=C2=A0 You can use releases/gcc-= 12 > > branch if you have any doubt. > >=20 > > Kernel userspace API is fine in 5.19-rc.=C2=A0 There are issues about > > boot > > protocol and some drivers but these issues are completely unrelated > > to > > glibc. > >=20 > > For binutils, ld is generating strange R_LARCH_NONE relocations > > (caused > > by an over-allocate of .rel.* sections and the usage of 0 as > > padding), > > and ld is generating R_LARCH_IRELATIVE for .rel.plt section (Fangrui > > says .rel.plt should not contain R_LARCH_IRELATIVE). > >=20 > > Loongson engineers seems preparing a large patch series containing > > *both* the bug fix removing buggy R_LARCH_NONE and R_LARCH_IRELATIVE > > relocations, *and* the implementation of many new relocation types > > (superseding the current stack-based relocs which are disliked by > > many > > people, including me). > >=20 > > Unfortunately, binutils 2.39 release branch is already created and I > > don't think such a large change set can be reviewed and landed into > > binutils soon.=C2=A0 So I'll repeat my suggestion again: it's better to > > separate the bug fix and the new feature into two patch series, and > > get > > the bug fix landed and backported for binutils-2.39 branch ASAP.=C2=A0 > > The > > new relocs (and/or other new features) can be reviewed later for > > binutils 2.40, after 2.39 release. > >=20 > > I don't like the stack-based relocs, maybe even more than you guys - > > I > > remember I'd shout loudly with "colorful metaphors" when I had to > > use > > these relocs in LLVM.=C2=A0 However another binutils release "supportin= g" > > LoongArch but completely unusable in practice will be worse.=C2=A0 > > (Remind: > > 2.38 is already such a release.) >=20 > So do we need a binutils 2.39 to have a workable glibc build or is the > 2.38 suffice? We need a 2.39, or backport one change [1] to 2.38. [1]: https://sourceware.org/git/?p=3Dbinutils-gdb.git;a=3Dcommit;h=3D3b1468= 2a > The R_LARCH_NONE issue should only affect performance, > since it should be ignored by loader although I am not sure without > understanding better the issue. Fangrui suggested [2] we should assume R_LARCH_NONE does not exist to simplify the code and catch ld bugs earlier. So the code ignoring R_LARCH_NONE is moved into #ifndef RTLD_BOOTSTRAP in the latest patch [3]. My experiment shows it causes a segfault starting ld.so. ld.so bootstrapping really hits R_LARCH_NONE, and the execution path falls into _dl_reloc_bad_type. But using _dl_reloc_bad_type before bootstrap complete just leads to a segfault (as the error reporting functions like _dl_signal_error are not relocated correctly yet). [2]: https://sourceware.org/pipermail/libc-alpha/2022-June/139424.html [3]: https://sourceware.org/pipermail/libc-alpha/2022-July/140451.html I agree to just ignore R_LARCH_NONE at all, because "we are not binutils test suite". > For R_LARCH_IRELATIVE I think we can just disable ifunc support for > now and re-enable on 2.37 once it is properly fixed on binutils (maybe > also bumping minimum required binutils). I agree with this approach. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University