3 Unified linker script for GCC based builds
5 Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
6 Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
8 This program and the accompanying materials are licensed and made available under
9 the terms and conditions of the BSD License that accompanies this distribution.
10 The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php.
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 * The PE/COFF binary consists of DOS and PE/COFF headers, and a sequence of
22 * section headers adding up to PECOFF_HEADER_SIZE bytes (which differs
23 * between 32-bit and 64-bit builds). The actual start of the .text section
24 * will be rounded up based on its actual alignment.
26 . = PECOFF_HEADER_SIZE;
28 .text : ALIGN(CONSTANT(COMMONPAGESIZE)) {
29 *(.text .text.* .stub .gnu.linkonce.t.*)
30 *(.rodata .rodata.* .gnu.linkonce.r.*)
34 * The contents of AutoGen.c files are constant from the POV of the program,
35 * but most of its contents end up in .data or .bss by default since few of
36 * the variable definitions that get emitted are declared as CONST.
38 *:AutoGen.obj(.data .data.* .bss .bss.*)
42 * The alignment of the .data section should be less than or equal to the
43 * alignment of the .text section. This ensures that the relative offset
44 * between these sections is the same in the ELF and the PE/COFF versions of
47 .data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
48 *(.data .data.* .gnu.linkonce.d.*)
52 .eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : {
56 .rela ALIGN(CONSTANT(COMMONPAGESIZE)) : {