An x86-64 operating system built from xv6, now largely rewritten: SMP, a copy-on-write root filesystem (SchFS), PCI/USB/virtio drivers, a TTF rasteriser, and a Linux-numbered syscall ABI. No history before this point -- the tree was never under version control. This commit exists so the rename that follows has something to undo to.
43 lines
788 B
Text
43 lines
788 B
Text
/* Simple linker script for the JOS kernel.
|
|
See the GNU ld 'info' manual ("info ld") to learn the syntax. */
|
|
|
|
/* OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") */
|
|
/* OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64") */
|
|
OUTPUT_FORMAT("elf64-x86-64")
|
|
OUTPUT_ARCH(i386:x86-64)
|
|
ENTRY(main)
|
|
|
|
SECTIONS
|
|
{
|
|
/* Link the kernel at this address: "." means the current address */
|
|
/* Must be equal to KERNLINK */
|
|
. = 0x1000;
|
|
|
|
PROVIDE(begin = .);
|
|
|
|
.text : {
|
|
*(.text .rela.text .stub .text.* .gnu.linkonce.t.*)
|
|
}
|
|
|
|
.rodata : {
|
|
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
}
|
|
|
|
/* The data segment */
|
|
.data : {
|
|
*(.data)
|
|
}
|
|
|
|
.bss : {
|
|
*(.bss)
|
|
*(COMMON)
|
|
}
|
|
|
|
. = ALIGN(0x1000);
|
|
|
|
PROVIDE(end = .);
|
|
|
|
/DISCARD/ : {
|
|
*(.eh_frame .rela.eh_frame .note.GNU-stack)
|
|
}
|
|
}
|