summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@kernel.crashing.org>2005-09-13 10:25:09 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-13 17:22:28 +0200
commit6a00cbfcf8ffdd719cb5a27e1a0a9779665d1e23 (patch)
tree3596cb8dc87fa3b8472234670e2022882ee64738 /arch
parent[PATCH] Fix MPOL_F_VERIFY (diff)
downloadlinux-6a00cbfcf8ffdd719cb5a27e1a0a9779665d1e23.tar.xz
linux-6a00cbfcf8ffdd719cb5a27e1a0a9779665d1e23.zip
[PATCH] ppc32: discard *.exit.text and *.exit.data sections
Discard *.exit.text sections on runtime. We cannot do this on link time because of the way BUG macros are implemented. If "__exit function" calls one of those macros, __bug_table section will reference this function. This is similar to ".altinstructions" situation on i386. *.exit.data seems to be OK in this respect and is discarded on link time. Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Tom Rini <trini@kernel.crashing.org> Acked-by: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc/kernel/vmlinux.lds.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/ppc/kernel/vmlinux.lds.S b/arch/ppc/kernel/vmlinux.lds.S
index 9353584fb710..17d2db7e537d 100644
--- a/arch/ppc/kernel/vmlinux.lds.S
+++ b/arch/ppc/kernel/vmlinux.lds.S
@@ -96,6 +96,9 @@ SECTIONS
*(.init.text)
_einittext = .;
}
+ /* .exit.text is discarded at runtime, not link time,
+ to deal with references from __bug_table */
+ .exit.text : { *(.exit.text) }
.init.data : {
*(.init.data);
__vtop_table_begin = .;
@@ -190,5 +193,6 @@ SECTIONS
/* Sections to be discarded. */
/DISCARD/ : {
*(.exitcall.exit)
+ *(.exit.data)
}
}