2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/boot/compressed/vmlinux.lds.in
|
|
|
|
*
|
|
|
|
* Copyright (C) 2000 Russell King
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
OUTPUT_ARCH(arm)
|
|
|
|
ENTRY(_start)
|
|
|
|
SECTIONS
|
|
|
|
{
|
2009-02-16 18:41:36 +08:00
|
|
|
/DISCARD/ : {
|
|
|
|
*(.ARM.exidx*)
|
|
|
|
*(.ARM.extab*)
|
ARM: Eliminate decompressor -Dstatic= PIC hack
We used to build decompressors with -Dstatic= to avoid any local data
being generated. The problem is that local data generates GOTOFF
relocations, which means we can't relocate the data relative to the
text segment.
Global data, on the other hand, goes through the GOT, and can be
relocated anywhere.
Unfortunately, with the new decompressors, this presents a problem
since they declare static data within functions, and this leads to
stack overflow.
Fix this by separating out the decompressor code into a separate file,
and removing 'static' from BSS data in misc.c.
Also, discard the .data section - this means that should we end up
with read/write initialized data, the decompressor will fail to link
and the problem will be obvious.
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-25 20:14:40 +08:00
|
|
|
/*
|
|
|
|
* Discard any r/w data - this produces a link error if we have any,
|
|
|
|
* which is required for PIC decompression. Local data generates
|
|
|
|
* GOTOFF relocations, which prevents it being relocated independently
|
|
|
|
* of the text/got segments.
|
|
|
|
*/
|
|
|
|
*(.data)
|
2009-02-16 18:41:36 +08:00
|
|
|
}
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
. = TEXT_START;
|
|
|
|
_text = .;
|
|
|
|
|
|
|
|
.text : {
|
|
|
|
_start = .;
|
|
|
|
*(.start)
|
|
|
|
*(.text)
|
2006-04-10 02:08:42 +08:00
|
|
|
*(.text.*)
|
2005-04-17 06:20:36 +08:00
|
|
|
*(.fixup)
|
|
|
|
*(.gnu.warning)
|
2011-05-26 18:40:54 +08:00
|
|
|
*(.glue_7t)
|
|
|
|
*(.glue_7)
|
|
|
|
}
|
|
|
|
.rodata : {
|
2005-04-17 06:20:36 +08:00
|
|
|
*(.rodata)
|
|
|
|
*(.rodata.*)
|
2011-05-26 18:40:54 +08:00
|
|
|
}
|
|
|
|
.piggydata : {
|
2005-04-17 06:20:36 +08:00
|
|
|
*(.piggydata)
|
|
|
|
}
|
|
|
|
|
2011-05-26 18:40:54 +08:00
|
|
|
. = ALIGN(4);
|
2005-04-17 06:20:36 +08:00
|
|
|
_etext = .;
|
|
|
|
|
2011-05-26 18:40:54 +08:00
|
|
|
.got.plt : { *(.got.plt) }
|
2005-04-17 06:20:36 +08:00
|
|
|
_got_start = .;
|
|
|
|
.got : { *(.got) }
|
|
|
|
_got_end = .;
|
2011-05-28 10:25:26 +08:00
|
|
|
|
|
|
|
/* ensure the zImage file size is always a multiple of 64 bits */
|
|
|
|
/* (without a dummy byte, ld just ignores the empty section) */
|
|
|
|
.pad : { BYTE(0); . = ALIGN(8); }
|
2005-04-17 06:20:36 +08:00
|
|
|
_edata = .;
|
|
|
|
|
|
|
|
. = BSS_START;
|
|
|
|
__bss_start = .;
|
|
|
|
.bss : { *(.bss) }
|
|
|
|
_end = .;
|
|
|
|
|
2011-04-22 09:45:08 +08:00
|
|
|
. = ALIGN(8); /* the stack must be 64-bit aligned */
|
2010-11-22 20:00:59 +08:00
|
|
|
.stack : { *(.stack) }
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
.stab 0 : { *(.stab) }
|
|
|
|
.stabstr 0 : { *(.stabstr) }
|
|
|
|
.stab.excl 0 : { *(.stab.excl) }
|
|
|
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
|
|
|
.stab.index 0 : { *(.stab.index) }
|
|
|
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
|
|
|
.comment 0 : { *(.comment) }
|
|
|
|
}
|
|
|
|
|