60 lines
1.7 KiB
Batchfile
60 lines
1.7 KiB
Batchfile
/* linker.cmd - Linker command/script file */
|
|
|
|
/*
|
|
* Copyright (c) 2011-2014, Wind River Systems, Inc.
|
|
*
|
|
* 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
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
/*
|
|
DESCRIPTION
|
|
This is the linker script for both standard images and XIP images.
|
|
*/
|
|
|
|
#include <autoconf.h>
|
|
|
|
/* 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 0x00400000
|
|
#else /* !CONFIG_XIP */
|
|
#define PHYS_RAM_ADDR PHYS_LOAD_ADDR
|
|
#endif /* CONFIG_XIP */
|
|
|
|
MEMORY
|
|
{
|
|
#ifdef CONFIG_XIP
|
|
ROM (rx) : ORIGIN = PHYS_LOAD_ADDR, LENGTH = 72K
|
|
RAM (wx) : ORIGIN = PHYS_RAM_ADDR, LENGTH = 128K
|
|
#else /* !CONFIG_XIP */
|
|
RAM (wx) : ORIGIN = PHYS_LOAD_ADDR, LENGTH = 192K
|
|
#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
|
|
}
|
|
|
|
#include <arch/x86/linker-common-sections.h>
|
|
|
|
/* start adding platform specific linker sections here */
|
|
|
|
/* no sections should appear after linker-epilog.h */
|
|
#include <arch/x86/linker-epilog.h>
|