linker script
In the OTBN random instruction generator flow, a linker script is an output artifact generated by otbn-rig asm alongside an assembly listing.[1]
Role in the OTBN RIG flow
After otbn-rig gen produces a random program in JSON form, the asm subcommand performs a deterministic translation from that JSON input to both assembly and linker-script output.[2]
For example, running:
hw/ip/otbn/dv/rig/otbn-rig asm --output foo foo.json
produces:
foo.s: an assembly listingfoo.ld: a linker script[1]
The generated linker script is then supplied to the OTBN linker step with -T:
hw/ip/otbn/util/otbn_as.py -o foo.o foo.s
hw/ip/otbn/util/otbn_ld.py -o foo.elf -T foo.ld foo.o
This means the linker script is part of the standard path from generated OTBN assembly to a linked ELF binary.[3]
Generation behavior
otbn-rig asm only generates the linker script when an output prefix is provided with --output. If --output is omitted, the command writes only the assembly listing to stdout and does not generate a linker script.[4]
Scope of available evidence
The available evidence establishes the linker script's place in the OTBN RIG tool flow: it is generated as a .ld file by otbn-rig asm and consumed by otbn_ld.py during linking. The evidence here does not describe the internal contents or syntax of the linker script itself.
[2]: See citation "otbn-rig asm deterministically translates JSON input to assembly and linker script output".
[1]: See citation "otbn-rig asm --output foo generates foo.s and foo.ld".
[3]: See citation "The generated linker script is passed to otbn_ld.py with -T foo.ld during linking".
[4]: See citation "Without --output, otbn-rig asm does not generate a linker script".