mailing list of musl libc
 help / color / mirror / code / Atom feed
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 23:48:19 +0100	[thread overview]
Message-ID: <20160121224818.GE9621@port70.net> (raw)
In-Reply-To: <CAOkOUedcUs1XNCUm0MdL+N2xe9cz+tv-MsghthKhjZdDZC5PwA@mail.gmail.com>

* N Jain <jain61@gmail.com> [2016-01-21 16:17:36 -0500]:
> >
> > > i think the musl linker should be able to deal with this :P
> >
> 
> 
> Do you mean linking using "g++" is not right way ? I am trying to find out

i meant the musl dynamic linker that loads the .so at runtime,
not the static linker you used at compilation.

> if I could use "ld" directly but not sure what options to use and how to
> pass libs.

when in doubt use -v too see what options gcc passes to ld

> I am using below commands to compile and link
> 
> gcc -c  a.c -o bin/a.o
> g++ -c acpp.cpp -o bin/acpp.o
> 
> g++   bin/a.o bin/acpp.o  -o a.elf
> 
> While reading about the difference between ld and g++ linking I found g++
> uses ld itself.
> Am I missing something ?
> 

i dont think so

and i think the linked binary is fine

libstdc++.so.6 vs libgcc_s.so.1 has some issues
which makes the musl linker fail to find some symbols.

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..


  reply	other threads:[~2016-01-21 22:48 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
2016-01-21 21:17       ` N Jain
2016-01-21 22:48         ` Szabolcs Nagy [this message]
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=20160121224818.GE9621@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).