X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fvms.c;h=06162084e088f47f43c7015a50ca113b0c835423;hb=ea1562b345338540cf9a3c8fa28fbcb6da78fd3e;hp=c98e483e637a61e7e75d8956e277c3acdec10f65;hpb=b34976b65aea8f33690229600bbf4527ec3118e1;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/vms.c b/bfd/vms.c index c98e483e63..06162084e0 100644 --- a/bfd/vms.c +++ b/bfd/vms.c @@ -1,6 +1,6 @@ /* vms.c -- BFD back-end for VAX (openVMS/VAX) and EVAX (openVMS/Alpha) files. - Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 + Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Written by Klaus K"ampf (kkaempf@rmi.de) @@ -95,7 +95,7 @@ static int vms_generic_stat_arch_elt PARAMS ((bfd *, struct stat *)); static long vms_get_symtab_upper_bound PARAMS ((bfd *abfd)); -static long vms_get_symtab +static long vms_canonicalize_symtab PARAMS ((bfd *abfd, asymbol **symbols)); static void vms_print_symbol PARAMS ((bfd *abfd, PTR file, asymbol *symbol, bfd_print_symbol_type how)); @@ -125,14 +125,14 @@ static const struct reloc_howto_struct *vms_bfd_reloc_type_lookup static bfd_boolean vms_set_arch_mach PARAMS ((bfd *abfd, enum bfd_architecture arch, unsigned long mach)); static bfd_boolean vms_set_section_contents - PARAMS ((bfd *abfd, asection *section, PTR location, file_ptr offset, + PARAMS ((bfd *abfd, asection *section, const PTR location, file_ptr offset, bfd_size_type count)); static int vms_sizeof_headers PARAMS ((bfd *abfd, bfd_boolean reloc)); static bfd_byte *vms_bfd_get_relocated_section_contents PARAMS ((bfd *abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocateable, asymbol **symbols)); + bfd_boolean relocatable, asymbol **symbols)); static bfd_boolean vms_bfd_relax_section PARAMS ((bfd *abfd, asection *section, struct bfd_link_info *link_info, bfd_boolean *again)); @@ -154,6 +154,7 @@ static long vms_get_dynamic_symtab_upper_bound PARAMS ((bfd *abfd)); static long vms_canonicalize_dynamic_symtab PARAMS ((bfd *abfd, asymbol **symbols)); +#define vms_get_synthetic_symtab _bfd_nodynamic_get_synthetic_symtab static long vms_get_dynamic_reloc_upper_bound PARAMS ((bfd *abfd)); static long vms_canonicalize_dynamic_reloc @@ -163,9 +164,15 @@ static bfd_boolean vms_bfd_merge_private_bfd_data static bfd_boolean vms_bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags)); +#define vms_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false) #define vms_make_empty_symbol _bfd_generic_make_empty_symbol #define vms_bfd_link_just_syms _bfd_generic_link_just_syms +#define vms_bfd_is_group_section bfd_generic_is_group_section #define vms_bfd_discard_group bfd_generic_discard_group +#define vms_section_already_linked \ + _bfd_generic_section_already_linked +#define vms_bfd_copy_private_header_data \ + _bfd_generic_bfd_copy_private_header_data /*===========================================================================*/ @@ -358,10 +365,10 @@ fill_section_ptr (entry, sections) /* fill forward references (these contain section number, not section ptr). */ - if ((unsigned int) sec < priv_section_count) + if ((unsigned int) (size_t) sec < priv_section_count) { - sec = ((vms_symbol_entry *)entry)->symbol->section = - ((asection **)sections)[(int)sec]; + sec = ((vms_symbol_entry *) entry)->symbol->section = + ((asection **) sections)[(unsigned int) (size_t) sec]; } if (strcmp (sym->name, sec->name) == 0) @@ -1065,7 +1072,7 @@ vms_get_symtab_upper_bound (abfd) /* Copy symbols from hash table to symbol vector - called from bfd_hash_traverse in vms_get_symtab + called from bfd_hash_traverse in vms_canonicalize_symtab init counter to 0 if entry == 0 */ static bfd_boolean @@ -1089,12 +1096,12 @@ copy_symbols (entry, arg) return # of symbols read */ static long -vms_get_symtab (abfd, symbols) +vms_canonicalize_symtab (abfd, symbols) bfd *abfd; asymbol **symbols; { #if VMS_DEBUG - vms_debug (1, "vms_get_symtab(%p, )\n", abfd); + vms_debug (1, "vms_canonicalize_symtab(%p, )\n", abfd); #endif /* init counter */ @@ -1659,14 +1666,14 @@ static bfd_boolean vms_set_section_contents (abfd, section, location, offset, count) bfd *abfd; asection *section; - PTR location; + const PTR location; file_ptr offset; bfd_size_type count; { #if VMS_DEBUG vms_debug (1, "vms_set_section_contents(%p, sec %s, loc %p, off %ld, count %d)\n", abfd, section->name, location, (long int)offset, (int)count); - vms_debug (2, "secraw %d, seccooked %d\n", (int)section->_raw_size, (int)section->_cooked_size); + vms_debug (2, "size %d\n", (int) section->size); #endif return _bfd_save_vms_section(abfd, section, location, offset, count); } @@ -1691,17 +1698,17 @@ vms_sizeof_headers (abfd, reloc) static bfd_byte * vms_bfd_get_relocated_section_contents (abfd, link_info, link_order, data, - relocateable, symbols) + relocatable, symbols) bfd *abfd ATTRIBUTE_UNUSED; struct bfd_link_info *link_info ATTRIBUTE_UNUSED; struct bfd_link_order *link_order ATTRIBUTE_UNUSED; bfd_byte *data ATTRIBUTE_UNUSED; - bfd_boolean relocateable ATTRIBUTE_UNUSED; + bfd_boolean relocatable ATTRIBUTE_UNUSED; asymbol **symbols ATTRIBUTE_UNUSED; { #if VMS_DEBUG vms_debug (1, "vms_bfd_get_relocated_section_contents(%p, %p, %p, %p, %s, %p)\n", - abfd, link_info, link_order, data, (relocateable)?"True":"False", symbols); + abfd, link_info, link_order, data, (relocatable)?"True":"False", symbols); #endif return 0; }