The _start code in crt0.S located in newlib is used to initialise Morello for bare metal mode at EL3, but where can I find the linker script for this set up? There are a number of ld files in newlib but it is not clear which, if any are associated with Morello? Where can I find this default linker script please for Morello?
By default the bare-metal toolchain is not using any of the newlib linker scripts, The default lld linker script is used instead, with clang specifying the image base and entry symbol (0x80000000 and _start). This default linker script is built into lld, so there is no way to get an equivalent one.
lld should be providing all the symbols needed for crt0.S even if you write your own linker script. Are you seeing any issues with that?
I am writing my own linker script to put sections of my code in specific places in memory, but wanted to check a few things against the default one. ok Thanks
The linker script makes a memory map of this memory allocation which is important to embedded systems because, having no OS, you have the ability then to manage the behavior of the chip. For G++, sets up the constructor and destructor tables. The actual section names vary depending on your object file format.