Ulf Samuelsson 0d79a2a8e2 ASCIZ Command for output section
Adds a new directive to the linker script syntax: ASCIZ.
This inserts a zero-terminated string into the output at the place where it is used.
2023-02-14 10:13:28 +00:00

24 lines
513 B
Raku

MEMORY {
rom : ORIGIN = 0x00000, LENGTH = 0x10000
ram : ORIGIN = 0x10000, LENGTH = 0x10000
}
_start = 0x000000;
SECTIONS
{
. = 0x1000 + SIZEOF_HEADERS;
.text ALIGN (0x20) :
{
*(.text)
ASCIZ "This is a string"
. = ALIGN(0x20);
align_label = .;
ASCIZ "This is another \nstring\123"
unalign_label = .;
}
.data : AT (0x10000) { *(.data) } >ram /* NO default AT>rom */
. = ALIGN(0x20);
.bss : { *(.bss) } >ram /* NO default AT>rom */
/DISCARD/ : { *(*) }
}