NOCROSSREFS should report cross references even if there is no SECTIONS command specified in the linker script, currently, it does not.
Reproducer:
cat > 1.c << '!'
int u = 11;
int foo() { return u; }
int bar() { return foo(); }
!
cat > script.t << '!'
NOCROSSREFS(.text .data)
!
LDs=(ld.eld ld.lld riscv64-unknown-elf-ld.bfd)
SFs=(eld lld bfd)
clang -o 1.o --target=riscv64-unknown-elf 1.c -c -ffunction-sections
for i in "${!SFs[@]}"; do
${LDs[$i]} -o 1.${SFs[$i]}.out 1.o -T script.t -Map 1.${SFs[$i]}.map.txt
done
NOCROSSREFSshould report cross references even if there is noSECTIONScommand specified in the linker script, currently, it does not.Reproducer: