[GHC] #703: all binaries built by ghc have executable stacks
GHC
ghc-devs at haskell.org
Wed Jul 10 09:57:53 CEST 2013
#703: all binaries built by ghc have executable stacks
----------------------------+----------------------------------------------
Reporter: duncan | Owner: ezyang
Type: merge | Status: merge
Priority: normal | Milestone: 6.6.1
Component: | Version: 7.6.3
Compiler (NCG) | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: Linux | Difficulty: Moderate (less than a day)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: N/A |
Blocking: |
----------------------------+----------------------------------------------
Comment (by ezyang):
Hm, that's not right. I'll need some of your assistance: please run `ghc
--make example.hs -v -fforce-recomp -keep-tmp-files` (where example.hs is
some trivial Haskell program) and look at the output. You should see
something like:
{{{
*** C Compiler:
'/usr/bin/gcc' '-fno-stack-protector' '-Wl,--hash-size=31' '-Wl,--reduce-
memory-overheads' '-c' '/tmp/ghc1284_0/ghc1284_0.c' '-o'
'/tmp/ghc1284_0/ghc1284_0.o' '-DTABLES_NEXT_TO_CODE'
'-I/usr/lib/ghc/include'
*** C Compiler:
'/usr/bin/gcc' '-fno-stack-protector' '-Wl,--hash-size=31' '-Wl,--reduce-
memory-overheads' '-c' '/tmp/ghc1284_0/ghc1284_1.s' '-o'
'/tmp/ghc1284_0/ghc1284_1.o' '-DTABLES_NEXT_TO_CODE'
'-I/usr/lib/ghc/include'
}}}
if you scroll up a little bit. Run `readelf -S` on both of the object
files and check if `.note.GNU-stack` is present. The bug I saw in HEAD was
`/tmp/ghc1284_0/ghc1284_1.s` did not have the appropriate `.note.GNU-
stack` applied. If you see something different maybe something else has
changed between 7.6 and HEAD.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/703#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list