From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5319 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: ELF loader rejects older glibc binary Date: Wed, 25 Jun 2014 20:59:24 -0700 Message-ID: <20140626035924.GA2714@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1403755159 6462 80.91.229.3 (26 Jun 2014 03:59:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Jun 2014 03:59:19 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5324-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jun 26 05:59:13 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1X00q8-0004fq-CH for gllmg-musl@plane.gmane.org; Thu, 26 Jun 2014 05:59:12 +0200 Original-Received: (qmail 3680 invoked by uid 550); 26 Jun 2014 03:59:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 3660 invoked from network); 26 Jun 2014 03:59:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=FjtbNN3iMDO1RgTdeDgny+FIkV+a4heWG+vsVTljmm4=; b=LzXMlVo90F9HC+gO55oVuMMWzuDJSy0E1UuVDPjdno6Qr7NPQiRVbsqTO9HivogSCT lM47SHzjn6nEiFWTYgmEOqj3qqB6DXbg8mzSKW8ZXQhM+DtBPENl95llXtnwYElUPGi6 yT+JF84RZ37W6k/rFDB/Fi6HvObGvtUCpzbv3XuJXiTpQFqniXmdJbcNg9fEcr7nf6pH 9hgFACx+JjKq+70awynCwVAGvci3RejPgvA3gqZ/D5ikOjTZUNOu5+m15HghxUSPDnpN v1d43YzIG77gAqBFtuFfkFhf8h4NNwyM9H20OnzP9t5Y5YQtBXwA+YI8Z9kkr9LyTNdE eFPA== X-Received: by 10.68.215.3 with SMTP id oe3mr17452136pbc.109.1403755138005; Wed, 25 Jun 2014 20:58:58 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:5319 Archived-At: Short version: I tried using a "libc6" shared binary that apparently is compatible with glibc back to 2.1, and musl rejected it as not a valid dynamic program. I've used this same binary on Debian 6, so it works elsewhere; but musl's loader is rejecting it. Long version: I'm trying to use a Brother DCP7065DN network printer with Alpine Linux; the drivers are closed-source though modified binaries are redistributable. The format used is a binary format having some relationship to PCL; I can't reverse-engineer it, so I'm stuck using the binary drivers for now. The drivers in question may be found here: http://support.brother.com/g/b/downloadlist.aspx?c=us&lang=en&prod=dcp7065dn_all&os=128 I grabbed the "LPR printer driver". After extracting it (ar x dcp7065*deb; tar xvzf data.tar.gz), I found the binaries in usr/local/Brother/Printer/DCP7065DN/{inf,lpd}/; the one I'd suggest poking at first is "usr/local/Brother/Printer/DCP7065DN/lpd/rawtobr3" (I previously determined that rawtobr3 does all the conversions). After locating the binaries and verifying with file that they were dynamically linked ELF binaries, I ran ldd. When this failed with the message: ldd: rawtobr3: Not a valid dynamic program I then ran "strace ldd rawtobr3"; the output indicates that musl mmap'd it and failed without trying to run it: ---start strace output--- execve("/usr/bin/ldd", ["ldd", "rawtobr3"], [/* 19 vars */]) = 0 open("rawtobr3", O_RDONLY|O_LARGEFILE) = 3 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\2\0\3\0\1\0\0\0\324\207\4\0104\0\0\0"..., 936) = 936 mmap2(0x8048000, 49152, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x566f1000 munmap(0x566f1000, 49152) = 0 writev(2, [{"ldd: rawtobr3: Not a valid dynam"..., 43}, {NULL, 0}], 2ldd: rawtobr3: Not a valid dynamic program ) = 43 exit_group(1) = ? +++ exited with 1 +++ ---end strace output--- strings suggests that it expects glibc 2.1 ABI, and that almost all the symbol requirements are met (_IO_stdin_used being the possible exception). Thanks, Isaac Dunham