D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6387 - scanelf (from pax-utils) criticizes dmd generated object files
Summary: scanelf (from pax-utils) criticizes dmd generated object files
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Linux
: P2 trivial
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 18:09 UTC by Marco Leise
Modified: 2011-08-29 07:14 UTC (History)
1 user (show)

See Also:


Attachments
noexecstack patch for dmd compiler (3.84 KB, application/octet-stream)
2011-07-26 18:09 UTC, Marco Leise
Details

Note You need to log in before you can comment on or make changes to this issue.
Description Marco Leise 2011-07-26 18:09:24 UTC
Created attachment 1012 [details]
noexecstack patch for dmd compiler

On Gentoo Linux the package manager runs "scanelf" to check for vulnerabilities
and compatibility issues of installed binaries and issues QA warnings.

scanelf -qyAF "%e %p" /usr/lib/libdruntime.a /usr/lib/libphobos2.a

The output of this is what I see on screen when installing dmd from the sources
included in the zip file on the digital mars ftp server.
I discussed this with some people on #gentoo and someone mentioned a missing
».note.GNU-stack« section. That was in fact the key. A gentoo hacker came up
with a simple patch for the dmd backend that makes it emit that section and the
warnings are now gone!
If there are no implications with this it should be the default on GNU Linux (I
think).

A note on ».note.GNU-stack«:
http://en.chys.info/2010/12/note-gnu-stack/

The role of pax-utils in gentoo:
http://www.gentoo.org/proj/en/hardened/pax-utils.xml
Comment 1 Marco Leise 2011-08-28 23:41:14 UTC
The patch has now been merged into the dmd source on GitHub.