From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9220 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: MUSL issue while loading C++ lib Date: Wed, 27 Jan 2016 21:08:07 +0100 Message-ID: <20160127200807.GQ9621@port70.net> References: <20160121171245.GC9621@port70.net> <20160121200626.GD9621@port70.net> <20160121224818.GE9621@port70.net> 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 1453940305 29651 80.91.229.3 (28 Jan 2016 00:18:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jan 2016 00:18:25 +0000 (UTC) Cc: musl@lists.openwall.com To: N Jain Original-X-From: musl-return-9231-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 27 21:08:21 2016 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 1aOWO5-0000uu-FI for gllmg-musl@m.gmane.org; Wed, 27 Jan 2016 21:08:21 +0100 Original-Received: (qmail 7491 invoked by uid 550); 27 Jan 2016 20:08:19 -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 7473 invoked from network); 27 Jan 2016 20:08:19 -0000 Mail-Followup-To: N Jain , musl@lists.openwall.com Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Xref: news.gmane.org gmane.linux.lib.musl.general:9220 * N Jain [2016-01-27 14:04:59 -0500]: > I was debugging and trying to find the issue in MUSL during finding > "_Unwind_Resume_or_Rethrow" symbol. > I see that under find_sym function sysv_lookup(s,h,dso) function it is not > able to get above names which seems to be right as the offset in reloc > section of "libstdc++.so.6" is zero > > Example table below - > > Offset Info Type Sym.Value Sym. > Name > 0013700c 00000516 R_ARM_JUMP_SLOT 000c8bc8 > _ZNSt13basic_filebufIcSt11char_traitsIcEE19_M_terminate_outputEv (*Able to > lookup*) > *00137330 00051c16 R_ARM_JUMP_SLOT 00000000 _Unwind_Resume_or_Rethrow > (Failed)* > *00137510 00083616 R_ARM_JUMP_SLOT 00000000 _Unwind_GetLanguageSpe > (Failed)* > 0 is ok as these are defined in libgcc_s not libstdc++ i'd try to compile and run (gcc foo.c -lgcc_s) void _Unwind_Resume_or_Rethrow(); int main() { _Unwind_Resume_or_Rethrow(); } (it would segfault at runtime but the point is to see if the symbol lookup succeeds, if not, you can debug this easier than libstdc++, if yes, then compare and see what's different) > > > i can't help further, you will have to debug it, > > > i'd try to look at dso->strings with gdb and why the find_sym fails > > > or recompile musl with some dprintf added, > > > or try a known working toolchain and compare against it, > > > or wait for other ideas.. > > > > Any one know code where if library itself is dependent on other library > where is symbol relocation happening ? > I guess the issue is in that part of MUSL code ? Is there any MUSL patch to > resolve above issue ? the code is in ldso/dynlink.c