link2138_rom.ld

来自「ucos移植到arm的源代码」· LD 代码 · 共 78 行

LD
78
字号
/**************************************************************************
*                                                                         *
*   PROJECT     : ARM port for uC/OS-II                                   *
*                                                                         *
*   MODULE      : LINK2138_ROM.ld                                         *
*                                                                         *
*   AUTHOR      : Michael Anburaj                                         *
*                 URL  : http://geocities.com/michaelanburaj/             *
*                 EMAIL: michaelanburaj@hotmail.com                       *
*                                                                         *
*   SPONSORS    : Thanks to Martin Li (mli00@yahoo.com) & Don Williams    *
*                 (donw@clearblu.net) for sponsoring hardware.            *
*                                                                         *
*   PROCESSOR   : LPC2138 (32 bit ARM7TDMI-S RISC core from Philips)      *
*                                                                         *
*   TOOL-CHAIN  : GCC                                                     *
*                                                                         *
*   DESCRIPTION :                                                         *
*   This is the Linker script file for ROM builds.                        *
*                                                                         *
**************************************************************************/


ENTRY(_start)

/* Memory Definitions */
MEMORY
{
  rom (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
  ram (rw) : ORIGIN = 0x40000000, LENGTH = 0x00008000
}

/* Section Definitions */
SECTIONS
{
  /* first section is .text which is used for code */
  .text :
  {
    init.o (.text)             /* Startup code */
    *(.text)                   /* remaining code */
    *(.rodata)                 /* read-only data (constants) */
    *(.rodata*)
    *(.glue_7)
    *(.glue_7t)
  } > rom

  . = ALIGN(4);
  _etext = . ;
  PROVIDE (etext = .);

  /* .data section which is used for initialized data */
  .data 0x40000080 : AT (_etext)
  {
    _data = .;
    *(.data)
  } > ram
 
  . = ALIGN(4);
  _edata = . ;
  PROVIDE (edata = .);

  /* .bss section which is used for uninitialized data */
  .bss (NOLOAD) :
  {
    _bss = . ;
    *(.bss)
    *(COMMON)
    . = ALIGN(4);
  } > ram

  . = ALIGN(4);
  _end = . ;
  PROVIDE (end = .);
}


/* ********************************************************************* */

⌨️ 快捷键说明

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