glibc
The GNU C library.
www.gnu.org
Recent Activity
- riscv: Add and use alignment-ignorant memcpy
Evan Green: For CPU implementations that can perform unaligned accesses with little or no performance penalty, create a memcpy implementation that does not bother aligning buffers. - riscv: Enable multi-arg ifunc resolvers
Evan Green: RISC-V is apparently the first architecture to pass more than one argument to ifunc resolvers. - riscv: Add hwprobe vdso call support
Evan Green: The new riscv_hwprobe syscall also comes with a vDSO for faster answers to your most common questions. - riscv: Add Linux hwprobe syscall support
Evan Green: Add awareness and a thin wrapper function around a new Linux system call that allows callers to get architecture and microarchitecture information about the CPUs from the kernel. - rtld: Add glibc.rtld.enable_secure tunable
Joe Simmons-Talbott: Add a tunable for setting __libc_enable_secure to 1. - x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers
H.J. Lu: _dl_tlsdesc_dynamic should also preserve AMX registers which are caller-saved. - x86_64: Suppress false positive valgrind error
H.J. Lu: When strcmp-avx2.S is used as the default, elf/tst-valgrind-smoke fails with
==1272761== Conditional jump or move depends on uninitialised value(s)
==1272761== at 0x4022C98: strcmp (strcmp-avx2.S:462)
==1272761== by 0x400B05B: _dl_name_match_p (dl-misc.c:75)
==1272761== by 0x40085F3: _dl_map_object (dl-load.c:1966)
==1272761== by 0x401AEA4: map_doit (rtld.c:644)
==1272761== by 0x4001488: _dl_catch_exception (dl-catch.c:237)
==1272761== by 0x40015AE: _dl_catch_error (dl-catch.c:256)
==1272761== by 0x401B38F: do_preload (rtld.c:816)
==1272761== by 0x401C116: handle_preload_list (rtld.c:892)
==1272761== by 0x401EDF5: dl_main (rtld.c:1842)
==1272761== by 0x401A79E: _dl_sysdep_start (dl-sysdep.c:140)
==1272761== by 0x401BEEE: _dl_start_final (rtld.c:494)
==1272761== by 0x401BEEE: _dl_start (rtld.c:581)
==1272761== by 0x401AD87: ??? (in */elf/ld.so)
The assembly codes are:
0x0000000004022c80 <+144>: vmovdqu 0x20(%rdi),%ymm0 0x0000000004022c85 <+149>: vpcmpeqb 0x20(%rsi),%ymm0,%ymm1 0x0000000004022c8a <+154>: vpcmpeqb %ymm0,%ymm15,%ymm2 0x0000000004022c8e <+158>: vpandn %ymm1,%ymm2,%ymm1 0x0000000004022c92 <+162>: vpmovmskb %ymm1,%ecx 0x0000000004022c96 <+166>: inc %ecx
=> 0x0000000004022c98 <+168>: jne 0x4022c32 <strcmp+66>
strcmp-avx2.S has 32-byte vector loads of strings which are shorter than 32 bytes:
(gdb) p (char *) ($rdi + 0x20) $6 = 0x1ffeffea20 "memcheck-amd64-linux.so" (gdb) p (char *) ($rsi + 0x20) $7 = 0x4832640 "core-amd64-linux.so" (gdb) call (int) strlen ((char *) ($rsi + 0x20)) $8 = 19 (gdb) call (int) strlen ((char *) ($rdi + 0x20)) $9 = 23 (gdb)
It triggers the valgrind error. - x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers
H.J. Lu: Compiler generates the following instruction sequence for GNU2 dynamic TLS access:
leaq tls_var@TLSDESC(%rip), %rax call *tls_var@TLSCALL(%rax)
or
leal tls_var@TLSDESC(%ebx), %eax call *tls_var@TLSCALL(%eax)
CALL instruction is transparent to compiler which assumes all registers, except for EFLAGS and RAX/EAX, are unchanged after CALL. - Support compiling .S files with additional options
H.J. Lu: Add $(sysdep-ASFLAGS) $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F)) to compile. - powerpc: Remove power7 strstr optimization
Adhemerval Zanella: The optimization is not faster than the generic algorithm, using the bench-strstr the geometric mean running on a POWER10 machine using gcc 13.1.1 is 482.47 while the default __strstr_ppc is 340.97 (which uses the generic implementation).
Most Popular In The Past Month
- powerpc: Remove power7 strstr optimization
Adhemerval Zanella: The optimization is not faster than the generic algorithm, using the bench-strstr the geometric mean running on a POWER10 machine using gcc 13.1.1 is 482.47 while the default __strstr_ppc is 340.97 (which uses the generic implementation). - Support compiling .S files with additional options
H.J. Lu: Add $(sysdep-ASFLAGS) $(ASFLAGS-$(<F)) $(ASFLAGS-$(@F)) to compile. - riscv: Add Linux hwprobe syscall support
Evan Green: Add awareness and a thin wrapper function around a new Linux system call that allows callers to get architecture and microarchitecture information about the CPUs from the kernel. - riscv: Add and use alignment-ignorant memcpy
Evan Green: For CPU implementations that can perform unaligned accesses with little or no performance penalty, create a memcpy implementation that does not bother aligning buffers. - riscv: Add hwprobe vdso call support
Evan Green: The new riscv_hwprobe syscall also comes with a vDSO for faster answers to your most common questions. - riscv: Enable multi-arg ifunc resolvers
Evan Green: RISC-V is apparently the first architecture to pass more than one argument to ifunc resolvers. - x86-64: Update _dl_tlsdesc_dynamic to preserve AMX registers
H.J. Lu: _dl_tlsdesc_dynamic should also preserve AMX registers which are caller-saved. - rtld: Add glibc.rtld.enable_secure tunable
Joe Simmons-Talbott: Add a tunable for setting __libc_enable_secure to 1. - x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers
H.J. Lu: Compiler generates the following instruction sequence for GNU2 dynamic TLS access:
leaq tls_var@TLSDESC(%rip), %rax call *tls_var@TLSCALL(%rax)
or
leal tls_var@TLSDESC(%ebx), %eax call *tls_var@TLSCALL(%eax)
CALL instruction is transparent to compiler which assumes all registers, except for EFLAGS and RAX/EAX, are unchanged after CALL. - x86_64: Suppress false positive valgrind error
H.J. Lu: When strcmp-avx2.S is used as the default, elf/tst-valgrind-smoke fails with
==1272761== Conditional jump or move depends on uninitialised value(s)
==1272761== at 0x4022C98: strcmp (strcmp-avx2.S:462)
==1272761== by 0x400B05B: _dl_name_match_p (dl-misc.c:75)
==1272761== by 0x40085F3: _dl_map_object (dl-load.c:1966)
==1272761== by 0x401AEA4: map_doit (rtld.c:644)
==1272761== by 0x4001488: _dl_catch_exception (dl-catch.c:237)
==1272761== by 0x40015AE: _dl_catch_error (dl-catch.c:256)
==1272761== by 0x401B38F: do_preload (rtld.c:816)
==1272761== by 0x401C116: handle_preload_list (rtld.c:892)
==1272761== by 0x401EDF5: dl_main (rtld.c:1842)
==1272761== by 0x401A79E: _dl_sysdep_start (dl-sysdep.c:140)
==1272761== by 0x401BEEE: _dl_start_final (rtld.c:494)
==1272761== by 0x401BEEE: _dl_start (rtld.c:581)
==1272761== by 0x401AD87: ??? (in */elf/ld.so)
The assembly codes are:
0x0000000004022c80 <+144>: vmovdqu 0x20(%rdi),%ymm0 0x0000000004022c85 <+149>: vpcmpeqb 0x20(%rsi),%ymm0,%ymm1 0x0000000004022c8a <+154>: vpcmpeqb %ymm0,%ymm15,%ymm2 0x0000000004022c8e <+158>: vpandn %ymm1,%ymm2,%ymm1 0x0000000004022c92 <+162>: vpmovmskb %ymm1,%ecx 0x0000000004022c96 <+166>: inc %ecx
=> 0x0000000004022c98 <+168>: jne 0x4022c32 <strcmp+66>
strcmp-avx2.S has 32-byte vector loads of strings which are shorter than 32 bytes:
(gdb) p (char *) ($rdi + 0x20) $6 = 0x1ffeffea20 "memcheck-amd64-linux.so" (gdb) p (char *) ($rsi + 0x20) $7 = 0x4832640 "core-amd64-linux.so" (gdb) call (int) strlen ((char *) ($rsi + 0x20)) $8 = 19 (gdb) call (int) strlen ((char *) ($rdi + 0x20)) $9 = 23 (gdb)
It triggers the valgrind error.