Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180509172848.GN1392@brightrain.aerifal.cx>
Date: Wed, 9 May 2018 13:28:48 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: undefined reference to `raise' with musl static toolchain

On Wed, May 09, 2018 at 05:24:37PM +0200, Szabolcs Nagy wrote:
> * Thomas Petazzoni <thomas.petazzoni@...tlin.com> [2018-05-09 15:44:07 +0200]:
> > 
> > So: why does a musl-based toolchain requires an explicit -static, while
> > it isn't needed with uClibc-ng ?
> > 
> 
> there can be many reasons.. 
> 
> e.g. if mktime in uclibc-ng happens to reference raise then it
> would get linked in independently of libgcc.
> 
> or maybe uclibc-ng has its own __aeabi_*div implementation.
> 
> or the way libgcc was configured, the raise(SIGFPE) was disabled
> (it is only enabled for linux targets, but who knows how
> *-linux-uclibcgnueabihf is interpreted).
> 
> you can check these using nm/objdump/readelf on libc.a and libgcc.a

It would be nice if this raise dependency could be removed from
libgcc. It's not necessary for any defined behavior; it's only there
for the sake of emulating x86 behavior on div-by-zero.

Either way you need to be using the right link order that -static
gives (potentially for other reasons) but it would be nice to avoid
unnecessary code getting static-linked like this.

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.