osprey/cygnus/bfd/elfcode.h File Reference

#include "bfd.h"
#include "sysdep.h"
#include "libiberty.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elfcore.h"

Include dependency graph for elfcode.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define Elf_External_Ehdr   NAME(Elf,External_Ehdr)
#define Elf_External_Sym   NAME(Elf,External_Sym)
#define Elf_External_Shdr   NAME(Elf,External_Shdr)
#define Elf_External_Phdr   NAME(Elf,External_Phdr)
#define Elf_External_Rel   NAME(Elf,External_Rel)
#define Elf_External_Rela   NAME(Elf,External_Rela)
#define Elf_External_Dyn   NAME(Elf,External_Dyn)
#define elf_core_file_failing_command   NAME(bfd_elf,core_file_failing_command)
#define elf_core_file_failing_signal   NAME(bfd_elf,core_file_failing_signal)
#define elf_core_file_matches_executable_p   NAME(bfd_elf,core_file_matches_executable_p)
#define elf_object_p   NAME(bfd_elf,object_p)
#define elf_core_file_p   NAME(bfd_elf,core_file_p)
#define elf_get_symtab_upper_bound   NAME(bfd_elf,get_symtab_upper_bound)
#define elf_get_dynamic_symtab_upper_bound   NAME(bfd_elf,get_dynamic_symtab_upper_bound)
#define elf_swap_reloc_in   NAME(bfd_elf,swap_reloc_in)
#define elf_swap_reloca_in   NAME(bfd_elf,swap_reloca_in)
#define elf_swap_reloc_out   NAME(bfd_elf,swap_reloc_out)
#define elf_swap_reloca_out   NAME(bfd_elf,swap_reloca_out)
#define elf_swap_symbol_in   NAME(bfd_elf,swap_symbol_in)
#define elf_swap_symbol_out   NAME(bfd_elf,swap_symbol_out)
#define elf_swap_phdr_in   NAME(bfd_elf,swap_phdr_in)
#define elf_swap_phdr_out   NAME(bfd_elf,swap_phdr_out)
#define elf_swap_dyn_in   NAME(bfd_elf,swap_dyn_in)
#define elf_swap_dyn_out   NAME(bfd_elf,swap_dyn_out)
#define elf_get_reloc_upper_bound   NAME(bfd_elf,get_reloc_upper_bound)
#define elf_canonicalize_reloc   NAME(bfd_elf,canonicalize_reloc)
#define elf_slurp_symbol_table   NAME(bfd_elf,slurp_symbol_table)
#define elf_canonicalize_symtab   NAME(bfd_elf,canonicalize_symtab)
#define elf_canonicalize_dynamic_symtab   NAME(bfd_elf,canonicalize_dynamic_symtab)
#define elf_get_synthetic_symtab   NAME(bfd_elf,get_synthetic_symtab)
#define elf_make_empty_symbol   NAME(bfd_elf,make_empty_symbol)
#define elf_get_symbol_info   NAME(bfd_elf,get_symbol_info)
#define elf_get_lineno   NAME(bfd_elf,get_lineno)
#define elf_set_arch_mach   NAME(bfd_elf,set_arch_mach)
#define elf_find_nearest_line   NAME(bfd_elf,find_nearest_line)
#define elf_sizeof_headers   NAME(bfd_elf,sizeof_headers)
#define elf_set_section_contents   NAME(bfd_elf,set_section_contents)
#define elf_no_info_to_howto   NAME(bfd_elf,no_info_to_howto)
#define elf_no_info_to_howto_rel   NAME(bfd_elf,no_info_to_howto_rel)
#define elf_find_section   NAME(bfd_elf,find_section)
#define elf_write_shdrs_and_ehdr   NAME(bfd_elf,write_shdrs_and_ehdr)
#define elf_write_out_phdrs   NAME(bfd_elf,write_out_phdrs)
#define elf_write_relocs   NAME(bfd_elf,write_relocs)
#define elf_slurp_reloc_table   NAME(bfd_elf,slurp_reloc_table)

Functions/Subroutines

void elf_swap_symbol_in (bfd *abfd, const void *psrc, const void *pshn, Elf_Internal_Sym *dst)
void elf_swap_symbol_out (bfd *abfd, const Elf_Internal_Sym *src, void *cdst, void *shndx)
static void elf_swap_ehdr_in (bfd *abfd, const Elf_External_Ehdr *src, Elf_Internal_Ehdr *dst)
static void elf_swap_ehdr_out (bfd *abfd, const Elf_Internal_Ehdr *src, Elf_External_Ehdr *dst)
static void elf_swap_shdr_in (bfd *abfd, const Elf_External_Shdr *src, Elf_Internal_Shdr *dst)
static void elf_swap_shdr_out (bfd *abfd, const Elf_Internal_Shdr *src, Elf_External_Shdr *dst)
void elf_swap_phdr_in (bfd *abfd, const Elf_External_Phdr *src, Elf_Internal_Phdr *dst)
void elf_swap_phdr_out (bfd *abfd, const Elf_Internal_Phdr *src, Elf_External_Phdr *dst)
void elf_swap_reloc_in (bfd *abfd, const bfd_byte *s, Elf_Internal_Rela *dst)
void elf_swap_reloca_in (bfd *abfd, const bfd_byte *s, Elf_Internal_Rela *dst)
void elf_swap_reloc_out (bfd *abfd, const Elf_Internal_Rela *src, bfd_byte *d)
void elf_swap_reloca_out (bfd *abfd, const Elf_Internal_Rela *src, bfd_byte *d)
void elf_swap_dyn_in (bfd *abfd, const void *p, Elf_Internal_Dyn *dst)
void elf_swap_dyn_out (bfd *abfd, const Elf_Internal_Dyn *src, void *p)
static bfd_boolean elf_file_p (Elf_External_Ehdr *x_ehdrp)
const bfd_targetelf_object_p (bfd *abfd)
void elf_write_relocs (bfd *abfd, asection *sec, void *data)
int elf_write_out_phdrs (bfd *abfd, const Elf_Internal_Phdr *phdr, unsigned int count)
bfd_boolean elf_write_shdrs_and_ehdr (bfd *abfd)
long elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
static bfd_boolean elf_slurp_reloc_table_from_section (bfd *abfd, asection *asect, Elf_Internal_Shdr *rel_hdr, bfd_size_type reloc_count, arelent *relents, asymbol **symbols, bfd_boolean dynamic)
bfd_boolean elf_slurp_reloc_table (bfd *abfd, asection *asect, asymbol **symbols, bfd_boolean dynamic)
struct elf_size_info NAME (_bfd_elf, size_info)

Variables

bfd *bfdtempl
bfd *bfd bfd_vma ehdr_vma
bfd *bfd bfd_vma bfd_vmaloadbasep
bfd *bfd bfd_vma bfd_vma int(* target_read_memory )(bfd_vma, bfd_byte *, int))


Define Documentation

#define elf_canonicalize_dynamic_symtab   NAME(bfd_elf,canonicalize_dynamic_symtab)

Definition at line 110 of file elfcode.h.

#define elf_canonicalize_reloc   NAME(bfd_elf,canonicalize_reloc)

Definition at line 107 of file elfcode.h.

#define elf_canonicalize_symtab   NAME(bfd_elf,canonicalize_symtab)

Definition at line 109 of file elfcode.h.

#define elf_core_file_failing_command   NAME(bfd_elf,core_file_failing_command)

Definition at line 87 of file elfcode.h.

#define elf_core_file_failing_signal   NAME(bfd_elf,core_file_failing_signal)

Definition at line 88 of file elfcode.h.

#define elf_core_file_matches_executable_p   NAME(bfd_elf,core_file_matches_executable_p)

Definition at line 89 of file elfcode.h.

#define elf_core_file_p   NAME(bfd_elf,core_file_p)

Definition at line 92 of file elfcode.h.

#define Elf_External_Dyn   NAME(Elf,External_Dyn)

#define Elf_External_Ehdr   NAME(Elf,External_Ehdr)

Definition at line 79 of file elfcode.h.

Referenced by elf_core_file_p(), elf_object_p(), and elf_write_shdrs_and_ehdr().

#define Elf_External_Phdr   NAME(Elf,External_Phdr)

Definition at line 82 of file elfcode.h.

Referenced by elf_core_file_p(), elf_object_p(), and elf_write_out_phdrs().

#define Elf_External_Rel   NAME(Elf,External_Rel)

#define Elf_External_Rela   NAME(Elf,External_Rela)

#define Elf_External_Shdr   NAME(Elf,External_Shdr)

Definition at line 81 of file elfcode.h.

Referenced by elf_object_p(), and elf_write_shdrs_and_ehdr().

#define Elf_External_Sym   NAME(Elf,External_Sym)

#define elf_find_nearest_line   NAME(bfd_elf,find_nearest_line)

Definition at line 118 of file elfcode.h.

#define elf_find_section   NAME(bfd_elf,find_section)

Definition at line 123 of file elfcode.h.

#define elf_get_dynamic_symtab_upper_bound   NAME(bfd_elf,get_dynamic_symtab_upper_bound)

Definition at line 94 of file elfcode.h.

#define elf_get_lineno   NAME(bfd_elf,get_lineno)

Definition at line 116 of file elfcode.h.

#define elf_get_reloc_upper_bound   NAME(bfd_elf,get_reloc_upper_bound)

Definition at line 106 of file elfcode.h.

#define elf_get_symbol_info   NAME(bfd_elf,get_symbol_info)

Definition at line 115 of file elfcode.h.

#define elf_get_symtab_upper_bound   NAME(bfd_elf,get_symtab_upper_bound)

Definition at line 93 of file elfcode.h.

#define elf_get_synthetic_symtab   NAME(bfd_elf,get_synthetic_symtab)

Definition at line 112 of file elfcode.h.

#define elf_make_empty_symbol   NAME(bfd_elf,make_empty_symbol)

Definition at line 114 of file elfcode.h.

#define elf_no_info_to_howto   NAME(bfd_elf,no_info_to_howto)

Definition at line 121 of file elfcode.h.

#define elf_no_info_to_howto_rel   NAME(bfd_elf,no_info_to_howto_rel)

Definition at line 122 of file elfcode.h.

#define elf_object_p   NAME(bfd_elf,object_p)

Definition at line 91 of file elfcode.h.

#define elf_set_arch_mach   NAME(bfd_elf,set_arch_mach)

Definition at line 117 of file elfcode.h.

#define elf_set_section_contents   NAME(bfd_elf,set_section_contents)

Definition at line 120 of file elfcode.h.

#define elf_sizeof_headers   NAME(bfd_elf,sizeof_headers)

Definition at line 119 of file elfcode.h.

#define elf_slurp_reloc_table   NAME(bfd_elf,slurp_reloc_table)

Definition at line 127 of file elfcode.h.

#define elf_slurp_symbol_table   NAME(bfd_elf,slurp_symbol_table)

Definition at line 108 of file elfcode.h.

#define elf_swap_dyn_in   NAME(bfd_elf,swap_dyn_in)

Definition at line 104 of file elfcode.h.

Referenced by elf_bfd_final_link(), and elf_link_add_object_symbols().

#define elf_swap_dyn_out   NAME(bfd_elf,swap_dyn_out)

Definition at line 105 of file elfcode.h.

Referenced by elf_add_dynamic_entry(), and elf_bfd_final_link().

#define elf_swap_phdr_in   NAME(bfd_elf,swap_phdr_in)

Definition at line 102 of file elfcode.h.

Referenced by elf_core_file_p(), and elf_object_p().

#define elf_swap_phdr_out   NAME(bfd_elf,swap_phdr_out)

Definition at line 103 of file elfcode.h.

Referenced by elf_write_out_phdrs().

#define elf_swap_reloc_in   NAME(bfd_elf,swap_reloc_in)

Definition at line 96 of file elfcode.h.

Referenced by elf_slurp_reloc_table_from_section().

#define elf_swap_reloc_out   NAME(bfd_elf,swap_reloc_out)

Definition at line 98 of file elfcode.h.

Referenced by elf_write_relocs().

#define elf_swap_reloca_in   NAME(bfd_elf,swap_reloca_in)

Definition at line 97 of file elfcode.h.

Referenced by elf_slurp_reloc_table_from_section().

#define elf_swap_reloca_out   NAME(bfd_elf,swap_reloca_out)

Definition at line 99 of file elfcode.h.

Referenced by elf_write_relocs().

#define elf_swap_symbol_in   NAME(bfd_elf,swap_symbol_in)

Definition at line 100 of file elfcode.h.

#define elf_swap_symbol_out   NAME(bfd_elf,swap_symbol_out)

Definition at line 101 of file elfcode.h.

Referenced by elf_bfd_final_link(), elf_link_output_extsym(), and elf_link_output_sym().

#define elf_write_out_phdrs   NAME(bfd_elf,write_out_phdrs)

Definition at line 125 of file elfcode.h.

#define elf_write_relocs   NAME(bfd_elf,write_relocs)

Definition at line 126 of file elfcode.h.

#define elf_write_shdrs_and_ehdr   NAME(bfd_elf,write_shdrs_and_ehdr)

Definition at line 124 of file elfcode.h.


Function Documentation

static bfd_boolean elf_file_p ( Elf_External_Ehdr *  x_ehdrp  )  [inline, static]

Definition at line 457 of file elfcode.h.

References EI_MAG0, EI_MAG1, EI_MAG2, EI_MAG3, ELFMAG0, ELFMAG1, ELFMAG2, and ELFMAG3.

Referenced by elf_core_file_p(), and elf_object_p().

const bfd_target* elf_object_p ( bfd abfd  ) 

Definition at line 474 of file elfcode.h.

References _bfd_elf_setup_group_pointers(), bfd_target::_bfd_set_format, elf_backend_data::arch, bfd_alloc(), bfd_bread(), bfd_default_set_arch_mach(), bfd_elf_get_str_section(), bfd_error_system_call, bfd_error_wrong_format, bfd_get_error(), bfd_header_big_endian, bfd_header_little_endian, bfd_object, bfd_preserve_finish(), bfd_preserve_restore(), bfd_preserve_save(), bfd_section_from_elf_index(), bfd_section_from_shdr(), bfd_seek(), bfd_set_error(), bfd_set_start_address(), bfd_target_elf_flavour, bfd_target_vector, D_PAGED, DYNAMIC, elf_internal_ehdr::e_entry, elf_internal_ehdr::e_machine, elf_internal_ehdr::e_phnum, elf_internal_ehdr::e_phoff, elf_internal_ehdr::e_shentsize, elf_internal_ehdr::e_shnum, elf_internal_ehdr::e_shoff, elf_internal_ehdr::e_shstrndx, elf_internal_ehdr::e_type, EI_CLASS, EI_DATA, EI_VERSION, elf_backend_data::elf_backend_object_p, elf_elfheader, elf_elfsections, Elf_External_Ehdr, Elf_External_Phdr, Elf_External_Shdr, elf_file_p(), elf_backend_data::elf_machine_alt1, elf_backend_data::elf_machine_alt2, elf_backend_data::elf_machine_code, elf_numsections, elf_section_data, elf_swap_ehdr_in(), elf_swap_phdr_in, elf_swap_shdr_in(), elf_tdata, ELFCLASS, ELFDATA2LSB, ELFDATA2MSB, ELFDATANONE, EM_NONE, ET_CORE, ET_DYN, ET_EXEC, ET_REL, EV_CURRENT, EXEC_P, bfd_section::flags, bfd::flags, get_elf_backend_data, i, if(), bfd_preserve::marker, memcpy, elf_backend_data::minpagesize, NULL, s, SEC_DEBUGGING, bfd::sections, SEEK_SET, elf_internal_shdr::sh_link, elf_internal_shdr::sh_size, SHF_ALLOC, SHF_INFO_LINK, SHN_HIRESERVE, SHN_LORESERVE, SHN_UNDEF, SHN_XINDEX, SHT_NOBITS, SHT_REL, SHT_RELA, where, and bfd::xvec.

bfd_boolean elf_slurp_reloc_table ( bfd abfd,
asection asect,
asymbol **  symbols,
bfd_boolean  dynamic 
)

static bfd_boolean elf_slurp_reloc_table_from_section ( bfd abfd,
asection asect,
Elf_Internal_Shdr rel_hdr,
bfd_size_type  reloc_count,
arelent relents,
asymbol **  symbols,
bfd_boolean  dynamic 
) [static]

long elf_slurp_symbol_table ( bfd abfd,
asymbol **  symptrs,
bfd_boolean  dynamic 
)

void elf_swap_dyn_in ( bfd abfd,
const void p,
Elf_Internal_Dyn dst 
)

void elf_swap_dyn_out ( bfd abfd,
const Elf_Internal_Dyn src,
void p 
)

static void elf_swap_ehdr_in ( bfd abfd,
const Elf_External_Ehdr *  src,
Elf_Internal_Ehdr dst 
) [static]

static void elf_swap_ehdr_out ( bfd abfd,
const Elf_Internal_Ehdr src,
Elf_External_Ehdr *  dst 
) [static]

void elf_swap_phdr_in ( bfd abfd,
const Elf_External_Phdr *  src,
Elf_Internal_Phdr dst 
)

void elf_swap_phdr_out ( bfd abfd,
const Elf_Internal_Phdr src,
Elf_External_Phdr *  dst 
)

void elf_swap_reloc_in ( bfd abfd,
const bfd_byte s,
Elf_Internal_Rela dst 
)

void elf_swap_reloc_out ( bfd abfd,
const Elf_Internal_Rela src,
bfd_byte d 
)

void elf_swap_reloca_in ( bfd abfd,
const bfd_byte s,
Elf_Internal_Rela dst 
)

void elf_swap_reloca_out ( bfd abfd,
const Elf_Internal_Rela src,
bfd_byte d 
)

static void elf_swap_shdr_in ( bfd abfd,
const Elf_External_Shdr *  src,
Elf_Internal_Shdr dst 
) [static]

static void elf_swap_shdr_out ( bfd abfd,
const Elf_Internal_Shdr src,
Elf_External_Shdr *  dst 
) [static]

void elf_swap_symbol_in ( bfd abfd,
const void psrc,
const void pshn,
Elf_Internal_Sym dst 
)

void elf_swap_symbol_out ( bfd abfd,
const Elf_Internal_Sym src,
void cdst,
void shndx 
)

int elf_write_out_phdrs ( bfd abfd,
const Elf_Internal_Phdr phdr,
unsigned int  count 
)

Definition at line 969 of file elfcode.h.

References bfd_bwrite(), Elf_External_Phdr, and elf_swap_phdr_out.

void elf_write_relocs ( bfd abfd,
asection sec,
void data 
)

bfd_boolean elf_write_shdrs_and_ehdr ( bfd abfd  ) 

struct elf_size_info NAME ( _bfd_elf  ,
size_info   
) [read]


Variable Documentation

Definition at line 1574 of file elfcode.h.

Definition at line 1574 of file elfcode.h.

Definition at line 1577 of file elfcode.h.

Referenced by bfd_elf_bfd_from_remote_memory().

Definition at line 1574 of file elfcode.h.

Referenced by addr_for_mem_ref().


Generated on Wed Apr 8 14:48:57 2009 for Open64 by  doxygen 1.5.6