Message ID | 20220708065255.2316410-1-caiyinyu@loongson.cn |
---|---|
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B2E62384859D for <patchwork@sourceware.org>; Fri, 8 Jul 2022 06:53:17 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by sourceware.org (Postfix) with ESMTP id 79F74385843E for <libc-alpha@sourceware.org>; Fri, 8 Jul 2022 06:53:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 79F74385843E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=loongson.cn Received: from 5.5.5 (unknown [10.2.5.5]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxP9NI1MdiKdAQAA--.4948S2; Fri, 08 Jul 2022 14:52:56 +0800 (CST) From: caiyinyu <caiyinyu@loongson.cn> To: libc-alpha@sourceware.org Subject: [PATCH v6 00/13] GLIBC LoongArch PATCHES Date: Fri, 8 Jul 2022 14:52:42 +0800 Message-Id: <20220708065255.2316410-1-caiyinyu@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf9DxP9NI1MdiKdAQAA--.4948S2 X-Coremail-Antispam: 1UD129KBjvAXoW3Aw4kXF13tFykJr4kAFW3Awb_yoW8XF1fKo WrCFWYqr18Zw4akw1FganxXry7Kr1xCr4UZay3Za4DJF4rCa4UWFyj9an0vry3Zr98Gr45 G34jgrsrtrW7Zrnxn29KB7ZKAUJUUUU8529EdanIXcx71UUUUU7v73VFW2AGmfu7bjvjm3 AaLaJ3UjIYCTnIWjp_UUUYe7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20xva j40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2 x7M28EF7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8 Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_Cr1j6rxdM28EF7xvwVC2z280aVCY1x0267AKxV W0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv 7VC0I7IYx2IY67AKxVWUGVWUXwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r 1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwCY02Avz4vE-syl 42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJV WUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAK I48JMIIF0xvE2Ix0cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F 4UMIIF0xvE42xK8VAvwI8IcIk0rVW3JVWrJr1lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAI cVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUbWCJPUUUUU== X-CM-SenderInfo: 5fdl5xhq1xqz5rrqw2lrqou0/ X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> Cc: adhemerval.zanella@linaro.or, joseph_myers@mentor.com, caiyinyu <caiyinyu@loongson.cn> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
GLIBC LoongArch PATCHES
|
|
Message
caiyinyu
July 8, 2022, 6:52 a.m. UTC
Hello, these are LoongArch patches v6, and we really need your futher suggestions: HISTORY: LoongArch patches v1: https://sourceware.org/pipermail/libc-alpha/2021-August/130262.html LoongArch patches v2: https://sourceware.org/pipermail/libc-alpha/2021-December/134811.html LoongArch patches v3: https://sourceware.org/pipermail/libc-alpha/2022-April/137888.html LoongArch patches v4: https://sourceware.org/pipermail/libc-alpha/2022-May/subject.html LoongArch patches v5: https://sourceware.org/pipermail/libc-alpha/2022-June/139262.html LoongArch-Doc: https://github.com/loongson/LoongArch-Documentation We add new section: procedure calling convention. https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_procedure_calling_convention Source code: glibc: https://github.com/loongson/glibc/tree/loongarch_2_36_upstream_v6 binutils: https://github.com/loongson/binutils-gdb/tree/dev/new_reloc gcc: https://github.com/loongson/gcc/tree/dev/new_reloc Linux kernel, GCC and Binutils Loongarch parts have been into GNU Open Source community. And there are some new designs about relocations in binutils and gcc which will be merged into master soon. test result: all passed. XPASS: conform/UNIX98/ndbm.h/linknamespace XPASS: conform/XOPEN2K/ndbm.h/linknamespace XPASS: conform/XOPEN2K8/ndbm.h/linknamespace XPASS: conform/XPG42/ndbm.h/linknamespace UNSUPPORTED: crypt/cert UNSUPPORTED: elf/tst-env-setuid UNSUPPORTED: elf/tst-env-setuid-tunables UNSUPPORTED: elf/tst-valgrind-smoke UNSUPPORTED: misc/tst-adjtimex UNSUPPORTED: misc/tst-clock_adjtime UNSUPPORTED: misc/tst-ntp_adjtime UNSUPPORTED: misc/tst-pkey UNSUPPORTED: misc/tst-rseq UNSUPPORTED: misc/tst-rseq-disable UNSUPPORTED: nptl/test-cond-printers UNSUPPORTED: nptl/test-condattr-printers UNSUPPORTED: nptl/test-mutex-printers UNSUPPORTED: nptl/test-mutexattr-printers UNSUPPORTED: nptl/test-rwlock-printers UNSUPPORTED: nptl/test-rwlockattr-printers UNSUPPORTED: nptl/tst-rseq-nptl UNSUPPORTED: stdlib/tst-secure-getenv UNSUPPORTED: time/tst-clock_settime UNSUPPORTED: time/tst-settimeofday Summary of test results: 4576 PASS 20 UNSUPPORTED 14 XFAIL 4 XPASS caiyinyu (13): LoongArch: Update NEWS and README for the LoongArch port. LoongArch: Add LoongArch entries to config.h.in LoongArch: Add relocations and ELF flags to elf.h and scripts/glibcelf.py LoongArch: ABI Implementation LoongArch: Thread-Local Storage Support LoongArch: Generic <math.h> and soft-fp Routines LoongArch: Atomic and Locking Routines LoongArch: Linux Syscall Interface LoongArch: Linux ABI LoongArch: Add ABI Lists LoongArch: Build Infastructure LoongArch: Hard Float Support LoongArch: Update build-many-glibcs.py for the LoongArch Port. NEWS | 8 + README | 1 + config.h.in | 6 + elf/elf.h | 68 +- manual/math.texi | 2 +- scripts/build-many-glibcs.py | 5 + scripts/glibcelf.py | 3 +- sysdeps/loongarch/Implies | 3 + sysdeps/loongarch/Makefile | 15 + sysdeps/loongarch/__longjmp.S | 52 + sysdeps/loongarch/abort-instr.h | 2 + sysdeps/loongarch/bits/endianness.h | 11 + sysdeps/loongarch/bits/fenv.h | 90 + sysdeps/loongarch/bits/link.h | 58 + sysdeps/loongarch/bits/setjmp.h | 42 + sysdeps/loongarch/bsd-_setjmp.c | 1 + sysdeps/loongarch/bsd-setjmp.c | 1 + sysdeps/loongarch/configure | 5 + sysdeps/loongarch/configure.ac | 6 + sysdeps/loongarch/dl-irel.h | 54 + sysdeps/loongarch/dl-machine.h | 287 +++ sysdeps/loongarch/dl-tls.h | 46 + sysdeps/loongarch/dl-trampoline.S | 91 + sysdeps/loongarch/e_sqrtl.c | 38 + sysdeps/loongarch/fpu/fclrexcpt.c | 46 + sysdeps/loongarch/fpu/fedisblxcpt.c | 39 + sysdeps/loongarch/fpu/feenablxcpt.c | 39 + sysdeps/loongarch/fpu/fegetenv.c | 31 + sysdeps/loongarch/fpu/fegetexcept.c | 32 + sysdeps/loongarch/fpu/fegetmode.c | 27 + sysdeps/loongarch/fpu/fegetround.c | 33 + sysdeps/loongarch/fpu/feholdexcpt.c | 40 + sysdeps/loongarch/fpu/fenv_libc.h | 30 + sysdeps/loongarch/fpu/fesetenv.c | 42 + sysdeps/loongarch/fpu/fesetexcept.c | 32 + sysdeps/loongarch/fpu/fesetmode.c | 38 + sysdeps/loongarch/fpu/fesetround.c | 44 + sysdeps/loongarch/fpu/feupdateenv.c | 43 + sysdeps/loongarch/fpu/fgetexcptflg.c | 38 + sysdeps/loongarch/fpu/fraiseexcpt.c | 75 + sysdeps/loongarch/fpu/fsetexcptflg.c | 41 + sysdeps/loongarch/fpu/ftestexcept.c | 32 + .../loongarch/fpu/math-use-builtins-sqrt.h | 4 + sysdeps/loongarch/fpu_control.h | 102 + sysdeps/loongarch/hp-timing.h | 42 + sysdeps/loongarch/jmpbuf-offsets.h | 22 + sysdeps/loongarch/jmpbuf-unwind.h | 45 + sysdeps/loongarch/ldsodefs.h | 41 + sysdeps/loongarch/libc-tls.c | 32 + sysdeps/loongarch/linkmap.h | 22 + sysdeps/loongarch/lp64/Implies-after | 1 + sysdeps/loongarch/lp64/libm-test-ulps | 1412 +++++++++++ sysdeps/loongarch/lp64/libm-test-ulps-name | 1 + sysdeps/loongarch/machine-gmon.h | 37 + sysdeps/loongarch/math_private.h | 248 ++ sysdeps/loongarch/nptl/Makefile | 21 + sysdeps/loongarch/nptl/pthreaddef.h | 32 + sysdeps/loongarch/nptl/tcb-offsets.sym | 6 + sysdeps/loongarch/nptl/tls.h | 138 ++ sysdeps/loongarch/preconfigure | 52 + sysdeps/loongarch/preconfigure.ac | 46 + sysdeps/loongarch/setjmp.S | 66 + sysdeps/loongarch/sfp-machine.h | 102 + sysdeps/loongarch/sotruss-lib.c | 50 + sysdeps/loongarch/stackinfo.h | 33 + sysdeps/loongarch/start.S | 66 + sysdeps/loongarch/sys/asm.h | 59 + sysdeps/loongarch/sys/ifunc.h | 30 + sysdeps/loongarch/sys/regdef.h | 93 + sysdeps/loongarch/tininess.h | 1 + sysdeps/loongarch/tst-audit.h | 23 + sysdeps/unix/sysv/linux/loongarch/Implies | 1 + sysdeps/unix/sysv/linux/loongarch/Makefile | 4 + .../unix/sysv/linux/loongarch/arch-syscall.h | 301 +++ .../sysv/linux/loongarch/atomic-machine.h | 181 ++ .../unix/sysv/linux/loongarch/bits/fcntl.h | 61 + .../unix/sysv/linux/loongarch/bits/procfs.h | 52 + .../linux/loongarch/bits/pthread_stack_min.h | 20 + .../unix/sysv/linux/loongarch/bits/sigstack.h | 32 + sysdeps/unix/sysv/linux/loongarch/clone.S | 96 + sysdeps/unix/sysv/linux/loongarch/clone3.S | 83 + sysdeps/unix/sysv/linux/loongarch/configure | 174 ++ .../unix/sysv/linux/loongarch/configure.ac | 22 + .../unix/sysv/linux/loongarch/getcontext.S | 59 + sysdeps/unix/sysv/linux/loongarch/ldconfig.h | 26 + .../unix/sysv/linux/loongarch/ldd-rewrite.sed | 3 + .../unix/sysv/linux/loongarch/localplt.data | 12 + .../unix/sysv/linux/loongarch/lp64/Implies | 3 + .../sysv/linux/loongarch/lp64/c++-types.data | 67 + .../unix/sysv/linux/loongarch/lp64/ld.abilist | 8 + .../loongarch/lp64/libBrokenLocale.abilist | 1 + .../sysv/linux/loongarch/lp64/libc.abilist | 2153 +++++++++++++++++ .../loongarch/lp64/libc_malloc_debug.abilist | 26 + .../linux/loongarch/lp64/libcrypt.abilist | 2 + .../sysv/linux/loongarch/lp64/libm.abilist | 1031 ++++++++ .../linux/loongarch/lp64/libpthread.abilist | 0 .../linux/loongarch/lp64/libresolv.abilist | 55 + .../sysv/linux/loongarch/lp64/librt.abilist | 0 .../linux/loongarch/lp64/libthread_db.abilist | 40 + .../unix/sysv/linux/loongarch/makecontext.c | 79 + .../unix/sysv/linux/loongarch/setcontext.S | 100 + .../unix/sysv/linux/loongarch/shlib-versions | 7 + .../sysv/linux/loongarch/sigcontextinfo.h | 32 + .../unix/sysv/linux/loongarch/swapcontext.S | 95 + .../unix/sysv/linux/loongarch/sys/ucontext.h | 61 + sysdeps/unix/sysv/linux/loongarch/sys/user.h | 42 + sysdeps/unix/sysv/linux/loongarch/sysdep.S | 53 + sysdeps/unix/sysv/linux/loongarch/sysdep.h | 321 +++ .../sysv/linux/loongarch/ucontext-macros.h | 32 + .../unix/sysv/linux/loongarch/ucontext_i.sym | 31 + sysdeps/unix/sysv/linux/loongarch/vfork.S | 50 + 111 files changed, 9837 insertions(+), 3 deletions(-) create mode 100644 sysdeps/loongarch/Implies create mode 100644 sysdeps/loongarch/Makefile create mode 100644 sysdeps/loongarch/__longjmp.S create mode 100644 sysdeps/loongarch/abort-instr.h create mode 100644 sysdeps/loongarch/bits/endianness.h create mode 100644 sysdeps/loongarch/bits/fenv.h create mode 100644 sysdeps/loongarch/bits/link.h create mode 100644 sysdeps/loongarch/bits/setjmp.h create mode 100644 sysdeps/loongarch/bsd-_setjmp.c create mode 100644 sysdeps/loongarch/bsd-setjmp.c create mode 100644 sysdeps/loongarch/configure create mode 100644 sysdeps/loongarch/configure.ac create mode 100644 sysdeps/loongarch/dl-irel.h create mode 100644 sysdeps/loongarch/dl-machine.h create mode 100644 sysdeps/loongarch/dl-tls.h create mode 100644 sysdeps/loongarch/dl-trampoline.S create mode 100644 sysdeps/loongarch/e_sqrtl.c create mode 100644 sysdeps/loongarch/fpu/fclrexcpt.c create mode 100644 sysdeps/loongarch/fpu/fedisblxcpt.c create mode 100644 sysdeps/loongarch/fpu/feenablxcpt.c create mode 100644 sysdeps/loongarch/fpu/fegetenv.c create mode 100644 sysdeps/loongarch/fpu/fegetexcept.c create mode 100644 sysdeps/loongarch/fpu/fegetmode.c create mode 100644 sysdeps/loongarch/fpu/fegetround.c create mode 100644 sysdeps/loongarch/fpu/feholdexcpt.c create mode 100644 sysdeps/loongarch/fpu/fenv_libc.h create mode 100644 sysdeps/loongarch/fpu/fesetenv.c create mode 100644 sysdeps/loongarch/fpu/fesetexcept.c create mode 100644 sysdeps/loongarch/fpu/fesetmode.c create mode 100644 sysdeps/loongarch/fpu/fesetround.c create mode 100644 sysdeps/loongarch/fpu/feupdateenv.c create mode 100644 sysdeps/loongarch/fpu/fgetexcptflg.c create mode 100644 sysdeps/loongarch/fpu/fraiseexcpt.c create mode 100644 sysdeps/loongarch/fpu/fsetexcptflg.c create mode 100644 sysdeps/loongarch/fpu/ftestexcept.c create mode 100644 sysdeps/loongarch/fpu/math-use-builtins-sqrt.h create mode 100644 sysdeps/loongarch/fpu_control.h create mode 100644 sysdeps/loongarch/hp-timing.h create mode 100644 sysdeps/loongarch/jmpbuf-offsets.h create mode 100644 sysdeps/loongarch/jmpbuf-unwind.h create mode 100644 sysdeps/loongarch/ldsodefs.h create mode 100644 sysdeps/loongarch/libc-tls.c create mode 100644 sysdeps/loongarch/linkmap.h create mode 100644 sysdeps/loongarch/lp64/Implies-after create mode 100644 sysdeps/loongarch/lp64/libm-test-ulps create mode 100644 sysdeps/loongarch/lp64/libm-test-ulps-name create mode 100644 sysdeps/loongarch/machine-gmon.h create mode 100644 sysdeps/loongarch/math_private.h create mode 100644 sysdeps/loongarch/nptl/Makefile create mode 100644 sysdeps/loongarch/nptl/pthreaddef.h create mode 100644 sysdeps/loongarch/nptl/tcb-offsets.sym create mode 100644 sysdeps/loongarch/nptl/tls.h create mode 100644 sysdeps/loongarch/preconfigure create mode 100644 sysdeps/loongarch/preconfigure.ac create mode 100644 sysdeps/loongarch/setjmp.S create mode 100644 sysdeps/loongarch/sfp-machine.h create mode 100644 sysdeps/loongarch/sotruss-lib.c create mode 100644 sysdeps/loongarch/stackinfo.h create mode 100644 sysdeps/loongarch/start.S create mode 100644 sysdeps/loongarch/sys/asm.h create mode 100644 sysdeps/loongarch/sys/ifunc.h create mode 100644 sysdeps/loongarch/sys/regdef.h create mode 100644 sysdeps/loongarch/tininess.h create mode 100644 sysdeps/loongarch/tst-audit.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/Implies create mode 100644 sysdeps/unix/sysv/linux/loongarch/Makefile create mode 100644 sysdeps/unix/sysv/linux/loongarch/arch-syscall.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/atomic-machine.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/fcntl.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/procfs.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/pthread_stack_min.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/sigstack.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/clone.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/clone3.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/configure create mode 100644 sysdeps/unix/sysv/linux/loongarch/configure.ac create mode 100644 sysdeps/unix/sysv/linux/loongarch/getcontext.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/ldconfig.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/ldd-rewrite.sed create mode 100644 sysdeps/unix/sysv/linux/loongarch/localplt.data create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/Implies create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/c++-types.data create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/ld.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libBrokenLocale.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libc.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libc_malloc_debug.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libcrypt.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libm.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libpthread.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libresolv.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/librt.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/lp64/libthread_db.abilist create mode 100644 sysdeps/unix/sysv/linux/loongarch/makecontext.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/setcontext.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/shlib-versions create mode 100644 sysdeps/unix/sysv/linux/loongarch/sigcontextinfo.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/swapcontext.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/sys/ucontext.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/sys/user.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/sysdep.S create mode 100644 sysdeps/unix/sysv/linux/loongarch/sysdep.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/ucontext-macros.h create mode 100644 sysdeps/unix/sysv/linux/loongarch/ucontext_i.sym create mode 100644 sysdeps/unix/sysv/linux/loongarch/vfork.S
Comments
On Fri, 2022-07-08 at 14:52 +0800, caiyinyu wrote:
> binutils: https://github.com/loongson/binutils-gdb/tree/dev/new_reloc
There are too much changes in this branch. Could you isolate a minimal
binutils patch enough for eliminating R_LARCH_NONE and R_LARCH_IRELATIVE
from .rela.plt, get it reviewed, and push it into GNU binutils repo? I
don't think it's a good idea to make *GNU* libc depend on some external
linker code which is not reviewed by GNU binutils developers.
And we need to do this ASAP: we already missed binutils 2.39 release
branch cut date [1] and if we don't move fast we'll miss glibc-2.36
release date.
[1]: https://sourceware.org/pipermail/binutils/2022-July/121567.html
Resend to fix Adhemerval's email address :(. On Fri, 2022-07-08 at 15:13 +0800, Xi Ruoyao via Libc-alpha wrote: > On Fri, 2022-07-08 at 14:52 +0800, caiyinyu wrote: > > > binutils: > > https://github.com/loongson/binutils-gdb/tree/dev/new_reloc > > There are too much changes in this branch. Could you isolate a > minimal > binutils patch enough for eliminating R_LARCH_NONE and > R_LARCH_IRELATIVE > from .rela.plt, get it reviewed, and push it into GNU binutils repo? > I > don't think it's a good idea to make *GNU* libc depend on some > external > linker code which is not reviewed by GNU binutils developers. > > And we need to do this ASAP: we already missed binutils 2.39 release > branch cut date [1] and if we don't move fast we'll miss glibc-2.36 > release date. > > [1]: https://sourceware.org/pipermail/binutils/2022-July/121567.html > >
On 08/07/22 04:13, Xi Ruoyao via Libc-alpha wrote: > On Fri, 2022-07-08 at 14:52 +0800, caiyinyu wrote: > >> binutils: https://github.com/loongson/binutils-gdb/tree/dev/new_reloc > > There are too much changes in this branch. Could you isolate a minimal > binutils patch enough for eliminating R_LARCH_NONE and R_LARCH_IRELATIVE > from .rela.plt, get it reviewed, and push it into GNU binutils repo? I > don't think it's a good idea to make *GNU* libc depend on some external > linker code which is not reviewed by GNU binutils developers. > > And we need to do this ASAP: we already missed binutils 2.39 release > branch cut date [1] and if we don't move fast we'll miss glibc-2.36 > release date. > > [1]: https://sourceware.org/pipermail/binutils/2022-July/121567.html > > I finished my review for the port and it looks ok in general, however there some pieces that would require a v7: 1. Add R_LARCH_NONE handling on bootstrap, binutils 2.38 does generated it and from previous discussion it should be considered a missed optimizations instead of a linker error. 2. Remove the __loongarch_soft_float parts, since there is no support for soft floating-point. 3. Remove sysdeps/unix/sysv/linux/loongarch/ldconfig.h, this file is not required. 4. Some minor style issues. 5. Either remove HAVE_GETTIMEOFDAY_VSYSCALL or add a gettimeofday ifunc optimization. The only part really prevent port inclusion is 1. I am also assuming ifunc is support (at least you have added support on the Linux ABI part) with binutils 2.38. If not, you will need to remove support until you fix it on binutils. And also, you need to check and report the test results using the expected defined release branches, using out-of-tree branches are not acceptable for inclusion.
On Wed, 2022-07-13 at 16:55 -0300, Adhemerval Zanella Netto wrote: > I finished my review for the port and it looks ok in general, however there > some pieces that would require a v7: > > 1. Add R_LARCH_NONE handling on bootstrap, binutils 2.38 does generated it > and from previous discussion it should be considered a missed > optimizations instead of a linker error. > > 2. Remove the __loongarch_soft_float parts, since there is no support for > soft floating-point. > > 3. Remove sysdeps/unix/sysv/linux/loongarch/ldconfig.h, this file is not > required. > > 4. Some minor style issues. > > 5. Either remove HAVE_GETTIMEOFDAY_VSYSCALL or add a gettimeofday ifunc > optimization. > > The only part really prevent port inclusion is 1. I am also assuming ifunc > is support (at least you have added support on the Linux ABI part) with > binutils 2.38. If not, you will need to remove support until you fix it on > binutils. > > And also, you need to check and report the test results using the expected > defined release branches, using out-of-tree branches are not acceptable for > inclusion. The series tested with Linux-5.19-rc4, Binutils-2.38, and GCC-12.1. Some kernel patches used but they are only boot protocols and hardware drivers, not related to userspace ABI so Glibc should be unaffected. Some Binutils and GCC patches used but they are all already committed to upstream. To work around binutils issues, I added R_LARCH_NONE back to RTLD_BOOTSTRAP, and disabled IFUNC (by adding libc_cv_ld_gnu_indirect_function=no into preconfigure). Result: XPASS: conform/UNIX98/ndbm.h/linknamespace XPASS: conform/XOPEN2K/ndbm.h/linknamespace XPASS: conform/XOPEN2K8/ndbm.h/linknamespace XPASS: conform/XPG42/ndbm.h/linknamespace UNSUPPORTED: crypt/cert UNSUPPORTED: elf/tst-env-setuid UNSUPPORTED: elf/tst-env-setuid-tunables XPASS: elf/tst-protected1a XPASS: elf/tst-protected1b UNSUPPORTED: elf/tst-valgrind-smoke UNSUPPORTED: misc/tst-adjtimex UNSUPPORTED: misc/tst-clock_adjtime UNSUPPORTED: misc/tst-ntp_adjtime UNSUPPORTED: misc/tst-pkey UNSUPPORTED: misc/tst-rseq UNSUPPORTED: misc/tst-rseq-disable UNSUPPORTED: nptl/test-cond-printers UNSUPPORTED: nptl/test-condattr-printers UNSUPPORTED: nptl/test-mutex-printers UNSUPPORTED: nptl/test-mutexattr-printers UNSUPPORTED: nptl/test-rwlock-printers UNSUPPORTED: nptl/test-rwlockattr-printers UNSUPPORTED: nptl/tst-pthread-gdb-attach UNSUPPORTED: nptl/tst-pthread-gdb-attach-static UNSUPPORTED: nptl/tst-rseq-nptl UNSUPPORTED: stdlib/tst-secure-getenv UNSUPPORTED: time/tst-clock_settime UNSUPPORTED: time/tst-settimeofday Summary of test results: 4536 PASS 22 UNSUPPORTED 12 XFAIL 6 XPASS
On 14/07/22 08:33, Xi Ruoyao wrote: > On Wed, 2022-07-13 at 16:55 -0300, Adhemerval Zanella Netto wrote: > >> I finished my review for the port and it looks ok in general, however there >> some pieces that would require a v7: >> >> 1. Add R_LARCH_NONE handling on bootstrap, binutils 2.38 does generated it >> and from previous discussion it should be considered a missed >> optimizations instead of a linker error. >> >> 2. Remove the __loongarch_soft_float parts, since there is no support for >> soft floating-point. >> >> 3. Remove sysdeps/unix/sysv/linux/loongarch/ldconfig.h, this file is not >> required. >> >> 4. Some minor style issues. >> >> 5. Either remove HAVE_GETTIMEOFDAY_VSYSCALL or add a gettimeofday ifunc >> optimization. >> >> The only part really prevent port inclusion is 1. I am also assuming ifunc >> is support (at least you have added support on the Linux ABI part) with >> binutils 2.38. If not, you will need to remove support until you fix it on >> binutils. >> >> And also, you need to check and report the test results using the expected >> defined release branches, using out-of-tree branches are not acceptable for >> inclusion. > > The series tested with Linux-5.19-rc4, Binutils-2.38, and GCC-12.1. > Some kernel patches used but they are only boot protocols and hardware > drivers, not related to userspace ABI so Glibc should be unaffected. > Some Binutils and GCC patches used but they are all already committed to > upstream. Thanks. > > To work around binutils issues, I added R_LARCH_NONE back to > RTLD_BOOTSTRAP, and disabled IFUNC (by adding > libc_cv_ld_gnu_indirect_function=no into preconfigure). I do not think this is blocker, but if you need to explicit add libc_cv_ld_gnu_indirect_function=no it means your toolchain can potentially generate invalid binaries: $ cat test.c #include <stdio.h> static int impl (void) { return 42; } static void * resolver (void) { return impl; } int ifunc (void) __attribute__((ifunc ("resolver"))); int main (int argc, char *argv[]) { printf ("%d\n", (int) ifunc ()); return 0; } $ loongarch64-linux-gnu-hard/bin/loongarch64-glibc-linux-gnu-gcc test.c -o test $ qemu-loongarch64 elf/ld.so --library-path . ./test ./test: error while loading shared libraries: unexpected PLT reloc type 0x0c It would be better if you just disable ifunc support on static linker for now. > > Result: > > XPASS: conform/UNIX98/ndbm.h/linknamespace > XPASS: conform/XOPEN2K/ndbm.h/linknamespace > XPASS: conform/XOPEN2K8/ndbm.h/linknamespace > XPASS: conform/XPG42/ndbm.h/linknamespace > UNSUPPORTED: crypt/cert > UNSUPPORTED: elf/tst-env-setuid > UNSUPPORTED: elf/tst-env-setuid-tunables > XPASS: elf/tst-protected1a > XPASS: elf/tst-protected1b > UNSUPPORTED: elf/tst-valgrind-smoke > UNSUPPORTED: misc/tst-adjtimex > UNSUPPORTED: misc/tst-clock_adjtime > UNSUPPORTED: misc/tst-ntp_adjtime > UNSUPPORTED: misc/tst-pkey > UNSUPPORTED: misc/tst-rseq > UNSUPPORTED: misc/tst-rseq-disable > UNSUPPORTED: nptl/test-cond-printers > UNSUPPORTED: nptl/test-condattr-printers > UNSUPPORTED: nptl/test-mutex-printers > UNSUPPORTED: nptl/test-mutexattr-printers > UNSUPPORTED: nptl/test-rwlock-printers > UNSUPPORTED: nptl/test-rwlockattr-printers > UNSUPPORTED: nptl/tst-pthread-gdb-attach > UNSUPPORTED: nptl/tst-pthread-gdb-attach-static > UNSUPPORTED: nptl/tst-rseq-nptl > UNSUPPORTED: stdlib/tst-secure-getenv > UNSUPPORTED: time/tst-clock_settime > UNSUPPORTED: time/tst-settimeofday > Summary of test results: > 4536 PASS > 22 UNSUPPORTED > 12 XFAIL > 6 XPASS
On 7/8/22 02:52, caiyinyu wrote:
> Hello, these are LoongArch patches v6, and we really need your futher suggestions:
The v6 patches came up for review in the weekly Monday patch review meeting.
May you please post a v7 with all suggestions integrated?
Having a new v7 would help with review and inclusion into the release.
Thank you!