Changeset 609 for branches/GNU/src/binutils/bfd/vms.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/bfd/vms.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* vms.c -- BFD back-end for VAX (openVMS/VAX) and 2 2 EVAX (openVMS/Alpha) files. 3 Copyright 1996, 1997, 1998, 1999, 2000, 2001 3 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 4 4 Free Software Foundation, Inc. 5 5 … … 27 27 #include "vms.h" 28 28 29 static boolean vms_initialize PARAMS ((bfd *)); 29 static bfd_boolean vms_initialize 30 PARAMS ((bfd *)); 30 31 static unsigned int priv_section_count; 31 static boolean fill_section_ptr PARAMS ((struct bfd_hash_entry *, PTR)); 32 static boolean vms_fixup_sections PARAMS ((bfd *)); 33 static boolean copy_symbols PARAMS ((struct bfd_hash_entry *, PTR)); 32 static bfd_boolean fill_section_ptr 33 PARAMS ((struct bfd_hash_entry *, PTR)); 34 static bfd_boolean vms_fixup_sections 35 PARAMS ((bfd *)); 36 static bfd_boolean copy_symbols 37 PARAMS ((struct bfd_hash_entry *, PTR)); 34 38 static bfd_reloc_status_type reloc_nil 35 39 PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **)); 36 static const struct bfd_target *vms_object_p PARAMS ((bfd *abfd)); 37 static const struct bfd_target *vms_archive_p PARAMS ((bfd *abfd)); 38 static boolean vms_mkobject PARAMS ((bfd *abfd)); 39 static boolean vms_write_object_contents PARAMS ((bfd *abfd)); 40 static boolean vms_close_and_cleanup PARAMS ((bfd *abfd)); 41 static boolean vms_bfd_free_cached_info PARAMS ((bfd *abfd)); 42 static boolean vms_new_section_hook PARAMS ((bfd *abfd, asection *section)); 43 static boolean vms_get_section_contents 40 static const struct bfd_target *vms_object_p 41 PARAMS ((bfd *abfd)); 42 static const struct bfd_target *vms_archive_p 43 PARAMS ((bfd *abfd)); 44 static bfd_boolean vms_mkobject 45 PARAMS ((bfd *abfd)); 46 static bfd_boolean vms_write_object_contents 47 PARAMS ((bfd *abfd)); 48 static bfd_boolean vms_close_and_cleanup 49 PARAMS ((bfd *abfd)); 50 static bfd_boolean vms_bfd_free_cached_info 51 PARAMS ((bfd *abfd)); 52 static bfd_boolean vms_new_section_hook 53 PARAMS ((bfd *abfd, asection *section)); 54 static bfd_boolean vms_get_section_contents 44 55 PARAMS ((bfd *abfd, asection *section, PTR x1, file_ptr x2, 45 56 bfd_size_type x3)); 46 static b oolean vms_get_section_contents_in_window57 static bfd_boolean vms_get_section_contents_in_window 47 58 PARAMS ((bfd *abfd, asection *section, bfd_window *w, file_ptr offset, 48 59 bfd_size_type count)); 49 static boolean vms_bfd_copy_private_bfd_data PARAMS ((bfd *src, bfd *dest)); 50 static boolean vms_bfd_copy_private_section_data 60 static bfd_boolean vms_bfd_copy_private_bfd_data 61 PARAMS ((bfd *src, bfd *dest)); 62 static bfd_boolean vms_bfd_copy_private_section_data 51 63 PARAMS ((bfd *srcbfd, asection *srcsec, bfd *dstbfd, asection *dstsec)); 52 static b oolean vms_bfd_copy_private_symbol_data64 static bfd_boolean vms_bfd_copy_private_symbol_data 53 65 PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym)); 54 static b oolean vms_bfd_print_private_bfd_data66 static bfd_boolean vms_bfd_print_private_bfd_data 55 67 PARAMS ((bfd *abfd, void *file)); 56 static char *vms_core_file_failing_command PARAMS ((bfd *abfd)); 57 static int vms_core_file_failing_signal PARAMS ((bfd *abfd)); 58 static boolean vms_core_file_matches_executable_p 68 static char *vms_core_file_failing_command 69 PARAMS ((bfd *abfd)); 70 static int vms_core_file_failing_signal 71 PARAMS ((bfd *abfd)); 72 static bfd_boolean vms_core_file_matches_executable_p 59 73 PARAMS ((bfd *abfd, bfd *bbfd)); 60 static boolean vms_slurp_armap PARAMS ((bfd *abfd)); 61 static boolean vms_slurp_extended_name_table PARAMS ((bfd *abfd)); 62 static boolean vms_construct_extended_name_table 74 static bfd_boolean vms_slurp_armap 75 PARAMS ((bfd *abfd)); 76 static bfd_boolean vms_slurp_extended_name_table 77 PARAMS ((bfd *abfd)); 78 static bfd_boolean vms_construct_extended_name_table 63 79 PARAMS ((bfd *abfd, char **tabloc, bfd_size_type *tablen, 64 80 const char **name)); 65 81 static void vms_truncate_arname 66 PARAMS ((bfd *abfd, CONSTchar *pathname, char *arhdr));67 static b oolean vms_write_armap82 PARAMS ((bfd *abfd, const char *pathname, char *arhdr)); 83 static bfd_boolean vms_write_armap 68 84 PARAMS ((bfd *arch, unsigned int elength, struct orl *map, 69 85 unsigned int orl_count, int stridx)); 70 static PTR vms_read_ar_hdr PARAMS ((bfd *abfd)); 71 static bfd *vms_get_elt_at_index PARAMS ((bfd *abfd, symindex index)); 72 static bfd *vms_openr_next_archived_file PARAMS ((bfd *arch, bfd *prev)); 73 static boolean vms_update_armap_timestamp PARAMS ((bfd *abfd)); 74 static int vms_generic_stat_arch_elt PARAMS ((bfd *abfd, struct stat *stat)); 75 static long vms_get_symtab_upper_bound PARAMS ((bfd *abfd)); 76 static long vms_get_symtab PARAMS ((bfd *abfd, asymbol **symbols)); 86 static PTR vms_read_ar_hdr 87 PARAMS ((bfd *abfd)); 88 static bfd *vms_get_elt_at_index 89 PARAMS ((bfd *abfd, symindex index)); 90 static bfd *vms_openr_next_archived_file 91 PARAMS ((bfd *arch, bfd *prev)); 92 static bfd_boolean vms_update_armap_timestamp 93 PARAMS ((bfd *abfd)); 94 static int vms_generic_stat_arch_elt 95 PARAMS ((bfd *, struct stat *)); 96 static long vms_get_symtab_upper_bound 97 PARAMS ((bfd *abfd)); 98 static long vms_get_symtab 99 PARAMS ((bfd *abfd, asymbol **symbols)); 77 100 static void vms_print_symbol 78 101 PARAMS ((bfd *abfd, PTR file, asymbol *symbol, bfd_print_symbol_type how)); 79 102 static void vms_get_symbol_info 80 103 PARAMS ((bfd *abfd, asymbol *symbol, symbol_info *ret)); 81 static boolean vms_bfd_is_local_label_name PARAMS ((bfd *abfd, const char *)); 82 static alent *vms_get_lineno PARAMS ((bfd *abfd, asymbol *symbol)); 83 static boolean vms_find_nearest_line 104 static bfd_boolean vms_bfd_is_local_label_name 105 PARAMS ((bfd *abfd, const char *)); 106 static alent *vms_get_lineno 107 PARAMS ((bfd *abfd, asymbol *symbol)); 108 static bfd_boolean vms_find_nearest_line 84 109 PARAMS ((bfd *abfd, asection *section, asymbol **symbols, bfd_vma offset, 85 110 const char **file, const char **func, unsigned int *line)); … … 87 112 PARAMS ((bfd *abfd, void *ptr, unsigned long size)); 88 113 static long vms_read_minisymbols 89 PARAMS ((bfd *abfd, boolean dynamic, PTR *minisymsp, unsigned int *sizep)); 114 PARAMS ((bfd *abfd, bfd_boolean dynamic, PTR *minisymsp, 115 unsigned int *sizep)); 90 116 static asymbol *vms_minisymbol_to_symbol 91 PARAMS ((bfd *abfd, boolean dynamic, const PTR minisym, asymbol *sym)); 92 static long vms_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect)); 117 PARAMS ((bfd *abfd, bfd_boolean dynamic, const PTR minisym, asymbol *sym)); 118 static long vms_get_reloc_upper_bound 119 PARAMS ((bfd *abfd, asection *sect)); 93 120 static long vms_canonicalize_reloc 94 121 PARAMS ((bfd *abfd, asection *srcsec, arelent **location, … … 96 123 static const struct reloc_howto_struct *vms_bfd_reloc_type_lookup 97 124 PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); 98 static b oolean vms_set_arch_mach125 static bfd_boolean vms_set_arch_mach 99 126 PARAMS ((bfd *abfd, enum bfd_architecture arch, unsigned long mach)); 100 static b oolean vms_set_section_contents127 static bfd_boolean vms_set_section_contents 101 128 PARAMS ((bfd *abfd, asection *section, PTR location, file_ptr offset, 102 129 bfd_size_type count)); 103 static int vms_sizeof_headers PARAMS ((bfd *abfd, boolean reloc)); 130 static int vms_sizeof_headers 131 PARAMS ((bfd *abfd, bfd_boolean reloc)); 104 132 static bfd_byte *vms_bfd_get_relocated_section_contents 105 133 PARAMS ((bfd *abfd, struct bfd_link_info *link_info, 106 134 struct bfd_link_order *link_order, bfd_byte *data, 107 b oolean relocateable, asymbol **symbols));108 static b oolean vms_bfd_relax_section135 bfd_boolean relocateable, asymbol **symbols)); 136 static bfd_boolean vms_bfd_relax_section 109 137 PARAMS ((bfd *abfd, asection *section, struct bfd_link_info *link_info, 110 boolean *again)); 111 static boolean vms_bfd_gc_sections 138 bfd_boolean *again)); 139 static bfd_boolean vms_bfd_gc_sections 140 PARAMS ((bfd *abfd, struct bfd_link_info *link_info)); 141 static bfd_boolean vms_bfd_merge_sections 112 142 PARAMS ((bfd *abfd, struct bfd_link_info *link_info)); 113 143 static struct bfd_link_hash_table *vms_bfd_link_hash_table_create 114 144 PARAMS ((bfd *abfd)); 115 static boolean vms_bfd_link_add_symbols 145 static void vms_bfd_link_hash_table_free 146 PARAMS ((struct bfd_link_hash_table *hash)); 147 static bfd_boolean vms_bfd_link_add_symbols 116 148 PARAMS ((bfd *abfd, struct bfd_link_info *link_info)); 117 static b oolean vms_bfd_final_link149 static bfd_boolean vms_bfd_final_link 118 150 PARAMS ((bfd *abfd, struct bfd_link_info *link_info)); 119 static b oolean vms_bfd_link_split_section151 static bfd_boolean vms_bfd_link_split_section 120 152 PARAMS ((bfd *abfd, asection *section)); 121 static long vms_get_dynamic_symtab_upper_bound PARAMS ((bfd *abfd)); 153 static long vms_get_dynamic_symtab_upper_bound 154 PARAMS ((bfd *abfd)); 122 155 static long vms_canonicalize_dynamic_symtab 123 156 PARAMS ((bfd *abfd, asymbol **symbols)); 124 static long vms_get_dynamic_reloc_upper_bound PARAMS ((bfd *abfd)); 157 static long vms_get_dynamic_reloc_upper_bound 158 PARAMS ((bfd *abfd)); 125 159 static long vms_canonicalize_dynamic_reloc 126 160 PARAMS ((bfd *abfd, arelent **arel, asymbol **symbols)); 127 static boolean vms_bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd)); 128 static boolean vms_bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags)); 129 130 #define vms_make_empty_symbol _bfd_vms_make_empty_symbol 161 static bfd_boolean vms_bfd_merge_private_bfd_data 162 PARAMS ((bfd *ibfd, bfd *obfd)); 163 static bfd_boolean vms_bfd_set_private_flags 164 PARAMS ((bfd *abfd, flagword flags)); 165 166 #define vms_make_empty_symbol _bfd_generic_make_empty_symbol 167 #define vms_bfd_link_just_syms _bfd_generic_link_just_syms 168 #define vms_bfd_discard_group bfd_generic_discard_group 131 169 132 170 … … 228 266 /* Initialize private data */ 229 267 230 static b oolean268 static bfd_boolean 231 269 vms_initialize (abfd) 232 270 bfd *abfd; 233 271 { 234 272 int i; 235 236 if (abfd->tdata.any != 0) 237 return true; 238 239 bfd_set_start_address (abfd, (bfd_vma)-1); 240 241 abfd->tdata.any = ((struct vms_private_data_struct*) 242 bfd_malloc (sizeof (struct vms_private_data_struct))); 273 bfd_size_type amt; 274 275 bfd_set_start_address (abfd, (bfd_vma) -1); 276 277 amt = sizeof (struct vms_private_data_struct); 278 abfd->tdata.any = (struct vms_private_data_struct*) bfd_alloc (abfd, amt); 243 279 if (abfd->tdata.any == 0) 244 return false;280 return FALSE; 245 281 246 282 #ifdef __ALPHA … … 253 289 PRIV (rec_length) = 0; 254 290 PRIV (file_format) = FF_UNKNOWN; 255 PRIV (fixup_done) = false;291 PRIV (fixup_done) = FALSE; 256 292 PRIV (sections) = NULL; 257 293 258 PRIV (stack) = ((struct stack_struct *)259 bfd_malloc (sizeof (struct stack_struct) * STACKSIZE));294 amt = sizeof (struct stack_struct) * STACKSIZE; 295 PRIV (stack) = (struct stack_struct *) bfd_alloc (abfd, amt); 260 296 if (PRIV (stack) == 0) 261 { 262 vms_init_no_mem1: 263 free (abfd->tdata.any); 264 abfd->tdata.any = 0; 265 return false; 266 } 297 goto error_ret1; 267 298 PRIV (stackptr) = 0; 268 299 269 PRIV (vms_symbol_table) = ((struct bfd_hash_table *)270 bfd_malloc (sizeof (struct bfd_hash_table)));300 amt = sizeof (struct bfd_hash_table); 301 PRIV (vms_symbol_table) = (struct bfd_hash_table *) bfd_alloc (abfd, amt); 271 302 if (PRIV (vms_symbol_table) == 0) 272 { 273 vms_init_no_mem2: 274 free (PRIV (stack)); 275 PRIV (stack) = 0; 276 goto vms_init_no_mem1; 277 } 303 goto error_ret1; 278 304 279 305 if (!bfd_hash_table_init (PRIV (vms_symbol_table), _bfd_vms_hash_newfunc)) 280 return false; 281 282 PRIV (location_stack) = ((struct location_struct *) 283 bfd_malloc (sizeof (struct location_struct) 284 * LOCATION_SAVE_SIZE)); 306 goto error_ret1; 307 308 amt = sizeof (struct location_struct) * LOCATION_SAVE_SIZE; 309 PRIV (location_stack) = (struct location_struct *) bfd_alloc (abfd, amt); 285 310 if (PRIV (location_stack) == 0) 286 { 287 vms_init_no_mem3: 288 free (PRIV (vms_symbol_table)); 289 PRIV (vms_symbol_table) = 0; 290 goto vms_init_no_mem2; 291 } 311 goto error_ret2; 292 312 293 313 for (i = 0; i < VMS_SECTION_COUNT; i++) 294 314 PRIV (vms_section_table)[i] = NULL; 295 315 296 PRIV (output_buf) = (unsigned char *) malloc (MAX_OUTREC_SIZE); 316 amt = MAX_OUTREC_SIZE; 317 PRIV (output_buf) = (unsigned char *) bfd_alloc (abfd, amt); 297 318 if (PRIV (output_buf) == 0) 298 { 299 free (PRIV (location_stack)); 300 PRIV (location_stack) = 0; 301 goto vms_init_no_mem3; 302 } 319 goto error_ret2; 320 303 321 PRIV (push_level) = 0; 304 322 PRIV (pushed_size) = 0; … … 307 325 PRIV (output_alignment) = 1; 308 326 309 return true; 327 return TRUE; 328 329 error_ret2: 330 bfd_hash_table_free (PRIV (vms_symbol_table)); 331 error_ret1: 332 bfd_release (abfd, abfd->tdata.any); 333 abfd->tdata.any = 0; 334 return FALSE; 310 335 } 311 336 … … 319 344 called from bfd_hash_traverse in vms_fixup_sections */ 320 345 321 static b oolean346 static bfd_boolean 322 347 fill_section_ptr (entry, sections) 323 348 struct bfd_hash_entry *entry; … … 345 370 sym->flags |= BSF_SECTION_SYM; 346 371 347 return true;372 return TRUE; 348 373 } 349 374 … … 357 382 copy abfd->sections to PRIV(sections) */ 358 383 359 static b oolean384 static bfd_boolean 360 385 vms_fixup_sections (abfd) 361 386 bfd *abfd; 362 387 { 363 388 if (PRIV (fixup_done)) 364 return true;389 return TRUE; 365 390 366 391 /* … … 373 398 (PTR) (PRIV (sections))); 374 399 375 PRIV (fixup_done) = true;376 377 return true;400 PRIV (fixup_done) = TRUE; 401 402 return TRUE; 378 403 } 379 404 … … 391 416 const struct bfd_target *target_vector = 0; 392 417 const bfd_arch_info_type *arch = 0; 418 PTR tdata_save = abfd->tdata.any; 419 bfd_vma saddr_save = bfd_get_start_address (abfd); 393 420 394 421 #if VMS_DEBUG … … 397 424 398 425 if (!vms_initialize (abfd)) 399 { 400 fprintf (stderr, "vms_initialize () failed !!\n"); 401 return 0; 402 } 403 404 if (bfd_seek (abfd, 0L, SEEK_SET)) 405 { 406 bfd_set_error (bfd_error_file_truncated); 407 return 0; 408 } 426 goto error_ret; 427 428 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET)) 429 goto err_wrong_format; 409 430 410 431 prev_type = -1; … … 420 441 vms_debug (2, "next_record failed\n"); 421 442 #endif 422 bfd_set_error (bfd_error_wrong_format); 423 return 0; 443 goto err_wrong_format; 424 444 } 425 445 … … 427 447 && (PRIV (rec_type) != EOBJ_S_C_EGSD)) 428 448 { 429 if ( vms_fixup_sections (abfd) == false)449 if (! vms_fixup_sections (abfd)) 430 450 { 431 451 #if VMS_DEBUG 432 452 vms_debug (2, "vms_fixup_sections failed\n"); 433 453 #endif 434 bfd_set_error (bfd_error_wrong_format); 435 return 0; 454 goto err_wrong_format; 436 455 } 437 456 } … … 485 504 vms_debug (2, "slurp type %d failed with %d\n", prev_type, err); 486 505 #endif 487 bfd_set_error (bfd_error_wrong_format); 488 return 0; 506 goto err_wrong_format; 489 507 } 490 508 } … … 493 511 if (target_vector == &vms_vax_vec) 494 512 { 495 if ( vms_fixup_sections (abfd) == false)513 if (! vms_fixup_sections (abfd)) 496 514 { 497 515 #if VMS_DEBUG 498 516 vms_debug (2, "vms_fixup_sections failed\n"); 499 517 #endif 500 bfd_set_error (bfd_error_wrong_format); 501 return 0; 518 goto err_wrong_format; 502 519 } 503 520 … … 526 543 vms_debug (2, "arch not found\n"); 527 544 #endif 528 bfd_set_error (bfd_error_wrong_format); 529 return 0; 545 goto err_wrong_format; 530 546 } 531 547 abfd->arch_info = arch; 532 548 533 549 return target_vector; 550 551 err_wrong_format: 552 bfd_set_error (bfd_error_wrong_format); 553 error_ret: 554 if (abfd->tdata.any != tdata_save && abfd->tdata.any != NULL) 555 bfd_release (abfd, abfd->tdata.any); 556 abfd->tdata.any = tdata_save; 557 bfd_set_start_address (abfd, saddr_save); 558 return NULL; 534 559 } 535 560 … … 550 575 /* Set the format of a file being written. */ 551 576 552 static b oolean577 static bfd_boolean 553 578 vms_mkobject (abfd) 554 579 bfd *abfd; … … 559 584 560 585 if (!vms_initialize (abfd)) 561 { 562 fprintf (stderr, "vms_initialize () failed !!\n"); 563 return 0; 564 } 586 return 0; 565 587 566 588 { … … 578 600 } 579 601 580 return true;602 return TRUE; 581 603 } 582 604 583 605 /* Write cached information into a file being written, at bfd_close. */ 584 606 585 static b oolean607 static bfd_boolean 586 608 vms_write_object_contents (abfd) 587 609 bfd *abfd; … … 596 618 { 597 619 if (_bfd_vms_write_hdr (abfd, OBJ_S_C_HDR) != 0) 598 return false;620 return FALSE; 599 621 if (_bfd_vms_write_gsd (abfd, OBJ_S_C_GSD) != 0) 600 return false;622 return FALSE; 601 623 if (_bfd_vms_write_tir (abfd, OBJ_S_C_TIR) != 0) 602 return false;624 return FALSE; 603 625 if (_bfd_vms_write_tbt (abfd, OBJ_S_C_TBT) != 0) 604 return false;626 return FALSE; 605 627 if (_bfd_vms_write_dbg (abfd, OBJ_S_C_DBG) != 0) 606 return false;628 return FALSE; 607 629 if (abfd->section_count > 255) 608 630 { 609 631 if (_bfd_vms_write_eom (abfd, OBJ_S_C_EOMW) != 0) 610 return false;632 return FALSE; 611 633 } 612 634 else 613 635 { 614 636 if (_bfd_vms_write_eom (abfd, OBJ_S_C_EOM) != 0) 615 return false;637 return FALSE; 616 638 } 617 639 } … … 619 641 { 620 642 if (_bfd_vms_write_hdr (abfd, EOBJ_S_C_EMH) != 0) 621 return false;643 return FALSE; 622 644 if (_bfd_vms_write_gsd (abfd, EOBJ_S_C_EGSD) != 0) 623 return false;645 return FALSE; 624 646 if (_bfd_vms_write_tir (abfd, EOBJ_S_C_ETIR) != 0) 625 return false;647 return FALSE; 626 648 if (_bfd_vms_write_tbt (abfd, EOBJ_S_C_ETBT) != 0) 627 return false;649 return FALSE; 628 650 if (_bfd_vms_write_dbg (abfd, EOBJ_S_C_EDBG) != 0) 629 return false;651 return FALSE; 630 652 if (_bfd_vms_write_eom (abfd, EOBJ_S_C_EEOM) != 0) 631 return false;653 return FALSE; 632 654 } 633 655 } 634 return true;656 return TRUE; 635 657 } 636 658 … … 639 661 /* Called when the BFD is being closed to do any necessary cleanup. */ 640 662 641 static b oolean663 static bfd_boolean 642 664 vms_close_and_cleanup (abfd) 643 665 bfd *abfd; 644 666 { 645 asection *sec;646 vms_section *es, *es1;647 int i;648 649 667 #if VMS_DEBUG 650 668 vms_debug (1, "vms_close_and_cleanup(%p)\n", abfd); 651 669 #endif 652 670 if (abfd == 0) 653 return true;671 return TRUE; 654 672 655 673 if (PRIV (vms_buf) != NULL) 656 { 657 free (PRIV (vms_buf)); 658 PRIV (vms_buf) = NULL; 659 } 660 PRIV (buf_size) = 0; 661 662 if (PRIV (output_buf) != 0) 663 { 664 free (PRIV (output_buf)); 665 PRIV (output_buf) = 0; 666 } 667 668 sec = abfd->sections; 669 while (sec != NULL) 670 { 671 if (sec->contents) 672 free (sec->contents); 673 sec = sec->next; 674 } 674 free (PRIV (vms_buf)); 675 675 676 676 if (PRIV (sections) != NULL) 677 { 678 free (PRIV (sections)); 679 PRIV (sections) = NULL; 680 } 677 free (PRIV (sections)); 681 678 682 679 if (PRIV (vms_symbol_table)) 683 { 684 bfd_hash_table_free (PRIV (vms_symbol_table)); 685 PRIV (vms_symbol_table) = 0; 686 } 687 688 if (PRIV (stack)) 689 { 690 free (PRIV (stack)); 691 PRIV (stack) = 0; 692 } 693 694 if (PRIV (location_stack)) 695 { 696 free (PRIV (location_stack)); 697 PRIV (location_stack) = 0; 698 } 699 700 for (i = 0; i < VMS_SECTION_COUNT; i++) 701 { 702 es = PRIV (vms_section_table)[i]; 703 while (es != NULL) 704 { 705 es1 = es->next; 706 free (es); 707 es = es1; 708 } 709 PRIV (vms_section_table)[i] = NULL; 710 } 711 712 free (abfd->tdata.any); 680 bfd_hash_table_free (PRIV (vms_symbol_table)); 681 682 bfd_release (abfd, abfd->tdata.any); 713 683 abfd->tdata.any = NULL; 714 684 715 return true;685 return TRUE; 716 686 } 717 687 718 688 /* Ask the BFD to free all cached information. */ 719 static b oolean689 static bfd_boolean 720 690 vms_bfd_free_cached_info (abfd) 721 691 bfd *abfd ATTRIBUTE_UNUSED; … … 724 694 vms_debug (1, "vms_bfd_free_cached_info(%p)\n", abfd); 725 695 #endif 726 return true;696 return TRUE; 727 697 } 728 698 729 699 /* Called when a new section is created. */ 730 700 731 static b oolean701 static bfd_boolean 732 702 vms_new_section_hook (abfd, section) 733 703 bfd *abfd; 734 704 asection *section; 735 705 { 736 #if VMS_DEBUG 737 vms_debug (1, "vms_new_section_hook (%p, [%d]%s), count %d\n", abfd, section->index, section->name, abfd->section_count); 738 #endif 739 bfd_set_section_alignment(abfd, section, 4); 740 741 if (abfd->section_count > PRIV (section_count)) 706 /* Count hasn't been incremented yet. */ 707 unsigned int section_count = abfd->section_count + 1; 708 709 #if VMS_DEBUG 710 vms_debug (1, "vms_new_section_hook (%p, [%d]%s), count %d\n", 711 abfd, section->index, section->name, section_count); 712 #endif 713 bfd_set_section_alignment (abfd, section, 4); 714 715 if (section_count > PRIV (section_count)) 742 716 { 743 PRIV (sections) = ((asection **) 744 bfd_realloc (PRIV (sections), abfd->section_count * sizeof (asection *))); 717 bfd_size_type amt = section_count; 718 amt *= sizeof (asection *); 719 PRIV (sections) = (asection **) bfd_realloc (PRIV (sections), amt); 745 720 if (PRIV (sections) == 0) 746 return false;747 PRIV (section_count) = abfd->section_count;721 return FALSE; 722 PRIV (section_count) = section_count; 748 723 } 749 724 #if VMS_DEBUG … … 755 730 #endif 756 731 757 return true;732 return TRUE; 758 733 } 759 734 … … 762 737 section data (starting at offset into section) */ 763 738 764 static b oolean739 static bfd_boolean 765 740 vms_get_section_contents (abfd, section, buf, offset, buf_size) 766 741 bfd *abfd ATTRIBUTE_UNUSED; … … 777 752 /* shouldn't be called, since all sections are IN_MEMORY */ 778 753 779 return false;754 return FALSE; 780 755 } 781 756 … … 784 759 section data (starting at offset into section) */ 785 760 786 static b oolean761 static bfd_boolean 787 762 vms_get_section_contents_in_window (abfd, section, w, offset, count) 788 763 bfd *abfd ATTRIBUTE_UNUSED; … … 799 774 /* shouldn't be called, since all sections are IN_MEMORY */ 800 775 801 return false;776 return FALSE; 802 777 } 803 778 … … 807 782 to another. */ 808 783 809 static b oolean784 static bfd_boolean 810 785 vms_bfd_copy_private_bfd_data (src, dest) 811 786 bfd *src ATTRIBUTE_UNUSED; … … 815 790 vms_debug (1, "vms_bfd_copy_private_bfd_data(%p, %p)\n", src, dest); 816 791 #endif 817 return true;792 return TRUE; 818 793 } 819 794 820 795 /* Merge private BFD information from the BFD @var{ibfd} to the 821 the output file BFD @var{obfd} when linking. Return << true>>822 on success, << false>> on error. Possible error returns are:796 the output file BFD @var{obfd} when linking. Return <<TRUE>> 797 on success, <<FALSE>> on error. Possible error returns are: 823 798 824 799 o <<bfd_error_no_memory>> - 825 800 Not enough memory exists to create private data for @var{obfd}. */ 826 801 827 static b oolean802 static bfd_boolean 828 803 vms_bfd_merge_private_bfd_data (ibfd, obfd) 829 804 bfd *ibfd ATTRIBUTE_UNUSED; … … 833 808 vms_debug (1,"vms_bfd_merge_private_bfd_data(%p, %p)\n", ibfd, obfd); 834 809 #endif 835 return true;810 return TRUE; 836 811 } 837 812 838 813 /* Set private BFD flag information in the BFD @var{abfd}. 839 Return << true>> on success, <<false>> on error. Possible error814 Return <<TRUE>> on success, <<FALSE>> on error. Possible error 840 815 returns are: 841 816 … … 843 818 Not enough memory exists to create private data for @var{obfd}. */ 844 819 845 static b oolean820 static bfd_boolean 846 821 vms_bfd_set_private_flags (abfd, flags) 847 822 bfd *abfd ATTRIBUTE_UNUSED; … … 851 826 vms_debug (1,"vms_bfd_set_private_flags(%p, %lx)\n", abfd, (long)flags); 852 827 #endif 853 return true;828 return TRUE; 854 829 } 855 830 … … 857 832 to another. */ 858 833 859 static b oolean834 static bfd_boolean 860 835 vms_bfd_copy_private_section_data (srcbfd, srcsec, dstbfd, dstsec) 861 836 bfd *srcbfd ATTRIBUTE_UNUSED; … … 868 843 srcbfd, srcsec->name, dstbfd, dstsec->name); 869 844 #endif 870 return true;845 return TRUE; 871 846 } 872 847 … … 874 849 to another. */ 875 850 876 static b oolean851 static bfd_boolean 877 852 vms_bfd_copy_private_symbol_data (ibfd, isym, obfd, osym) 878 853 bfd *ibfd ATTRIBUTE_UNUSED; … … 885 860 ibfd, isym->name, obfd, osym->name); 886 861 #endif 887 return true;862 return TRUE; 888 863 } 889 864 … … 916 891 } 917 892 918 /* Return trueif the core file attached to core_bfd was generated919 by a run of the executable file attached to exec_bfd, falseotherwise. */920 921 static b oolean893 /* Return TRUE if the core file attached to core_bfd was generated 894 by a run of the executable file attached to exec_bfd, FALSE otherwise. */ 895 896 static bfd_boolean 922 897 vms_core_file_matches_executable_p (abfd, bbfd) 923 898 bfd *abfd ATTRIBUTE_UNUSED; … … 927 902 vms_debug (1, "vms_core_file_matches_executable_p(%p, %p)\n", abfd, bbfd); 928 903 #endif 929 return false;904 return FALSE; 930 905 } 931 906 … … 933 908 934 909 /* ??? do something with an archive map. 935 Return false on error, trueotherwise. */936 937 static b oolean910 Return FALSE on error, TRUE otherwise. */ 911 912 static bfd_boolean 938 913 vms_slurp_armap (abfd) 939 914 bfd *abfd ATTRIBUTE_UNUSED; … … 942 917 vms_debug (1, "vms_slurp_armap(%p)\n", abfd); 943 918 #endif 944 return false;919 return FALSE; 945 920 } 946 921 947 922 /* ??? do something with an extended name table. 948 Return false on error, trueotherwise. */949 950 static b oolean923 Return FALSE on error, TRUE otherwise. */ 924 925 static bfd_boolean 951 926 vms_slurp_extended_name_table (abfd) 952 927 bfd *abfd ATTRIBUTE_UNUSED; … … 955 930 vms_debug (1, "vms_slurp_extended_name_table(%p)\n", abfd); 956 931 #endif 957 return false;932 return FALSE; 958 933 } 959 934 960 935 /* ??? do something with an extended name table. 961 Return false on error, trueotherwise. */962 963 static b oolean936 Return FALSE on error, TRUE otherwise. */ 937 938 static bfd_boolean 964 939 vms_construct_extended_name_table (abfd, tabloc, tablen, name) 965 940 bfd *abfd ATTRIBUTE_UNUSED; … … 971 946 vms_debug (1, "vms_construct_extended_name_table(%p)\n", abfd); 972 947 #endif 973 return false;948 return FALSE; 974 949 } 975 950 … … 979 954 vms_truncate_arname (abfd, pathname, arhdr) 980 955 bfd *abfd ATTRIBUTE_UNUSED; 981 CONSTchar *pathname ATTRIBUTE_UNUSED;956 const char *pathname ATTRIBUTE_UNUSED; 982 957 char *arhdr ATTRIBUTE_UNUSED; 983 958 { … … 990 965 /* ??? write archive map */ 991 966 992 static b oolean967 static bfd_boolean 993 968 vms_write_armap (arch, elength, map, orl_count, stridx) 994 969 bfd *arch ATTRIBUTE_UNUSED; … … 1002 977 arch, elength, map, orl_count, stridx); 1003 978 #endif 1004 return true;979 return TRUE; 1005 980 } 1006 981 … … 1052 1027 1053 1028 static int 1054 vms_generic_stat_arch_elt (abfd, st at)1029 vms_generic_stat_arch_elt (abfd, st) 1055 1030 bfd *abfd; 1056 struct stat *st at;1057 { 1058 #if VMS_DEBUG 1059 vms_debug (1, "vms_generic_stat_arch_elt(%p, %p)\n", abfd, st at);1060 #endif 1061 return bfd_generic_stat_arch_elt (abfd, stat);1031 struct stat *st; 1032 { 1033 #if VMS_DEBUG 1034 vms_debug (1, "vms_generic_stat_arch_elt(%p, %p)\n", abfd, st); 1035 #endif 1036 return bfd_generic_stat_arch_elt (abfd, st); 1062 1037 } 1063 1038 1064 1039 /* This is a new function in bfd 2.5 */ 1065 1040 1066 static b oolean1041 static bfd_boolean 1067 1042 vms_update_armap_timestamp (abfd) 1068 1043 bfd *abfd ATTRIBUTE_UNUSED; … … 1071 1046 vms_debug (1, "vms_update_armap_timestamp(%p)\n", abfd); 1072 1047 #endif 1073 return true;1048 return TRUE; 1074 1049 } 1075 1050 … … 1096 1071 init counter to 0 if entry == 0 */ 1097 1072 1098 static b oolean1073 static bfd_boolean 1099 1074 copy_symbols (entry, arg) 1100 1075 struct bfd_hash_entry *entry; … … 1108 1083 PRIV (symcache)[PRIV (symnum)++] = ((vms_symbol_entry *)entry)->symbol; 1109 1084 1110 return true;1085 return TRUE; 1111 1086 } 1112 1087 … … 1138 1113 } 1139 1114 1140 /* Create a new asymbol structure for the BFD abfd and return a pointer1141 to it.1142 This routine is necessary because each back end has private information1143 surrounding the asymbol. Building your own asymbol and pointing to it1144 will not create the private information, and will cause problems later on. */1145 1146 asymbol *1147 _bfd_vms_make_empty_symbol (abfd)1148 bfd *abfd;1149 {1150 asymbol *symbol = (asymbol *)bfd_zalloc(abfd, sizeof (asymbol));1151 1152 #if VMS_DEBUG1153 vms_debug (1, "_bfd_vms_make_empty_symbol(%p)\n", abfd);1154 #endif1155 1156 if (symbol == 0)1157 {1158 bfd_set_error (bfd_error_no_memory);1159 return 0;1160 }1161 symbol->the_bfd = abfd;1162 1163 return symbol;1164 }1165 1166 1115 /* Print symbol to file according to how. how is one of 1167 1116 bfd_print_symbol_name just print the name … … 1171 1120 static void 1172 1121 vms_print_symbol (abfd, file, symbol, how) 1173 bfd *abfd ATTRIBUTE_UNUSED;1122 bfd *abfd; 1174 1123 PTR file; 1175 1124 asymbol *symbol; … … 1189 1138 case bfd_print_symbol_all: 1190 1139 { 1191 CONSTchar *section_name = symbol->section->name;1192 1193 bfd_print_symbol_vandf ((PTR)file,symbol);1140 const char *section_name = symbol->section->name; 1141 1142 bfd_print_symbol_vandf (abfd, (PTR)file, symbol); 1194 1143 1195 1144 fprintf ((FILE *)file," %-8s %s", section_name, symbol->name); … … 1257 1206 } 1258 1207 1259 /* Return trueif the given symbol sym in the BFD abfd is1260 a compiler generated local label, else return false. */1261 1262 static b oolean1208 /* Return TRUE if the given symbol sym in the BFD abfd is 1209 a compiler generated local label, else return FALSE. */ 1210 1211 static bfd_boolean 1263 1212 vms_bfd_is_local_label_name (abfd, name) 1264 1213 bfd *abfd ATTRIBUTE_UNUSED; … … 1288 1237 location. */ 1289 1238 1290 static b oolean1239 static bfd_boolean 1291 1240 vms_find_nearest_line (abfd, section, symbols, offset, file, func, line) 1292 1241 bfd *abfd ATTRIBUTE_UNUSED; … … 1294 1243 asymbol **symbols ATTRIBUTE_UNUSED; 1295 1244 bfd_vma offset ATTRIBUTE_UNUSED; 1296 CONSTchar **file ATTRIBUTE_UNUSED;1297 CONSTchar **func ATTRIBUTE_UNUSED;1245 const char **file ATTRIBUTE_UNUSED; 1246 const char **func ATTRIBUTE_UNUSED; 1298 1247 unsigned int *line ATTRIBUTE_UNUSED; 1299 1248 { … … 1302 1251 abfd, section->name, symbols, (long int)offset); 1303 1252 #endif 1304 return false;1253 return FALSE; 1305 1254 } 1306 1255 … … 1328 1277 vms_read_minisymbols (abfd, dynamic, minisymsp, sizep) 1329 1278 bfd *abfd; 1330 b oolean dynamic;1279 bfd_boolean dynamic; 1331 1280 PTR *minisymsp; 1332 1281 unsigned int *sizep; … … 1345 1294 vms_minisymbol_to_symbol (abfd, dynamic, minisym, sym) 1346 1295 bfd *abfd; 1347 b oolean dynamic;1296 bfd_boolean dynamic; 1348 1297 const PTR minisym; 1349 1298 asymbol *sym; … … 1388 1337 vms_debug (1, "vms_canonicalize_reloc(%p, %s, <ret>, <ret>)\n", abfd, section->name); 1389 1338 #endif 1390 return false;1339 return FALSE; 1391 1340 } 1392 1341 … … 1431 1380 0, /* size (0 = byte, 1 = short, 2 = long) */ 1432 1381 8, /* bitsize */ 1433 true, /* pc_relative */1382 TRUE, /* pc_relative */ 1434 1383 0, /* bitpos */ 1435 1384 complain_overflow_dont, /* complain_on_overflow */ 1436 1385 reloc_nil, /* special_function */ 1437 1386 "IGNORE", /* name */ 1438 true, /* partial_inplace */1387 TRUE, /* partial_inplace */ 1439 1388 0, /* src_mask */ 1440 1389 0, /* dst_mask */ 1441 true), /* pcrel_offset */1390 TRUE), /* pcrel_offset */ 1442 1391 1443 1392 /* A 64 bit reference to a symbol. */ … … 1446 1395 4, /* size (0 = byte, 1 = short, 2 = long) */ 1447 1396 64, /* bitsize */ 1448 false, /* pc_relative */1397 FALSE, /* pc_relative */ 1449 1398 0, /* bitpos */ 1450 1399 complain_overflow_bitfield, /* complain_on_overflow */ 1451 1400 reloc_nil, /* special_function */ 1452 1401 "REFQUAD", /* name */ 1453 true, /* partial_inplace */1402 TRUE, /* partial_inplace */ 1454 1403 MINUS_ONE, /* src_mask */ 1455 1404 MINUS_ONE, /* dst_mask */ 1456 false), /* pcrel_offset */1405 FALSE), /* pcrel_offset */ 1457 1406 1458 1407 /* A 21 bit branch. The native assembler generates these for … … 1463 1412 2, /* size (0 = byte, 1 = short, 2 = long) */ 1464 1413 21, /* bitsize */ 1465 true, /* pc_relative */1414 TRUE, /* pc_relative */ 1466 1415 0, /* bitpos */ 1467 1416 complain_overflow_signed, /* complain_on_overflow */ 1468 1417 reloc_nil, /* special_function */ 1469 1418 "BRADDR", /* name */ 1470 true, /* partial_inplace */1419 TRUE, /* partial_inplace */ 1471 1420 0x1fffff, /* src_mask */ 1472 1421 0x1fffff, /* dst_mask */ 1473 false), /* pcrel_offset */1422 FALSE), /* pcrel_offset */ 1474 1423 1475 1424 /* A hint for a jump to a register. */ … … 1478 1427 1, /* size (0 = byte, 1 = short, 2 = long) */ 1479 1428 14, /* bitsize */ 1480 true, /* pc_relative */1429 TRUE, /* pc_relative */ 1481 1430 0, /* bitpos */ 1482 1431 complain_overflow_dont, /* complain_on_overflow */ 1483 1432 reloc_nil, /* special_function */ 1484 1433 "HINT", /* name */ 1485 true, /* partial_inplace */1434 TRUE, /* partial_inplace */ 1486 1435 0x3fff, /* src_mask */ 1487 1436 0x3fff, /* dst_mask */ 1488 false), /* pcrel_offset */1437 FALSE), /* pcrel_offset */ 1489 1438 1490 1439 /* 16 bit PC relative offset. */ … … 1493 1442 1, /* size (0 = byte, 1 = short, 2 = long) */ 1494 1443 16, /* bitsize */ 1495 true, /* pc_relative */1444 TRUE, /* pc_relative */ 1496 1445 0, /* bitpos */ 1497 1446 complain_overflow_signed, /* complain_on_overflow */ 1498 1447 reloc_nil, /* special_function */ 1499 1448 "SREL16", /* name */ 1500 true, /* partial_inplace */1449 TRUE, /* partial_inplace */ 1501 1450 0xffff, /* src_mask */ 1502 1451 0xffff, /* dst_mask */ 1503 false), /* pcrel_offset */1452 FALSE), /* pcrel_offset */ 1504 1453 1505 1454 /* 32 bit PC relative offset. */ … … 1508 1457 2, /* size (0 = byte, 1 = short, 2 = long) */ 1509 1458 32, /* bitsize */ 1510 true, /* pc_relative */1459 TRUE, /* pc_relative */ 1511 1460 0, /* bitpos */ 1512 1461 complain_overflow_signed, /* complain_on_overflow */ 1513 1462 reloc_nil, /* special_function */ 1514 1463 "SREL32", /* name */ 1515 true, /* partial_inplace */1464 TRUE, /* partial_inplace */ 1516 1465 0xffffffff, /* src_mask */ 1517 1466 0xffffffff, /* dst_mask */ 1518 false), /* pcrel_offset */1467 FALSE), /* pcrel_offset */ 1519 1468 1520 1469 /* A 64 bit PC relative offset. */ … … 1523 1472 4, /* size (0 = byte, 1 = short, 2 = long) */ 1524 1473 64, /* bitsize */ 1525 true, /* pc_relative */1474 TRUE, /* pc_relative */ 1526 1475 0, /* bitpos */ 1527 1476 complain_overflow_signed, /* complain_on_overflow */ 1528 1477 reloc_nil, /* special_function */ 1529 1478 "SREL64", /* name */ 1530 true, /* partial_inplace */1479 TRUE, /* partial_inplace */ 1531 1480 MINUS_ONE, /* src_mask */ 1532 1481 MINUS_ONE, /* dst_mask */ 1533 false), /* pcrel_offset */1482 FALSE), /* pcrel_offset */ 1534 1483 1535 1484 /* Push a value on the reloc evaluation stack. */ … … 1538 1487 0, /* size (0 = byte, 1 = short, 2 = long) */ 1539 1488 0, /* bitsize */ 1540 false, /* pc_relative */1489 FALSE, /* pc_relative */ 1541 1490 0, /* bitpos */ 1542 1491 complain_overflow_dont, /* complain_on_overflow */ 1543 1492 reloc_nil, /* special_function */ 1544 1493 "OP_PUSH", /* name */ 1545 false, /* partial_inplace */1494 FALSE, /* partial_inplace */ 1546 1495 0, /* src_mask */ 1547 1496 0, /* dst_mask */ 1548 false), /* pcrel_offset */1497 FALSE), /* pcrel_offset */ 1549 1498 1550 1499 /* Store the value from the stack at the given address. Store it in … … 1554 1503 4, /* size (0 = byte, 1 = short, 2 = long) */ 1555 1504 64, /* bitsize */ 1556 false, /* pc_relative */1505 FALSE, /* pc_relative */ 1557 1506 0, /* bitpos */ 1558 1507 complain_overflow_dont, /* complain_on_overflow */ 1559 1508 reloc_nil, /* special_function */ 1560 1509 "OP_STORE", /* name */ 1561 false, /* partial_inplace */1510 FALSE, /* partial_inplace */ 1562 1511 0, /* src_mask */ 1563 1512 MINUS_ONE, /* dst_mask */ 1564 false), /* pcrel_offset */1513 FALSE), /* pcrel_offset */ 1565 1514 1566 1515 /* Subtract the reloc address from the value on the top of the … … 1570 1519 0, /* size (0 = byte, 1 = short, 2 = long) */ 1571 1520 0, /* bitsize */ 1572 false, /* pc_relative */1521 FALSE, /* pc_relative */ 1573 1522 0, /* bitpos */ 1574 1523 complain_overflow_dont, /* complain_on_overflow */ 1575 1524 reloc_nil, /* special_function */ 1576 1525 "OP_PSUB", /* name */ 1577 false, /* partial_inplace */1526 FALSE, /* partial_inplace */ 1578 1527 0, /* src_mask */ 1579 1528 0, /* dst_mask */ 1580 false), /* pcrel_offset */1529 FALSE), /* pcrel_offset */ 1581 1530 1582 1531 /* Shift the value on the top of the relocation stack right by the … … 1586 1535 0, /* size (0 = byte, 1 = short, 2 = long) */ 1587 1536 0, /* bitsize */ 1588 false, /* pc_relative */1537 FALSE, /* pc_relative */ 1589 1538 0, /* bitpos */ 1590 1539 complain_overflow_dont, /* complain_on_overflow */ 1591 1540 reloc_nil, /* special_function */ 1592 1541 "OP_PRSHIFT", /* name */ 1593 false, /* partial_inplace */1542 FALSE, /* partial_inplace */ 1594 1543 0, /* src_mask */ 1595 1544 0, /* dst_mask */ 1596 false), /* pcrel_offset */1545 FALSE), /* pcrel_offset */ 1597 1546 1598 1547 /* Hack. Linkage is done by linker. */ … … 1601 1550 8, /* size (0 = byte, 1 = short, 2 = long) */ 1602 1551 256, /* bitsize */ 1603 false, /* pc_relative */1552 FALSE, /* pc_relative */ 1604 1553 0, /* bitpos */ 1605 1554 complain_overflow_dont, /* complain_on_overflow */ 1606 1555 reloc_nil, /* special_function */ 1607 1556 "LINKAGE", /* name */ 1608 false, /* partial_inplace */1557 FALSE, /* partial_inplace */ 1609 1558 0, /* src_mask */ 1610 1559 0, /* dst_mask */ 1611 false), /* pcrel_offset */1560 FALSE), /* pcrel_offset */ 1612 1561 1613 1562 /* A 32 bit reference to a symbol. */ … … 1616 1565 2, /* size (0 = byte, 1 = short, 2 = long) */ 1617 1566 32, /* bitsize */ 1618 false, /* pc_relative */1567 FALSE, /* pc_relative */ 1619 1568 0, /* bitpos */ 1620 1569 complain_overflow_bitfield, /* complain_on_overflow */ 1621 1570 reloc_nil, /* special_function */ 1622 1571 "REFLONG", /* name */ 1623 true, /* partial_inplace */1572 TRUE, /* partial_inplace */ 1624 1573 0xffffffff, /* src_mask */ 1625 1574 0xffffffff, /* dst_mask */ 1626 false), /* pcrel_offset */1575 FALSE), /* pcrel_offset */ 1627 1576 1628 1577 /* A 64 bit reference to a procedure, written as 32 bit value. */ … … 1631 1580 4, /* size (0 = byte, 1 = short, 2 = long) */ 1632 1581 64, /* bitsize */ 1633 false, /* pc_relative */1582 FALSE, /* pc_relative */ 1634 1583 0, /* bitpos */ 1635 1584 complain_overflow_signed,/* complain_on_overflow */ 1636 1585 reloc_nil, /* special_function */ 1637 1586 "CODEADDR", /* name */ 1638 false, /* partial_inplace */1587 FALSE, /* partial_inplace */ 1639 1588 0xffffffff, /* src_mask */ 1640 1589 0xffffffff, /* dst_mask */ 1641 false), /* pcrel_offset */1590 FALSE), /* pcrel_offset */ 1642 1591 1643 1592 }; … … 1686 1635 pointer. */ 1687 1636 1688 static b oolean1637 static bfd_boolean 1689 1638 vms_set_arch_mach (abfd, arch, mach) 1690 1639 bfd *abfd; … … 1697 1646 abfd->arch_info = bfd_scan_arch("alpha"); 1698 1647 1699 return true;1648 return TRUE; 1700 1649 } 1701 1650 … … 1704 1653 offset offset for count bytes. 1705 1654 1706 Normally true is returned, else false. Possible error returns are:1655 Normally TRUE is returned, else FALSE. Possible error returns are: 1707 1656 o bfd_error_no_contents - The output section does not have the 1708 1657 SEC_HAS_CONTENTS attribute, so nothing can be written to it. 1709 1658 o and some more too */ 1710 1659 1711 static b oolean1660 static bfd_boolean 1712 1661 vms_set_section_contents (abfd, section, location, offset, count) 1713 1662 bfd *abfd; … … 1732 1681 vms_sizeof_headers (abfd, reloc) 1733 1682 bfd *abfd ATTRIBUTE_UNUSED; 1734 b oolean reloc ATTRIBUTE_UNUSED;1683 bfd_boolean reloc ATTRIBUTE_UNUSED; 1735 1684 { 1736 1685 #if VMS_DEBUG … … 1750 1699 struct bfd_link_order *link_order ATTRIBUTE_UNUSED; 1751 1700 bfd_byte *data ATTRIBUTE_UNUSED; 1752 b oolean relocateable ATTRIBUTE_UNUSED;1701 bfd_boolean relocateable ATTRIBUTE_UNUSED; 1753 1702 asymbol **symbols ATTRIBUTE_UNUSED; 1754 1703 { … … 1762 1711 /* ??? */ 1763 1712 1764 static b oolean1713 static bfd_boolean 1765 1714 vms_bfd_relax_section (abfd, section, link_info, again) 1766 1715 bfd *abfd ATTRIBUTE_UNUSED; 1767 1716 asection *section ATTRIBUTE_UNUSED; 1768 1717 struct bfd_link_info *link_info ATTRIBUTE_UNUSED; 1769 b oolean *again ATTRIBUTE_UNUSED;1718 bfd_boolean *again ATTRIBUTE_UNUSED; 1770 1719 { 1771 1720 #if VMS_DEBUG … … 1773 1722 abfd, section->name, link_info); 1774 1723 #endif 1775 return true;1776 } 1777 1778 static b oolean1724 return TRUE; 1725 } 1726 1727 static bfd_boolean 1779 1728 vms_bfd_gc_sections (abfd, link_info) 1780 1729 bfd *abfd ATTRIBUTE_UNUSED; … … 1784 1733 vms_debug (1, "vms_bfd_gc_sections(%p, %p)\n", abfd, link_info); 1785 1734 #endif 1786 return true; 1735 return TRUE; 1736 } 1737 1738 static bfd_boolean 1739 vms_bfd_merge_sections (abfd, link_info) 1740 bfd *abfd ATTRIBUTE_UNUSED; 1741 struct bfd_link_info *link_info ATTRIBUTE_UNUSED; 1742 { 1743 #if VMS_DEBUG 1744 vms_debug (1, "vms_bfd_merge_sections(%p, %p)\n", abfd, link_info); 1745 #endif 1746 return TRUE; 1787 1747 } 1788 1748 … … 1800 1760 } 1801 1761 1762 /* Free a linker hash table. */ 1763 1764 static void 1765 vms_bfd_link_hash_table_free (hash) 1766 struct bfd_link_hash_table *hash ATTRIBUTE_UNUSED; 1767 { 1768 #if VMS_DEBUG 1769 vms_debug (1, "vms_bfd_link_hash_table_free(%p)\n", abfd); 1770 #endif 1771 } 1772 1802 1773 /* Add symbols from this object file into the hash table. */ 1803 1774 1804 static b oolean1775 static bfd_boolean 1805 1776 vms_bfd_link_add_symbols (abfd, link_info) 1806 1777 bfd *abfd ATTRIBUTE_UNUSED; … … 1810 1781 vms_debug (1, "vms_bfd_link_add_symbols(%p, %p)\n", abfd, link_info); 1811 1782 #endif 1812 return false;1783 return FALSE; 1813 1784 } 1814 1785 … … 1816 1787 section of the BFD. */ 1817 1788 1818 static b oolean1789 static bfd_boolean 1819 1790 vms_bfd_final_link (abfd, link_info) 1820 1791 bfd *abfd ATTRIBUTE_UNUSED; … … 1824 1795 vms_debug (1, "vms_bfd_final_link(%p, %p)\n", abfd, link_info); 1825 1796 #endif 1826 return true;1797 return TRUE; 1827 1798 } 1828 1799 1829 1800 /* Should this section be split up into smaller pieces during linking. */ 1830 1801 1831 static b oolean1802 static bfd_boolean 1832 1803 vms_bfd_link_split_section (abfd, section) 1833 1804 bfd *abfd ATTRIBUTE_UNUSED; … … 1837 1808 vms_debug (1, "vms_bfd_link_split_section(%p, %s)\n", abfd, section->name); 1838 1809 #endif 1839 return false;1810 return FALSE; 1840 1811 } 1841 1812 … … 1854 1825 } 1855 1826 1856 static b oolean1827 static bfd_boolean 1857 1828 vms_bfd_print_private_bfd_data (abfd, file) 1858 1829 bfd *abfd ATTRIBUTE_UNUSED; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.