FD.io VPP  v16.06
Vector Packet Processing
elf.c File Reference
+ Include dependency graph for elf.c:

Go to the source code of this file.

Data Structures

struct  string_table_builder_t
 

Functions

always_inline void elf_swap_first_header (elf_main_t *em, elf_first_header_t *h)
 
always_inline void elf_swap_verneed (elf_dynamic_version_need_t *n)
 
always_inline void elf_swap_verneed_aux (elf_dynamic_version_need_aux_t *n)
 
clib_error_telf_get_section_by_name (elf_main_t *em, char *section_name, elf_section_t **result)
 
elf_section_telf_get_section_by_start_address_no_check (elf_main_t *em, uword start_address)
 
clib_error_telf_get_section_by_start_address (elf_main_t *em, uword start_address, elf_section_t **result)
 
static u8format_elf_section_type (u8 *s, va_list *args)
 
static u8format_elf_section (u8 *s, va_list *args)
 
static u8format_elf_segment_type (u8 *s, va_list *args)
 
static u8format_elf_segment (u8 *s, va_list *args)
 
static u8format_elf_symbol_binding_and_type (u8 *s, va_list *args)
 
static u8format_elf_symbol_visibility (u8 *s, va_list *args)
 
static u8format_elf_symbol_section_name (u8 *s, va_list *args)
 
u8format_elf_symbol (u8 *s, va_list *args)
 
static u8format_elf_relocation_type (u8 *s, va_list *args)
 
static u8format_elf_relocation (u8 *s, va_list *args)
 
static u8format_elf_dynamic_entry_type (u8 *s, va_list *args)
 
static u8format_elf_dynamic_entry (u8 *s, va_list *args)
 
static u8format_elf_architecture (u8 *s, va_list *args)
 
static u8format_elf_abi (u8 *s, va_list *args)
 
static u8format_elf_file_class (u8 *s, va_list *args)
 
static u8format_elf_file_type (u8 *s, va_list *args)
 
static u8format_elf_data_encoding (u8 *s, va_list *args)
 
static int elf_section_offset_compare (void *a1, void *a2)
 
static int elf_segment_va_compare (void *a1, void *a2)
 
u8format_elf_main (u8 *s, va_list *args)
 
static void elf_parse_segments (elf_main_t *em, void *data)
 
static void elf_parse_sections (elf_main_t *em, void *data)
 
static void add_symbol_table (elf_main_t *em, elf_section_t *s)
 
static void add_relocation_table (elf_main_t *em, elf_section_t *s)
 
void elf_parse_symbols (elf_main_t *em)
 
void elf_set_dynamic_entries (elf_main_t *em)
 
clib_error_telf_parse (elf_main_t *em, void *data, uword data_bytes)
 
static void add_dynamic_entries (elf_main_t *em, elf_section_t *s)
 
static void byte_swap_verneed (elf_main_t *em, elf_dynamic_version_need_union_t *vus)
 
static void set_dynamic_verneed (elf_main_t *em)
 
static void set_symbol_table (elf_main_t *em, u32 table_index)
 
static char * elf_find_interpreter (elf_main_t *em, void *data)
 
static voidelf_get_section_contents_with_starting_address (elf_main_t *em, uword start_address, uword elt_size, u32 *section_index_result)
 
static void elf_parse_dynamic (elf_main_t *em)
 
clib_error_telf_read_file (elf_main_t *em, char *file_name)
 
static u32 string_table_add_name (string_table_builder_t *b, u8 *n)
 
static u32 string_table_add_name_index (string_table_builder_t *b, u32 index)
 
static void string_table_init (string_table_builder_t *b, u8 *old_table)
 
static u8string_table_done (string_table_builder_t *b)
 
static void layout_sections (elf_main_t *em)
 
clib_error_telf_write_file (elf_main_t *em, char *file_name)
 
clib_error_telf_delete_named_section (elf_main_t *em, char *section_name)
 
void elf_create_section_with_contents (elf_main_t *em, char *section_name, elf64_section_header_t *header, void *contents, uword n_content_bytes)
 
uword elf_delete_segment_with_type (elf_main_t *em, elf_segment_type_t segment_type)
 

Function Documentation

static void add_dynamic_entries ( elf_main_t em,
elf_section_t s 
)
static

Definition at line 1030 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void add_relocation_table ( elf_main_t em,
elf_section_t s 
)
static

Definition at line 791 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void add_symbol_table ( elf_main_t em,
elf_section_t s 
)
static

Definition at line 736 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void byte_swap_verneed ( elf_main_t em,
elf_dynamic_version_need_union_t vus 
)
static

Definition at line 1069 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void elf_create_section_with_contents ( elf_main_t em,
char *  section_name,
elf64_section_header_t header,
void contents,
uword  n_content_bytes 
)

Definition at line 1870 of file elf.c.

clib_error_t* elf_delete_named_section ( elf_main_t em,
char *  section_name 
)

Definition at line 1855 of file elf.c.

+ Here is the call graph for this function:

uword elf_delete_segment_with_type ( elf_main_t em,
elf_segment_type_t  segment_type 
)

Definition at line 1918 of file elf.c.

static char* elf_find_interpreter ( elf_main_t em,
void data 
)
static

Definition at line 1163 of file elf.c.

+ Here is the caller graph for this function:

clib_error_t* elf_get_section_by_name ( elf_main_t em,
char *  section_name,
elf_section_t **  result 
)

Definition at line 47 of file elf.c.

+ Here is the caller graph for this function:

clib_error_t* elf_get_section_by_start_address ( elf_main_t em,
uword  start_address,
elf_section_t **  result 
)

Definition at line 67 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

elf_section_t* elf_get_section_by_start_address_no_check ( elf_main_t em,
uword  start_address 
)

Definition at line 60 of file elf.c.

+ Here is the caller graph for this function:

static void* elf_get_section_contents_with_starting_address ( elf_main_t em,
uword  start_address,
uword  elt_size,
u32 section_index_result 
)
static

Definition at line 1187 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* elf_parse ( elf_main_t em,
void data,
uword  data_bytes 
)

Definition at line 951 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void elf_parse_dynamic ( elf_main_t em)
static

Definition at line 1208 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void elf_parse_sections ( elf_main_t em,
void data 
)
static

Definition at line 681 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void elf_parse_segments ( elf_main_t em,
void data 
)
static

Definition at line 649 of file elf.c.

+ Here is the caller graph for this function:

void elf_parse_symbols ( elf_main_t em)

Definition at line 846 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* elf_read_file ( elf_main_t em,
char *  file_name 
)

Definition at line 1286 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int elf_section_offset_compare ( void a1,
void a2 
)
static

Definition at line 513 of file elf.c.

+ Here is the caller graph for this function:

static int elf_segment_va_compare ( void a1,
void a2 
)
static

Definition at line 521 of file elf.c.

+ Here is the caller graph for this function:

void elf_set_dynamic_entries ( elf_main_t em)

Definition at line 875 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void elf_swap_first_header ( elf_main_t em,
elf_first_header_t h 
)

Definition at line 23 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void elf_swap_verneed ( elf_dynamic_version_need_t n)

Definition at line 31 of file elf.c.

+ Here is the caller graph for this function:

always_inline void elf_swap_verneed_aux ( elf_dynamic_version_need_aux_t n)

Definition at line 39 of file elf.c.

+ Here is the caller graph for this function:

clib_error_t* elf_write_file ( elf_main_t em,
char *  file_name 
)

Definition at line 1678 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_abi ( u8 s,
va_list *  args 
)
static

Definition at line 439 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_architecture ( u8 s,
va_list *  args 
)
static

Definition at line 422 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_data_encoding ( u8 s,
va_list *  args 
)
static

Definition at line 496 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_dynamic_entry ( u8 s,
va_list *  args 
)
static

Definition at line 376 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_dynamic_entry_type ( u8 s,
va_list *  args 
)
static

Definition at line 358 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_file_class ( u8 s,
va_list *  args 
)
static

Definition at line 456 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_file_type ( u8 s,
va_list *  args 
)
static

Definition at line 473 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_elf_main ( u8 s,
va_list *  args 
)

Definition at line 530 of file elf.c.

+ Here is the call graph for this function:

static u8* format_elf_relocation ( u8 s,
va_list *  args 
)
static

Definition at line 319 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_relocation_type ( u8 s,
va_list *  args 
)
static

Definition at line 284 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_section ( u8 s,
va_list *  args 
)
static

Definition at line 97 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_section_type ( u8 s,
va_list *  args 
)
static

Definition at line 77 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_segment ( u8 s,
va_list *  args 
)
static

Definition at line 148 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_segment_type ( u8 s,
va_list *  args 
)
static

Definition at line 128 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_elf_symbol ( u8 s,
va_list *  args 
)

Definition at line 263 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_symbol_binding_and_type ( u8 s,
va_list *  args 
)
static

Definition at line 176 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_symbol_section_name ( u8 s,
va_list *  args 
)
static

Definition at line 232 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_elf_symbol_visibility ( u8 s,
va_list *  args 
)
static

Definition at line 213 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void layout_sections ( elf_main_t em)
static

Definition at line 1397 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_dynamic_verneed ( elf_main_t em)
static

Definition at line 1110 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void set_symbol_table ( elf_main_t em,
u32  table_index 
)
static

Definition at line 1126 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 string_table_add_name ( string_table_builder_t b,
u8 n 
)
static

Definition at line 1350 of file elf.c.

+ Here is the caller graph for this function:

static u32 string_table_add_name_index ( string_table_builder_t b,
u32  index 
)
static

Definition at line 1378 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* string_table_done ( string_table_builder_t b)
static

Definition at line 1391 of file elf.c.

+ Here is the caller graph for this function:

static void string_table_init ( string_table_builder_t b,
u8 old_table 
)
static

Definition at line 1384 of file elf.c.

+ Here is the caller graph for this function: