public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/105472] New: [13 regression] .note.GNU-stack breaks many Solaris/x86 tests
@ 2022-05-04  8:24 ro at gcc dot gnu.org
  2022-05-04  8:24 ` [Bug target/105472] " ro at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2022-05-04  8:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105472

            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, 
-O0 
[...]

(332 tests total).  The failure is always the same:

Assembler:
       
"/vol/gcc/src/hg/master/local/gcc/testsuite/gcc.target/x86_64/abi/asm-support.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=nxstack 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.

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

end of thread, other threads:[~2022-05-10 20:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04  8:24 [Bug target/105472] New: [13 regression] .note.GNU-stack breaks many Solaris/x86 tests ro at gcc dot gnu.org
2022-05-04  8:24 ` [Bug target/105472] " ro at gcc dot gnu.org
2022-05-04  8:36 ` marxin at gcc dot gnu.org
2022-05-06 17:16 ` hjl.tools at gmail dot com
2022-05-06 17:29 ` jakub at gcc dot gnu.org
2022-05-06 18:01 ` hjl.tools at gmail dot com
2022-05-06 18:01 ` hjl.tools at gmail dot com
2022-05-09 10:15 ` ro at CeBiTec dot Uni-Bielefeld.DE
2022-05-10 16:42 ` cvs-commit at gcc dot gnu.org
2022-05-10 16:43 ` cvs-commit at gcc dot gnu.org
2022-05-10 16:51 ` cvs-commit at gcc dot gnu.org
2022-05-10 20:14 ` hjl.tools at gmail dot com

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).