学习blob的简单而有效的代码
源代码在线查看: ld-script
/*------------------------------------------------------------------------- * Filename: ld-script * Version: $Id: ld-script,v 1.2 1999/08/29 12:49:52 erikm Exp $ * Copyright: Copyright (C) 1999, Erik Mouw * Author: Erik Mouw * Description: ld (linker) script to make the blob bootlader. * Heavily inspired by the Linux kernel linker scripts. * Created at: Tue Aug 24 17:24:06 1999 * Modified by: Erik Mouw * Modified at: Sun Aug 29 14:45:54 1999 *-----------------------------------------------------------------------*/ OUTPUT_FORMAT("elf32-arm", "elf32-arm", "elf32-arm") OUTPUT_ARCH(arm) ENTRY(_start) SECTIONS { . = ALIGN(4); .text : { *(.text) } . = ALIGN(4); .rodata : { *(.rodata) } . = ALIGN(4); .data : { *(.data) } . = ALIGN(4); .got : { *(.got) } }