From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 20FD8BBB7 for ; Mon, 16 Jun 2008 14:59:57 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvcBAMoAVkjAXQImiGdsb2JhbACSHgEBAQ8gmnY X-IronPort-AV: E=Sophos;i="4.27,652,1204498800"; d="scan'208";a="12116952" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 16 Jun 2008 14:59:57 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id m5GCxums031502 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 16 Jun 2008 14:59:56 +0200 X-IronPort-AV: E=Sophos;i="4.27,652,1204498800"; d="scan'208";a="14061014" Received: from estephe.inria.fr (HELO [128.93.11.95]) ([128.93.11.95]) by mail3-relais-sop.national.inria.fr with ESMTP; 16 Jun 2008 14:59:55 +0200 Message-ID: <485663CB.2050509@inria.fr> Date: Mon, 16 Jun 2008 14:59:55 +0200 From: Xavier Leroy User-Agent: Thunderbird 1.5.0.7 (X11/20060915) MIME-Version: 1.0 To: Richard Jones Cc: caml-list@inria.fr Subject: Re: [Caml-list] ocamlopt generates binaries with executable stacks References: <20080609175622.GA10624@annexia.org> In-Reply-To: <20080609175622.GA10624@annexia.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 485663CC.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocamlopt:01 ocamlopt:01 ocaml:01 binutils:01 hand-written:01 runtime:01 gentoo:01 gcc:01 smell:98 binaries:01 binaries:01 caml-list:01 portability:02 caml:02 assembler:02 > I posted a patch which should fix the issue that ocamlopt generates > binaries with executable stacks: > > http://caml.inria.fr/mantis/view.php?id=4564 > > However this patch affects every assembly target, far more than I > could possibly test. Could people using OCaml on non-Linux platforms > have a look at the patch, or even test it for me? I'm pretty sure this patch is Linux-specific. My fear is that it might be specific to particular versions of binutils and/or particular Linux distributions... I smell a portability nightmare! Note that in 3.11, the "configure" script will have options to specify how to call the assembler (for ocamlopt-generated assembly code and for the hand-written asm files in the runtime system). So it might be sufficient to configure the Gentoo packages with e.g. configure -as "as --noexecstack" -aspp "gcc -c -Wa,--noexecstack" This could be one of the rare cases where addressing the issue at the level of the packages is safer than by changing the source distribution. - Xavier Leroy