⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ldscript

📁 open source bios with linux platform, very good and can be reused.
💻
字号:
OUTPUT_FORMAT(elf64-sparc)OUTPUT_ARCH(sparc:v9)/* Qemu ELF loader can't handle very complex files, so we put ELFBootinfo to rodata and put initctx to data.*/ENTRY(trap_table)/* Initial load address */BASE_ADDR = 0x000001fff0000000;/* 16KB heap and stack */HEAP_SIZE = 16384;STACK_SIZE = 16384;VMEM_SIZE = 128 * 1024;IOMEM_SIZE = 256 * 1024 + 768 * 1024;SECTIONS{    . = BASE_ADDR;    /* Start of the program.      * Now the version string is in the note, we must include it     * in the program. Otherwise we lose the string after relocation. */    _start = .;    /* Normal sections */    .text ALIGN(65536): {        *(.text.vectors)        *(.text)        *(.text.*)    }    .rodata ALIGN(65536): {        _rodata = .;	sound_drivers_start = .;	*(.rodata.sound_drivers)	sound_drivers_end = .;	*(.rodata)	*(.rodata.*)        *(.note.ELFBoot)    }    .data ALIGN(65536): {        _data = .;        *(.data)        *(.data.*)    }    .bss ALIGN(4096): {        _bss = .;	*(.bss)	*(.bss.*)	*(COMMON)	/* Put heap and stack here, so they are included in PT_LOAD segment	 * and the bootloader is aware of it. */	. = ALIGN(16);	_heap = .;	. += HEAP_SIZE;	. = ALIGN(16);	_eheap = .;	. = ALIGN(4096);	_vmem = .;	. += VMEM_SIZE;        _evmem = .;	_stack = .;	. += STACK_SIZE;	. = ALIGN(16);	_estack = .;    }    . = ALIGN(4096);    _end = .;    _iomem = _end + IOMEM_SIZE;    /* We discard .note sections other than .note.ELFBoot,     * because some versions of GCC generates useless ones. */    /DISCARD/ : { *(.comment*) *(.note.*) }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -