lkml.org 
[lkml]   [2009]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 6/8] x86: mark some standard sections as broken in a vDSO
Date
Some standard sections can't work in a vDSO. Although most of them
are not very likely to ever appear there, it doesn't hurt to list
them as a precaution.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
arch/x86/vdso/vdso-layout.lds.S | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/x86/vdso/vdso-layout.lds.S b/arch/x86/vdso/vdso-layout.lds.S
index 2f0830f..0da3db0 100644
--- a/arch/x86/vdso/vdso-layout.lds.S
+++ b/arch/x86/vdso/vdso-layout.lds.S
@@ -71,6 +71,25 @@ SECTIONS
* if they get used by accident.
*/
.broken : {
+ /* Code in the Procedure Linkage Table will segfault */
+ *(.plt)
+
+ /* Relocation will not be done, so any pointers will
+ * still point to the prelinked address, which is wrong
+ */
+ *(.data.rel.ro*)
+ *(.gnu.linkonce.d.rel.ro.*)
+
+ /* Initialization/termination won't work this way */
+ *(.init) *(.fini)
+ *(.preinit_array) *(.init_array*)
+ *(.fini_array*)
+
+ /* Thread-local storage cannot be defined like this */
+ *(.tdata .tdata.* .gnu.linkonce.td.*)
+ *(.tbss .tbss.* .gnu.linkonce.tb.*)
+ *(.tcommon)
+
/* The vDSO setup code does not handle alternative
* instructions.
*/
--
1.6.0.2


\
 
 \ /
  Last update: 2009-06-12 15:29    [W:0.040 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site