From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23868 invoked by alias); 19 Apr 2005 00:59:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23735 invoked by uid 48); 19 Apr 2005 00:59:47 -0000 Date: Tue, 19 Apr 2005 00:59:00 -0000 From: "amodra at bigpond dot net dot au" To: gcc-bugs@gcc.gnu.org Message-ID: <20050419005945.21098.amodra@bigpond.net.au> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/21098] New: .note.GNU-stack emitted X-Bugzilla-Reason: CC X-SW-Source: 2005-04/txt/msg02509.txt.bz2 List-Id: .note.GNU-stack sections emitted in object files control whether the linker emits a PT_GNU_STACK header. This header in turn tells ld.so and the kernel whether the stack should be executable. The linker emits the PT_GNU_STACK header if any input object file has a .note.GNU-stack section, and the header has the exec bit set if any .note.GNU-stack section is SEC_CODE, *or if any file is missing the note*. ie. Linking a mix of files, some of which have the note section and others that don't, result in PT_GNU_STACK asking for an exec stack. On powerpc64, nested functions do not require a trampoline on the stack, so there is no need for an executable stack. gcc should either emit .note.GNU-stack section on all object files (remove !defined __powerpc64__ in the last few lines of config/rs6000/ppc-asm.h), or better, not emit any notes (not call file_end_indicate_exec_stack when -m64). -- Summary: .note.GNU-stack emitted Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: target AssignedTo: amodra at bigpond dot net dot au ReportedBy: amodra at bigpond dot net dot au CC: gcc-bugs at gcc dot gnu dot org GCC target triplet: powerpc64-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21098