Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
symbol-elf.c File Reference
#include <libelf.h>
#include <gelf.h>
#include <elf.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <inttypes.h>
#include "symbol.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define NT_GNU_BUILD_ID   3
 
#define elf_symtab__for_each_symbol(syms, nr_syms, idx, sym)
 
#define elf_section__for_each_rel(reldata, pos, pos_mem, idx, nr_entries)
 
#define elf_section__for_each_rela(reldata, pos, pos_mem, idx, nr_entries)
 
#define NOTE_ALIGN(n)   (((n) + 3) & -4U)
 

Functions

int dso__synthesize_plt_symbols (struct dso *dso, struct symsrc *ss, struct map *map, symbol_filter_t filter)
 
int filename__read_build_id (const char *filename, void *bf, size_t size)
 
int sysfs__read_build_id (const char *filename, void *build_id, size_t size)
 
int filename__read_debuglink (const char *filename, char *debuglink, size_t size)
 
bool symsrc__possibly_runtime (struct symsrc *ss)
 
bool symsrc__has_symtab (struct symsrc *ss)
 
void symsrc__destroy (struct symsrc *ss)
 
int symsrc__init (struct symsrc *ss, struct dso *dso, const char *name, enum dso_binary_type type)
 
int dso__load_sym (struct dso *dso, struct map *map, struct symsrc *syms_ss, struct symsrc *runtime_ss, symbol_filter_t filter, int kmodule)
 
void symbol__elf_init (void)
 

Macro Definition Documentation

#define elf_section__for_each_rel (   reldata,
  pos,
  pos_mem,
  idx,
  nr_entries 
)
Value:
for (idx = 0, pos = gelf_getrel(reldata, 0, &pos_mem); \
idx < nr_entries; \
++idx, pos = gelf_getrel(reldata, idx, &pos_mem))

Definition at line 152 of file symbol-elf.c.

#define elf_section__for_each_rela (   reldata,
  pos,
  pos_mem,
  idx,
  nr_entries 
)
Value:
for (idx = 0, pos = gelf_getrela(reldata, 0, &pos_mem); \
idx < nr_entries; \
++idx, pos = gelf_getrela(reldata, idx, &pos_mem))

Definition at line 157 of file symbol-elf.c.

#define elf_symtab__for_each_symbol (   syms,
  nr_syms,
  idx,
  sym 
)
Value:
for (idx = 0, gelf_getsym(syms, idx, &sym);\
idx < nr_syms; \
idx++, gelf_getsym(syms, idx, &sym))

elf_symtab__for_each_symbol - iterate thru all the symbols

: struct elf_symtab instance to iterate : uint32_t idx : GElf_Sym iterator

Definition at line 25 of file symbol-elf.c.

#define NOTE_ALIGN (   n)    (((n) + 3) & -4U)

Definition at line 301 of file symbol-elf.c.

#define NT_GNU_BUILD_ID   3

Definition at line 15 of file symbol-elf.c.

Function Documentation

int dso__load_sym ( struct dso dso,
struct map map,
struct symsrc syms_ss,
struct symsrc runtime_ss,
symbol_filter_t  filter,
int  kmodule 
)

Definition at line 630 of file symbol-elf.c.

int dso__synthesize_plt_symbols ( struct dso dso,
struct symsrc ss,
struct map map,
symbol_filter_t  filter 
)

Definition at line 169 of file symbol-elf.c.

int filename__read_build_id ( const char filename,
void bf,
size_t  size 
)

Definition at line 382 of file symbol-elf.c.

int filename__read_debuglink ( const char filename,
char debuglink,
size_t  size 
)

Definition at line 454 of file symbol-elf.c.

void symbol__elf_init ( void  )

Definition at line 838 of file symbol-elf.c.

void symsrc__destroy ( struct symsrc ss)

Definition at line 541 of file symbol-elf.c.

bool symsrc__has_symtab ( struct symsrc ss)

Definition at line 536 of file symbol-elf.c.

int symsrc__init ( struct symsrc ss,
struct dso dso,
const char name,
enum dso_binary_type  type 
)

Definition at line 548 of file symbol-elf.c.

bool symsrc__possibly_runtime ( struct symsrc ss)

Definition at line 531 of file symbol-elf.c.

int sysfs__read_build_id ( const char filename,
void build_id,
size_t  size 
)

Definition at line 409 of file symbol-elf.c.