Back to index

glibc  2.9
Functions
dl-symaddr.c File Reference
#include <ldsodefs.h>
#include <dl-fptr.h>

Go to the source code of this file.

Functions

void * _dl_symbol_address (struct link_map *map, const ElfW(Sym)*ref)

Function Documentation

void* _dl_symbol_address ( struct link_map map,
const ElfW(Sym)*  ref 
)

Definition at line 24 of file dl-symaddr.c.

{
  ElfW(Addr) value = (map ? map->l_addr : 0) + ref->st_value;

  /* Return the pointer to function descriptor. */
  if (ELFW(ST_TYPE) (ref->st_info) == STT_FUNC)
    return (void *) _dl_make_fptr (map, ref, value);
  else
    return (void *) value;
}