mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-09 15:19:07 +00:00
Clang has a completely inconsistent CLI for its integrated assembler for each target architecture. For x86_64, for example, it does not accept an -mcpu parameter, and emits "warning: unused parameter". However, for ARM, -mcpu is needed in order to properly lower assembly to machine code instructions (see new standalone test case provided thanks to @g-w1). This is a compromise betweenb8f85a805bandafb9f695b1.
42 lines
677 B
Text
42 lines
677 B
Text
ENTRY(_start)
|
|
|
|
SECTIONS
|
|
{
|
|
/* Starts at LOADER_ADDR. */
|
|
. = 0x8000;
|
|
__start = .;
|
|
__text_start = .;
|
|
.text :
|
|
{
|
|
KEEP(*(.text.boot))
|
|
*(.text)
|
|
}
|
|
. = ALIGN(4096); /* align to page size */
|
|
__text_end = .;
|
|
|
|
__rodata_start = .;
|
|
.rodata :
|
|
{
|
|
*(.rodata)
|
|
}
|
|
. = ALIGN(4096); /* align to page size */
|
|
__rodata_end = .;
|
|
|
|
__data_start = .;
|
|
.data :
|
|
{
|
|
*(.data)
|
|
}
|
|
. = ALIGN(4096); /* align to page size */
|
|
__data_end = .;
|
|
|
|
__bss_start = .;
|
|
.bss :
|
|
{
|
|
bss = .;
|
|
*(.bss)
|
|
}
|
|
. = ALIGN(4096); /* align to page size */
|
|
__bss_end = .;
|
|
__end = .;
|
|
}
|