public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch ping] libffi/boehm-gc/crt files executable stack (missing  .note.GNU-stack on .o files)
@ 2007-07-05 11:10 Matthias Klose
  2007-07-12 11:58 ` Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Klose @ 2007-07-05 11:10 UTC (permalink / raw)
  To: GCJ-patches, Jakub Jelinek; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

The following patch (taken from the redhat/gcc-4_1-branch) adds .note.GNU-stack
sections for gcc's crt files, libffi and boehm-gc.

sent first here: http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00948.html

Updated in the patch is:

2007-05-11  Daniel Jacobowitz  <dan@debian.org>

        * src/arm/sysv.S: Fix ARM comment marker.

Jakub, is this patch necessary/wanted in the FSF sources?

  Matthias

[-- Attachment #2: note-gnu-stack.diff --]
[-- Type: text/plain, Size: 8341 bytes --]

Add .note.GNU-stack sections for gcc's crt files, libffi and boehm-gc
Taken from FC.

gcc/

2004-09-20  Jakub Jelinek  <jakub@redhat.com>

	* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
	on ppc64-linux.

	* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
	ia64-linux.
	* config/ia64/crtbegin.asm: Likewise.
	* config/ia64/crtend.asm: Likewise.
	* config/ia64/crti.asm: Likewise.
	* config/ia64/crtn.asm: Likewise.

2004-05-14  Jakub Jelinek  <jakub@redhat.com>

	* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.


boehm-gc/

2005-02-08  Jakub Jelinek  <jakub@redhat.com>

	* ia64_save_regs_in_stack.s: Moved to...
	* ia64_save_regs_in_stack.S: ... this.  Add .note.GNU-stack
	on Linux.

libffi/

2007-05-11  Daniel Jacobowitz  <dan@debian.org>

	* src/arm/sysv.S: Fix ARM comment marker.

2005-02-08  Jakub Jelinek  <jakub@redhat.com>

	* src/alpha/osf.S: Add .note.GNU-stack on Linux.
	* src/s390/sysv.S: Likewise.
	* src/powerpc/linux64.S: Likewise.
	* src/powerpc/linux64_closure.S: Likewise.
	* src/powerpc/ppc_closure.S: Likewise.
	* src/powerpc/sysv.S: Likewise.
	* src/x86/unix64.S: Likewise.
	* src/x86/sysv.S: Likewise.
	* src/sparc/v8.S: Likewise.
	* src/sparc/v9.S: Likewise.
	* src/m68k/sysv.S: Likewise.
	* src/ia64/unix.S: Likewise.
	* src/arm/sysv.S: Likewise.


Index: boehm-gc/ia64_save_regs_in_stack.s
===================================================================
--- boehm-gc/ia64_save_regs_in_stack.s	(revision 107431)
+++ boehm-gc/ia64_save_regs_in_stack.s	(revision 107432)
@@ -1,12 +0,0 @@
-        .text
-        .align 16
-        .global GC_save_regs_in_stack
-        .proc GC_save_regs_in_stack
-GC_save_regs_in_stack:
-        .body
-        flushrs
-        ;;
-        mov r8=ar.bsp
-        br.ret.sptk.few rp
-        .endp GC_save_regs_in_stack
-
Index: boehm-gc/ia64_save_regs_in_stack.S
===================================================================
--- boehm-gc/ia64_save_regs_in_stack.S	(revision 0)
+++ boehm-gc/ia64_save_regs_in_stack.S	(revision 107432)
@@ -0,0 +1,15 @@
+        .text
+        .align 16
+        .global GC_save_regs_in_stack
+        .proc GC_save_regs_in_stack
+GC_save_regs_in_stack:
+        .body
+        flushrs
+        ;;
+        mov r8=ar.bsp
+        br.ret.sptk.few rp
+        .endp GC_save_regs_in_stack
+
+#ifdef __linux__
+	.section .note.GNU-stack,"",@progbits
+#endif
--- gcc/config/ia64/linux.h.orig	2006-10-12 02:01:00.000000000 +0200
+++ gcc/config/ia64/linux.h	2006-12-11 10:33:13.000000000 +0100
@@ -5,6 +5,8 @@
 
 #define TARGET_VERSION fprintf (stderr, " (IA-64) Linux");
 
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+
 /* This is for -profile to use -lc_p instead of -lc.  */
 #undef CC1_SPEC
 #define CC1_SPEC "%{profile:-p} %{G*}"
--- gcc/config/ia64/lib1funcs.asm.orig	2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/lib1funcs.asm	2006-12-11 10:33:13.000000000 +0100
@@ -792,3 +792,7 @@
 	}
 	.endp __floattitf
 #endif
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crti.asm.orig	2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crti.asm	2006-12-11 10:33:13.000000000 +0100
@@ -64,3 +64,7 @@
 	.body
 
 # end of crti.asm
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crtn.asm.orig	2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crtn.asm	2006-12-11 10:33:13.000000000 +0100
@@ -54,3 +54,7 @@
 	br.ret.sptk.many b0
 
 # end of crtn.asm
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crtend.asm.orig	2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crtend.asm	2006-12-11 10:33:13.000000000 +0100
@@ -122,3 +122,7 @@
 
 	br.ret.sptk.many rp
 	.endp __do_global_ctors_aux
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/ia64/crtbegin.asm.orig	2006-01-18 22:46:41.000000000 +0100
+++ gcc/config/ia64/crtbegin.asm	2006-12-11 10:33:13.000000000 +0100
@@ -255,3 +255,7 @@
 .weak __cxa_finalize
 #endif
 .weak _Jv_RegisterClasses
+
+#ifdef __linux__
+.section .note.GNU-stack; .previous
+#endif
--- gcc/config/rs6000/ppc-asm.h.orig	2006-01-18 22:46:46.000000000 +0100
+++ gcc/config/rs6000/ppc-asm.h	2006-12-11 10:33:14.000000000 +0100
@@ -158,7 +158,7 @@
 	.size FUNC_NAME(name),GLUE(.L,name)-FUNC_NAME(name)
 #endif
 
-#if defined __linux__ && !defined __powerpc64__
+#if defined __linux__
 	.section .note.GNU-stack
 	.previous
 #endif
--- libffi/src/powerpc/ppc_closure.S.orig	2006-03-25 09:16:06.000000000 +0100
+++ libffi/src/powerpc/ppc_closure.S	2006-12-11 10:33:14.000000000 +0100
@@ -281,3 +281,7 @@
 .LEFDE1:
 
 #endif
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/powerpc/sysv.S.orig	2006-03-25 09:16:06.000000000 +0100
+++ libffi/src/powerpc/sysv.S	2006-12-11 10:33:14.000000000 +0100
@@ -217,3 +217,7 @@
       .align 2
 .LEFDE1:
 #endif
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/powerpc/linux64_closure.S.orig	2006-01-18 22:49:27.000000000 +0100
+++ libffi/src/powerpc/linux64_closure.S	2006-12-11 10:33:14.000000000 +0100
@@ -204,3 +204,7 @@
 	.align 3
 .LEFDE1:
 #endif
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/powerpc/linux64.S.orig	2006-03-25 09:16:06.000000000 +0100
+++ libffi/src/powerpc/linux64.S	2006-12-11 10:33:14.000000000 +0100
@@ -175,3 +175,7 @@
 	.align 3
 .LEFDE1:
 #endif
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/arm/sysv.S.orig	2006-10-12 02:00:57.000000000 +0200
+++ libffi/src/arm/sysv.S	2006-12-11 10:33:14.000000000 +0100
@@ -255,3 +255,6 @@
 .ffi_closure_SYSV_end:
         .size    CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
 
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",%progbits
+#endif
--- libffi/src/m68k/sysv.S.orig	2006-01-18 22:49:27.000000000 +0100
+++ libffi/src/m68k/sysv.S	2006-12-11 10:33:14.000000000 +0100
@@ -207,3 +207,7 @@
 	rts
 	CFI_ENDPROC()
 	.size	ffi_closure_struct_SYSV,.-ffi_closure_struct_SYSV
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/alpha/osf.S.orig	2006-01-18 22:49:27.000000000 +0100
+++ libffi/src/alpha/osf.S	2006-12-11 10:33:14.000000000 +0100
@@ -356,4 +356,8 @@
 	.byte	16		# uleb128 offset 16*-8
 	.align 3
 $LEFDE3:
+
+#ifdef __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
 #endif
--- libffi/src/x86/sysv.S.orig	2006-01-18 22:49:28.000000000 +0100
+++ libffi/src/x86/sysv.S	2006-12-11 10:33:14.000000000 +0100
@@ -376,3 +376,7 @@
 #endif
 
 #endif /* ifndef __x86_64__ */
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/x86/unix64.S.orig	2006-01-18 22:49:28.000000000 +0100
+++ libffi/src/x86/unix64.S	2006-12-11 10:33:14.000000000 +0100
@@ -410,3 +410,7 @@
 .LEFDE3:
 
 #endif /* __x86_64__ */
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/s390/sysv.S.orig	2006-01-18 22:49:28.000000000 +0100
+++ libffi/src/s390/sysv.S	2006-12-11 10:33:14.000000000 +0100
@@ -427,3 +427,6 @@
 
 #endif
 
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/ia64/unix.S.orig	2006-01-18 22:49:29.000000000 +0100
+++ libffi/src/ia64/unix.S	2006-12-11 10:33:14.000000000 +0100
@@ -553,3 +553,7 @@
 	data8	@pcrel(.Lld_hfa_float)		// FFI_IA64_TYPE_HFA_FLOAT
 	data8	@pcrel(.Lld_hfa_double)		// FFI_IA64_TYPE_HFA_DOUBLE
 	data8	@pcrel(.Lld_hfa_ldouble)	// FFI_IA64_TYPE_HFA_LDOUBLE
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/sparc/v9.S.orig	2006-01-18 22:49:29.000000000 +0100
+++ libffi/src/sparc/v9.S	2006-12-11 10:33:14.000000000 +0100
@@ -300,3 +300,7 @@
 	.align 8
 .LLEFDE2:
 #endif
+
+#ifdef __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif
--- libffi/src/sparc/v8.S.orig	2006-01-18 22:49:29.000000000 +0100
+++ libffi/src/sparc/v8.S	2006-12-11 10:33:14.000000000 +0100
@@ -265,3 +265,7 @@
 	.byte	0x1f	! uleb128 0x1f
 	.align	WS
 .LLEFDE2:
+
+#if defined __ELF__ && defined __linux__
+	.section	.note.GNU-stack,"",@progbits
+#endif

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

* Re: [patch ping] libffi/boehm-gc/crt files executable stack (missing  .note.GNU-stack on .o files)
  2007-07-05 11:10 [patch ping] libffi/boehm-gc/crt files executable stack (missing .note.GNU-stack on .o files) Matthias Klose
@ 2007-07-12 11:58 ` Jakub Jelinek
  2007-07-12 12:14   ` Andrew Haley
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2007-07-12 11:58 UTC (permalink / raw)
  To: Matthias Klose; +Cc: GCJ-patches, gcc-patches

On Thu, Jul 05, 2007 at 12:51:51PM +0200, Matthias Klose wrote:
> The following patch (taken from the redhat/gcc-4_1-branch) adds .note.GNU-stack
> sections for gcc's crt files, libffi and boehm-gc.
> 
> sent first here: http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00948.html
> 
> Updated in the patch is:
> 
> 2007-05-11  Daniel Jacobowitz  <dan@debian.org>
> 
>         * src/arm/sysv.S: Fix ARM comment marker.
> 
> Jakub, is this patch necessary/wanted in the FSF sources?

Yes, except perhaps the ppc64 and ia64 bits.  There it is ambiguous whether
PT_GNU_STACK segments are desirable or not (varries between upstream and
distros) and recent changes in binutils on ia64 and ppc64 assume by
default non-executable stack whe .note.GNU-stack section is not present,
so explicit .note.GNU-stack with "x" needs to be used to force
executable PT_GNU_STACK.
So, I think all the changes except changes in files with /rs6000/, ia64 and
/powerpc/linux64 substrings in filenames should be applied.

> gcc/
> 
> 2004-09-20  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* config/rs6000/ppc-asm.h: Add .note.GNU-stack section also
> 	on ppc64-linux.
> 
> 	* config/ia64/lib1funcs.asm: Add .note.GNU-stack section on
> 	ia64-linux.
> 	* config/ia64/crtbegin.asm: Likewise.
> 	* config/ia64/crtend.asm: Likewise.
> 	* config/ia64/crti.asm: Likewise.
> 	* config/ia64/crtn.asm: Likewise.
> 
> 2004-05-14  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* config/ia64/linux.h (TARGET_ASM_FILE_END): Define.
> 
> 
> boehm-gc/
> 
> 2005-02-08  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* ia64_save_regs_in_stack.s: Moved to...
> 	* ia64_save_regs_in_stack.S: ... this.  Add .note.GNU-stack
> 	on Linux.
> 
> libffi/
> 
> 2007-05-11  Daniel Jacobowitz  <dan@debian.org>
> 
> 	* src/arm/sysv.S: Fix ARM comment marker.
> 
> 2005-02-08  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* src/alpha/osf.S: Add .note.GNU-stack on Linux.
> 	* src/s390/sysv.S: Likewise.
> 	* src/powerpc/linux64.S: Likewise.
> 	* src/powerpc/linux64_closure.S: Likewise.
> 	* src/powerpc/ppc_closure.S: Likewise.
> 	* src/powerpc/sysv.S: Likewise.
> 	* src/x86/unix64.S: Likewise.
> 	* src/x86/sysv.S: Likewise.
> 	* src/sparc/v8.S: Likewise.
> 	* src/sparc/v9.S: Likewise.
> 	* src/m68k/sysv.S: Likewise.
> 	* src/ia64/unix.S: Likewise.
> 	* src/arm/sysv.S: Likewise.

	Jakub

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

* Re: [patch ping] libffi/boehm-gc/crt files executable stack (missing  .note.GNU-stack on .o files)
  2007-07-12 11:58 ` Jakub Jelinek
@ 2007-07-12 12:14   ` Andrew Haley
  2007-07-12 12:23     ` Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Haley @ 2007-07-12 12:14 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Matthias Klose, GCJ-patches, gcc-patches

Jakub Jelinek writes:
 > On Thu, Jul 05, 2007 at 12:51:51PM +0200, Matthias Klose wrote:
 > > The following patch (taken from the redhat/gcc-4_1-branch) adds .note.GNU-stack
 > > sections for gcc's crt files, libffi and boehm-gc.
 > > 
 > > sent first here: http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00948.html
 > > 
 > > Updated in the patch is:
 > > 
 > > 2007-05-11  Daniel Jacobowitz  <dan@debian.org>
 > > 
 > >         * src/arm/sysv.S: Fix ARM comment marker.
 > > 
 > > Jakub, is this patch necessary/wanted in the FSF sources?
 > 
 > Yes, except perhaps the ppc64 and ia64 bits.  There it is ambiguous whether
 > PT_GNU_STACK segments are desirable or not (varries between upstream and
 > distros) and recent changes in binutils on ia64 and ppc64 assume by
 > default non-executable stack whe .note.GNU-stack section is not present,
 > so explicit .note.GNU-stack with "x" needs to be used to force
 > executable PT_GNU_STACK.

But why?  libffi doesn't need an executable stack, and libgcj
definitely doesn't want it.

Andrew.

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

* Re: [patch ping] libffi/boehm-gc/crt files executable stack (missing  .note.GNU-stack on .o files)
  2007-07-12 12:14   ` Andrew Haley
@ 2007-07-12 12:23     ` Jakub Jelinek
  2007-09-25  1:40       ` [patch ping2] " Matthias Klose
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2007-07-12 12:23 UTC (permalink / raw)
  To: Andrew Haley; +Cc: Matthias Klose, GCJ-patches, gcc-patches

On Thu, Jul 12, 2007 at 12:58:15PM +0100, Andrew Haley wrote:
> Jakub Jelinek writes:
>  > On Thu, Jul 05, 2007 at 12:51:51PM +0200, Matthias Klose wrote:
>  > > The following patch (taken from the redhat/gcc-4_1-branch) adds .note.GNU-stack
>  > > sections for gcc's crt files, libffi and boehm-gc.
>  > > 
>  > > sent first here: http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00948.html
>  > > 
>  > > Updated in the patch is:
>  > > 
>  > > 2007-05-11  Daniel Jacobowitz  <dan@debian.org>
>  > > 
>  > >         * src/arm/sysv.S: Fix ARM comment marker.
>  > > 
>  > > Jakub, is this patch necessary/wanted in the FSF sources?
>  > 
>  > Yes, except perhaps the ppc64 and ia64 bits.  There it is ambiguous whether
>  > PT_GNU_STACK segments are desirable or not (varries between upstream and
>  > distros) and recent changes in binutils on ia64 and ppc64 assume by
>  > default non-executable stack whe .note.GNU-stack section is not present,
>  > so explicit .note.GNU-stack with "x" needs to be used to force
>  > executable PT_GNU_STACK.
> 
> But why?  libffi doesn't need an executable stack, and libgcj
> definitely doesn't want it.

The gcc/as/ld behavior on linux non-ppc64/non-ia64 is:
- compiler generated assembly always contains .note.GNU-stack note,
  either with "", or with "x" flags - the former if it doesn't need
  trampolines, the latter if it does
- if -Wa,--execstack or -Wa,--noexecstack options are used,
  .note.GNU-stack section is generated, with "x" resp. "" flags
- during linking, if none of the input objects for some DSO or
  executable contain .note.GNU-stack note, no PT_GNU_STACK
  is created (very rare these days, as crtfiles e.g. will have
  the notes), otherwise if .note.GNU-stack notes are present
  in all object files and are all "" (non-executable), PT_GNU_STACK
  without PF_X is created, otherwise PT_GNU_STACK with PF_X is
  created.  This can be overridden with -Wl,-z,execstack or
  -Wl,-z,noexecstack
So, C/C++/Java code by default is assumed not to need executable
stack unless it needs trampolines (e.g. when taking address of
a nested function, or for Ada), while assembly sources must be
marked in one of the above ways, otherwise they are pessimistally
assumed to need executable stack.
As libffi assembly is known not to need executable stack, it
should be either marked, or assembled with -Wa,--noexecstack,
otherwise libgcj.so will require executable stack.

	Jakub

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

* Re: [patch ping2] libffi/boehm-gc/crt files executable stack (missing   .note.GNU-stack on .o files)
  2007-07-12 12:23     ` Jakub Jelinek
@ 2007-09-25  1:40       ` Matthias Klose
  2007-10-01  9:33         ` Andrew Haley
  0 siblings, 1 reply; 6+ messages in thread
From: Matthias Klose @ 2007-09-25  1:40 UTC (permalink / raw)
  To: GCJ-patches, gcc-patches; +Cc: Jakub Jelinek, Andrew Haley

ping 2 on the non ia64/ppc64 parts of this patch

Jakub Jelinek schrieb:
> On Thu, Jul 12, 2007 at 12:58:15PM +0100, Andrew Haley wrote:
>> Jakub Jelinek writes:
>>  > On Thu, Jul 05, 2007 at 12:51:51PM +0200, Matthias Klose wrote:
>>  > > The following patch (taken from the redhat/gcc-4_1-branch) adds .note.GNU-stack
>>  > > sections for gcc's crt files, libffi and boehm-gc.
>>  > > 
>>  > > sent first here: http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00948.html
>>  > > 
>>  > > Updated in the patch is:
>>  > > 
>>  > > 2007-05-11  Daniel Jacobowitz  <dan@debian.org>
>>  > > 
>>  > >         * src/arm/sysv.S: Fix ARM comment marker.
>>  > > 
>>  > > Jakub, is this patch necessary/wanted in the FSF sources?
>>  > 
>>  > Yes, except perhaps the ppc64 and ia64 bits.  There it is ambiguous whether
>>  > PT_GNU_STACK segments are desirable or not (varries between upstream and
>>  > distros) and recent changes in binutils on ia64 and ppc64 assume by
>>  > default non-executable stack whe .note.GNU-stack section is not present,
>>  > so explicit .note.GNU-stack with "x" needs to be used to force
>>  > executable PT_GNU_STACK.
>>
>> But why?  libffi doesn't need an executable stack, and libgcj
>> definitely doesn't want it.
> 
> The gcc/as/ld behavior on linux non-ppc64/non-ia64 is:
> - compiler generated assembly always contains .note.GNU-stack note,
>   either with "", or with "x" flags - the former if it doesn't need
>   trampolines, the latter if it does
> - if -Wa,--execstack or -Wa,--noexecstack options are used,
>   .note.GNU-stack section is generated, with "x" resp. "" flags
> - during linking, if none of the input objects for some DSO or
>   executable contain .note.GNU-stack note, no PT_GNU_STACK
>   is created (very rare these days, as crtfiles e.g. will have
>   the notes), otherwise if .note.GNU-stack notes are present
>   in all object files and are all "" (non-executable), PT_GNU_STACK
>   without PF_X is created, otherwise PT_GNU_STACK with PF_X is
>   created.  This can be overridden with -Wl,-z,execstack or
>   -Wl,-z,noexecstack
> So, C/C++/Java code by default is assumed not to need executable
> stack unless it needs trampolines (e.g. when taking address of
> a nested function, or for Ada), while assembly sources must be
> marked in one of the above ways, otherwise they are pessimistally
> assumed to need executable stack.
> As libffi assembly is known not to need executable stack, it
> should be either marked, or assembled with -Wa,--noexecstack,
> otherwise libgcj.so will require executable stack.
> 
> 	Jakub

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

* Re: [patch ping2] libffi/boehm-gc/crt files executable stack (missing   .note.GNU-stack on .o files)
  2007-09-25  1:40       ` [patch ping2] " Matthias Klose
@ 2007-10-01  9:33         ` Andrew Haley
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Haley @ 2007-10-01  9:33 UTC (permalink / raw)
  To: Matthias Klose; +Cc: GCJ-patches, gcc-patches, Jakub Jelinek

Matthias Klose writes:
 > ping 2 on the non ia64/ppc64 parts of this patch

Please resubmit the patch you actually want to commit.

TIA,
Andrew.

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

end of thread, other threads:[~2007-10-01  9:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-05 11:10 [patch ping] libffi/boehm-gc/crt files executable stack (missing .note.GNU-stack on .o files) Matthias Klose
2007-07-12 11:58 ` Jakub Jelinek
2007-07-12 12:14   ` Andrew Haley
2007-07-12 12:23     ` Jakub Jelinek
2007-09-25  1:40       ` [patch ping2] " Matthias Klose
2007-10-01  9:33         ` Andrew Haley

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 read-only IMAP folder(s) and NNTP newsgroup(s).