Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765013AbZFLN1k (ORCPT ); Fri, 12 Jun 2009 09:27:40 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1762129AbZFLNZq (ORCPT ); Fri, 12 Jun 2009 09:25:46 -0400 Received: from cantor.suse.de ([195.135.220.2]:41672 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760175AbZFLNZl (ORCPT ); Fri, 12 Jun 2009 09:25:41 -0400 From: Petr Tesarik To: LKML Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andi Kleen , Roland McGrath , Petr Tesarik Subject: [PATCH 6/8] x86: mark some standard sections as broken in a vDSO Date: Fri, 12 Jun 2009 15:25:40 +0200 Message-Id: <18f4ec0df8d4aa8d1b7ae80f14939d46d297808e.1244812577.git.ptesarik@suse.cz> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1464 Lines: 47 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/