Reproduce does not work when a linker script is found within a -L directory.
Reproducer:
#!/usr/bin/env bash
set -e
mkdir -p A/lib
cat >main.c <<\EOF
int foo() { return 1; }
int main() { return foo(); }
EOF
cat >script.t <<\EOF
EOF
clang -target x86_64-linux-gnu -o main.o main.c -c -ffunction-sections
mv script.t A/lib
ld.eld -o main.eld.out main.o -L A/lib -T script.t --reproduce a.tar
rm -rf reproduce && mkdir reproduce -p
tar -xvf a.tar -C reproduce --strip-components=1
cd reproduce
bash -x response.txt
Reproduce does not work when a linker script is found within a
-Ldirectory.Reproducer: