_*frame_* functions in glibc

Ulrich Drepper drepper@redhat.com
Thu Jun 15 10:16:00 GMT 2000


"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.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libc-hacker mailing list