Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130211120816.GC6181@port70.net>
Date: Mon, 11 Feb 2013 13:08:16 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 2/3] Have different definitions of
 __pthread_tsd_main agree in size

* Szabolcs Nagy <nsz@...t70.net> [2013-02-11 12:22:37 +0100]:
> * Jens Gustedt <jens.gustedt@...ia.fr> [2013-02-11 08:40:20 +0100]:
> > In any case, this is perhaps better done with the tool chain. I have
> > good experience by having
> > 
> >   -fdata-sections -ffunction-sections
> > 
> > for the compiler options and then
> > 
> >    -Wl, --gc-sections
> > 
> > for the link. In the case of musl, this removes exactly all the dummy
> > sections :) plus two others (pad and sccp), see below.
> > 
> 
> are you sure about the correctness of these?
> 
> they seem to be broken to me: weak aliases are not respected
> and functions are dropped even if there are weak references to
> them which is bad..
> 
> eg if sccp is dropped then in any code that does not
> use pthread, the cancellable syscalls will be broken
> (if i understand these right)

ah sorry, --gc-sections is for dynamic linking,
there the weak aliases dont matter

and in case of static linking -fdata-sections
and -ffunction-sections just makes the elfheader
bigger and the linking slower (sum size of sections
may be a bit smaller or bigger because of alignment
things)

so these flags may be useful for building .so

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.