2015-12-17 13:03:40 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2011-2014, Wind River Systems, Inc.
|
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-12-17 13:03:40 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief Linker command/script file
|
|
|
|
*
|
|
|
|
* This is the linker script for both standard images and XIP images.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <autoconf.h>
|
2017-11-22 03:21:19 +08:00
|
|
|
#include <generated_dts_board.h>
|
2015-12-17 13:03:40 +08:00
|
|
|
/* physical address where the kernel is loaded */
|
|
|
|
#define PHYS_LOAD_ADDR CONFIG_PHYS_LOAD_ADDR
|
|
|
|
|
|
|
|
/* physical address of RAM */
|
|
|
|
#ifdef CONFIG_XIP
|
|
|
|
#define PHYS_RAM_ADDR CONFIG_PHYS_RAM_ADDR
|
|
|
|
#else /* !CONFIG_XIP */
|
|
|
|
#define PHYS_RAM_ADDR PHYS_LOAD_ADDR
|
|
|
|
#endif /* CONFIG_XIP */
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
#ifdef CONFIG_XIP
|
|
|
|
ROM (rx) : ORIGIN = PHYS_LOAD_ADDR, LENGTH = CONFIG_ROM_SIZE*1K
|
|
|
|
RAM (wx) : ORIGIN = PHYS_RAM_ADDR, LENGTH = CONFIG_RAM_SIZE*1K
|
|
|
|
#else /* !CONFIG_XIP */
|
|
|
|
RAM (wx) : ORIGIN = PHYS_LOAD_ADDR, LENGTH = CONFIG_RAM_SIZE*1K
|
|
|
|
#endif /* CONFIG_XIP */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* It doesn't matter where this region goes as it is stripped from the
|
|
|
|
* final ELF image. The address doesn't even have to be valid on the
|
|
|
|
* target. However, it shouldn't overlap any other regions.
|
|
|
|
*/
|
|
|
|
|
|
|
|
IDT_LIST : ORIGIN = 2K, LENGTH = 2K
|
|
|
|
}
|
|
|
|
|
2016-10-20 23:09:32 +08:00
|
|
|
#include <arch/x86/linker.ld>
|
2015-12-17 13:03:40 +08:00
|
|
|
|