mirror of
https://github.com/ziglang/zig.git
synced 2024-11-29 00:22:33 +00:00
55811d8dac
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 betweenb8f85a805b
andafb9f695b1
.
43 lines
677 B
Plaintext
43 lines
677 B
Plaintext
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 = .;
|
|
}
|