osprey/libelf/lib/update.c File Reference

#include <private.h>

Include dependency graph for update.c:

Go to the source code of this file.

Defines

#define native_encoding   (*(unsigned char*)&__encoding)
#define rewrite(var, val, f)   do{if((var)!=(val)){(var)=(val);(f)|=ELF_F_DIRTY;}}while(0)
#define align(var, val)   do{if((val)>1){(var)+=(val)-1;(var)-=(var)%(val);}}while(0)
#define max(a, b)   ((a)>(b)?(a):(b))
#define ptrinside(p, a, l)   ((p)>=(a)&&(p)<(a)+(l))
#define newptr(p, o, n)   ((p)=((p)-(o))+(n))

Functions/Subroutines

static off_t scn_data_layout (Elf_Scn *scn, unsigned v, unsigned type, size_t *algn, unsigned *flag)
static size_t scn_entsize (const Elf *elf, unsigned version, unsigned stype)
static off_t _elf32_layout (Elf *elf, unsigned *flag)
static int _elf_update_pointers (Elf *elf, char *outbuf, size_t len)
static off_t _elf32_write (Elf *elf, char *outbuf, size_t len)
static off_t _elf_output (Elf *elf, int fd, size_t len, off_t(*_elf_write)(Elf *, char *, size_t))
off_t elf_update (Elf *elf, Elf_Cmd cmd)

Variables

static const char rcsid [] = "@(#) $Id: update.c,v 1.1.1.1 2005/10/21 19:00:00 marcel Exp $"
static const unsigned short __encoding = ELFDATA2LSB + (ELFDATA2MSB << 8)


Define Documentation

#define align ( var,
val   )     do{if((val)>1){(var)+=(val)-1;(var)-=(var)%(val);}}while(0)

Definition at line 40 of file update.c.

Referenced by _bfd_add_merge_section(), _bfd_elf_tls_setup(), _elf32_layout(), Adjusted_Alignment(), allocate_dynamic_stack_space(), Allocate_Space(), alpha_align_insns(), alpha_expand_block_clear(), alpha_expand_compare_and_swap_12(), alpha_expand_lock_test_and_set_12(), apply_args_size(), apply_result_size(), arc_va_arg(), assign_file_positions_for_segments(), Assign_Offset(), assign_parm_find_stack_rtl(), assign_stack_temp_for_type(), aux_memset(), bfin_expand_movmem(), bfin_expand_strmov(), can_move_by_pieces(), change_address(), clear_storage(), clipper_movstr(), clipper_va_arg(), compute_alignment(), compute_argument_addresses(), compute_clrmem_length(), compute_ebb_actions(), compute_movmem_length(), compute_movstrsi_length(), Create_DST_type_For_Tree(), Create_Maligned_TY(), Create_TY_For_Tree(), crx_expand_movmem(), cvrt_to_pdg(), CODEREP::Divisable(), DST_enter_normal_field(), DST_enter_struct_union_members(), Dump_all(), dump_constants(), elf_link_add_object_symbols(), emit_block_move(), emit_move_sequence(), emit_pic_helper(), expand_block_clear(), expand_block_move(), expand_expr_real_1(), expand_main_function(), expand_movstr(), expand_one_stack_var(), expand_one_stack_var_at(), expand_used_vars(), final_addr_vec_align(), final_scan_insn(), finalize_type_size(), force_reg(), frv_expand_block_clear(), frv_expand_block_move(), function_arg(), function_arg_advance(), function_arg_partial_nregs(), gen_cmpstrsi(), Get_Align(), get_basic_type(), get_decl_align_unit(), get_pointer_alignment(), gimplify_init_constructor(), gimplify_omp_atomic(), GTY(), hppa_va_arg(), i860_gimplify_va_arg_expr(), i860_va_arg(), i960_pr_align(), init_alignment_context(), initial_elimination_offset(), IPO_generate_new_types(), IPO_get_new_ordering(), ix86_expand_clrmem(), ix86_expand_clrstr(), ix86_expand_movmem(), ix86_expand_movstr(), ix86_expand_strlensi_unroll_1(), ix86_function_arg_boundary(), ix86_gimplify_va_arg(), ix86_va_arg(), load_pic_register(), loop_givs_rescan(), m32r_expand_block_move(), m68hc11_va_arg(), m88k_va_arg(), mcore_expand_block_move(), Memop_Variant(), mips_gimplify_va_arg_expr(), mips_va_arg(), mmix_expand_builtin_va_arg(), mn10200_va_arg(), mn10300_arg_partial_bytes(), mn10300_va_arg(), mri_draw_tree(), output_block_clear(), output_block_move(), output_stack_adjust(), pj_expand_builtin_va_arg(), profile_function(), realign_file(), record_section(), round_push(), rounded_frame_size(), rs6000_arg_partial_bytes(), rs6000_expand_compare_and_swapqhi(), rs6000_gimplify_va_arg(), rs6000_parm_start(), rs6000_special_round_type_align(), rs6000_va_arg(), sbitmap_vector_alloc(), scn_data_layout(), send_attr_ntry(), set_mem_attributes_minus_bitpos(), sh5_schedule_saves(), sh_expand_epilogue(), sh_expand_prologue(), shorten_branches(), sparc_gimplify_va_arg(), sparc_output_deferred_case_vectors(), sparc_va_arg(), Split_Individual_Common(), ST_alignment(), STB_align(), store_by_pieces_1(), Trace_Stack_Segments(), v850_arg_partial_bytes(), VEC(), WFE_Expand_Expr(), WGEN_Expand_Expr(), Write_Elf_Symtab(), xtensa_emit_block_move(), xtensa_expand_block_move(), and xtensa_gimplify_va_arg_expr().

#define max ( a,
b   )     ((a)>(b)?(a):(b))

Definition at line 43 of file update.c.

#define native_encoding   (*(unsigned char*)&__encoding)

Definition at line 35 of file update.c.

Referenced by _elf32_layout().

#define newptr ( p,
o,
n   )     ((p)=((p)-(o))+(n))

Definition at line 505 of file update.c.

Referenced by _elf_update_pointers(), and add_new_contents().

#define ptrinside ( p,
a,
 )     ((p)>=(a)&&(p)<(a)+(l))

Definition at line 504 of file update.c.

Referenced by _elf_update_pointers().

#define rewrite ( var,
val,
f   )     do{if((var)!=(val)){(var)=(val);(f)|=ELF_F_DIRTY;}}while(0)

Definition at line 37 of file update.c.

Referenced by _elf32_layout(), and scn_data_layout().


Function Documentation

static off_t _elf32_layout ( Elf elf,
unsigned *  flag 
) [static]

static off_t _elf32_write ( Elf elf,
char *  outbuf,
size_t  len 
) [static]

static off_t _elf_output ( Elf elf,
int  fd,
size_t  len,
off_t(*)(Elf *, char *, size_t _elf_write 
) [static]

static int _elf_update_pointers ( Elf elf,
char *  outbuf,
size_t  len 
) [static]

off_t elf_update ( Elf elf,
Elf_Cmd  cmd 
)

static off_t scn_data_layout ( Elf_Scn scn,
unsigned  v,
unsigned  type,
size_t algn,
unsigned *  flag 
) [static]

static size_t scn_entsize ( const Elf elf,
unsigned  version,
unsigned  stype 
) [static]

Definition at line 110 of file update.c.

References _elf_scn_type(), _fsize, Elf::e_class, ELF_T_BYTE, ELF_T_VDEF, and ELF_T_VNEED.

Referenced by _elf32_layout(), and Init_Section().


Variable Documentation

const unsigned short __encoding = ELFDATA2LSB + (ELFDATA2MSB << 8) [static]

Definition at line 34 of file update.c.

const char rcsid[] = "@(#) $Id: update.c,v 1.1.1.1 2005/10/21 19:00:00 marcel Exp $" [static]

Definition at line 27 of file update.c.


Generated on Wed Apr 8 15:52:43 2009 for Open64 by  doxygen 1.5.6