This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [google gcc-4_7, integration] Build more of libstdc++ with frame pointers


On Thu, Feb 28, 2013 at 11:59 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Feb 28, 2013 at 11:57:48AM -0800, Cary Coutant wrote:
>> Similarly, couldn't dlopen drop the loader lock while calling malloc?
>
> It can't, but perhaps it could call some alternative malloc instead
> (the simpler malloc version in ld.so or similar).

ld-linux starts calling the simpler malloc in dl-minimal.c, then switches to
"real" libc.so.6 malloc later on.

This behavior causes a lot of pain to anyone who tries to interpose malloc
and use dlsym(RTLD_NEXT,...) or similar from the interposer.

Roland explained to me ~15 years ago why it is that way (it had something to
do with Hurd); an explanation I can't find at the moment.

-- 
Paul Pluzhnikov


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]