/*
    GNU linker script for NRF52 w/ s132 3.0.0 SoftDevice
*/

/* Specify the memory areas */
MEMORY
{
    FLASH (rx)      : ORIGIN = 0x00000000, LENGTH = 0x080000 /* entire flash, 512 KiB */
    FLASH_ISR (rx)  : ORIGIN = 0x0001f000, LENGTH = 0x001000 /* sector 0, 4 KiB */
    FLASH_TEXT (rx) : ORIGIN = 0x00020000, LENGTH = 0x060000 /* 396 KiB */
    RAM (xrw)       : ORIGIN = 0x200039c0, LENGTH = 0x0c640  /* 49.5 KiB, give 8KiB headroom for softdevice */
}

/* produce a link error if there is not this amount of RAM for these sections */
_minimum_stack_size = 2K;
_minimum_heap_size = 16K;

/* top end of the stack */

/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/
_estack = ORIGIN(RAM) + LENGTH(RAM);

/* RAM extents for the garbage collector */
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_heap_end = 0x20005000; /* tunable */

INCLUDE "boards/common.ld"

/*
    GNU linker script for NRF52 w/ s132 3.0.0 SoftDevice
*/

/* Specify the memory areas */
MEMORY
{
    FLASH (rx)      : ORIGIN = 0x00000000, LENGTH = 0x080000 /* entire flash, 512 KiB */
    FLASH_ISR (rx)  : ORIGIN = 0x0001f000, LENGTH = 0x001000 /* sector 0, 4 KiB */
    FLASH_TEXT (rx) : ORIGIN = 0x00020000, LENGTH = 0x060000 /* 396 KiB */
    RAM (xrw)       : ORIGIN = 0x200039c0, LENGTH = 0x0c640  /* 49.5 KiB, give 8KiB headroom for softdevice */
}

/* produce a link error if there is not this amount of RAM for these sections */
_minimum_stack_size = 2K;
_minimum_heap_size = 16K;

/* top end of the stack */

/*_stack_end = ORIGIN(RAM) + LENGTH(RAM);*/
_estack = ORIGIN(RAM) + LENGTH(RAM);

/* RAM extents for the garbage collector */
_ram_end = ORIGIN(RAM) + LENGTH(RAM);
_heap_end = 0x20006000; /* tunable */

INCLUDE "boards/common.ld"

nrf5/boards: Adjust heap end after increased .data usage in nrf52832 s132 linker script.


OUTPUT_FORMAT("elf32-i386")
ENTRY(_start)
phys = 0x100000;

SECTIONS
{
  .text phys : AT(phys)
  {
    text = .;
    *(.multiboot)
    *(.text)
    . = ALIGN(4K);
  }

  .rodata : AT(phys + (rodata - text))
  {
    rodata = .;
    *(.rodata*)
    . = ALIGN(4K);
  }

  .data : AT(phys + (data - text))
  {
    data = .;
    *(.data)
    . = ALIGN(4K);
  }

  .bss : AT(phys + (bss - text))
  {
    bss = .;
    *(COMMON)
    *(.bss)
    *(.stack)
    . = ALIGN(4K);
  }

  kernels_end = .;
}

OUTPUT_FORMAT("elf32-i386")
ENTRY(_start)
phys = 0x100000;

SECTIONS
{
  .text phys : AT(phys)
  {
    text = .;
    *(.multiboot)
    *(.text)
    *(.rodata*)
    . = ALIGN(4K);
  }

  .data : AT(phys + (data - text))
  {
    data = .;
    *(.data)
    . = ALIGN(4K);
  }

  .bss : AT(phys + (bss - text))
  {
    bss = .;
    *(COMMON)
    *(.bss)
    *(.stack)
    . = ALIGN(4K);
  }

  kernels_end = .;
}

Make .rodata be included in .text

Make .rodata be included in .text


/* Update the linker script with rules for custom sections */
SECTIONS
{
  .text :
  {
    . = ALIGN(4);
    __start_command_section = .;
    *(.command_section)
    __stop_command_section = .;
  } >FLASH
}

/* Update the linker script with rules for custom sections */
SECTIONS
{
  .text :
  {
    . = ALIGN(4);
    __start_command_section = .;
    *(command_section)
    __stop_command_section = .;
  } >FLASH
}

Fix command section name for STM32 targets


/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
ENTRY(Reset_Handler)

/*
 * Memory map
 */
MEMORY {
    FLASH (rx): ORIGIN = 0x08004000, LENGTH = 240K
    CCRAM (rw): ORIGIN = 0x10000000, LENGTH = 8K
    SRAM  (rw): ORIGIN = 0x20000000, LENGTH = 40K
}
/*
 * Image header size - no bootloader support, no header.
 */
_imghdr_size = 0x20;

/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
ENTRY(Reset_Handler)

/*
 * Memory map
 */
MEMORY {
    FLASH (rx): ORIGIN = 0x08004000, LENGTH = 88K
    CCRAM (rw): ORIGIN = 0x10000000, LENGTH = 8K
    SRAM  (rw): ORIGIN = 0x20000000, LENGTH = 40K
}
/*
 * Image header size - no bootloader support, no header.
 */
_imghdr_size = 0x20;

Fix slot0 size in f3disco to avoid writing after end

Signed-off-by: Fabio Utzig <66676b1ceaf93296e098708c09494361103aa635@apache.org>


ENTRY(_Reset)
SECTIONS
{
  . = 0x10000;
  .startup  . : { testit*exe/startup.S.o(.text) }
  .text : { *(.text) }
  .data : { *(.data) }
  .bss : { *(.bss COMMON) }
  . = ALIGN(8);
  . = . + 0x1000; /* 4kB stack */
  stack_top = .;
}

ENTRY(_Reset)
SECTIONS
{
  . = 0x10000;
  /* TODO: fix meson naming scheme so there its something other
   * than testit@exe as the linker script doesn't like '@' */
  .startup  . : { testit?exe/startup.S.o(.text) }
  .text : { *(.text) }
  .data : { *(.data) }
  .bss : { *(.bss COMMON) }
  . = ALIGN(8);
  . = . + 0x1000; /* 4kB stack */
  stack_top = .;
}

Use question mark instead of asterisk in path for startup.S.o.

Jussi use asterisk but he suggested question mark is marginally better
as it would match less possibilities. Long term the use of the '@' in
meson needs to be fixed see [issue #24](https://github.com/mesonbuild/meson/issues/294)


# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

ENTRY(interrupt_reset)

MEMORY
{
    FLASH (rx) : ORIGIN = 0x0000000, LENGTH = 0x80000
    STACK (rw): ORIGIN = 0x20004FFC, LENGTH = 0K
    RAM (rw) : ORIGIN = 0x20010000, LENGTH = 0x10000
}

SECTIONS
{
    .text :
    {
        KEEP(*(.vector_table))
        *(.text)
    } >FLASH

    .stack :
    {
        _STACK_HEAD = .;
    } >STACK
}

Remove license header form linker script

Signed-off-by: Tomasz Jankowski <503a486186d52d88001783868db1a06ad09e4157@gmail.com>


ENTRY (main)

MEMORY
{
	ram : ORIGIN = 0x00218000, LENGTH = 29M
	rom : ORIGIN = 0x60000000, LENGTH = 8M
}

SECTIONS
{
	.data : /* Initialized data. */
	{
		_DataStart = . ;
		*(.data)
		_DataEnd = . ;
	} >ram

	.bss : /* Uninitialized data. */
	{
		_BssStart = . ;
		*(.bss)
		_BssEnd = . ;
	} >ram

	.text : /* The actual instructions. */
	{
		*(.text)
		*(.got)
		*(.got.plt)
		*(.rodata)
		*(.rodata.str1.4)
		*(.glue_7)
		*(.glue_7t)
	} >ram
}

ENTRY (main)

MEMORY
{
	ram : ORIGIN = 0x00218000, LENGTH = 29M
	rom : ORIGIN = 0x60000000, LENGTH = 8M
}

SECTIONS
{
	.data : /* Initialized data. */
	{
		_DataStart = . ;
		*(.data)
		_DataEnd = . ;
	} >ram

	.bss : /* Uninitialized data. */
	{
		_BssStart = . ;
		*(.bss)
		*(.sbss)
		_BssEnd = . ;
	} >ram

	.text : /* The actual instructions. */
	{
		*(.text)
		*(.got)
		*(.got.plt)
		*(.rodata)
		*(.rodata.str1.4)
		*(.glue_7)
		*(.glue_7t)
	} >ram
}

Add an sbss section to the linker script


/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0x26000 /* 128k, 128k is taken by S110 */
  RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 /* 8k, 8k is taken by S110 */
}
INCLUDE "gcc_nrf51_common.ld"

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0x26000 /* 80 kB is taken by S110, 176 kB for app. */
  RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 /* 8 kB is taken by S110,8 kB for app. */
}
INCLUDE "gcc_nrf51_common.ld"

Fix comments in S110 linker script.

Fix comments in S110 linker script.


# For Android, we must not export anything other than loader-related API
{
global:
	vkGetInstanceProcAddr;

	# Loader-ICD interface functions
	vk_icdGetInstanceProcAddr;
	vk_icdNegotiateLoaderICDInterfaceVersion;

	# Android HAL module info object
	HMI;

local:
	*;
};

# For Android, we must not export anything other than loader-related API
{
global:
	# Loader-ICD interface functions
	vk_icdGetInstanceProcAddr;
	vk_icdNegotiateLoaderICDInterfaceVersion;

	# Android HAL module info object
	HMI;

local:
	*;
};

Remove vkGetInstanceProcAddr from exported symbols on Android

Android only allows access to the ICD's functions, through the Vulkan
Loader interface functions.

This was causing direct access to vkGetPhysicalDeviceSurfaceFormatsKHR,
while Android's libvulkan must override it to provide an implementation
based on AHardwareBuffer, which affects things like wide-gamut support.

Bug: b/182576189
Bug: b/148822450
Change-Id: I64fd5a601f92beca186696d2cd09eee1a09b8ce9
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53608
Reviewed-by: Jason Macnak <76caa58940b8c6785e996f522e85b625ac7c7baa@google.com>
Reviewed-by: Chris Forbes <c3279c50043e18e9442c1ae071cafa0e7a4ca967@google.com>
Tested-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>


OUTPUT_FORMAT("elf64-x86-64") /* FLAT BINARY DOES NOT WORK, ELF WORKS */
ENTRY(start)

SECTIONS {
  . = 0x0000000000010000;

  .entry :
  {
    /* ensure that the kernel entry code is at the beginning */
    *(.entry)
  }
  .text : ALIGN(0x1000)
  {
    *(.text .text.*)
  }
  .rodata : ALIGN(0x1000)
  {
    *(.rodata .rodata.*)
  }

  .data : ALIGN(0x1000)
  {
    *(.data .data.*)
  }

  .data.rel.ro : ALIGN(0x1000)
  {
    *(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*)
  }
}

OUTPUT_FORMAT("elf64-x86-64") /* FLAT BINARY DOES NOT WORK, ELF WORKS */
ENTRY(start)

SECTIONS {
  . = 0x0000000000010000;

  .entry :
  {
    /* ensure that the kernel entry code is at the beginning */
    *(.entry)
  }
  .text : ALIGN(0x200)
  {
    *(.text .text.*)
  }
  .rodata : ALIGN(0x200)
  {
    *(.rodata .rodata.*)
  }

  .data : ALIGN(0x200)
  {
    *(.data .data.*)
  }

  .data.rel.ro : ALIGN(0x200)
  {
    *(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*)
  }
}

Reduce binary size by cutting aligments

Reduce binary size by cutting aligments


/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) : ORIGIN = 0xA000, LENGTH = 0x36000 /* 128k, 128k is taken by S110 */
  RAM (rwx) : ORIGIN = 0x20000800, LENGTH = 0x3800 /* 8k, 8k is taken by S110 */
}
INCLUDE "gcc_nrf51_common.ld"

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) : ORIGIN = 0xC000, LENGTH = 0x34000 /* 48 kB is taken by S210, 80 kB for app. */
  RAM (rwx) : ORIGIN = 0x20000900, LENGTH = 0x3700 /* 2.25 kB is taken by S210, 13.75 kB for app.  */
}
INCLUDE "gcc_nrf51_common.ld"

Update S210 linker script for S210 3.0.0.


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) :  ORIGIN = 0x08000000, LENGTH = 32K
  ITCM (rx)  :  ORIGIN = 0x00000000, LENGTH = 16K
  DTCM (rwx) :  ORIGIN = 0x20000000, LENGTH = 128K
  RAM (rwx)  :  ORIGIN = 0x20020000, LENGTH = 512K
}

/* The bootloader does not contain an image header */
_imghdr_size = 0x0;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) :  ORIGIN = 0x08000000, LENGTH = 32K  /* FLASHAXI_BASE */
  ITCM (rx)  :  ORIGIN = 0x00000000, LENGTH = 16K  /* RAMITCM_BASE */
  DTCM (rwx) :  ORIGIN = 0x20000000, LENGTH = 64K  /* RAMDTCM_BASE */
  RAM (rwx)  :  ORIGIN = 0x20020000, LENGTH = 256K /* SRAM1_BASE */
}

/* The bootloader does not contain an image header */
_imghdr_size = 0x0;

Add comments to boot linker script.

Add comments to boot linker script.


LIBCEE_SYSLOG_0.1.0 {
	global:
        # Our own symbols
          cee_format;
          cee_vformat;
          cee_syslog;
          cee_vsyslog;
          cee_legacy_syslog;
          cee_legacy_vsyslog;
          cee_openlog;
          cee_setlogmask;
        # Overrides
          syslog;
          vsyslog;
          openlog;
          setlogmask;
};

LIBCEE_SYSLOG_0.1.0 {
	global:
        # Our own symbols
          cee_format;
          cee_vformat;
          cee_syslog;
          cee_vsyslog;
          cee_legacy_syslog;
          cee_legacy_vsyslog;
          cee_openlog;
          cee_setlogmask;
        # Overrides
          syslog;
          vsyslog;
          openlog;
          setlogmask;

	local:
        # Inherited from elsewhere, but should not be exported
          facilitynames;
          prioritynames;
};

Hide two inherited symbols with the version script.

We inherit facilitynames and prioritynames from syslog.h, but they
should not be exported by us.

Signed-off-by: Gergely Nagy <6780fac3b38619ac20422286e4110a70dbba2203@balabit.hu>


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 32K
  CCM (rwx) : ORIGIN = 0x10000000, LENGTH = 64K
  RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
}

/* The bootloader does not contain an image header */
_imghdr_size = 0x0;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) :  ORIGIN = 0x08000000, LENGTH = 16K
  CCM (rwx) :   ORIGIN = 0x10000000, LENGTH = 64K
  RAM (rwx) :   ORIGIN = 0x20000000, LENGTH = 128K
}

/* The bootloader does not contain an image header */
_imghdr_size = 0x0;

Fix linker script's boot size to match bsp.yml


ENTRY (main)

MEMORY
{
	ram : ORIGIN = 0x00218000, LENGTH = 29M
	rom : ORIGIN = 0x60000000, LENGTH = 8M
}

SECTIONS
{
	data : /* Initialized data. */
	{
		_DataStart = . ;
		*(.data)
		_DataEnd = . ;
	} >ram

	bss : /* Uninitialized data. */
	{
		_BssStart = . ;
		*(.bss)
		_BssEnd = . ;
	} >ram

	text : /* The actual instructions. */
	{
		*(.text)
		*(.got)
		*(.got.plt)
		*(.rodata)
		*(.rodata.str1.4)
		*(.glue_7)
		*(.glue_7t)
	} >ram
}

ENTRY (main)

MEMORY
{
	ram : ORIGIN = 0x00218000, LENGTH = 29M
	rom : ORIGIN = 0x60000000, LENGTH = 8M
}

SECTIONS
{
	.data : /* Initialized data. */
	{
		_DataStart = . ;
		*(.data)
		_DataEnd = . ;
	} >ram

	.bss : /* Uninitialized data. */
	{
		_BssStart = . ;
		*(.bss)
		_BssEnd = . ;
	} >ram

	.text : /* The actual instructions. */
	{
		*(.text)
		*(.got)
		*(.got.plt)
		*(.rodata)
		*(.rodata.str1.4)
		*(.glue_7)
		*(.glue_7t)
	} >ram
}

Fix bullshit in the linker script

Fix bullshit in the linker script

The “ld: error: no memory region specified for loadable section `.bss’”
problem was literally because the section was misnamed in the script.

And guess what, if we fix .data as well then static variable initialization
actually works. Hooray for another class-wide misdiagnosis…


/* Linker script for AliExpress STM32F103 board (STM32F103C8T6, 64K flash, 20K RAM). */

MEMORY
{
	rom (rx)  : ORIGIN = 0x08000000, LENGTH = 64K
	ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
}

INCLUDE libopencm3_stm32f1.ld

/* Linker script for AliExpress STM32F103 board (STM32F103C8T6, 64K flash, 20K RAM). */

MEMORY
{
	rom (rx)  : ORIGIN = 0x08000000, LENGTH = 64K
	ram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K
}

/* Put the transmitter configuration in the upper-most 8 KBytes of flash */
SECTIONS
{
    .transmitter_configuration 0x0800e000 :
    {
        *(.rodata.config_flash)
    }
}

INCLUDE libopencm3_stm32f1.ld

Put config_flash into fixed memory at 0x0800e000


/*
 * generic gcc linker script for LPC1549
 * Taken from Kamal Mostafa <kamal@whence.com>.
 *
 * License: Public Domain
 */

MEMORY
{
    FLASH (rx)    : ORIGIN = 0x00000000, LENGTH = 256K
    RAM (rwx)     : ORIGIN = 0x02000000, LENGTH = 16K
    RAM1 (rwx)    : ORIGIN = 0x02004000, LENGTH = 16K
    RAM2 (rwx)    : ORIGIN = 0x02008000, LENGTH = 4K
}

SECTIONS
{
    .text :
    {
        _text = .;
        KEEP(*(.isr_vector))
        KEEP(*(.after_vectors))
        *(.text*)
        *(.rodata*)
        _etext = .;
    } > FLASH

    .data : AT (ADDR(.text) + SIZEOF(.text))
    {
        __stack_start__ = .; /* start of the stack section */
        KEEP(*(.stack))
         . = ALIGN(4);
        __stack_end__ = .;   /* end of the stack section */

        _data = .;
        *(vtable)
        *(.data*)
        _edata = .;
    } > RAM

    .bss :
    {
        _bss = .;
        *(.bss*)
        *(COMMON)
        _ebss = .;
    } > RAM

}

/*
 * generic gcc linker script for LPC1549
 * Taken from Kamal Mostafa <kamal@whence.com>.
 *
 * License: Public Domain
 */

MEMORY
{
    FLASH (rx)    : ORIGIN = 0x00000000, LENGTH = 256K
    RAM (rwx)     : ORIGIN = 0x02000000, LENGTH = 16K
    RAM1 (rwx)    : ORIGIN = 0x02004000, LENGTH = 16K
    RAM2 (rwx)    : ORIGIN = 0x02008000, LENGTH = 4K
}

SECTIONS
{
    .text :
    {
        _text = .;
        KEEP(*(.isr_vector))
        KEEP(*(.after_vectors))
        *(.text*)
        *(.rodata*)
        _etext = .;
    } > FLASH

    .data :
    {
        __stack_start__ = .; /* start of the stack section */
        KEEP(*(.stack))
         . = ALIGN(4);
        __stack_end__ = .;   /* end of the stack section */

        _data = .;
        *(vtable)
        *(.data*)
        _edata = .;
    } > RAM AT > FLASH

    .bss :
    {
        _bss = .;
        *(.bss*)
        *(COMMON)
        _ebss = .;
    } > RAM

}

Fix bug with linker script

Fix bug with linker script


/* Flash Split for 4M chips */
/* sketch 1019KB */
/* spiffs 3052KB */
/* eeprom 20KB */

MEMORY
{
  dport0_0_seg :                        org = 0x3FF00000, len = 0x10
  dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = 0x40201010, len = 0xfeff0
}

PROVIDE ( _SPIFFS_start = 0x40500000 );
PROVIDE ( _SPIFFS_end = 0x405FB000 );
PROVIDE ( _SPIFFS_page = 0x100 );
PROVIDE ( _SPIFFS_block = 0x2000 );

INCLUDE "../ld/eagle.app.v6.common.ld"

/* Flash Split for 4M chips */
/* sketch 1019KB */
/* empty  2048KB */
/* spiffs 1004KB */
/* eeprom 20KB */

MEMORY
{
  dport0_0_seg :                        org = 0x3FF00000, len = 0x10
  dram0_0_seg :                         org = 0x3FFE8000, len = 0x14000
  iram1_0_seg :                         org = 0x40100000, len = 0x8000
  irom0_0_seg :                         org = 0x40201010, len = 0xfeff0
}

PROVIDE ( _SPIFFS_start = 0x40500000 );
PROVIDE ( _SPIFFS_end = 0x405FB000 );
PROVIDE ( _SPIFFS_page = 0x100 );
PROVIDE ( _SPIFFS_block = 0x2000 );

INCLUDE "../ld/eagle.app.v6.common.ld"

Fix comment in linker script

Fix comment in linker script


Fix comment in linker script

Fix comment in linker script


add_language_extension("cpp", "c")
add_language_extension("hpp", "c")
file = {"../src/lib/configure", "../src/configure"}
project = "configure"
package = "configure"
description = "Configure your projects' builds"
one = false
sort = true
merge = true
topics = {'../README.md'}
kind_names = {topic = 'Manual',}
template = true
style = true
format = 'discount'

add_language_extension("cpp", "c")
add_language_extension("hpp", "c")
file = {"../src/lib/configure", "../src/configure"}
project = "configure"
package = "configure"
description = "Configure your projects' builds"
one = false
sort = true
merge = true
--topics = {'../README.md'}
readme = '../README.md'
kind_names = {topic = 'Manual',}
-- template = true
-- style = true
format = 'discount'

Disable custom template and style

doc: Disable custom template and style


MEMORY
{
  FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x4000            /* 16K */
  RAM (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000      /* 4K */
}

SECTIONS
{
    .vectors :
    {
        _text = .;
        KEEP(*(.isr_vector))
        . = ALIGN(4);
    } > FLASH

    .persistent_data :
    {
        . = ALIGN(64);
        KEEP(*(.persistent_data))
        . = ALIGN(64);
    } > FLASH

    .text :
    {
        KEEP(*(.after_vectors))
        *(.text*)
        *(.rodata*)
        . = ALIGN(4);
        _etext = .;
    } > FLASH

    .data : AT (_etext)
    {
        _data = .;
        *(.survivors)       /* 80 bytes that survive reset in LPC81x */
        *(.data*)
        . = ALIGN(4);
        _edata = .;
    } > RAM

    .bss :
    {
        _bss = .;
        *(.bss*)
        *(COMMON)
        . = ALIGN(4);
        _ebss = .;
    } > RAM

    /* The stack starts 32 bytes below to of RAM as those 32 bytes are needed
     * for the IAR ROM function that we use to write the Flash with persistent
     * data.
     */
    _stacktop = ORIGIN(RAM) + LENGTH(RAM) - 32;
}

MEMORY
{
  FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x4000            /* 16K */
  RAM (rwx) : ORIGIN = 0x10000000, LENGTH = 0x1000      /* 4K */
}

SECTIONS
{
    .vectors :
    {
        _text = .;
        KEEP(*(.isr_vector))
        . = ALIGN(4);
    } > FLASH

    .text :
    {
        KEEP(*(.after_vectors))
        *(.text*)
        *(.rodata*)
        . = ALIGN(4);
        _etext = .;
    } > FLASH

    .data : AT (_etext)
    {
        _data = .;
        *(.survivors)       /* 80 bytes that survive reset in LPC81x */
        *(.data*)
        . = ALIGN(4);
        _edata = .;
    } > RAM

    .bss :
    {
        _bss = .;
        *(.bss*)
        *(COMMON)
        . = ALIGN(4);
        _ebss = .;
    } > RAM

    /* Use the top-most page in flash to store the persistent data */
    .persistent_data : AT (0x4000 - 64)
    {
        KEEP(*(.persistent_data))
    } > FLASH

    /* The stack starts 32 bytes below to of RAM as those 32 bytes are needed
     * for the IAR ROM function that we use to write the Flash with persistent
     * data.
     */
    _stacktop = ORIGIN(RAM) + LENGTH(RAM) - 32;
}

Move persistent storage into top of the flash


Make sure programs goes in PML4T entries > 0


PROVIDE(diag_init = nosys);
PROVIDE(diag_getc = nosys);
PROVIDE(diag_putc = nosys);

PROVIDE(irq_init     = nosys);
PROVIDE(irq_attach   = nosys);
PROVIDE(irq_detach   = nosys);
PROVIDE(irq_dispatch = nosys);

PROVIDE(softirq_init     = nosys);
PROVIDE(softirq_install  = nosys);
PROVIDE(softirq_raise    = nosys);
PROVIDE(softirq_dispatch = nosys);

PROVIDE(sched_policy_current = nosys);
PROVIDE(__sched_dispatch = nosys);

PROVIDE(printk = nosys);

PROVIDE(timer_init = nosys);
PROVIDE(set_timer = nosys);
PROVIDE(close_timer = nosys);
PROVIDE(timers_off = nosys);
PROVIDE(irq_func_tmr_1mS = nosys);
PROVIDE(usleep = nosys);

/* XXX remove from here. -- Eldar */
PROVIDE(uart_init = nosys);

PROVIDE(diag_init = nosys);
PROVIDE(diag_getc = nosys);
PROVIDE(diag_putc = nosys);

PROVIDE(irq_init     = nosys);
PROVIDE(irq_attach   = nosys);
PROVIDE(irq_detach   = nosys);
PROVIDE(irq_dispatch = nosys);

PROVIDE(softirq_init     = nosys);
PROVIDE(softirq_install  = nosys);
PROVIDE(softirq_raise    = nosys);
PROVIDE(softirq_dispatch = nosys);

PROVIDE(sched_policy_current = nosys);
PROVIDE(__sched_dispatch = nosys);
PROVIDE(sched_check_switch = nosys);

PROVIDE(printk = nosys);

PROVIDE(timer_init = nosys);
PROVIDE(set_timer = nosys);
PROVIDE(close_timer = nosys);
PROVIDE(timers_off = nosys);
PROVIDE(irq_func_tmr_1mS = nosys);
PROVIDE(usleep = nosys);

/* XXX remove from here. -- Eldar */
PROVIDE(uart_init = nosys);

Fix undefined reference to `sched_check_switch' error on some configs


/**
 * @addtogroup      cpu_cc26x0
 * @{
 *
 * @file
 * @brief           linker script for cc26x0f128 MCUs
 *
 * @}
 */

/* Memory Space Definitions: */
MEMORY
{
    rom  (rx ) : ORIGIN = 0x00000000, LENGTH = 0x00020000 - 88 /* technically, it's 128K */
    gpram  (rwx) : ORIGIN = 0x11000000, LENGTH = 8K /* configurable as cache. 20K here, 8K there, and 2K in the ld-script of cc26x0ware */
    ram    (rwx) : ORIGIN = 0x20000000, LENGTH = 20K /* sram */
}

INCLUDE cortexm_base.ld

/**
 * @addtogroup      cpu_cc26x0
 * @{
 *
 * @file
 * @brief           linker script for cc26x0f128 MCUs
 *
 * @}
 */

/* Memory Space Definitions: */
MEMORY
{
    rom (rx)   : ORIGIN = 0x00000000, LENGTH = 0x00020000 - 88 /* technically, it's 128K */
    gpram      : ORIGIN = 0x11000000, LENGTH = 8K /* configurable as cache. 20K here, 8K there, and 2K in the ld-script of cc26x0ware */
    ram (w!rx) : ORIGIN = 0x20000000, LENGTH = 20K /* sram */
}

INCLUDE cortexm_base.ld

cc26x0: Adjust ldscript memory segment attributes


/*
 * Copyright (C) 2017 Inria
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

/**
 * @addtogroup      cpu_samd21
 * @{
 *
 * @file
 * @brief           Memory definitions for the SAMD21J18A with Arduino bootloader
 *
 * @author          Alexandre Abadie <alexandre.abadie@inria.fr>
 *
 * @}
 */

MEMORY
{
    rom (rx)    : ORIGIN = 0x00002000, LENGTH = 256K-0x2000
    ram (rwx)   : ORIGIN = 0x20000000, LENGTH = 32K
}

INCLUDE cortexm_base.ld

/*
 * Copyright (C) 2017 Inria
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

/**
 * @addtogroup      cpu_samd21
 * @{
 *
 * @file
 * @brief           Memory definitions for the SAMD21J18A with Arduino bootloader
 *
 * @author          Alexandre Abadie <alexandre.abadie@inria.fr>
 *
 * @}
 */

MEMORY
{
    rom (rx)    : ORIGIN = 0x00002000, LENGTH = 256K-0x2000
    ram (w!rx)  : ORIGIN = 0x20000000, LENGTH = 32K
}

INCLUDE cortexm_base.ld

sam0_common: Adjust ldscript memory segment attributes


ENTRY(_start)
SECTIONS
{
	. = 0x00000000;  /* QEMU versatilepb start address */
	.text : {
		_text = .;
		boot.o (interrupt_vector)
		*(.text)
		_etext = .;
	}

	.rodata : {
		_rodata = .;
		*(.rodata)
		_erodata = .;
	}

	.data : {
		_data = .;
		*(.data)
		_edata = .;
	}
	.bss : {
		_bss = .;
		*(.bss)
		*(COMMON)
		_ebss = .;
	}

	. = ALIGN(0x1000);

	kernel_stack_top = .;
	. += 0x1000;
	kernel_stack_start = .;
	. += 0x1000;
	irq_stack_start = .;
}

ENTRY(_start)
SECTIONS
{
	. = 0xC0000000;  /* QEMU versatilepb start address */
	.text : {
		_text = .;
		boot.o (interrupt_vector)
		*(.text)
		_etext = .;
	}

	.rodata : {
		_rodata = .;
		*(.rodata)
		_erodata = .;
	}

	.data : {
		_data = .;
		*(.data)
		_edata = .;
	}
	.bss : {
		_bss = .;
		*(.bss)
		*(COMMON)
		_ebss = .;
	}

	. = ALIGN(0x1000);

	kernel_stack_top = .;
	. += 0x1000;
	kernel_stack_start = .;
	. += 0x1000;
	irq_stack_start = .;
}

Change link base address from 0x0 to 0xC0000000


/*
 * Copyright (C) 2015 Rakendra Thapa <rakendrathapa@gmail.com
 *
 * This file is subject to the terms and conditions of the GNU Lesser General
 * Public License v2.1. See the file LICENSE in the top level directory for more
 * details.
 */

/**
 * @ingroup     cpu_lm4f120
 * @{
 *
 * @file		lm4f120_linkerscript.ld
 * @brief       Linker description file for LM4FXXX microcontrollers.
 *
 * @author      Rakendra Thapa <rakendrathapa@gmail.com>
 *
 * @}
 */
MEMORY
{
    rom (rx)    : ORIGIN = 0x00000000, LENGTH = 256K
    ram (rwx)   : ORIGIN = 0x20000000, LENGTH = 32K
}

INCLUDE cortexm_base.ld

/*
 * Copyright (C) 2015 Rakendra Thapa <rakendrathapa@gmail.com
 *
 * This file is subject to the terms and conditions of the GNU Lesser General
 * Public License v2.1. See the file LICENSE in the top level directory for more
 * details.
 */

/**
 * @ingroup     cpu_lm4f120
 * @{
 *
 * @file		lm4f120_linkerscript.ld
 * @brief       Linker description file for LM4FXXX microcontrollers.
 *
 * @author      Rakendra Thapa <rakendrathapa@gmail.com>
 *
 * @}
 */
MEMORY
{
    rom (rx)    : ORIGIN = 0x00000000, LENGTH = 256K
    ram (w!rx)  : ORIGIN = 0x20000000, LENGTH = 32K
}

INCLUDE cortexm_base.ld

lm4f120: Adjust ldscript memory segment attributes


/* Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

MEMORY
{
  rom (rx)     : ORIGIN = 0x00044400, LENGTH = 0x00021c00
  prog (rx)    : ORIGIN = 0x00066000, LENGTH = 0x00020000
  ram (rwx)    : ORIGIN = 0x00010000, LENGTH = 0x00004000
  appram (rwx) : ORIGIN = 0x00014000, LENGTH = 0x0000c000
}

MPU_MIN_ALIGN = 8K;

/* Copyright 2018 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

MEMORY
{
  rom (rx)     : ORIGIN = 0x00044400, LENGTH = 0x00021c00
  prog (rx)    : ORIGIN = 0x00076000, LENGTH = 0x00010000
  ram (rwx)    : ORIGIN = 0x00010000, LENGTH = 0x00004000
  appram (rwx) : ORIGIN = 0x00014000, LENGTH = 0x0000c000
}

MPU_MIN_ALIGN = 8K;

Make more room for the kernel. Useful for when there are lots of debugging messages.


VERS_1.0 {
  # Export vendor delegate symbol only.
  global:
    TFL_TheStableDelegate;

  # Hide everything else.
  local:
    *;
};

VERS_1.0 {
  # Export the stable delegate API.
  global:
    # Export stable delegate symbol.
    extern "C" {
      TFL_TheStableDelegate;
    };

    # Export operator new/delete.  These are defined as weak symbols and we need to keep these
    # symbols to ensure that if the main binary overrides these, we use the same version in the
    # stable delegate, since data that is allocated by stable delegate may be deallocated elsewhere.
    extern "C++" {
      # The syntax here is a bit awkward.  Here we want to match against a demangled symbol name
      # that contains spaces, but we also want to use glob-style pattern matching.
      # The linker script syntax doesn't allow spaces in symbol names unless quoted;
      # but if you do quote the symbol name, then it doesn't do glob-style pattern matching.
      # So we can't use quotes.  Instead we just use the wildcard character "?" to match space,
      # which is not ideal, since it would also match any other character.  But these patterns
      # are nevertheless sufficiently unique that they are unlikely to match any symbols other
      # than the overloaded global ::operator new and ::operator delete functions.
      operator?new*;
      operator?delete*;

      # Currently the demangler doesn't output the leading "::" for global symbols.
      # But just in case a future symbol demangler outputs the leading "::",
      # we also export those names too...
      ::operator?new*;
      ::operator?delete*;
    };

  # Hide everything else.
  local:
    *;
};

Add new and delete operators to the stable delegate linker script.

This adds new and delete operators to the list of symbols that we keep
when building the sample stable delegate.  Those end up defined as weak
symbols in the stable delegate, and we need to ensure those get bound to
the same symbol for the stable delegate as for the main executable,
since data that is allocated by the stable delegate may be deallocated
elsewhere.

PiperOrigin-RevId: 490873417


ENTRY(_start)
OUTPUT_FORMAT(elf32-i386)

MEMORY {
	highmem : org = 0x80000000, l = 4096K
}

SECTIONS {
	.text : {
		*(.text*)
	} >highmem

	.rodata : {
		*(.rodata*)
	} >highmem

	.data : {
		*(.data*)
	} >highmem

	.eh_frame : {
		*(.eh_frame)
	} >highmem

	/DISCARD/ : {
		*(.comment)
		*(.rel.eh_frame)
	}
}

ENTRY(_start)

MEMORY {
	highmem : org = 0x80000000, l = 4096K
}

SECTIONS {
	.text : {
		*(.text*)
	} >highmem

	.rodata : {
		*(.rodata*)
	} >highmem

	.data : {
		*(.data*)
	} >highmem

        .eh_frame : {
		*(.eh_frame*)
        } >highmem

	/DISCARD/ : {
		*(.comment)
		*(.rel.eh_frame)
	}
}

Fix WD in .bin opens

Fix WD in .bin opens


/* Layout for the nRF52840-DK, usable by the examples in this repository. */

MEMORY {
  FLASH (X) : ORIGIN = 0x00030000, LENGTH = 0x000D0000
  RAM   (W) : ORIGIN = 0x20004000, LENGTH = 62K
}

TBF_HEADER_SIZE = 0x48;
INCLUDE libtock_layout.ld

/* Layout for the nRF52840-DK, usable by the examples in this repository. */

MEMORY {
  FLASH (X) : ORIGIN = 0x00030000, LENGTH = 0x000D0000
  RAM   (W) : ORIGIN = 0x20008000, LENGTH = 46K
}

TBF_HEADER_SIZE = 0x48;
INCLUDE libtock_layout.ld

Adjust the NRF52840-DK's RAM window to match that of latest Tock master.


/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0x26000 /* 80 kB is taken by S110, 176 kB for app. */
  RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 /* 8 kB is taken by S110,8 kB for app. */
}
INCLUDE "gcc_nrf51_common.ld"

/* Linker script to configure memory regions. */
MEMORY
{
  FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0x2C000 /* 80 kB is taken by S110, 176 kB for app. */
  RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 /* 8 kB is taken by S110,8 kB for app. */
}
INCLUDE "gcc_nrf51_common.ld"

Use full flash in S110 linker script

Use full flash in S110 linker script


# For Fuchsia, we must not export anything other than loader-related API
# There is also the vk_icdInitializeConnectToServiceCallback entry point
# that is specific to the Fuchsia Vulkan loader implementation.
{
global:
	vkGetInstanceProcAddr;

	# Loader-ICD interface functions
	vk_icdGetInstanceProcAddr;
	vk_icdNegotiateLoaderICDInterfaceVersion;
	vk_icdInitializeConnectToServiceCallback;

local:
	*;
};

# For Fuchsia, we must not export anything other than loader-related API
# There is also the vk_icdInitializeConnectToServiceCallback entry point
# that is specific to the Fuchsia Vulkan loader implementation.
{
global:
	# Loader-ICD interface functions
	vk_icdGetInstanceProcAddr;
	vk_icdNegotiateLoaderICDInterfaceVersion;
	vk_icdInitializeConnectToServiceCallback;

local:
	*;
};

Remove vkGetInstanceProcAddr from exported symbols on Fuchsia

Fuchsia only allows access to the ICD's functions, through the Vulkan
Loader interface functions.

Exporting this function was copied from the android_vk_swiftshader.lds
file, but it has been removed from the latter due to causing direct
access to methods that should have an overridden implementation. Similar
issues are likely to occur on Fuchsia if we keep this function exported.

Bug: b/148822450
Change-Id: I12f2dad933abcd9dbf89518ac5714b9f936419e4
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53609
Kokoro-Result: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Reviewed-by: David Turner <dcb93bd72059500c1226ad16fdd58ffe25c9e0ea@google.com>
Reviewed-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>
Tested-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>


OUTPUT_FORMAT("elf32-i386");
OUTPUT_ARCH("i386")
ENTRY(_core_entry)

SECTIONS
{
	. = 0x100000;

	__pok_begin = . ;

	.text :
	{
		*(.multiboot)
		*(.text)
	}

	.rodata :
	{
		*(.rodata)
	}

	.data :
	{
		*(.data) *(.bss) *(COMMON)

		__archive_begin = .;
		*(.archive)
		__archive_end = .;
		__archive2_begin = .;
		*(.archive2)
		__archive2_end = .;
	}

	__pok_end = . ;
}

OUTPUT_FORMAT("elf32-i386");
OUTPUT_ARCH("i386")
ENTRY(_core_entry)

SECTIONS
{
	. = 0x100000;

	__pok_begin = . ;

	.text :
	{
		*(.multiboot)
		*(.text)
		*(*got*)
	}

	.rodata :
	{
		*(.rodata)
	}

	.data :
	{
		*(.data*) *(.bss) *(COMMON)

		__archive_begin = .;
		*(.archive)
		__archive_end = .;
		__archive2_begin = .;
		*(.archive2)
		__archive2_end = .;
	}

	/* Nothing must have a VMA greater than __pok_end symbol address */
	__pok_end = . ;
}

Update linker script to put every section VMA before __pok_end symbol


ENTRY(kinit);
OUTPUT_FORMAT(elf32-i386);

PHDRS {
	headers PT_PHDR FILEHDR PHDRS;
	code PT_LOAD;
}

SECTIONS {
	.text 0x600: ALIGN(0x100) { *(.text) } :code
	.rdata : { *(rdata) }
	.data : { *(data) }
	.bss : { *(bss) }
	/DISCARD/ : { *(.eh_frame) }
}

ENTRY(kinit);
OUTPUT_FORMAT(elf32-i386);

PHDRS {
	headers PT_PHDR PHDRS;
	code PT_LOAD FILEHDR PHDRS;
}

SECTIONS {
	.text 0x600: ALIGN(0x100) { *(.text) } :code
	.rdata : { *(rdata) }
	.data : { *(data) }
	.bss : { *(bss) }
	/DISCARD/ : { *(.eh_frame) }
}

Fix issue due to LD 20815

Fix issue due to LD 20815

https://sourceware.org/bugzilla/show_bug.cgi?id=20815


ENTRY(_start)
SECTIONS
{
	. = 0x100000;

	.text :
	{
		*(.multiboot)
		*(.text)
		. = ALIGN(4096);
	}
	.data :
	{
		*(.data)
		*(.rodata)
		. = ALIGN(4096);
	}
	.bss :
	{
		*(.bss)
		. = ALIGN(4096);
	}
	.stab :
	{
		*(.stab)
		. = ALIGN(4096);
	}
	.stabstr :
	{
		*(.stabstr)
		. = ALIGN(4096);
	}

	. = ALIGN(4096);
	KERNEL_CODE_END = .;

	/DISCARD/ : { *(.comment) *(.eh_frame) }
}

ENTRY(_start)
SECTIONS
{
	. = 0x100000;

	.text :
	{
		*(.multiboot)
		*(.text)
		. = ALIGN(4096);
	}
	.data :
	{
		*(.data)
		*(.rodata)
		. = ALIGN(4096);
	}
	.stab :
	{
		*(.stab)
		. = ALIGN(4096);
	}
	.stabstr :
	{
		*(.stabstr)
		. = ALIGN(4096);
	}
	.bss :
	{
		*(.bss)
		. = ALIGN(4096);
	}

	STACK_TOP = .;
	. = ALIGN(32768);
	KERNEL_CODE_END = .;

	/DISCARD/ : { *(.comment) *(.eh_frame) }
}

Move stack define out of boot.asm

Move stack define out of boot.asm


/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
MEMORY
{
  FLASH (rx) : ORIGIN = 0x01000000, LENGTH = 0x4000
  RAM (rwx) : ORIGIN = 0x21000000, LENGTH = 0x10000
}

/* The bootloader does not contain an image header */
_imghdr_size = 0x0;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
MEMORY
{
  FLASH (rx) : ORIGIN = 0x01000000, LENGTH = 0x4000
  RAM (rwx) : ORIGIN = 0x21000000, LENGTH = 0x10000
  IPC (rw)  : ORIGIN = 0x20000400, LENGTH = 0
}

/* The bootloader does not contain an image header */
_imghdr_size = 0x0;

bsp/nordic_pca10095_net: Set empty IPC region for bootloader build

IPC is not used in bootloader but linker were complaining about IPC
region being not present.