This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: _*frame_* functions in glibc


On Thu, Jun 15, 2000 at 10:04:44AM -0700, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > If those functions are referenced in the DSO in any way, they
> > will be exported from the main object. A reference can be as
> > simple as
> > 
> > static void *(foo) () = funtion;
> 
> You can prevent that.  DSOs (unline the main program) can have
> undefined references.
> 

From gcc/crtstuff.c:

/* 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 put them in for libc 5 since it needs ___brk_addr and __environ
exported from the main object. I don't see why we cannot play the
same trick.


H.J.

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