2 * Copyright (C) 2000 Russell King
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
9 #ifdef CONFIG_CPU_ENDIAN_BE8
10 #define ZIMAGE_MAGIC(x) ( (((x) >> 24) & 0x000000ff) | \
11 (((x) >> 8) & 0x0000ff00) | \
12 (((x) << 8) & 0x00ff0000) | \
13 (((x) << 24) & 0xff000000) )
15 #define ZIMAGE_MAGIC(x) (x)
26 * Discard any r/w data - this produces a link error if we have any,
27 * which is required for PIC decompression. Local data generates
28 * GOTOFF relocations, which prevents it being relocated independently
29 * of the text/got segments.
58 .got.plt : { *(.got.plt) }
63 /* ensure the zImage file size is always a multiple of 64 bits */
64 /* (without a dummy byte, ld just ignores the empty section) */
65 .pad : { BYTE(0); . = ALIGN(8); }
67 #ifdef CONFIG_EFI_STUB
69 __pecoff_data_start = .;
71 * The EFI stub always executes from RAM, and runs strictly before the
72 * decompressor, so we can make an exception for its r/w data, and keep it
75 __pecoff_data_end = .;
78 * PE/COFF mandates a file size which is a multiple of 512 bytes if the
79 * section size equals or exceeds 4 KB
83 __pecoff_data_rawsize = . - ADDR(.data);
88 _magic_sig = ZIMAGE_MAGIC(0x016f2818);
89 _magic_start = ZIMAGE_MAGIC(_start);
90 _magic_end = ZIMAGE_MAGIC(_edata);
97 . = ALIGN(8); /* the stack must be 64-bit aligned */
98 .stack : { *(.stack) }
100 PROVIDE(__pecoff_data_size = ALIGN(512) - ADDR(.data));
101 PROVIDE(__pecoff_end = ALIGN(512));
103 .stab 0 : { *(.stab) }
104 .stabstr 0 : { *(.stabstr) }
105 .stab.excl 0 : { *(.stab.excl) }
106 .stab.exclstr 0 : { *(.stab.exclstr) }
107 .stab.index 0 : { *(.stab.index) }
108 .stab.indexstr 0 : { *(.stab.indexstr) }
109 .comment 0 : { *(.comment) }