caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlopt generates binaries with executable stacks
@ 2008-06-09 17:56 Richard Jones
  2008-06-16 12:59 ` [Caml-list] " Xavier Leroy
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Jones @ 2008-06-09 17:56 UTC (permalink / raw)
  To: caml-list

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

Previously discussed on the list here:

  http://caml.inria.fr/pub/ml-archives/caml-list/2006/11/2678e935e05e0298cc2e5352b966c262.en.html

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?

Thanks,

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlopt generates binaries with executable stacks
  2008-06-09 17:56 ocamlopt generates binaries with executable stacks Richard Jones
@ 2008-06-16 12:59 ` Xavier Leroy
  2008-06-16 21:14   ` Richard Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Xavier Leroy @ 2008-06-16 12:59 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

> 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlopt generates binaries with executable stacks
  2008-06-16 12:59 ` [Caml-list] " Xavier Leroy
@ 2008-06-16 21:14   ` Richard Jones
  2008-09-18 16:59     ` Xavier Leroy
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Jones @ 2008-06-16 21:14 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: caml-list

On Mon, Jun 16, 2008 at 02:59:55PM +0200, Xavier Leroy wrote:
> 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.

Fair enough.  I'll check this out and get back if it doesn't work.

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlopt generates binaries with executable stacks
  2008-06-16 21:14   ` Richard Jones
@ 2008-09-18 16:59     ` Xavier Leroy
  0 siblings, 0 replies; 4+ messages in thread
From: Xavier Leroy @ 2008-09-18 16:59 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

>> 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.
> 
> Fair enough.  I'll check this out and get back if it doesn't work.

For the record, in the working sources that will be released as 3.11,
I added the "no exec note" in assembly files for Linux/x86 and
Linux/AMD64, but no other platforms so far because I can't test on
them.  If someone with access to other Linux platforms is willing to
experiment and confirm that it works, let me know.  This said, the
configure trick above might do the job just as well.

- Xavier Leroy


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-09-18 16:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-09 17:56 ocamlopt generates binaries with executable stacks Richard Jones
2008-06-16 12:59 ` [Caml-list] " Xavier Leroy
2008-06-16 21:14   ` Richard Jones
2008-09-18 16:59     ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).