Bug 6387 – scanelf (from pax-utils) criticizes dmd generated object files

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2011-07-26T18:09:00Z
Last change time
2011-08-29T07:14:03Z
Assigned to
nobody
Creator
Marco.Leise

Attachments

IDFilenameSummaryContent-TypeSize
1012noexecstack.patchnoexecstack patch for dmd compilerapplication/octet-stream3935

Comments

Comment #0 by Marco.Leise — 2011-07-26T18:09:24Z
Created attachment 1012 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 by Marco.Leise — 2011-08-28T23:41:14Z
The patch has now been merged into the dmd source on GitHub.
Comment #2 by yebblies — 2011-08-29T07:14:03Z