summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/compressed/vmlinux.lds.in
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-02-25 12:14:40 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-25 19:34:31 +0000
commit5de813b6cd06460b337f9da9afe316823cf3ef45 (patch)
tree804eb5a2d986569353ac5c8728af419ce1907124 /arch/arm/boot/compressed/vmlinux.lds.in
parentd6d502fa4be1acd01971476fc732c95a4da16d90 (diff)
downloadtalos-op-linux-5de813b6cd06460b337f9da9afe316823cf3ef45.tar.gz
talos-op-linux-5de813b6cd06460b337f9da9afe316823cf3ef45.zip
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>
Diffstat (limited to 'arch/arm/boot/compressed/vmlinux.lds.in')
-rw-r--r--arch/arm/boot/compressed/vmlinux.lds.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/vmlinux.lds.in b/arch/arm/boot/compressed/vmlinux.lds.in
index a5924b9b88bd..7ca9ecff652f 100644
--- a/arch/arm/boot/compressed/vmlinux.lds.in
+++ b/arch/arm/boot/compressed/vmlinux.lds.in
@@ -14,6 +14,13 @@ SECTIONS
/DISCARD/ : {
*(.ARM.exidx*)
*(.ARM.extab*)
+ /*
+ * 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)
}
. = TEXT_START;
@@ -40,7 +47,6 @@ SECTIONS
.got : { *(.got) }
_got_end = .;
.got.plt : { *(.got.plt) }
- .data : { *(.data) }
_edata = .;
. = BSS_START;
OpenPOWER on IntegriCloud