[GHC] #10369: arm binaries have an executable stack

#10369: arm binaries have an executable stack -----------------------------------+------------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Keywords: | Operating System: Unknown/Multiple Architecture: arm | Type of failure: Other Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------+------------------------------------- Test `T703` is currently failing on on armhf/linux. The test result shows: {{{ GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0 }}} Arm compiles via LLVM, but x86_64 executbles compiled via LLVM do not have an executable stack. The other difference between the x86_64 and Arm is the Arm uses `ld.gold` as the linker. Sure enough, adding `-optl -Wl,-z,noexecstack` to the ghc command line fixes this, but a better solution is needed. This is probably also an issue on AArch64 which also uses the `ld.gold` linker. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10369 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10369: arm binaries have an executable stack -------------------------------------+--------------------------------- Reporter: erikd | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+--------------------------------- Changes (by erikd): * cc: ezyang (added) Comment: @ezyang : What do you think of the idea of adding the required ld command line args to `ld flags` field of the ghc `settings` file (when using `ld.gold`)? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10369#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10369: arm binaries have an executable stack -------------------------------------+--------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+--------------------------------- Changes (by erikd): * owner: => erikd -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10369#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10369: arm binaries have an executable stack -------------------------------------+--------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+--------------------------------- Comment (by erikd): @rwbarton suggests checking if the same problem exists when using `ld.gold` on x86_64/linux. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10369#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10369: arm binaries have an executable stack -------------------------------------+--------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: new Priority: normal | Milestone: 7.12.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+--------------------------------- Comment (by erikd): Tested this on x86_64 by hacking `aclocal.m4` to add `x86_64` to `arm` and `aarch64`, then configured and checked that the `settings` file contained: {{{ ("C compiler link flags", " -fuse-ld=gold"), ("ld command", "/usr/bin/ld.gold"), }}} built the compiler and then ran test `T703` and it passed. So, when using `ld.gold` on `x86_64` we do not end up with an executable stack. This seems like an Arm specific problem. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10369#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10369: arm binaries have an executable stack
-------------------------------------+---------------------------------
Reporter: erikd | Owner: erikd
Type: bug | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture: arm
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+---------------------------------
Comment (by Erik de Castro Lopo

#10369: arm binaries have an executable stack -------------------------------------+--------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: merge Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.11 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+--------------------------------- Changes (by erikd): * status: new => merge * milestone: 7.12.1 => 7.10.2 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10369#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10369: arm binaries have an executable stack -------------------------------------+--------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: closed Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.11 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: arm Type of failure: Other | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+--------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-7.10`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10369#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC