From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7314 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: perl native musl, ldd Date: Thu, 2 Apr 2015 12:18:37 -0400 Message-ID: <20150402161837.GA6817@brightrain.aerifal.cx> References: <551D65EF.9030802@safe.ca> 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 1427991563 27074 80.91.229.3 (2 Apr 2015 16:19:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 2 Apr 2015 16:19:23 +0000 (UTC) Cc: musl@lists.openwall.com To: Jean-Marc Pigeon Original-X-From: musl-return-7327-gllmg-musl=m.gmane.org@lists.openwall.com Thu Apr 02 18:19:09 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YdhpW-0005eg-Jy for gllmg-musl@m.gmane.org; Thu, 02 Apr 2015 18:18:54 +0200 Original-Received: (qmail 5228 invoked by uid 550); 2 Apr 2015 16:18:53 -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 5207 invoked from network); 2 Apr 2015 16:18:52 -0000 Content-Disposition: inline In-Reply-To: <551D65EF.9030802@safe.ca> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7314 Archived-At: On Thu, Apr 02, 2015 at 11:53:19AM -0400, Jean-Marc Pigeon wrote: > Hello, > > > I compiled perl (native, under gcc-musl) and I have > a non expected result with ldd. > > Example: (with a musl system tree chroot) > bash=4/3# cd /usr/lib/perl5/5.20.2/auto/IPC/SysV/ > bash-4.3# ldd SysV.so > ldd (0x7f5d60dd2000) > libc.so => ldd (0x7f5d60dd2000) > Error relocating SysV.so: Perl_croak: symbol not found > Error relocating SysV.so: Perl_sv_setiv: symbol not found > Error relocating SysV.so: Perl_sv_2pv_flags: symbol not found > Error relocating SysV.so: Perl_av_store: symbol not found > etc. > > While with glibc (with a glibc system tree chroot) > bash-4.3# cd /usr/lib/perl5/5.20.2/auto/IPC/SysV > bash-4.3# ldd SysV.so > linux-vdso.so.1 (0x00007fff09556000) > libc.so.6 => /lib64/libc.so.6 (0x00007f25be856000) > /lib64/ld-linux-x86-64.so.2 (0x00007f25bee00000) > > I am puzzled about those "Error relocating" > native (within musl) perl make didn't return error, > so I am assuming everything went well. > > Advices...? hints? do we have a real problem > with musl ldd or I goofed somehow? Hmm, it seems like glibc ldd does not (or at least does not always) report symbols that can't be resolved. What seems to be happening is that the above symbols are intended to be provided by the main program (the perl interpreter) loading SysV.so rather than resolved via library dependencies. I hadn't really considered using ldd on .so files, only on main programs where this would not be an issue. If someone can help determine exactly what glibc ldd's behavior is here (does it always ignore missing symbols? or only for .so files, and if so, how does it distinguish .so file from main program?) it should be easy to make musl's behavior match. Rich