FD.io VPP  v18.01-8-g0eacf49
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

static void elf_swap_first_header (elf_main_t *em, elf_first_header_t *h)
 
static void elf_swap_verneed (elf_dynamic_version_need_t *n)
 
static 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 void * elf_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 1056 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 811 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 753 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 1096 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 1963 of file elf.c.

clib_error_t* elf_delete_named_section ( elf_main_t em,
char *  section_name 
)

Definition at line 1948 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 2014 of file elf.c.

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

Definition at line 1193 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 69 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 61 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 1217 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 978 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 1239 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 699 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 667 of file elf.c.

+ Here is the caller graph for this function:

void elf_parse_symbols ( elf_main_t em)

Definition at line 869 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 1329 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 526 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 535 of file elf.c.

+ Here is the caller graph for this function:

void elf_set_dynamic_entries ( elf_main_t em)

Definition at line 899 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void elf_swap_first_header ( elf_main_t em,
elf_first_header_t h 
)
inlinestatic

Definition at line 23 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void elf_swap_verneed ( elf_dynamic_version_need_t n)
inlinestatic

Definition at line 31 of file elf.c.

+ Here is the caller graph for this function:

static void elf_swap_verneed_aux ( elf_dynamic_version_need_aux_t n)
inlinestatic

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 1752 of file elf.c.

+ Here is the call graph for this function:

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

Definition at line 448 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 430 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 508 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 383 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 364 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 466 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 484 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 545 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 326 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 291 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 102 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 82 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 153 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 133 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 269 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 179 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 237 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 218 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 1453 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 1137 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 1156 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 1395 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_index ( string_table_builder_t b,
u32  index 
)
static

Definition at line 1427 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 1446 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 1436 of file elf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: