|
From: | slyfox at inbox dot ru |
Subject: | [Bug ld/28138] [2.37 Regression][bisected] Linker plugin complains about "malformed archive" on thin archines |
Date: | Mon, 26 Jul 2021 13:20:40 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28138 --- Comment #8 from Sergei Trofimovich <slyfox at inbox dot ru> --- Here is the full reproducer: 1200 interdependent files required for a thin archive. gcc-11.1.0 + binutils-2.36.1: $ ./mk.bash thin archive for 1200 176 gcc-11.1.0 + binutils-2.37: $ ./mk.bash thin archive for 1200 /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: //libthin.a: error adding symbols: malformed archive Full script: $ cat mk.bash #!/bin/bash rm -rf -- libthin.a main.o m s mkdir -p s cc=x86_64-pc-linux-gnu-gcc ar=x86_64-pc-linux-gnu-ar nfiles=${1-1200} for i in `seq 1 ${nfiles}`; do prev_i=$((i - 1)) printf "extern int a${prev_i}(void); int a${i}(void) { return 1 + a${prev_i}(); }" > s/a${i}.c $cc -c s/a${i}.c -o s/a${i}.o done printf "int a0(void) { return 0; }; extern int a${nfiles}(void); int main() { return a${nfiles}(); }" > main.c $cc -c main.c -o main.o # thin archive echo "thin archive for $nfiles" >&2 $ar crsT libthin.a s/a*.o $cc -pthread -o m -rdynamic -m64 main.o ${PWD}/libthin.a ./m; echo $? -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |