Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 7 Aug 2011 18:05:09 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: Compilation error

On Sun, Aug 07, 2011 at 06:00:25PM -0400, Rich Felker wrote:
> > isn't it enough to
> > weakalias(sc_clock_gettime, __vdso_clock_gettime);
> > and then just use __vdso_clock_gettime ?
> > 
> > (so no __cgt etc)
> 
> No, because -Bsymbolic-functions binds it at link-time, or in other
> words, libc.so is intentionally built with no PLT because that makes
> it faster to start, faster to run, and lighter in memory.

By the way, it would be a lot nicer if we could use and rely on
visibility instead of -Bsymbolic-functions, so we could override the
behavior for a few specific functions. However, as far as I can tell
gcc (much less any other compiler) has no way to say "all functions
without explicit visibility should be protected, and all data without
explicit visibility should be default". So to use visibility we'd have
to have hideous attributes all over the place, which is pretty much
unacceptable...

Fortunately -Bsymbolic-functions is a close enough approximation to
what we want, and happens at the linker level instead of the compiler
level, so it's safe to use.

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.