From: Szabolcs Nagy <nsz@port70.net>
To: N Jain <jain61@gmail.com>
Cc: musl@lists.openwall.com
Subject: Re: MUSL issue while loading C++ lib
Date: Thu, 21 Jan 2016 21:06:26 +0100 [thread overview]
Message-ID: <20160121200626.GD9621@port70.net> (raw)
In-Reply-To: <CAOkOUefZEax6yNTK8hMTXzmuZc+By3P4SF2CbmuE8kF3wwDoFw@mail.gmail.com>
* N Jain <jain61@gmail.com> [2016-01-21 14:05:41 -0500]:
>
> Also searching online I saw some issues with versions for
> GLIBCXX but don't know how to confirm if this is not the problem with MUSL
> toolchain I generated.
>
symbol versioning can cause problems, but gcc-5
libstdc++ and libgcc_s should work
> > > echo 'int main(){}' |g++ -xc++ -
> >
>
> I am not sure where to issue this command ?
i meant you should create a minimal dynamic linked
binary with your toolchain and analyze that
> > > readelf -ld ./a.out
> >
>
> INTERP 0x000114 0x00010114 0x00010114 0x00016 0x00016 R 0x1
> [Requesting program interpreter: /lib/ld-musl-arm.so.1]
...
> Dynamic section at offset 0xc24 contains 26 entries:
> Tag Type Name/Value
> 0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
> 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
> 0x00000001 (NEEDED) Shared library: [libc.so]
ok
> > > strace /lib/ld-musl-*.so.1 ./a.out
> >
>
> I don't have strace capability in my toolchain.
>
i wanted to see what paths are opened by the musl linker
to make sure the right libgcc_s.so.1 is found
> > > readelf -d /lib/libstdc++.so.6
> >
> 0x00000001 (NEEDED) Shared library: [libc.so]
> 0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
> 0x0000000e (SONAME) Library soname: [libstdc++.so.6]
ok
> > > readelf -aW /lib/libstdc++.so.6 |grep Unwind
> >
> 00137330 00051c16 R_ARM_JUMP_SLOT 00000000
> _Unwind_Resume_or_Rethrow
> 00137510 00083616 R_ARM_JUMP_SLOT 00000000
> _Unwind_GetLanguageSpecificData
my readelf prints the @GCC_3.x version suffix here.
i'm not sure what's the difference
> 1308: 00000000 0 FUNC GLOBAL DEFAULT UND
> _Unwind_Resume_or_Rethrow@GCC_3.3 (37)
> 2102: 00000000 0 FUNC GLOBAL DEFAULT UND
> _Unwind_GetLanguageSpecificData@GCC_3.0 (36)
...
> 14022: 00000000 0 FUNC GLOBAL DEFAULT UND
> _Unwind_Resume_or_Rethrow@@GCC_3.3
> 14816: 00000000 0 FUNC GLOBAL DEFAULT UND
> _Unwind_GetLanguageSpecificData@@GCC_3.0
ok
> > > readelf -aW /lib/libgcc_s.so.1 |grep Unwin
> >
>
> 302: 0001b350 28 FUNC GLOBAL DEFAULT 10
> _Unwind_GetLanguageSpecificData@@GCC_3.0
> 620: 0001ae04 36 FUNC GLOBAL DEFAULT 10
> _Unwind_Resume_or_Rethrow@@GCC_3.3
ok (.dynsym has the symbols)
> 1917: 0001b350 28 FUNC GLOBAL DEFAULT 10
> _Unwind_GetLanguageSpecificData
> 2235: 0001ae04 36 FUNC GLOBAL DEFAULT 10 _Unwind_Resume_or_Rethrow
this looks ok too
i think the musl linker should be able to deal with this :P
next prev parent reply other threads:[~2016-01-21 20:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 16:21 N Jain
2016-01-21 17:12 ` Szabolcs Nagy
2016-01-21 19:05 ` N Jain
2016-01-21 20:06 ` Szabolcs Nagy [this message]
2016-01-21 21:17 ` N Jain
2016-01-21 22:48 ` Szabolcs Nagy
2016-01-27 19:04 ` N Jain
2016-01-27 20:08 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160121200626.GD9621@port70.net \
--to=nsz@port70.net \
--cc=jain61@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).