_*frame_* functions in glibc

H . J . Lu hjl@lucon.org
Thu Jun 15 11:51:00 GMT 2000


On Thu, Jun 15, 2000 at 10:16:19AM -0700, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > /* This is a kludge. The i386 GNU/Linux dynamic linker needs ___brk_addr,
> >    __environ and atexit (). We have to make sure they are in the .dynsym
> >    section. We accomplish it by making a dummy call here. This
> >    code is never reached.  */
> >  
> > #if defined(__linux__) && defined(__PIC__) && defined(__i386__)
> >   {
> >     extern void *___brk_addr;
> >     extern char **__environ;
> > 
> >     ___brk_addr = __environ;
> >     atexit (0);
> >   }
> > #endif
> 
> I'm not sure this is the same.  What you are using here is that the
> x86 has copy relocations for data used in the main object.
> 
> But I'm sure we can make something work in this direction.
> 

Let me try to understand:

1. We want  _*frame_* functions in glibc.
2. We don't want to export them.
3. If the main object uses them, we want glibc to use copies in
the main object.
4. If the the main object doesn't use them, the copies in glibc will
be used.

Suppose we can export them from the main object by some magic, I still
don't fully understand how it works:

1. How to make glibc to use the ones from the main object and not
export them at the same time? I assume you will give them a non-default
version.
2. What about DSOs which need them?


H.J.


More information about the Libc-hacker mailing list