This is the mail archive of the gcc@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]

Re: fde-glibc.c bug


Richard Henderson <rth@redhat.com> writes:

> On Tue, Jul 03, 2001 at 11:49:18AM -0700, Geoff Keating wrote:
> > Just out of interest, why can't dlsym() be used?
> 
> On a static application?  There's no dynamic symbol table.

Sorry, I meant dladdr():

/* Structure containing information about object searched using
   `dladdr'.  */
typedef struct
{
  __const char *dli_fname;      /* File name of defining object.  */
  void *dli_fbase;              /* Load address of that object.  */
  __const char *dli_sname;      /* Name of nearest symbol.  */
  void *dli_saddr;              /* Exact value of nearest symbol.  */
} Dl_info;

/* Fill in *INFO with the following information about ADDRESS.
   Returns 0 iff no shared object's segments contain that address.  */
extern int dladdr (const void *__address, Dl_info *__info) __THROW;

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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