osprey/cygnus/bfd/elf32-ppc.c File Reference

#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/ppc.h"
#include "elf32-ppc.h"
#include "elf32-target.h"

Include dependency graph for elf32-ppc.c:

Go to the source code of this file.

Data Types

type  elf_linker_section
type  elf_linker_section_pointers
type  ppc_elf_obj_tdata
type  ppc_elf_dyn_relocs
type  ppc_elf_link_hash_entry
type  ppc_elf_link_hash_table
type  apuinfo_list

Defines

#define BRANCH_PREDICT_BIT   0x200000
#define RA_REGISTER_MASK   0x001f0000
#define RA_REGISTER_SHIFT   16
#define ELF_DYNAMIC_INTERPRETER   "/usr/lib/ld.so.1"
#define PLT_ENTRY_SIZE   12
#define PLT_INITIAL_ENTRY_SIZE   72
#define PLT_SLOT_SIZE   8
#define PLT_NUM_SINGLE_ENTRIES   8192
#define NOP   0x60000000
#define CROR_151515   0x4def7b82
#define CROR_313131   0x4ffffb82
#define TP_OFFSET   0x7000
#define DTP_OFFSET   0x8000
#define ppc_elf_tdata(bfd)   ((struct ppc_elf_obj_tdata *) (bfd)->tdata.any)
#define elf_local_ptr_offsets(bfd)   (ppc_elf_tdata (bfd)->linker_section_pointers)
#define TLS_GD   1
#define TLS_LD   2
#define TLS_TPREL   4
#define TLS_DTPREL   8
#define TLS_TLS   16
#define TLS_TPRELGD   32
#define ppc_elf_hash_entry(ent)   ((struct ppc_elf_link_hash_entry *) (ent))
#define ppc_elf_hash_table(p)   ((struct ppc_elf_link_hash_table *) (p)->hash)
#define ELIMINATE_COPY_RELOCS   1
#define ARRAY_SIZE(a)   (sizeof (a) / sizeof ((a)[0]))
#define bfd_put_ptr(BFD, VAL, ADDR)   bfd_put_32 (BFD, VAL, ADDR)
#define MUST_BE_DYN_RELOC(RTYPE)
#define add_dynamic_entry(TAG, VAL)   _bfd_elf_add_dynamic_entry (info, TAG, VAL)
#define APUINFO_SECTION_NAME   ".PPC.EMB.apuinfo"
#define APUINFO_LABEL   "APUinfo"
#define TARGET_LITTLE_SYM   bfd_elf32_powerpcle_vec
#define TARGET_LITTLE_NAME   "elf32-powerpcle"
#define TARGET_BIG_SYM   bfd_elf32_powerpc_vec
#define TARGET_BIG_NAME   "elf32-powerpc"
#define ELF_ARCH   bfd_arch_powerpc
#define ELF_MACHINE_CODE   EM_PPC
#define ELF_MAXPAGESIZE   0x10000
#define ELF_MINPAGESIZE   0x1000
#define elf_info_to_howto   ppc_elf_info_to_howto
#define elf_backend_plt_not_loaded   1
#define elf_backend_got_symbol_offset   4
#define elf_backend_can_gc_sections   1
#define elf_backend_can_refcount   1
#define elf_backend_got_header_size   12
#define elf_backend_rela_normal   1
#define bfd_elf32_mkobject   ppc_elf_mkobject
#define bfd_elf32_bfd_merge_private_bfd_data   ppc_elf_merge_private_bfd_data
#define bfd_elf32_bfd_relax_section   ppc_elf_relax_section
#define bfd_elf32_bfd_reloc_type_lookup   ppc_elf_reloc_type_lookup
#define bfd_elf32_bfd_set_private_flags   ppc_elf_set_private_flags
#define bfd_elf32_bfd_link_hash_table_create   ppc_elf_link_hash_table_create
#define elf_backend_object_p   ppc_elf_object_p
#define elf_backend_gc_mark_hook   ppc_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook   ppc_elf_gc_sweep_hook
#define elf_backend_section_from_shdr   ppc_elf_section_from_shdr
#define elf_backend_relocate_section   ppc_elf_relocate_section
#define elf_backend_create_dynamic_sections   ppc_elf_create_dynamic_sections
#define elf_backend_check_relocs   ppc_elf_check_relocs
#define elf_backend_copy_indirect_symbol   ppc_elf_copy_indirect_symbol
#define elf_backend_adjust_dynamic_symbol   ppc_elf_adjust_dynamic_symbol
#define elf_backend_add_symbol_hook   ppc_elf_add_symbol_hook
#define elf_backend_size_dynamic_sections   ppc_elf_size_dynamic_sections
#define elf_backend_finish_dynamic_symbol   ppc_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections   ppc_elf_finish_dynamic_sections
#define elf_backend_fake_sections   ppc_elf_fake_sections
#define elf_backend_additional_program_headers   ppc_elf_additional_program_headers
#define elf_backend_grok_prstatus   ppc_elf_grok_prstatus
#define elf_backend_grok_psinfo   ppc_elf_grok_psinfo
#define elf_backend_reloc_type_class   ppc_elf_reloc_type_class
#define elf_backend_begin_write_processing   ppc_elf_begin_write_processing
#define elf_backend_final_write_processing   ppc_elf_final_write_processing
#define elf_backend_write_section   ppc_elf_write_section
#define elf_backend_special_sections   ppc_elf_special_sections
#define elf_backend_plt_sym_val   ppc_elf_plt_sym_val

Typedefs

typedef struct elf_linker_section elf_linker_section_t
typedef struct
elf_linker_section_pointers 
elf_linker_section_pointers_t

Enumerations

enum  elf_linker_section_enum { LINKER_SECTION_SDATA, LINKER_SECTION_SDATA2 }

Functions/Subroutines

static bfd_reloc_status_type ppc_elf_addr16_ha_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **)
static bfd_reloc_status_type ppc_elf_unhandled_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **)
static bfd_boolean ppc_elf_mkobject (bfd *abfd)
static struct bfd_hash_entryppc_elf_link_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table, const char *string)
static struct bfd_link_hash_tableppc_elf_link_hash_table_create (bfd *abfd)
static void ppc_elf_copy_indirect_symbol (const struct elf_backend_data *bed, struct elf_link_hash_entry *dir, struct elf_link_hash_entry *ind)
static void ppc_elf_howto_init (void)
static bfd_boolean ppc_elf_relax_section (bfd *abfd, asection *isec, struct bfd_link_info *link_info, bfd_boolean *again)
static reloc_howto_typeppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code)
static void ppc_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst)
static bfd_reloc_status_type ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry, asymbol *symbol, void *data ATTRIBUTE_UNUSED, asection *input_section, bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED)
static bfd_boolean ppc_elf_object_p (bfd *abfd)
static bfd_boolean ppc_elf_set_private_flags (bfd *abfd, flagword flags)
static bfd_boolean is_ppc_elf_target (const struct bfd_target *targ)
static bfd_boolean ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
static bfd_boolean ppc_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name)
static bfd_boolean ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *shdr, asection *asect)
static
elf_linker_section_pointers_t
elf_find_pointer_linker_section (elf_linker_section_pointers_t *linker_pointers, bfd_vma addend, elf_linker_section_t *lsect)
static bfd_boolean elf_create_pointer_linker_section (bfd *abfd, struct bfd_link_info *info, elf_linker_section_t *lsect, struct elf_link_hash_entry *h, const Elf_Internal_Rela *rel)
static bfd_vma elf_finish_pointer_linker_section (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info, elf_linker_section_t *lsect, struct elf_link_hash_entry *h, bfd_vma relocation, const Elf_Internal_Rela *rel, int relative_reloc)
static elf_linker_section_tppc_elf_create_linker_section (bfd *abfd, struct bfd_link_info *info, enum elf_linker_section_enum which)
static int ppc_elf_additional_program_headers (bfd *abfd)
static bfd_boolean ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info)
static bfd_boolean ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
static bfd_boolean ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h)
static bfd_boolean allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
static bfd_boolean readonly_dynrelocs (struct elf_link_hash_entry *h, void *info)
static bfd_boolean ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
static bfd_boolean update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, unsigned long r_symndx, int tls_type)
static void bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type)
static bfd_boolean ppc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs)
static asectionppc_elf_gc_mark_hook (asection *sec, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Rela *rel, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym)
static bfd_boolean ppc_elf_gc_sweep_hook (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs)
asectionppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
bfd_boolean ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
static bfd_boolean ppc_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep ATTRIBUTE_UNUSED, flagword *flagsp ATTRIBUTE_UNUSED, asection **secp, bfd_vma *valp)
static bfd_boolean ppc_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym)
static bfd_boolean ppc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
static bfd_boolean ppc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, asection *input_section, bfd_byte *contents, Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms, asection **local_sections)
static enum elf_reloc_type_class ppc_elf_reloc_type_class (const Elf_Internal_Rela *rela)
static bfd_boolean ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
static bfd_boolean ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
static void apuinfo_list_init (void)
static void apuinfo_list_add (unsigned long value)
static unsigned apuinfo_list_length (void)
static unsigned long apuinfo_list_element (unsigned long number)
static void apuinfo_list_finish (void)
static void ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
static bfd_boolean ppc_elf_write_section (bfd *abfd ATTRIBUTE_UNUSED, asection *asec, bfd_byte *contents ATTRIBUTE_UNUSED)
static void ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
static bfd_vma ppc_elf_plt_sym_val (bfd_vma i ATTRIBUTE_UNUSED, const asection *plt ATTRIBUTE_UNUSED, const arelent *rel)

Variables

static reloc_howto_typeppc_elf_howto_table [R_PPC_max]
static reloc_howto_type ppc_elf_howto_raw []
static const int shared_stub_entry []
static const int stub_entry []
static apuinfo_listhead
static struct
bfd_elf_special_section const 
ppc_elf_special_sections []


Define Documentation

#define add_dynamic_entry ( TAG,
VAL   )     _bfd_elf_add_dynamic_entry (info, TAG, VAL)

#define APUINFO_LABEL   "APUinfo"

Definition at line 5964 of file elf32-ppc.c.

Referenced by ppc_elf_begin_write_processing(), and ppc_elf_final_write_processing().

#define APUINFO_SECTION_NAME   ".PPC.EMB.apuinfo"

#define ARRAY_SIZE ( a   )     (sizeof (a) / sizeof ((a)[0]))

Definition at line 1605 of file elf32-ppc.c.

Referenced by _bfd_elf_make_section_from_shdr(), adjust_field_tree_exp(), alpha_expand_block_move(), alpha_init_builtins(), alpha_lookup_xfloating_lib_func(), altivec_expand_builtin(), altivec_expand_dst_builtin(), altivec_init_builtins(), argument_info_ptr(), argument_name_ptr(), arm_expand_builtin(), arm_init_iwmmxt_builtins(), arm_override_options(), bfd_arm_get_mach_from_notes(), bfd_elf32_bfd_reloc_type_lookup(), bfd_hash_set_default_size(), bfin_expand_builtin(), choose_abi_by_name(), choose_arch_by_name(), choose_arch_by_number(), const_hash_rtx(), cplus_demangle_opname(), cplus_mangle_opname(), create_file(), cse_cc_succs(), cxx_init(), cxx_keyword_p(), cxx_keyword_subst(), darwin_file_start(), decl_attributes(), decode_f_option(), decode_reg_name(), decode_W_option(), default_get_pch_validity(), default_pch_valid_p(), demangle_expression(), demangle_function_name(), df_hard_reg_init(), display_help(), display_target_options(), do_option_spec(), dump_edge_info(), dumpem(), dumpgen(), exp_print_token(), expand_builtin_setjmp_receiver(), expand_nl_goto_receiver(), ffebad_init_0(), ffebld_init_0(), ffebld_op_string(), ffecom_build_f2c_string_(), ffecom_debug_kludge_(), ffecom_f2c_set_lio_code_(), ffecom_init_0(), ffecom_init_decl_processing(), ffeimplic_none(), ffeinfo_basictype_string(), ffeinfo_init_0(), ffeinfo_kind_message(), ffeinfo_kind_string(), ffeinfo_kindtype_string(), ffeinfo_where_string(), ffeintrin_fulfill_generic(), ffeintrin_init_0(), ffeintrin_is_intrinsic(), ffelex_cfelex_(), ffelex_hash_kludge(), ffelex_type_string_(), ffestc_R904(), ffestc_R907(), ffesymbol_attrs_string(), ffesymbol_init_0(), ffesymbol_state_string(), ffetarget_print_binary(), ffetarget_print_hex(), ffetarget_print_octal(), ffetarget_real1(), ffetarget_real2(), ffetype_lookup_kind(), ffetype_lookup_star(), ffetype_set_kind(), ffetype_set_star(), find_free_reg(), fr30_print_operand(), frv_expand_builtin(), frv_insn_unit(), frv_override_options(), frv_registers_conflict_p_1(), frv_registers_update_1(), frv_reorder_packet(), gen_insn(), global_alloc(), gs_decode_reg_name(), handle_structs_in_regs(), ia64_handle_option(), ia64_hpux_add_pragma_builtin(), ia64_override_options(), init_attributes(), init_emit_once(), init_iconv_desc(), init_optabs(), init_ra(), init_reswords(), init_spec(), ix86_expand_builtin(), ix86_init_mmx_sse_builtins(), java_decode_option(), layout_mcore_frame(), life_analysis(), lookup_spec_function(), main(), make_length_attrs(), mcore_output_inline_const_forced(), mips_expand_builtin(), mips_init_builtins(), mips_mach_extends_p(), mmix_output_condition(), openrisc_reloc_type_lookup(), order_regs_for_local_alloc(), output_block_move(), output_objc_section_asm_op(), output_options(), output_predicate_decls(), override_options(), parse_options_and_default_flags(), physmem_available(), physmem_total(), post_address(), ppc_elf_relax_section(), print_mips_disassembler_options(), print_operand(), print_reg(), print_switch_values(), print_symbol(), process_command(), remove_last_token(), rs6000_common_init_builtins(), rs6000_expand_builtin(), rs6000_file_start(), rs6000_override_options(), s390_handle_arch_option(), segv_handler(), set_sizetype(), set_spec(), set_target_switch(), sh_coff_reloc_type_lookup(), sh_elf_get_flags_from_mach(), sh_media_init_builtins(), sh_pch_valid_p(), signed_type(), sparc_add_gc_roots(), spe_expand_builtin(), spe_init_builtins(), testname(), testnames(), translate_options(), type_for_mode(), type_for_size(), ucn_valid_in_identifier(), unsigned_type(), v850_elf_reloc_type_lookup(), write_lookup_constraint(), and xstormy16_reloc_type_lookup().

#define bfd_elf32_bfd_link_hash_table_create   ppc_elf_link_hash_table_create

Definition at line 6229 of file elf32-ppc.c.

#define bfd_elf32_bfd_merge_private_bfd_data   ppc_elf_merge_private_bfd_data

Definition at line 6225 of file elf32-ppc.c.

#define bfd_elf32_bfd_relax_section   ppc_elf_relax_section

Definition at line 6226 of file elf32-ppc.c.

#define bfd_elf32_bfd_reloc_type_lookup   ppc_elf_reloc_type_lookup

Definition at line 6227 of file elf32-ppc.c.

#define bfd_elf32_bfd_set_private_flags   ppc_elf_set_private_flags

Definition at line 6228 of file elf32-ppc.c.

#define bfd_elf32_mkobject   ppc_elf_mkobject

Definition at line 6224 of file elf32-ppc.c.

#define bfd_put_ptr ( BFD,
VAL,
ADDR   )     bfd_put_32 (BFD, VAL, ADDR)

Definition at line 2491 of file elf32-ppc.c.

Referenced by elf_finish_pointer_linker_section().

#define BRANCH_PREDICT_BIT   0x200000

Definition at line 48 of file elf32-ppc.c.

Referenced by ppc_elf_relocate_section().

#define CROR_151515   0x4def7b82

Definition at line 69 of file elf32-ppc.c.

Referenced by ppc64_elf_relocate_section().

#define CROR_313131   0x4ffffb82

Definition at line 70 of file elf32-ppc.c.

Referenced by ppc64_elf_relocate_section().

#define DTP_OFFSET   0x8000

Definition at line 74 of file elf32-ppc.c.

Referenced by dtprel_base(), ppc64_elf_relocate_section(), and ppc_elf_relocate_section().

#define ELF_ARCH   bfd_arch_powerpc

Definition at line 6199 of file elf32-ppc.c.

#define elf_backend_add_symbol_hook   ppc_elf_add_symbol_hook

Definition at line 6240 of file elf32-ppc.c.

#define elf_backend_additional_program_headers   ppc_elf_additional_program_headers

Definition at line 6245 of file elf32-ppc.c.

#define elf_backend_adjust_dynamic_symbol   ppc_elf_adjust_dynamic_symbol

Definition at line 6239 of file elf32-ppc.c.

#define elf_backend_begin_write_processing   ppc_elf_begin_write_processing

Definition at line 6249 of file elf32-ppc.c.

#define elf_backend_can_gc_sections   1

Definition at line 6219 of file elf32-ppc.c.

#define elf_backend_can_refcount   1

Definition at line 6220 of file elf32-ppc.c.

#define elf_backend_check_relocs   ppc_elf_check_relocs

Definition at line 6237 of file elf32-ppc.c.

#define elf_backend_copy_indirect_symbol   ppc_elf_copy_indirect_symbol

Definition at line 6238 of file elf32-ppc.c.

#define elf_backend_create_dynamic_sections   ppc_elf_create_dynamic_sections

Definition at line 6236 of file elf32-ppc.c.

#define elf_backend_fake_sections   ppc_elf_fake_sections

Definition at line 6244 of file elf32-ppc.c.

#define elf_backend_final_write_processing   ppc_elf_final_write_processing

Definition at line 6250 of file elf32-ppc.c.

#define elf_backend_finish_dynamic_sections   ppc_elf_finish_dynamic_sections

Definition at line 6243 of file elf32-ppc.c.

#define elf_backend_finish_dynamic_symbol   ppc_elf_finish_dynamic_symbol

Definition at line 6242 of file elf32-ppc.c.

#define elf_backend_gc_mark_hook   ppc_elf_gc_mark_hook

Definition at line 6232 of file elf32-ppc.c.

#define elf_backend_gc_sweep_hook   ppc_elf_gc_sweep_hook

Definition at line 6233 of file elf32-ppc.c.

#define elf_backend_got_header_size   12

Definition at line 6221 of file elf32-ppc.c.

#define elf_backend_got_symbol_offset   4

Definition at line 6218 of file elf32-ppc.c.

#define elf_backend_grok_prstatus   ppc_elf_grok_prstatus

Definition at line 6246 of file elf32-ppc.c.

#define elf_backend_grok_psinfo   ppc_elf_grok_psinfo

Definition at line 6247 of file elf32-ppc.c.

#define elf_backend_object_p   ppc_elf_object_p

Definition at line 6231 of file elf32-ppc.c.

#define elf_backend_plt_not_loaded   1

Definition at line 6217 of file elf32-ppc.c.

#define elf_backend_plt_sym_val   ppc_elf_plt_sym_val

Definition at line 6253 of file elf32-ppc.c.

#define elf_backend_rela_normal   1

Definition at line 6222 of file elf32-ppc.c.

#define elf_backend_reloc_type_class   ppc_elf_reloc_type_class

Definition at line 6248 of file elf32-ppc.c.

#define elf_backend_relocate_section   ppc_elf_relocate_section

Definition at line 6235 of file elf32-ppc.c.

#define elf_backend_section_from_shdr   ppc_elf_section_from_shdr

Definition at line 6234 of file elf32-ppc.c.

#define elf_backend_size_dynamic_sections   ppc_elf_size_dynamic_sections

Definition at line 6241 of file elf32-ppc.c.

#define elf_backend_special_sections   ppc_elf_special_sections

Definition at line 6252 of file elf32-ppc.c.

#define elf_backend_write_section   ppc_elf_write_section

Definition at line 6251 of file elf32-ppc.c.

#define ELF_DYNAMIC_INTERPRETER   "/usr/lib/ld.so.1"

Definition at line 56 of file elf32-ppc.c.

#define elf_info_to_howto   ppc_elf_info_to_howto

Definition at line 6207 of file elf32-ppc.c.

#define elf_local_ptr_offsets ( bfd   )     (ppc_elf_tdata (bfd)->linker_section_pointers)

#define ELF_MACHINE_CODE   EM_PPC

Definition at line 6200 of file elf32-ppc.c.

#define ELF_MAXPAGESIZE   0x10000

Definition at line 6204 of file elf32-ppc.c.

#define ELF_MINPAGESIZE   0x1000

Definition at line 6206 of file elf32-ppc.c.

#define ELIMINATE_COPY_RELOCS   1

Definition at line 284 of file elf32-ppc.c.

#define MUST_BE_DYN_RELOC ( RTYPE   ) 

Value:

((RTYPE) != R_PPC_REL24     \
   && (RTYPE) != R_PPC_REL14      \
   && (RTYPE) != R_PPC_REL14_BRTAKEN    \
   && (RTYPE) != R_PPC_REL14_BRNTAKEN   \
   && (RTYPE) != R_PPC_REL32)

Definition at line 3005 of file elf32-ppc.c.

Referenced by dec_dynrel_count(), ppc64_elf_check_relocs(), ppc64_elf_relocate_section(), ppc_elf_check_relocs(), and ppc_elf_relocate_section().

#define NOP   0x60000000

Definition at line 68 of file elf32-ppc.c.

#define PLT_ENTRY_SIZE   12

Definition at line 59 of file elf32-ppc.c.

#define PLT_INITIAL_ENTRY_SIZE   72

#define PLT_NUM_SINGLE_ENTRIES   8192

Definition at line 65 of file elf32-ppc.c.

Referenced by allocate_dynrelocs(), and ppc_elf_finish_dynamic_symbol().

#define PLT_SLOT_SIZE   8

Definition at line 63 of file elf32-ppc.c.

Referenced by allocate_dynrelocs(), and ppc_elf_finish_dynamic_symbol().

#define ppc_elf_hash_entry ( ent   )     ((struct ppc_elf_link_hash_entry *) (ent))

#define ppc_elf_hash_table ( p   )     ((struct ppc_elf_link_hash_table *) (p)->hash)

#define ppc_elf_tdata ( bfd   )     ((struct ppc_elf_obj_tdata *) (bfd)->tdata.any)

Definition at line 125 of file elf32-ppc.c.

#define RA_REGISTER_MASK   0x001f0000

Definition at line 50 of file elf32-ppc.c.

Referenced by ppc_elf_relocate_section().

#define RA_REGISTER_SHIFT   16

Definition at line 52 of file elf32-ppc.c.

Referenced by ppc_elf_relocate_section().

#define TARGET_BIG_NAME   "elf32-powerpc"

Definition at line 6198 of file elf32-ppc.c.

Definition at line 6197 of file elf32-ppc.c.

#define TARGET_LITTLE_NAME   "elf32-powerpcle"

Definition at line 6196 of file elf32-ppc.c.

Definition at line 6195 of file elf32-ppc.c.

#define TLS_DTPREL   8

#define TLS_GD   1

#define TLS_LD   2

#define TLS_TLS   16

#define TLS_TPREL   4

#define TLS_TPRELGD   32

#define TP_OFFSET   0x7000


Typedef Documentation


Enumeration Type Documentation

Enumerator:
LINKER_SECTION_SDATA 
LINKER_SECTION_SDATA2 

Definition at line 78 of file elf32-ppc.c.


Function Documentation

static bfd_boolean allocate_dynrelocs ( struct elf_link_hash_entry h,
void inf 
) [static]

static void apuinfo_list_add ( unsigned long  value  )  [static]

Definition at line 5901 of file elf32-ppc.c.

References bfd_malloc(), apuinfo_list::next, NULL, and apuinfo_list::value.

Referenced by ppc_elf_begin_write_processing().

static unsigned long apuinfo_list_element ( unsigned long  number  )  [inline, static]

Definition at line 5936 of file elf32-ppc.c.

References apuinfo_list::next, and apuinfo_list::value.

Referenced by ppc_elf_final_write_processing().

static void apuinfo_list_finish ( void   )  [static]

Definition at line 5949 of file elf32-ppc.c.

References free(), next, apuinfo_list::next, and NULL.

Referenced by ppc_elf_final_write_processing().

static void apuinfo_list_init ( void   )  [static]

Definition at line 5895 of file elf32-ppc.c.

References NULL.

Referenced by ppc_elf_begin_write_processing().

static unsigned apuinfo_list_length ( void   )  [static]

static void bad_shared_reloc ( bfd abfd,
enum elf_ppc_reloc_type  r_type 
) [static]

Definition at line 3543 of file elf32-ppc.c.

References _, bfd_error_bad_value, bfd_set_error(), and reloc_howto_struct::name.

Referenced by ppc_elf_check_relocs().

static bfd_boolean elf_create_pointer_linker_section ( bfd abfd,
struct bfd_link_info info,
elf_linker_section_t lsect,
struct elf_link_hash_entry h,
const Elf_Internal_Rela rel 
) [static]

static elf_linker_section_pointers_t* elf_find_pointer_linker_section ( elf_linker_section_pointers_t linker_pointers,
bfd_vma  addend,
elf_linker_section_t lsect 
) [static]

static bfd_vma elf_finish_pointer_linker_section ( bfd output_bfd,
bfd input_bfd,
struct bfd_link_info info,
elf_linker_section_t lsect,
struct elf_link_hash_entry h,
bfd_vma  relocation,
const Elf_Internal_Rela rel,
int  relative_reloc 
) [static]

static bfd_boolean is_ppc_elf_target ( const struct bfd_target targ  )  [static]

static bfd_boolean ppc_elf_add_symbol_hook ( bfd abfd,
struct bfd_link_info info,
Elf_Internal_Sym sym,
const char **namep  ATTRIBUTE_UNUSED,
flagword *flagsp  ATTRIBUTE_UNUSED,
asection **  secp,
bfd_vma valp 
) [static]

static int ppc_elf_additional_program_headers ( bfd abfd  )  [static]

Definition at line 2737 of file elf32-ppc.c.

References bfd_get_section_by_name(), bfd_section::flags, NULL, ret, s, and SEC_ALLOC.

static bfd_reloc_status_type ppc_elf_addr16_ha_reloc ( bfd *abfd  ATTRIBUTE_UNUSED,
arelent reloc_entry,
asymbol symbol,
void *data  ATTRIBUTE_UNUSED,
asection input_section,
bfd output_bfd,
char **error_message  ATTRIBUTE_UNUSED 
) [static]

static bfd_reloc_status_type ppc_elf_addr16_ha_reloc ( bfd ,
arelent ,
asymbol ,
void ,
asection ,
bfd ,
char **   
) [static]

static bfd_boolean ppc_elf_adjust_dynamic_symbol ( struct bfd_link_info info,
struct elf_link_hash_entry h 
) [static]

static void ppc_elf_begin_write_processing ( bfd abfd,
struct bfd_link_info link_info 
) [static]

static bfd_boolean ppc_elf_check_relocs ( bfd abfd,
struct bfd_link_info info,
asection sec,
const Elf_Internal_Rela relocs 
) [static]

Definition at line 3557 of file elf32-ppc.c.

References _, _bfd_error_handler, bad_shared_reloc(), bfd_alloc(), BFD_ASSERT, bfd_elf_gc_record_vtentry(), bfd_elf_gc_record_vtinherit(), bfd_elf_string_from_elf_section(), bfd_error_bad_value, bfd_get_section_by_name(), bfd_get_section_name, bfd_link_hash_defweak, bfd_make_section(), bfd_section_from_r_symndx(), bfd_set_error(), bfd_set_section_alignment, bfd_set_section_flags(), ppc_elf_dyn_relocs::count, elf_link_hash_entry::def_regular, DF_STATIC_TLS, elf_link_hash_table::dynobj, ppc_elf_link_hash_table::elf, ELF32_R_SYM, ELF32_R_TYPE, elf_create_pointer_linker_section(), elf_elfheader, elf_section_data, elf_sym_hashes, elf_tdata, ELIMINATE_COPY_RELOCS, FALSE, bfd_link_info::flags, bfd_section::flags, flags, fprintf(), ppc_elf_link_hash_table::got, elf_link_hash_entry::got, h, bfd_section::has_tls_reloc, LINKER_SECTION_SDATA, LINKER_SECTION_SDATA2, long, MUST_BE_DYN_RELOC, reloc_howto_struct::name, elf_link_hash_entry::needs_plt, ppc_elf_dyn_relocs::next, elf_link_hash_entry::non_got_ref, NULL, p, ppc_elf_dyn_relocs::pc_count, elf_link_hash_entry::plt, ppc_elf_create_got(), ppc_elf_create_linker_section(), ppc_elf_hash_entry, ppc_elf_hash_table, ppc_elf_howto_init(), elf_internal_rela::r_addend, elf_internal_rela::r_info, elf_internal_rela::r_offset, elf_link_hash_entry::gotplt_union::refcount, ppc_elf_link_hash_table::refcount, rel, bfd_section::reloc_count, bfd_link_info::relocatable, elf_link_hash_entry::root, bfd_link_hash_entry::root, s, ppc_elf_link_hash_table::sdata, ppc_elf_link_hash_table::sdata2, ppc_elf_dyn_relocs::sec, SEC_ALLOC, SEC_HAS_CONTENTS, SEC_IN_MEMORY, SEC_LINKER_CREATED, SEC_LOAD, SEC_READONLY, elf_internal_shdr::sh_info, bfd_link_info::shared, strcmp(), bfd_hash_entry::string, strncmp(), ppc_elf_link_hash_table::sym_sec, bfd_link_info::symbolic, TLS_DTPREL, TLS_GD, TLS_LD, TLS_TLS, TLS_TPREL, ppc_elf_link_hash_table::tlsld_got, TRUE, bfd_link_hash_entry::type, and update_local_sym_info().

static void ppc_elf_copy_indirect_symbol ( const struct elf_backend_data bed,
struct elf_link_hash_entry dir,
struct elf_link_hash_entry ind 
) [static]

static bfd_boolean ppc_elf_create_dynamic_sections ( bfd abfd,
struct bfd_link_info info 
) [static]

static bfd_boolean ppc_elf_create_got ( bfd abfd,
struct bfd_link_info info 
) [static]

static elf_linker_section_t* ppc_elf_create_linker_section ( bfd abfd,
struct bfd_link_info info,
enum elf_linker_section_enum  which 
) [static]

static bfd_boolean ppc_elf_fake_sections ( bfd *abfd  ATTRIBUTE_UNUSED,
Elf_Internal_Shdr shdr,
asection asect 
) [static]

static void ppc_elf_final_write_processing ( bfd abfd,
bfd_boolean linker  ATTRIBUTE_UNUSED 
) [static]

static bfd_boolean ppc_elf_finish_dynamic_sections ( bfd output_bfd,
struct bfd_link_info info 
) [static]

static bfd_boolean ppc_elf_finish_dynamic_symbol ( bfd output_bfd,
struct bfd_link_info info,
struct elf_link_hash_entry h,
Elf_Internal_Sym sym 
) [static]

static asection* ppc_elf_gc_mark_hook ( asection sec,
struct bfd_link_info *info  ATTRIBUTE_UNUSED,
Elf_Internal_Rela rel,
struct elf_link_hash_entry h,
Elf_Internal_Sym sym 
) [static]

static bfd_boolean ppc_elf_gc_sweep_hook ( bfd abfd,
struct bfd_link_info info,
asection sec,
const Elf_Internal_Rela relocs 
) [static]

static bfd_boolean ppc_elf_grok_prstatus ( bfd abfd,
Elf_Internal_Note note 
) [static]

static bfd_boolean ppc_elf_grok_psinfo ( bfd abfd,
Elf_Internal_Note note 
) [static]

static void ppc_elf_howto_init ( void   )  [static]

static void ppc_elf_info_to_howto ( bfd *abfd  ATTRIBUTE_UNUSED,
arelent cache_ptr,
Elf_Internal_Rela dst 
) [static]

static struct bfd_hash_entry* ppc_elf_link_hash_newfunc ( struct bfd_hash_entry entry,
struct bfd_hash_table table,
const char *  string 
) [static, read]

static struct bfd_link_hash_table* ppc_elf_link_hash_table_create ( bfd abfd  )  [static, read]

static bfd_boolean ppc_elf_merge_private_bfd_data ( bfd ibfd,
bfd obfd 
) [static]

static bfd_boolean ppc_elf_mkobject ( bfd abfd  )  [static]

Definition at line 134 of file elf32-ppc.c.

References bfd::any, bfd_zalloc(), FALSE, NULL, bfd::tdata, and TRUE.

static bfd_boolean ppc_elf_object_p ( bfd abfd  )  [static]

static bfd_vma ppc_elf_plt_sym_val ( bfd_vma i  ATTRIBUTE_UNUSED,
const asection *plt  ATTRIBUTE_UNUSED,
const arelent rel 
) [static]

Definition at line 6169 of file elf32-ppc.c.

References reloc_cache_entry::address.

static bfd_boolean ppc_elf_relax_section ( bfd abfd,
asection isec,
struct bfd_link_info link_info,
bfd_boolean *  again 
) [static]

static enum elf_reloc_type_class ppc_elf_reloc_type_class ( const Elf_Internal_Rela rela  )  [static]

static reloc_howto_type* ppc_elf_reloc_type_lookup ( bfd *abfd  ATTRIBUTE_UNUSED,
bfd_reloc_code_real_type  code 
) [static]

Definition at line 2018 of file elf32-ppc.c.

References BFD_RELOC_16, BFD_RELOC_16_BASEREL, BFD_RELOC_16_GOTOFF, BFD_RELOC_24_PLT_PCREL, BFD_RELOC_32, BFD_RELOC_32_PCREL, BFD_RELOC_32_PLT_PCREL, BFD_RELOC_32_PLTOFF, BFD_RELOC_CTOR, BFD_RELOC_GPREL16, BFD_RELOC_HI16, BFD_RELOC_HI16_BASEREL, BFD_RELOC_HI16_GOTOFF, BFD_RELOC_HI16_PLTOFF, BFD_RELOC_HI16_S, BFD_RELOC_HI16_S_BASEREL, BFD_RELOC_HI16_S_GOTOFF, BFD_RELOC_HI16_S_PLTOFF, BFD_RELOC_LO16, BFD_RELOC_LO16_BASEREL, BFD_RELOC_LO16_GOTOFF, BFD_RELOC_LO16_PLTOFF, BFD_RELOC_NONE, BFD_RELOC_PPC_B16, BFD_RELOC_PPC_B16_BRNTAKEN, BFD_RELOC_PPC_B16_BRTAKEN, BFD_RELOC_PPC_B26, BFD_RELOC_PPC_BA16, BFD_RELOC_PPC_BA16_BRNTAKEN, BFD_RELOC_PPC_BA16_BRTAKEN, BFD_RELOC_PPC_BA26, BFD_RELOC_PPC_COPY, BFD_RELOC_PPC_DTPMOD, BFD_RELOC_PPC_DTPREL, BFD_RELOC_PPC_DTPREL16, BFD_RELOC_PPC_DTPREL16_HA, BFD_RELOC_PPC_DTPREL16_HI, BFD_RELOC_PPC_DTPREL16_LO, BFD_RELOC_PPC_EMB_BIT_FLD, BFD_RELOC_PPC_EMB_MRKREF, BFD_RELOC_PPC_EMB_NADDR16, BFD_RELOC_PPC_EMB_NADDR16_HA, BFD_RELOC_PPC_EMB_NADDR16_HI, BFD_RELOC_PPC_EMB_NADDR16_LO, BFD_RELOC_PPC_EMB_NADDR32, BFD_RELOC_PPC_EMB_RELSDA, BFD_RELOC_PPC_EMB_RELSEC16, BFD_RELOC_PPC_EMB_RELST_HA, BFD_RELOC_PPC_EMB_RELST_HI, BFD_RELOC_PPC_EMB_RELST_LO, BFD_RELOC_PPC_EMB_SDA21, BFD_RELOC_PPC_EMB_SDA2I16, BFD_RELOC_PPC_EMB_SDA2REL, BFD_RELOC_PPC_EMB_SDAI16, BFD_RELOC_PPC_GLOB_DAT, BFD_RELOC_PPC_GOT_DTPREL16, BFD_RELOC_PPC_GOT_DTPREL16_HA, BFD_RELOC_PPC_GOT_DTPREL16_HI, BFD_RELOC_PPC_GOT_DTPREL16_LO, BFD_RELOC_PPC_GOT_TLSGD16, BFD_RELOC_PPC_GOT_TLSGD16_HA, BFD_RELOC_PPC_GOT_TLSGD16_HI, BFD_RELOC_PPC_GOT_TLSGD16_LO, BFD_RELOC_PPC_GOT_TLSLD16, BFD_RELOC_PPC_GOT_TLSLD16_HA, BFD_RELOC_PPC_GOT_TLSLD16_HI, BFD_RELOC_PPC_GOT_TLSLD16_LO, BFD_RELOC_PPC_GOT_TPREL16, BFD_RELOC_PPC_GOT_TPREL16_HA, BFD_RELOC_PPC_GOT_TPREL16_HI, BFD_RELOC_PPC_GOT_TPREL16_LO, BFD_RELOC_PPC_LOCAL24PC, BFD_RELOC_PPC_TLS, BFD_RELOC_PPC_TOC16, BFD_RELOC_PPC_TPREL, BFD_RELOC_PPC_TPREL16, BFD_RELOC_PPC_TPREL16_HA, BFD_RELOC_PPC_TPREL16_HI, BFD_RELOC_PPC_TPREL16_LO, BFD_RELOC_VTABLE_ENTRY, BFD_RELOC_VTABLE_INHERIT, NULL, ppc_elf_howto_init(), and r.

static bfd_boolean ppc_elf_relocate_section ( bfd output_bfd,
struct bfd_link_info info,
bfd input_bfd,
asection input_section,
bfd_byte contents,
Elf_Internal_Rela relocs,
Elf_Internal_Sym local_syms,
asection **  local_sections 
) [static]

Definition at line 4636 of file elf32-ppc.c.

References _, _bfd_elf_rela_local_sym(), _bfd_elf_section_offset(), _bfd_error_handler, _bfd_final_link_relocate(), abfd, abort, BFD_ASSERT, bfd_elf32_swap_reloca_out(), bfd_elf_string_from_elf_section(), bfd_elf_sym_name(), bfd_error_bad_value, bfd_error_invalid_operation, bfd_get_32, bfd_get_section_by_name(), bfd_get_section_name, bfd_is_abs_section, bfd_is_und_section, bfd_link_hash_indirect, bfd_link_hash_undefweak, bfd_link_hash_warning, bfd_put_32, bfd_reloc_ok, bfd_reloc_overflow, bfd_set_error(), BRANCH_PREDICT_BIT, bfd_link_info::callbacks, bfd_section::contents, bfd_link_hash_entry::def, elf_link_hash_entry::def_dynamic, elf_link_hash_entry::def_regular, DTP_OFFSET, elf_link_hash_table::dynamic_sections_created, elf_link_hash_entry::dynindx, elf_link_hash_table::dynobj, ppc_elf_link_hash_table::elf, ELF32_R_INFO, ELF32_R_SYM, ELF32_R_TYPE, elf_elfheader, elf_finish_pointer_linker_section(), elf_local_got_offsets, elf_section_data, ELF_ST_VISIBILITY, elf_sym_hashes, elf_tdata, ELIMINATE_COPY_RELOCS, FALSE, bfd_section::flags, fprintf(), ppc_elf_link_hash_table::got, elf_link_hash_entry::got, h, bfd_link_hash_entry::i, if(), indx, insn, int, IS_PPC_TLS_RELOC, long, memset, MUST_BE_DYN_RELOC, reloc_howto_struct::name, bfd_section::name, elf_link_hash_entry::non_got_ref, NOP, NULL, ppc_elf_link_hash_table::offset, offset, elf_link_hash_entry::gotplt_union::offset, elf_link_hash_entry::other, bfd_section::output_offset, bfd_section::output_section, bfd_section::owner, reloc_howto_struct::pc_relative, ppc_elf_link_hash_table::plt, elf_link_hash_entry::plt, ppc_elf_hash_table, ppc_elf_howto_init(), printf(), r, elf_internal_rela::r_addend, elf_internal_rela::r_info, elf_internal_rela::r_offset, R_PPC_RELAX32, R_PPC_RELAX32_PLT, R_PPC_RELAX32PC, R_PPC_RELAX32PC_PLT, RA_REGISTER_MASK, RA_REGISTER_SHIFT, rel, ppc_elf_link_hash_table::relgot, bfd_section::reloc_count, RELOC_FOR_GLOBAL_SYMBOL, bfd_link_callbacks::reloc_overflow, bfd_link_info::relocatable, ret, elf_link_hash_entry::root, bfd_link_hash_entry::root, ppc_elf_link_hash_table::sdata, ppc_elf_link_hash_table::sdata2, sec, SEC_ALLOC, SEC_DEBUGGING, elf_internal_shdr::sh_info, bfd_link_info::shared, skip, strcmp(), bfd_hash_entry::string, strncmp(), STV_DEFAULT, sym, elf_linker_section::sym_hash, sym_name, SYMBOL_CALLS_LOCAL, SYMBOL_REFERENCES_LOCAL, t1, TLS_DTPREL, TLS_GD, ppc_elf_link_hash_table::tls_get_addr, TLS_LD, elf_link_hash_table::tls_sec, TLS_TLS, TLS_TPREL, TLS_TPRELGD, ppc_elf_link_hash_table::tlsld_got, TP_OFFSET, TRUE, bfd_link_hash_entry::type, bfd_link_hash_entry::u, bfd_link_callbacks::undefined_symbol, bfd_section::vma, and WILL_CALL_FINISH_DYNAMIC_SYMBOL.

static bfd_boolean ppc_elf_section_from_shdr ( bfd abfd,
Elf_Internal_Shdr hdr,
const char *  name 
) [static]

static bfd_boolean ppc_elf_set_private_flags ( bfd abfd,
flagword  flags 
) [static]

Definition at line 2218 of file elf32-ppc.c.

References BFD_ASSERT, elf_elfheader, elf_flags_init, and TRUE.

static bfd_boolean ppc_elf_size_dynamic_sections ( bfd *output_bfd  ATTRIBUTE_UNUSED,
struct bfd_link_info info 
) [static]

bfd_boolean ppc_elf_tls_optimize ( bfd *obfd  ATTRIBUTE_UNUSED,
struct bfd_link_info info 
)

asection* ppc_elf_tls_setup ( bfd obfd,
struct bfd_link_info info 
)

static bfd_reloc_status_type ppc_elf_unhandled_reloc ( bfd abfd,
arelent reloc_entry,
asymbol symbol,
void data,
asection input_section,
bfd output_bfd,
char **  error_message 
) [static]

static bfd_boolean ppc_elf_write_section ( bfd *abfd  ATTRIBUTE_UNUSED,
asection asec,
bfd_byte *contents  ATTRIBUTE_UNUSED 
) [static]

Definition at line 6101 of file elf32-ppc.c.

References apuinfo_list_length(), APUINFO_SECTION_NAME, bfd_section::name, and strcmp().

static bfd_boolean readonly_dynrelocs ( struct elf_link_hash_entry h,
void info 
) [static]

static bfd_boolean update_local_sym_info ( bfd abfd,
Elf_Internal_Shdr symtab_hdr,
unsigned long  r_symndx,
int  tls_type 
) [static]


Variable Documentation

apuinfo_list* head [static]

Definition at line 5891 of file elf32-ppc.c.

Definition at line 352 of file elf32-ppc.c.

reloc_howto_type* ppc_elf_howto_table[R_PPC_max] [static]

Definition at line 350 of file elf32-ppc.c.

Initial value:

{
  { ".tags",             5,  0, SHT_ORDERED,  SHF_ALLOC },
  { ".sdata",            6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
  { ".sbss",             5, -2, SHT_NOBITS,   SHF_ALLOC + SHF_WRITE },
  { ".sdata2",           7, -2, SHT_PROGBITS, SHF_ALLOC },
  { ".sbss2",            6, -2, SHT_PROGBITS, SHF_ALLOC },
  { ".PPC.EMB.apuinfo", 16,  0, SHT_NOTE,     0 },
  { ".PPC.EMB.sdata0",  15,  0, SHT_PROGBITS, SHF_ALLOC },
  { ".PPC.EMB.sbss0",   14,  0, SHT_PROGBITS, SHF_ALLOC },
  { ".plt",              4,  0, SHT_NOBITS,   SHF_ALLOC + SHF_EXECINSTR },
  { NULL,                0,  0, 0,            0 }
}

Definition at line 6181 of file elf32-ppc.c.

const int shared_stub_entry[] [static]

Initial value:

  {
    0x7c0802a6, 
    0x429f0005, 
    0x7d6802a6, 
    0x3d6b0000, 
    0x396b0018, 
    0x7c0803a6, 
    0x7d6903a6, 
    0x4e800420, 
  }

Definition at line 1607 of file elf32-ppc.c.

Referenced by ppc_elf_relax_section().

const int stub_entry[] [static]


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