"archive:mem" input section description file pattern is not interpreted correctly when it is within quotes.
Reproducer:
#!/usr/bin/env bash
cat >1.c <<\EOF
int foo() { return 1; }
EOF
cat >main.c <<\EOF
int foo();
int main() { return foo(); }
EOF
cat >script.t <<\EOF
SECTIONS {
.foo : { "lib1.a:1.o"(.text*) }
.text : { *(.text*) }
}
EOF
clang -target x86_64-linux-pc-gnu -o 1.o 1.c -c -ffunction-sections
clang -target x86_64-linux-pc-gnu -o main.o main.c -c -ffunction-sections
llvm-ar cr lib1.a 1.o
LDs=(ld.eld)
SFs=(eld)
for i in "${!SFs[@]}"; do
${LDs[$i]} -o main.${SFs[$i]}.out main.o lib1.a -T script.t -Map main.${SFs[$i]}.map.txt
done
The generated output file does not contain .foo output section, and the map-file shows that the "lib1.a:1.o" pattern is not interpreted correctly.