[Pkg-haskell-maintainers] Bug#786573: ghc: GHC 7.6.3 generates binaries with executable stack and data sections

Jonathan Neuschäfer j.neuschaefer at gmx.net
Tue May 26 13:28:04 UTC 2015


On Sat, May 23, 2015 at 10:18:20PM +0200, Joachim Breitner wrote:
> Hi,
> 
> Am Samstag, den 23.05.2015, 01:19 +0200 schrieb Jonathan Neuschäfer:
> > GHC 7.6.3, which is included in Debian jessie (now stable), generates
> > binaries with an executable stack and apparently with executable data
> > sections (on amd64; I didn't test anywhere else):
> >
> > [..]
> >
> > The fix discussed at [1] and [2], i.e. adding a ".note.GNU-stack"
> > section does not seem have an effect; it _is_ present:
> > 
> > > $ ghc -c test.hs
> > > compilation IS NOT required
> > > $ readelf -a test.o | grep -i stack
> > >   [ 6] .note.GNU-stack   PROGBITS         0000000000000000  000001f8
> > > $ ghc -S test.hs
> > > $ grep -i stack test.s
> > > .section .note.GNU-stack,"", at progbits
> 
> thanks for the report. I’m not sure what to do about it though. Is there
> a fix available?

I rebuilt with [3], but that didn't fix it.

[3] https://ghc.haskell.org/trac/ghc/attachment/ticket/703/0001-Disable-executable-stack-for-the-linker-note-fixing-.patch

> Also, you file this against the stable version, while I
> do not expect a fix for this to be worthy of backporting to stable.

Okay.

> Is it fixed in 7.8, or in 7.10?

It is indeed fixed in Debian's ghc 7.8.

> I think this is clearly an upstream matter. Can I suggest you take this
> discussion upstream at https://ghc.haskell.org/trac/ghc/ticket/703?

Since they probably aren't interested in backporting the fix to 7.6,
either, I don't think I have much to contribute.


Thanks,
Jonathan



More information about the Pkg-haskell-maintainers mailing list