Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 21 Jan 2016 23:48:19 +0100
From: Szabolcs Nagy <>
To: N Jain <>
Subject: Re: MUSL issue while loading C++ lib

* N Jain <> [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 vs 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..

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.