Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 5 Sep 2013 01:20:50 +0800
From: 邓尧 <torshie@...il.com>
To: musl@...ts.openwall.com
Subject: Re: Hidden symbol '__muldc3' referenced when compiled with gcc-4.8.1

>
>
> More details on this would be helpful.
>
1. build binutils
../binutils-2.23.2/configure --disable-nls
--prefix=/home/hoolala/musl/tools --disable-werror
--target=x86_64-unknown-linux-musl --with-sysroot=/home/hoolala/musl/sysroot
make && make install

2. build gcc (compiler only):
../gcc-4.8.1/configure --prefix=/home/hoolala/musl/tools
--target=x86_64-unknown-linux-musl
--with-sysroot=/home/hoolala/musl/sysroot --disable-plugin --disable-lto
--with-newlib --without-headers --with-local-prefix=/usr --disable-nls
--disable-multilib --disable-decimal-float --disable-threads
--disable-libmudflap --disable-libssp --disable-libgomp
--disable-libquadmath --enable-languages=c --disable-libstdcxx
--disable-static --enable-shared
make all-gcc && make install-gcc

3. build musl
./configure --prefix=/usr --libdir=/usr/lib/x86_64-unknown-linux-musl
--includedir=/usr/include --disable-gcc-wrapper
make && make DESTDIR=/home/hoolala/musl/sysroot install

4. build gcc:
this time, gcc is configure'd exactly the same as last time, but built &
installed with command:
make && make install


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

The following is the generated config.mak

# This version of config.mak was generated by:
# ./configure --prefix=/usr --libdir=/usr/lib/x86_64-unknown-linux-musl
--includedir=/usr/include --disable-gcc-wrapper
# Any changes made here will be lost if configure is re-run
ARCH = x86_64
SUBARCH =
ASMSUBARCH =
prefix = /usr
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = /usr/lib/x86_64-unknown-linux-musl
includedir = /usr/include
syslibdir = /lib
CC = x86_64-unknown-linux-musl-gcc
CFLAGS= -pipe -fomit-frame-pointer -fno-unwind-tables
-fno-asynchronous-unwind-tables -Wa,--noexecstack
-Werror=implicit-function-declaration -Werror=implicit-int
-Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -O2
CFLAGS_C99FSE = -std=c99 -nostdinc -ffreestanding
-fexcess-precision=standard -frounding-math
CFLAGS_MEMOPS = -fno-tree-loop-distribute-patterns
CPPFLAGS =
LDFLAGS = -Wl,--hash-style=both
CROSS_COMPILE =
LIBCC =
OPTIMIZE_GLOBS =
ALL_TOOLS =
TOOL_LIBS =




>
> Rich
>

Content of type "text/html" skipped

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.