From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10766 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ldd not working on ET_EXEC executables Date: Mon, 5 Dec 2016 21:33:25 -0500 Message-ID: <20161206023325.GH1555@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1480991620 30712 195.159.176.226 (6 Dec 2016 02:33:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 6 Dec 2016 02:33:40 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-10779-gllmg-musl=m.gmane.org@lists.openwall.com Tue Dec 06 03:33:36 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cE5ZY-0007R4-Ff for gllmg-musl@m.gmane.org; Tue, 06 Dec 2016 03:33:36 +0100 Original-Received: (qmail 7416 invoked by uid 550); 6 Dec 2016 02:33:38 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 7398 invoked from network); 6 Dec 2016 02:33:38 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10766 Archived-At: On Mon, Dec 05, 2016 at 07:39:32PM -0600, Laine Gholson wrote: > Hello, > > I am running musl on a ARM platform, and ldd won't work on a executable with the ET_EXEC type. > > running GNU ld 2.25.1, gcc 6.2.0, and musl 1.1.15-git-71-g54991729 > > $ gcc -fPIE -pie test.c -o test-pie > $ ldd test-pie > > $ gcc -fno-PIE -no-pie test.c -o test-nopie > $ ldd test-nopie > ldd: test-nopie: Not a valid dynamic program > $ elfedit --output-type DYN test-nopie > $ ldd test-nopie > > > Any idea why ldd says executables with the ET_EXEC type aren't valid? strace it; I suspect you'll find that mmap is not honoring the requested address. This is a bug introduced intentionally by grsec/pax and perhaps other hardened kernels. Rich