From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D02DF3857344; Wed, 4 May 2022 08:24:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D02DF3857344 From: "ro at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105472] New: [13 regression] .note.GNU-stack breaks many Solaris/x86 tests Date: Wed, 04 May 2022 08:24:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ro at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2022 08:24:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105472 Bug ID: 105472 Summary: [13 regression] .note.GNU-stack breaks many Solaris/x86 tests Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: hjl.tools at gmail dot com Target Milestone: --- Target: i386-pc-solaris2.11, x86_64-pc-solaris2.11 Between 20220502 (1cb220498e1f59021dab36c39c5d726e9f070c6a) and 20220503 (2680f5eec23805ab8a344f942ca5a7e180d57905), many tests began to FAIL on Solaris/x86 with /bin/as: +FAIL: gcc.target/x86_64/abi/test_3_element_struct_and_unions.c compilation= ,=20 -O0=20 [...] (332 tests total). The failure is always the same: Assembler: =20=20=20=20=20=20=20 "/vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/x86_64/abi/asm-suppo= rt.S", line 85 : Syntax error Near line: " .section .note.GNU-stack,"",@progbits" This happens because with /bin/as, '-' isn't valid in section names. However, even with gas which can assemble the test, this doesn't really make sense: Solaris ld doesn't know or care about .note.GNU-stack, so this has no effect. Instead, the Solaris security extensions framework is used, which defaults to non-exec stack on Solaris 11 anyway: $ sxadm status nxstack EXTENSION STATUS FLAGS nxstack enabled (all) u-c-- On top of that, ld provides -z sx=3Dnxstack to control the behaviour on an per-executable basis. gld doesn't know about all this, of course, but let's cross that bridge when the binutils 2.39 release approaches. The usual way throughout the code base is to guard .note.GNU-stack with __ELF__ && __linux__ to avoid all this.=