Package: binutils-x86-64-linux-gnu Version: 2.32-5 Severity: normal Hi,
I tried to optimize the build of apt-cacher-ng a little bit, and I found that I have not used -Wl,threads with gold. So I "fixed" this and then it started crashing. Apparently linking shared libraries works, but executables segfaults. Tried with current sid (version 2.31, I think) and experimental, same problem. While trying to reproduce, I run into the following (and not sure why omiting -Wl,threads makes this go away, but something with -lug looks fishy). gcc is latest from Sid: ii gcc-8 8.3.0-2 amd64 GNU C compiler dev/apt-cacher-ng/dev/relbuild $ gdb /usr/bin/ld.gold GNU gdb (Debian 8.2.1-2) 8.2.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/ld.gold...(no debugging symbols found)...done. (gdb) run -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plug Starting program: /usr/bin/ld.gold -plugin /usr/lib/gcc/x86_64-linux-gnu/8/liblto_plugin.so -plug [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". /usr/bin/ld.gold: error: cannot find -lug Program received signal SIGSEGV, Segmentation fault. __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65 65 ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory. (gdb) bt #0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65 #1 0x000055555569ab8d in ?? () #2 0x000055555569fe1d in ?? () #3 0x000055555566edb9 in ?? () #4 0x00005555556b0448 in ?? () #5 0x00005555556b066a in ?? () #6 0x00005555555a148b in ?? () #7 0x00007ffff7a2009b in __libc_start_main (main=0x5555555a0ef0, argc=4, argv=0x7fffffffdf08, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdef8) at ../csu/libc-start.c:308 #8 0x00005555555a235a in ?? () Best regards, Eduard. -- System Information: Debian Release: buster/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.0.0+ (SMP w/12 CPU cores) Kernel taint flags: TAINT_UNSIGNED_MODULE Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages binutils-x86-64-linux-gnu depends on: ii binutils-common 2.32-5 ii libbinutils 2.32-5 ii libc6 2.28-7 ii zlib1g 1:1.2.11.dfsg-1 binutils-x86-64-linux-gnu recommends no packages. Versions of packages binutils-x86-64-linux-gnu suggests: pn binutils-doc <none> -- no debconf information

