targets/coverity/btshell_nrf52840_coverity/nrf52.ld (81 lines of code) (raw):

/* Linker script for Nordic Semiconductor nRF5 devices * * Version: Sourcery G++ 4.5-1 * Support: https://support.codesourcery.com/GNUToolchain/ * * Copyright (c) 2007, 2008, 2009, 2010 CodeSourcery, Inc. * * The authors hereby grant permission to use, copy, modify, distribute, * and license this software and its documentation for any purpose, provided * that existing copyright notices are retained in all copies and that this * notice is included verbatim in any distributions. No written agreement, * license, or royalty fee is required for any of the authorized uses. * Modifications to this software may be copyrighted by their authors * and need not follow the licensing terms described here, provided that * the new terms are clearly indicated on the first page of each file where * they apply. */ OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") SECTIONS { .imghdr (NOLOAD): { . = . + _imghdr_size; } > FLASH __text = .; .text : { } > FLASH .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) . = ALIGN(4); } > FLASH __exidx_start = .; .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) . = ALIGN(4); } > FLASH __exidx_end = .; __etext = .; .vector_relocation : { } > RAM /* This section will be zeroed by RTT package init */ .rtt (NOLOAD): { . = ALIGN(4); *(.rtt) . = ALIGN(4); } > RAM .data : { } > RAM AT > FLASH .bssnz : { } > RAM .bss : { } > RAM /* Heap starts after BSS */ . = ALIGN(8); __HeapBase = .; /* .stack_dummy section doesn't contains any symbols. It is only * used for linker to calculate size of stack sections, and assign * values to stack symbols later */ .stack_dummy (COPY): { *(.stack*) } > RAM _ram_start = ORIGIN(RAM); /* Set stack top to end of RAM, and stack limit move down by * size of stack_dummy section */ __StackTop = ORIGIN(RAM) + LENGTH(RAM); __StackLimit = __StackTop - SIZEOF(.stack_dummy); PROVIDE(__stack = __StackTop); /* Top of head is the bottom of the stack */ __HeapLimit = __StackLimit; /* Check if data + heap + stack exceeds RAM limit */ ASSERT(__HeapBase <= __HeapLimit, "region RAM overflowed with stack") }