Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Sep 2013 11:51:50 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Hidden symbol '__muldc3' referenced when compiled with
 gcc-4.8.1

On Wed, Sep 04, 2013 at 11:07:35PM +0800, 邓尧 wrote:
> Hi,
> 
> I'm trying to build a musl based toolchain. My approach works well with
> gcc-4.7.3, however when upgrading gcc to 4.8.1, I run into such problem.
> 
> Firstly comiple cross binutils:
>     ../binutils-2.23.2/configure --prefix=... --target=...
> --with-sysroot=...
>     make && make DESTDIR=... install
> Then compile cross gcc (compiler only)
>     ../gcc-4.8.1/configure --prefix --target=... --with-sysroot=...
> --enable-languages=c
>     make all-gcc && make DESTDIR=... install-gcc
> Compile musl-0.9.13:
>     CC=$TARGET-gcc CFLAGS=-O2 ./configure --prefix=..
>     make && make DESTDIR=... install
> Finally compile fully working cross compiler, this is where I got problems:
>     ../gcc-4.8.1/configure --prefix --target=... --with-sysroot=...
> --enable-languages=c
>     make && make DESTDIR=... install
> In the final step, the build system will check whether the compiler (xgcc)
> could create executable. xgcc failed when linking, showed some error
> messages like the following:
> x86_64-unknown-linux-musl/bin/ld: a.out: hidden symbol `__muldc3' in
> musl/build/cross-4.8.1-gcc/./gcc/libgcc.a(_muldc3.o) is referenced by DSO.

More details on this would be helpful.

> It seems libc.so is referencing some hidden symbol defined in libgcc.a. The

What it means is that libc.so was linked incorrectly and does not have
its own (should be hidden) copy of __muldc3 and other libgcc functions
in it. Could you show us your config.mak from building musl?

Rich

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.