osprey/cygnus/bfd/libbfd.c File Reference

#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"

Include dependency graph for libbfd.c:

Go to the source code of this file.

Defines

#define getpagesize()   2048
#define COERCE16(x)   (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000)
#define COERCE32(x)   (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000)
#define EIGHT_GAZILLION   ((bfd_int64_t) 1 << 63)
#define COERCE64(x)   (((bfd_int64_t) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION)

Functions/Subroutines

bfd_boolean bfd_false (bfd *ignore ATTRIBUTE_UNUSED)
bfd_boolean bfd_true (bfd *ignore ATTRIBUTE_UNUSED)
voidbfd_nullvoidptr (bfd *ignore ATTRIBUTE_UNUSED)
int bfd_0 (bfd *ignore ATTRIBUTE_UNUSED)
unsigned int bfd_0u (bfd *ignore ATTRIBUTE_UNUSED)
long bfd_0l (bfd *ignore ATTRIBUTE_UNUSED)
long _bfd_n1 (bfd *ignore_abfd ATTRIBUTE_UNUSED)
void bfd_void (bfd *ignore ATTRIBUTE_UNUSED)
bfd_boolean _bfd_nocore_core_file_matches_executable_p (bfd *ignore_core_bfd ATTRIBUTE_UNUSED, bfd *ignore_exec_bfd ATTRIBUTE_UNUSED)
char * _bfd_nocore_core_file_failing_command (bfd *ignore_abfd ATTRIBUTE_UNUSED)
int _bfd_nocore_core_file_failing_signal (bfd *ignore_abfd ATTRIBUTE_UNUSED)
const bfd_target_bfd_dummy_target (bfd *ignore_abfd ATTRIBUTE_UNUSED)
voidbfd_malloc (bfd_size_type size)
voidbfd_realloc (void *ptr, bfd_size_type size)
voidbfd_zmalloc (bfd_size_type size)
bfd_boolean bfd_write_bigendian_4byte_int (bfd *abfd, unsigned int i)
bfd_vma bfd_getb16 (const void *p)
bfd_vma bfd_getl16 (const void *p)
bfd_signed_vma bfd_getb_signed_16 (const void *p)
bfd_signed_vma bfd_getl_signed_16 (const void *p)
void bfd_putb16 (bfd_vma data, void *p)
void bfd_putl16 (bfd_vma data, void *p)
bfd_vma bfd_getb32 (const void *p)
bfd_vma bfd_getl32 (const void *p)
bfd_signed_vma bfd_getb_signed_32 (const void *p)
bfd_signed_vma bfd_getl_signed_32 (const void *p)
bfd_uint64_t bfd_getb64 (const void *p ATTRIBUTE_UNUSED)
bfd_uint64_t bfd_getl64 (const void *p ATTRIBUTE_UNUSED)
bfd_int64_t bfd_getb_signed_64 (const void *p ATTRIBUTE_UNUSED)
bfd_int64_t bfd_getl_signed_64 (const void *p ATTRIBUTE_UNUSED)
void bfd_putb32 (bfd_vma data, void *p)
void bfd_putl32 (bfd_vma data, void *p)
void bfd_putb64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
void bfd_putl64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED)
void bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p)
bfd_uint64_t bfd_get_bits (const void *p, int bits, bfd_boolean big_p)
bfd_boolean _bfd_generic_get_section_contents (bfd *abfd, sec_ptr section, void *location, file_ptr offset, bfd_size_type count)
bfd_boolean _bfd_generic_get_section_contents_in_window (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr section ATTRIBUTE_UNUSED, bfd_window *w ATTRIBUTE_UNUSED, file_ptr offset ATTRIBUTE_UNUSED, bfd_size_type count ATTRIBUTE_UNUSED)
bfd_boolean _bfd_generic_set_section_contents (bfd *abfd, sec_ptr section, const void *location, file_ptr offset, bfd_size_type count)
unsigned int bfd_log2 (bfd_vma x)
bfd_boolean bfd_generic_is_local_label_name (bfd *abfd, const char *name)
bfd_boolean _bfd_generic_verify_endian_match (bfd *ibfd, bfd *obfd)
void warn_deprecated (const char *what, const char *file, int line, const char *func)
bfd_vma read_unsigned_leb128 (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf, unsigned int *bytes_read_ptr)
bfd_signed_vma read_signed_leb128 (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *buf, unsigned int *bytes_read_ptr)


Define Documentation

#define COERCE16 (  )     (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000)

The do-it-yourself (byte) sex-change kit

Definition at line 396 of file libbfd.c.

Referenced by bfd_getb_signed_16(), and bfd_getl_signed_16().

#define COERCE32 (  )     (((bfd_signed_vma) (x) ^ 0x80000000) - 0x80000000)

Definition at line 397 of file libbfd.c.

#define COERCE64 (  )     (((bfd_int64_t) (x) ^ EIGHT_GAZILLION) - EIGHT_GAZILLION)

Definition at line 399 of file libbfd.c.

Referenced by bfd_getb_signed_64(), and bfd_getl_signed_64().

#define EIGHT_GAZILLION   ((bfd_int64_t) 1 << 63)

Definition at line 398 of file libbfd.c.

#define getpagesize ( void   )     2048


Function Documentation

const bfd_target* _bfd_dummy_target ( bfd *ignore_abfd  ATTRIBUTE_UNUSED  ) 

Definition at line 137 of file libbfd.c.

References bfd_error_wrong_format, and bfd_set_error().

bfd_boolean _bfd_generic_get_section_contents ( bfd abfd,
sec_ptr  section,
void location,
file_ptr  offset,
bfd_size_type  count 
)

bfd_boolean _bfd_generic_get_section_contents_in_window ( bfd *abfd  ATTRIBUTE_UNUSED,
sec_ptr section  ATTRIBUTE_UNUSED,
bfd_window *w  ATTRIBUTE_UNUSED,
file_ptr offset  ATTRIBUTE_UNUSED,
bfd_size_type count  ATTRIBUTE_UNUSED 
)

bfd_boolean _bfd_generic_set_section_contents ( bfd abfd,
sec_ptr  section,
const void location,
file_ptr  offset,
bfd_size_type  count 
)

Definition at line 771 of file libbfd.c.

References bfd_bwrite(), bfd_seek(), FALSE, bfd_section::filepos, SEEK_SET, and TRUE.

bfd_boolean _bfd_generic_verify_endian_match ( bfd ibfd,
bfd obfd 
)

long _bfd_n1 ( bfd *ignore_abfd  ATTRIBUTE_UNUSED  ) 

Definition at line 96 of file libbfd.c.

References bfd_error_invalid_operation, and bfd_set_error().

char* _bfd_nocore_core_file_failing_command ( bfd *ignore_abfd  ATTRIBUTE_UNUSED  ) 

Definition at line 120 of file libbfd.c.

References bfd_error_invalid_operation, bfd_set_error(), and NULL.

int _bfd_nocore_core_file_failing_signal ( bfd *ignore_abfd  ATTRIBUTE_UNUSED  ) 

Definition at line 130 of file libbfd.c.

References bfd_error_invalid_operation, and bfd_set_error().

bfd_boolean _bfd_nocore_core_file_matches_executable_p ( bfd *ignore_core_bfd  ATTRIBUTE_UNUSED,
bfd *ignore_exec_bfd  ATTRIBUTE_UNUSED 
)

Definition at line 109 of file libbfd.c.

References bfd_error_invalid_operation, bfd_set_error(), and FALSE.

int bfd_0 ( bfd *ignore  ATTRIBUTE_UNUSED  ) 

Definition at line 75 of file libbfd.c.

long bfd_0l ( bfd *ignore  ATTRIBUTE_UNUSED  ) 

Definition at line 87 of file libbfd.c.

unsigned int bfd_0u ( bfd *ignore  ATTRIBUTE_UNUSED  ) 

Definition at line 81 of file libbfd.c.

bfd_boolean bfd_false ( bfd *ignore  ATTRIBUTE_UNUSED  ) 

Definition at line 49 of file libbfd.c.

References bfd_error_invalid_operation, bfd_set_error(), and FALSE.

bfd_boolean bfd_generic_is_local_label_name ( bfd abfd,
const char *  name 
)

Definition at line 810 of file libbfd.c.

References bfd_get_symbol_leading_char.

bfd_uint64_t bfd_get_bits ( const void p,
int  bits,
bfd_boolean  big_p 
)

Definition at line 668 of file libbfd.c.

References abort, addr(), bytes, i, and index().

Referenced by cgen_get_insn_value(), print_insn(), and read_insn().

bfd_vma bfd_getb16 ( const void p  ) 

bfd_vma bfd_getb32 ( const void p  ) 

bfd_uint64_t bfd_getb64 ( const void *p  ATTRIBUTE_UNUSED  ) 

Definition at line 499 of file libbfd.c.

References addr(), BFD_FAIL, and p.

bfd_signed_vma bfd_getb_signed_16 ( const void p  ) 

Definition at line 417 of file libbfd.c.

References addr(), and COERCE16.

bfd_signed_vma bfd_getb_signed_32 ( const void p  ) 

Definition at line 473 of file libbfd.c.

References addr(), COERCE32, and long.

bfd_int64_t bfd_getb_signed_64 ( const void *p  ATTRIBUTE_UNUSED  ) 

Definition at line 546 of file libbfd.c.

References addr(), BFD_FAIL, COERCE64, and p.

bfd_vma bfd_getl16 ( const void p  ) 

bfd_vma bfd_getl32 ( const void p  ) 

bfd_uint64_t bfd_getl64 ( const void *p  ATTRIBUTE_UNUSED  ) 

Definition at line 522 of file libbfd.c.

References addr(), BFD_FAIL, and p.

bfd_signed_vma bfd_getl_signed_16 ( const void p  ) 

Definition at line 424 of file libbfd.c.

References addr(), and COERCE16.

bfd_signed_vma bfd_getl_signed_32 ( const void p  ) 

Definition at line 486 of file libbfd.c.

References addr(), COERCE32, and long.

Referenced by ppcboot_bfd_print_private_bfd_data().

bfd_int64_t bfd_getl_signed_64 ( const void *p  ATTRIBUTE_UNUSED  ) 

Definition at line 569 of file libbfd.c.

References addr(), BFD_FAIL, COERCE64, and p.

unsigned int bfd_log2 ( bfd_vma  x  ) 

void* bfd_malloc ( bfd_size_type  size  ) 

Definition at line 146 of file libbfd.c.

References bfd_error_no_memory, bfd_set_error(), malloc, NULL, and ptr.

Referenced by _bfd_coff_final_link(), _bfd_coff_get_external_symbols(), _bfd_coff_link_hash_table_create(), _bfd_coff_read_internal_relocs(), _bfd_coff_read_string_table(), _bfd_compute_and_write_armap(), _bfd_ecoff_bfd_link_hash_table_create(), _bfd_ecoff_write_object_contents(), _bfd_elf_get_synthetic_symtab(), _bfd_elf_link_assign_sym_version(), _bfd_elf_link_hash_table_create(), _bfd_elf_link_read_relocs(), _bfd_elf_mips_get_relocated_section_contents(), _bfd_elf_slurp_version_tables(), _bfd_elf_strtab_finalize(), _bfd_elf_strtab_init(), _bfd_elf_write_section_eh_frame(), _bfd_elf_write_section_eh_frame_hdr(), _bfd_generic_final_link(), _bfd_generic_get_section_contents_in_window(), _bfd_generic_link_add_archive_symbols(), _bfd_generic_link_hash_table_create(), _bfd_generic_read_minisymbols(), _bfd_mips_elf_final_link(), _bfd_mips_elf_hi16_reloc(), _bfd_mips_elf_link_hash_table_create(), _bfd_mips_elf_read_ecoff_info(), _bfd_mips_elf_section_from_shdr(), _bfd_mn10300_elf_create_dynamic_sections(), _bfd_stab_section_find_nearest_line(), _bfd_stringtab_init(), _bfd_vms_get_record(), _bfd_vms_save_sized_string(), _bfd_xcoff_bfd_final_link(), _bfd_xcoff_bfd_link_hash_table_create(), add_extra_plt_sections(), alpha_ecoff_get_relocated_section_contents(), analyze_relocations(), aout_get_external_symbols(), apuinfo_list_add(), assign_section_numbers(), b_out_bfd_get_relocated_section_contents(), b_out_bfd_relax_section(), b_out_slurp_reloc_table(), b_out_squirt_out_relocs(), bfd_arch_list(), bfd_boolean(), bfd_check_format_matches(), bfd_coff_reloc16_get_relocated_section_contents(), bfd_coff_reloc16_relax_section(), bfd_ecoff_debug_accumulate(), bfd_ecoff_debug_init(), bfd_ecoff_write_accumulated_debug(), bfd_elf_final_link(), bfd_elf_get_elf_syms(), bfd_elf_match_symbols_in_sections(), bfd_elf_size_dynamic_sections(), bfd_generic_get_relocated_section_contents(), bfd_get_unique_section_name(), bfd_mach_o_core_fetch_environment(), bfd_mach_o_openr_next_archived_file(), bfd_make_writable(), bfd_malloc_and_get_section(), bfd_pef_parse_function_stubs(), bfd_pef_parse_symbols(), bfd_pef_print_loader_section(), bfd_pef_scan_start_address(), bfd_simple_get_relocated_section_contents(), bfd_target_list(), bfd_wrapped_link_hash_lookup(), bfd_xcoff_export_symbol(), bfd_xcoff_link_generate_rtinit(), bfd_xcoff_size_dynamic_sections(), cache_fix_array(), coff_arm_link_hash_table_create(), coff_i960_start_final_link(), compute_bucket_count(), concat_filename(), copy_private_bfd_data(), default_data_link_order(), default_indirect_link_order(), ecoff_compute_section_file_positions(), ecoff_indirect_link_order(), ecoff_link_add_object_symbols(), ecoff_link_check_archive_element(), ecoff_slurp_symbolic_header(), ecoff_write_symhdr(), elf32_h8_get_relocated_section_contents(), elf32_hppa_link_hash_table_create(), elf32_hppa_setup_section_lists(), elf32_m68hc11_setup_section_lists(), elf32_mn10300_link_hash_table_create(), elf64_alpha_read_ecoff_info(), elf64_hppa_check_relocs(), elf64_x86_64_link_hash_table_create(), elf_bfd_final_link(), elf_collect_hash_codes(), elf_cris_link_hash_table_create(), elf_i386_link_hash_table_create(), elf_link_add_object_symbols(), elf_link_check_versioned_symbol(), elf_m68k_link_hash_table_create(), elf_s390_link_hash_table_create(), elf_slurp_reloc_table_from_section(), elf_slurp_symbol_table(), elf_vax_link_hash_table_create(), elf_xtensa_combine_prop_entries(), elfcore_read_notes(), elfNN_ia64_final_link(), elfNN_ia64_relax_section(), find_arm_glue(), find_thumb_glue(), h8300_bfd_link_add_symbols(), h8300_coff_link_hash_table_create(), h8300_reloc16_extra_cases(), hppa_stub_name(), ieee_archive_p(), init_op_single_format_table(), ld_set_section_data(), linux_link_hash_table_create(), linux_tally_symbols(), lookup_line(), m32r_elf_create_dynamic_sections(), m32r_elf_hi16_reloc(), m32r_elf_link_hash_table_create(), m68hc11_elf_hash_table_create(), map_sections_to_segments(), merge_strings(), mips_elf64_slurp_one_reloc_table(), mips_elf_create_procedure_table(), mips_refhi_reloc(), mmo_get_spec_section(), mmo_object_p(), mmo_scan(), mn10200_elf_get_relocated_section_contents(), mn10300_elf_get_relocated_section_contents(), mn10300_elf_relax_section(), NAME(), new_section(), or32_elf_consth_reloc(), pe_print_edata(), pe_print_idata(), ppc64_elf_build_stubs(), ppc64_elf_edit_opd(), ppc64_elf_get_synthetic_symtab(), ppc_bfd_coff_final_link(), ppc_build_one_stub(), ppc_coff_link_hash_table_create(), ppc_elf_begin_write_processing(), ppc_elf_final_write_processing(), ppc_elf_relax_section(), ppc_stub_name(), record_arm_to_thumb_glue(), record_thumb_to_arm_glue(), record_toc(), reloc_bfd_fix_init(), sec_merge_init(), sh64_elf64_add_symbol_hook(), sh64_elf64_create_dynamic_sections(), sh64_elf64_link_hash_table_create(), sh64_elf_add_symbol_hook(), sh_align_loads(), sh_coff_get_relocated_section_contents(), sh_elf64_get_relocated_section_contents(), sh_elf_align_loads(), sh_elf_create_dynamic_sections(), sh_elf_get_relocated_section_contents(), sh_elf_link_hash_table_create(), sparc64_elf_slurp_one_reloc_table(), srec_read_section(), srec_scan(), sunos_add_dynamic_symbols(), sunos_canonicalize_dynamic_symtab(), sunos_link_hash_table_create(), sunos_scan_relocs(), xcoff64_write_object_contents(), xcoff_link_add_dynamic_symbols(), xcoff_link_add_symbols(), xcoff_write_archive_contents_big(), xtensa_get_property_section_name(), xtensa_isa_init(), and xtensa_read_table_entries().

void* bfd_nullvoidptr ( bfd *ignore  ATTRIBUTE_UNUSED  ) 

Definition at line 68 of file libbfd.c.

References bfd_error_invalid_operation, bfd_set_error(), and NULL.

void bfd_put_bits ( bfd_uint64_t  data,
void p,
int  bits,
bfd_boolean  big_p 
)

Definition at line 648 of file libbfd.c.

References abort, addr(), bytes, i, and index().

Referenced by cgen_put_insn_value(), hash_insn_array(), and hash_insn_list().

void bfd_putb16 ( bfd_vma  data,
void p 
)

Definition at line 431 of file libbfd.c.

References addr().

Referenced by pj_elf_reloc().

void bfd_putb32 ( bfd_vma  data,
void p 
)

Definition at line 592 of file libbfd.c.

References addr().

Referenced by bfd_write_bigendian_4byte_int(), elfNN_ia64_install_value(), and pj_elf_reloc().

void bfd_putb64 ( bfd_uint64_t data  ATTRIBUTE_UNUSED,
void *p  ATTRIBUTE_UNUSED 
)

Definition at line 612 of file libbfd.c.

References addr(), BFD_FAIL, and p.

void bfd_putl16 ( bfd_vma  data,
void p 
)

Definition at line 439 of file libbfd.c.

References addr().

Referenced by build_link_order(), and image_write_w().

void bfd_putl32 ( bfd_vma  data,
void p 
)

void bfd_putl64 ( bfd_uint64_t data  ATTRIBUTE_UNUSED,
void *p  ATTRIBUTE_UNUSED 
)

Definition at line 630 of file libbfd.c.

References addr(), BFD_FAIL, and p.

void* bfd_realloc ( void ptr,
bfd_size_type  size 
)

bfd_boolean bfd_true ( bfd *ignore  ATTRIBUTE_UNUSED  ) 

Definition at line 59 of file libbfd.c.

References TRUE.

void bfd_void ( bfd *ignore  ATTRIBUTE_UNUSED  ) 

Definition at line 103 of file libbfd.c.

bfd_boolean bfd_write_bigendian_4byte_int ( bfd abfd,
unsigned int  i 
)

Definition at line 226 of file libbfd.c.

References bfd_bwrite(), and bfd_putb32().

Referenced by coff_write_armap().

void* bfd_zmalloc ( bfd_size_type  size  ) 

Definition at line 190 of file libbfd.c.

References bfd_error_no_memory, bfd_set_error(), malloc, memset, NULL, and ptr.

Referenced by _bfd_coff_reloc_link_order(), _bfd_elf_discard_section_eh_frame(), _bfd_elf_link_size_reloc_section(), _bfd_generic_get_section_contents_in_window(), _bfd_generic_reloc_link_order(), _bfd_mips_elf_discard_info(), _bfd_new_bfd(), _bfd_vms_slurp_gsd(), add_removed_literal(), add_value_map(), aout_link_reloc_link_order(), bfd_coff_reloc16_relax_section(), bfd_ecoff_write_accumulated_debug(), bfd_elf_final_link(), bfd_elf_gc_record_vtentry(), cisco_core_file_validate(), ebb_propose_action(), ecoff_reloc_link_order(), ecoff_write_shuffle(), elf32_hppa_setup_section_lists(), elf32_m68hc11_size_stubs(), elf32_sparc_link_hash_table_create(), elf64_alpha_bfd_link_hash_table_create(), elf_bfd_final_link(), elf_gc_record_vtentry(), elf_link_add_archive_symbols(), elf_link_sort_relocs(), elf_reloc_link_order(), elfNN_ia64_hash_table_create(), get_local_syms(), mmo_get_spec_section(), mmo_mkobject(), move_literal(), NAME(), ppc64_elf_edit_toc(), ppc64_elf_link_hash_table_create(), ppc64_elf_setup_section_lists(), ppc_elf_link_hash_table_create(), read_uarea(), relax_section(), sec_merge_emit(), sh64_bfd_elf_copy_private_section_data(), sparc64_elf_bfd_link_hash_table_create(), text_action_add(), text_action_add_literal(), trad_unix_core_file_p(), value_map_hash_table_init(), xcoff64_generate_rtinit(), xcoff_generate_rtinit(), xcoff_link_add_symbols(), xcoff_reloc_link_order(), xcoff_write_archive_contents_big(), and xcoff_write_armap_big().

bfd_signed_vma read_signed_leb128 ( bfd *abfd  ATTRIBUTE_UNUSED,
bfd_byte buf,
unsigned int *  bytes_read_ptr 
)

Definition at line 899 of file libbfd.c.

References abfd, bfd_get_8, result, and shift.

bfd_vma read_unsigned_leb128 ( bfd *abfd  ATTRIBUTE_UNUSED,
bfd_byte buf,
unsigned int *  bytes_read_ptr 
)

Definition at line 871 of file libbfd.c.

References abfd, bfd_get_8, result, and shift.

void warn_deprecated ( const char *  what,
const char *  file,
int  line,
const char *  func 
)

Definition at line 847 of file libbfd.c.

References _, fprintf(), and size_t.


Generated on Wed Apr 8 14:50:29 2009 for Open64 by  doxygen 1.5.6