Skip to content

NOCROSSREFS does not report cross references if there is no SECTIONS command in the linker script #451

@parth-07

Description

@parth-07

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions