~ubuntu-branches/debian/jessie/gdb/jessie

« back to all changes in this revision

Viewing changes to bfd/vms.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2010-03-20 01:21:29 UTC
  • mfrom: (1.3.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100320012129-t7h25y8zgr8c2369
Tags: 7.1-1
* New upstream release, including:
  - PIE support (Closes: #346409).
  - C++ improvements, including static_cast<> et al, namespace imports,
    and bug fixes in printing virtual base classes.
  - Multi-program debugging.  One GDB can now debug multiple programs
    at the same time.
  - Python scripting improvements, including gdb.parse_and_eval.
  - Updated MIPS Linux signal frame layout (Closes: #570875).
  - No internal error stepping over _dl_debug_state (Closes: #569551).
* Update to Standards-Version: 3.8.4 (no changes required).
* Include more relevant (and smaller) docs in the gdbserver package
  (Closes: #571132).
* Do not duplicate documentation in gdb64, gdb-source, and libgdb-dev.
* Fix crash when switching into TUI mode (Closes: #568489).

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
static int vms_slurp_module (bfd *abfd);
47
47
static int vms_slurp_image (bfd *abfd);
48
48
static const struct bfd_target *vms_object_p (bfd *abfd);
49
 
static const struct bfd_target *vms_archive_p (bfd *abfd);
50
49
static bfd_boolean vms_mkobject (bfd *abfd);
51
50
static bfd_boolean vms_write_object_contents (bfd *abfd);
52
51
static void free_reloc_stream (bfd *abfd, asection *section, void *data);
53
52
static bfd_boolean vms_close_and_cleanup (bfd *abfd);
54
 
static bfd_boolean vms_bfd_free_cached_info (bfd *abfd);
55
53
static bfd_boolean vms_new_section_hook (bfd *abfd, asection *section);
56
54
static bfd_boolean vms_get_section_contents
57
55
  (bfd *abfd, asection *section, PTR x1, file_ptr x2, bfd_size_type x3);
58
 
static bfd_boolean vms_get_section_contents_in_window
59
 
  (bfd *abfd, asection *section, bfd_window *w, file_ptr offset,
60
 
   bfd_size_type count);
61
 
static bfd_boolean vms_bfd_copy_private_bfd_data (bfd *src, bfd *dest);
62
 
static bfd_boolean vms_bfd_copy_private_section_data
63
 
  (bfd *srcbfd, asection *srcsec, bfd *dstbfd, asection *dstsec);
64
 
static bfd_boolean vms_bfd_copy_private_symbol_data
65
 
  (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
66
 
static bfd_boolean vms_bfd_print_private_bfd_data (bfd *abfd, void *file);
67
 
static char *vms_core_file_failing_command (bfd *abfd);
68
 
static int vms_core_file_failing_signal (bfd *abfd);
69
 
static bfd_boolean vms_core_file_matches_executable_p (bfd *abfd, bfd *bbfd);
70
 
static bfd_boolean vms_slurp_armap (bfd *abfd);
71
 
static bfd_boolean vms_slurp_extended_name_table (bfd *abfd);
72
 
static bfd_boolean vms_construct_extended_name_table
73
 
  (bfd *abfd, char **tabloc, bfd_size_type *tablen, const char **name);
74
 
static void vms_truncate_arname (bfd *abfd, const char *pathname, char *arhdr);
75
 
static bfd_boolean vms_write_armap
76
 
  (bfd *arch, unsigned int elen, struct orl *map, unsigned int cnt, int idx);
77
 
static PTR vms_read_ar_hdr (bfd *abfd);
78
 
static bfd *vms_get_elt_at_index (bfd *abfd, symindex index);
79
 
static bfd *vms_openr_next_archived_file (bfd *arch, bfd *prev);
80
 
static bfd_boolean vms_update_armap_timestamp (bfd *abfd);
81
 
static int vms_generic_stat_arch_elt (bfd *, struct stat *);
82
56
static long vms_get_symtab_upper_bound (bfd *abfd);
83
57
static long vms_canonicalize_symtab (bfd *abfd, asymbol **symbols);
84
58
static void vms_print_symbol (bfd *abfd, PTR file, asymbol *symbol,
85
59
                              bfd_print_symbol_type how);
86
60
static void vms_get_symbol_info (bfd *abfd, asymbol *symbol, symbol_info *ret);
87
61
static bfd_boolean vms_bfd_is_local_label_name (bfd *abfd, const char *);
88
 
static alent *vms_get_lineno (bfd *abfd, asymbol *symbol);
89
62
static bfd_boolean vms_find_nearest_line
90
63
  (bfd *abfd, asection *section, asymbol **symbols, bfd_vma offset,
91
64
   const char **file, const char **func, unsigned int *line);
92
 
static asymbol *vms_bfd_make_debug_symbol (bfd *abfd, void *ptr,
93
 
                                           unsigned long size);
94
 
static long vms_read_minisymbols (bfd *abfd, bfd_boolean dynamic,
95
 
                                  PTR *minisymsp, unsigned int *sizep);
96
 
static asymbol *vms_minisymbol_to_symbol
97
 
  (bfd *abfd, bfd_boolean dynamic, const PTR minisym, asymbol *sym);
98
65
static void alloc_reloc_stream (bfd *abfd, asection *section,
99
66
                                void *alloc_error);
100
67
static bfd_boolean vms_slurp_reloc_table (bfd *abfd, asection *section,
109
76
static bfd_boolean vms_set_section_contents
110
77
  (bfd *abfd, asection *section, const PTR location, file_ptr offset,
111
78
   bfd_size_type count);
112
 
static int vms_sizeof_headers (bfd *abfd,
113
 
                               struct bfd_link_info *info ATTRIBUTE_UNUSED);
114
 
static bfd_byte *vms_bfd_get_relocated_section_contents
115
 
  (bfd *abfd, struct bfd_link_info *link_info,
116
 
   struct bfd_link_order *link_order, bfd_byte *data,
117
 
   bfd_boolean relocatable, asymbol **symbols);
118
 
static bfd_boolean vms_bfd_relax_section
119
 
  (bfd *abfd, asection *section, struct bfd_link_info *link_info,
120
 
   bfd_boolean *again);
121
 
static bfd_boolean vms_bfd_gc_sections
122
 
  (bfd *abfd, struct bfd_link_info *link_info);
123
 
static bfd_boolean vms_bfd_merge_sections
124
 
  (bfd *abfd, struct bfd_link_info *link_info);
125
 
static struct bfd_link_hash_table *vms_bfd_link_hash_table_create (bfd *abfd);
126
 
static void vms_bfd_link_hash_table_free (struct bfd_link_hash_table *hash);
127
 
static bfd_boolean vms_bfd_link_add_symbols
128
 
  (bfd *abfd, struct bfd_link_info *link_info);
129
 
static bfd_boolean vms_bfd_final_link (bfd *abfd,
130
 
                                       struct bfd_link_info *link_info);
131
 
static bfd_boolean vms_bfd_link_split_section (bfd *abfd, asection *section);
132
 
static long vms_get_dynamic_symtab_upper_bound (bfd *abfd);
133
 
static long vms_canonicalize_dynamic_symtab (bfd *abfd, asymbol **symbols);
134
 
static long vms_get_dynamic_reloc_upper_bound (bfd *abfd);
135
 
static long vms_canonicalize_dynamic_reloc
136
 
  (bfd *abfd, arelent **arel, asymbol **symbols);
137
 
static bfd_boolean vms_bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
138
 
static bfd_boolean vms_bfd_set_private_flags (bfd *abfd, flagword flags);
139
79
 
140
80
#define vms_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
141
81
#define vms_make_empty_symbol             _bfd_generic_make_empty_symbol
142
82
#define vms_bfd_link_just_syms            _bfd_generic_link_just_syms
 
83
#define vms_bfd_copy_link_hash_symbol_type \
 
84
  _bfd_generic_copy_link_hash_symbol_type
143
85
#define vms_bfd_is_group_section          bfd_generic_is_group_section
144
86
#define vms_bfd_discard_group             bfd_generic_discard_group
145
87
#define vms_section_already_linked        _bfd_generic_section_already_linked
147
89
#define vms_bfd_copy_private_header_data  _bfd_generic_bfd_copy_private_header_data
148
90
#define vms_get_synthetic_symtab          _bfd_nodynamic_get_synthetic_symtab
149
91
 
 
92
#define vms_bfd_copy_private_bfd_data     _bfd_generic_bfd_copy_private_bfd_data
 
93
#define vms_bfd_free_cached_info          _bfd_generic_bfd_free_cached_info
 
94
#define vms_bfd_copy_private_section_data _bfd_generic_bfd_copy_private_section_data
 
95
#define vms_bfd_copy_private_symbol_data  _bfd_generic_bfd_copy_private_symbol_data
 
96
#define vms_bfd_set_private_flags         _bfd_generic_bfd_set_private_flags
 
97
#define vms_bfd_merge_private_bfd_data    _bfd_generic_bfd_merge_private_bfd_data
 
98
#define vms_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
 
99
#define vms_read_minisymbols               _bfd_generic_read_minisymbols
 
100
#define vms_minisymbol_to_symbol           _bfd_generic_minisymbol_to_symbol
 
101
#define vms_get_lineno                     _bfd_nosymbols_get_lineno
 
102
#define vms_find_inliner_info              _bfd_nosymbols_find_inliner_info
 
103
#define vms_bfd_make_debug_symbol          _bfd_nosymbols_bfd_make_debug_symbol
150
104
 
151
105
#ifdef VMS_DEBUG
152
106
/* Cause debug info to be emitted for the structure.  */
229
183
  struct pair *data = (struct pair *)sections;
230
184
  unsigned long sec = (unsigned long)sym->section;
231
185
 
232
 
#if VMS_DEBUG
233
 
  vms_debug (6, "fill_section_ptr: sym %p, sec %p\n", sym, sec);
234
 
#endif
 
186
  vms_debug2 ((6, "fill_section_ptr: sym %p, sec %lu\n", sym, sec));
235
187
 
236
188
  if (sec < data->section_count)
237
189
    {
242
194
    }
243
195
  else if (sec == (unsigned long)-1)
244
196
    sym->section = &bfd_und_section;
245
 
    
 
197
 
246
198
  return TRUE;
247
199
}
248
200
 
271
223
 
272
224
  do
273
225
    {
274
 
#if VMS_DEBUG
275
 
      vms_debug (7, "reading at %08lx\n", bfd_tell (abfd));
276
 
#endif
 
226
      vms_debug2 ((7, "reading at %08lx\n", bfd_tell (abfd)));
 
227
 
277
228
      new_type = _bfd_vms_get_object_record (abfd);
278
229
      if (new_type < 0)
279
230
        {
280
 
#if VMS_DEBUG
281
 
          vms_debug (2, "next_record failed\n");
282
 
#endif
 
231
          vms_debug2 ((2, "next_record failed\n"));
283
232
          return -1;
284
233
        }
285
234
 
287
236
        {
288
237
          if (! vms_fixup_sections (abfd))
289
238
            {
290
 
#if VMS_DEBUG
291
 
              vms_debug (2, "vms_fixup_sections failed\n");
292
 
#endif
 
239
              vms_debug2 ((2, "vms_fixup_sections failed\n"));
293
240
              return -1;
294
241
            }
295
242
        }
333
280
        }
334
281
      if (err != 0)
335
282
        {
336
 
#if VMS_DEBUG
337
 
          vms_debug (2, "slurp type %d failed with %d\n", type, err);
338
 
#endif
 
283
          vms_debug2 ((2, "slurp type %d failed with %d\n", type, err));
339
284
          return err;
340
285
        }
341
286
    }
403
348
  bfd_vma saddr_save = bfd_get_start_address (abfd);
404
349
  int err = 0;
405
350
 
406
 
#if VMS_DEBUG
407
 
  vms_debug (1, "vms_object_p(%p)\n", abfd);
408
 
#endif
 
351
  vms_debug2 ((1, "vms_object_p(%p)\n", abfd));
409
352
 
410
353
  if (!vms_initialize (abfd))
411
354
    goto error_ret;
436
379
    {
437
380
      if (! vms_fixup_sections (abfd))
438
381
        {
439
 
#if VMS_DEBUG
440
 
          vms_debug (2, "vms_fixup_sections failed\n");
441
 
#endif
 
382
          vms_debug2 ((2, "vms_fixup_sections failed\n"));
442
383
          goto err_wrong_format;
443
384
        }
444
385
 
445
386
      target_vector = &vms_vax_vec;
446
387
      arch = bfd_scan_arch ("vax");
447
388
 
448
 
#if VMS_DEBUG
449
 
      vms_debug (2, "arch is vax\n");
450
 
#endif
 
389
      vms_debug2 ((2, "arch is vax\n"));
451
390
    }
452
391
  else
453
392
    {
454
393
      /* Set arch_info to alpha.   */
455
394
      target_vector = &vms_alpha_vec;
456
395
      arch = bfd_scan_arch ("alpha");
457
 
#if VMS_DEBUG
458
 
      vms_debug (2, "arch is alpha\n");
459
 
#endif
 
396
      vms_debug2 ((2, "arch is alpha\n"));
460
397
    }
461
398
 
462
399
  abfd->arch_info = arch;
473
410
  return NULL;
474
411
}
475
412
 
476
 
/* Check the format for a file being read.
477
 
   Return a (bfd_target *) if it's an archive file or zero.  */
478
 
 
479
 
static const struct bfd_target *
480
 
vms_archive_p (bfd * abfd ATTRIBUTE_UNUSED)
481
 
{
482
 
#if VMS_DEBUG
483
 
  vms_debug (1, "vms_archive_p (%p)\n", abfd);
484
 
#endif
485
 
 
486
 
  return NULL;
487
 
}
488
 
 
489
413
/* Set the format of a file being written.  */
490
414
 
491
415
static bfd_boolean
493
417
{
494
418
  const bfd_arch_info_type *arch;
495
419
 
496
 
#if VMS_DEBUG
497
 
  vms_debug (1, "vms_mkobject (%p)\n", abfd);
498
 
#endif
 
420
  vms_debug2 ((1, "vms_mkobject (%p)\n", abfd));
499
421
 
500
422
  if (!vms_initialize (abfd))
501
423
    return FALSE;
520
442
static bfd_boolean
521
443
vms_write_object_contents (bfd * abfd)
522
444
{
523
 
#if VMS_DEBUG
524
 
  vms_debug (1, "vms_write_object_contents (%p)\n", abfd);
525
 
#endif
 
445
  vms_debug2 ((1, "vms_write_object_contents (%p)\n", abfd));
526
446
 
527
447
  if (abfd->section_count > 0)                  /* we have sections */
528
448
    {
595
515
  fab.fab$b_fac = FAB$M_PUT;
596
516
  fab.fab$l_fop = FAB$M_ESC;
597
517
  fab.fab$l_ctx = RME$C_SETRFM;
598
 
  
 
518
 
599
519
  sys$open (&fab);
600
 
  
 
520
 
601
521
  fab.fab$b_rfm = FAB$C_VAR;
602
 
  
 
522
 
603
523
  sys$modify (&fab);
604
524
  sys$close (&fab);
605
525
}
631
551
static bfd_boolean
632
552
vms_close_and_cleanup (bfd * abfd)
633
553
{
634
 
#if VMS_DEBUG
635
 
  vms_debug (1, "vms_close_and_cleanup (%p)\n", abfd);
636
 
#endif
 
554
  vms_debug2 ((1, "vms_close_and_cleanup (%p)\n", abfd));
 
555
 
637
556
  if (abfd == NULL || abfd->tdata.any == NULL)
638
557
    return TRUE;
639
558
 
666
585
  return TRUE;
667
586
}
668
587
 
669
 
/* Ask the BFD to free all cached information.  */
670
 
 
671
 
static bfd_boolean
672
 
vms_bfd_free_cached_info (bfd * abfd ATTRIBUTE_UNUSED)
673
 
{
674
 
#if VMS_DEBUG
675
 
  vms_debug (1, "vms_bfd_free_cached_info (%p)\n", abfd);
676
 
#endif
677
 
  return TRUE;
678
 
}
679
 
 
680
588
/* Called when a new section is created.  */
681
589
 
682
590
static bfd_boolean
687
595
  /* Count hasn't been incremented yet.  */
688
596
  unsigned int section_count = abfd->section_count + 1;
689
597
 
690
 
#if VMS_DEBUG
691
 
  vms_debug (1, "vms_new_section_hook (%p, [%d]%s), count %d\n",
692
 
             abfd, section->index, section->name, section_count);
693
 
#endif
 
598
  vms_debug2 ((1, "vms_new_section_hook (%p, [%d]%s), count %d\n",
 
599
               abfd, section->index, section->name, section_count));
694
600
 
695
601
  bfd_set_section_alignment (abfd, section, 0);
696
602
 
697
603
  if (section_count > PRIV (section_count))
698
604
    {
699
 
      bfd_size_type amt = section_count;
 
605
      amt = section_count;
700
606
      amt *= sizeof (asection *);
701
607
      PRIV (sections) = bfd_realloc_or_free (PRIV (sections), amt);
702
608
      if (PRIV (sections) == NULL)
704
610
      PRIV (section_count) = section_count;
705
611
    }
706
612
 
707
 
#if VMS_DEBUG
708
 
  vms_debug (6, "section_count: %d\n", PRIV (section_count));
709
 
#endif
 
613
  vms_debug2 ((6, "section_count: %d\n", PRIV (section_count)));
710
614
 
711
615
  PRIV (sections)[section->index] = section;
712
616
 
713
 
#if VMS_DEBUG
714
 
  vms_debug (7, "%d: %s\n", section->index, section->name);
715
 
#endif
 
617
  vms_debug2 ((7, "%d: %s\n", section->index, section->name));
716
618
 
717
619
  amt = sizeof (struct vms_section_data_struct);
718
620
  section->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
735
637
{
736
638
  bfd_size_type size = section->size;
737
639
 
738
 
#if VMS_DEBUG
739
 
  vms_debug (1, "vms_get_section_contents (%p, %s, %p, off %ld, size %d)\n",
740
 
                 abfd, section->name, buf, offset, (int)buf_size);
741
 
#endif
 
640
  vms_debug2 ((1, "vms_get_section_contents (%p, %s, %p, off %ld, size %d)\n",
 
641
               abfd, section->name, buf, offset, (int)buf_size));
742
642
 
743
643
  if (section->contents)
744
644
    abort ();
771
671
  return TRUE;
772
672
}
773
673
 
774
 
/* Read the contents of a section.
775
 
   buf points to a buffer of buf_size bytes to be filled with
776
 
   section data (starting at offset into section).  */
777
 
 
778
 
static bfd_boolean
779
 
vms_get_section_contents_in_window (bfd * abfd ATTRIBUTE_UNUSED,
780
 
                                    asection *section ATTRIBUTE_UNUSED,
781
 
                                    bfd_window *w ATTRIBUTE_UNUSED,
782
 
                                    file_ptr offset ATTRIBUTE_UNUSED,
783
 
                                    bfd_size_type count ATTRIBUTE_UNUSED)
784
 
{
785
 
#if VMS_DEBUG
786
 
  vms_debug (1, "vms_get_section_contents_in_window (%p, %s, %p, off %ld, count %d)\n",
787
 
                 abfd, section->name, w, offset, (int)count);
788
 
#endif
789
 
 
790
 
  /* Shouldn't be called, since all sections are IN_MEMORY.  */
791
 
  return FALSE;
792
 
}
793
 
 
794
 
/* Part 4.2, copy private data.  */
795
 
 
796
 
/* Called to copy BFD general private data from one object file
797
 
   to another.  */
798
 
 
799
 
static bfd_boolean
800
 
vms_bfd_copy_private_bfd_data (bfd *src ATTRIBUTE_UNUSED,
801
 
                               bfd *dest ATTRIBUTE_UNUSED)
802
 
{
803
 
#if VMS_DEBUG
804
 
  vms_debug (1, "vms_bfd_copy_private_bfd_data (%p, %p)\n", src, dest);
805
 
#endif
806
 
  return TRUE;
807
 
}
808
 
 
809
 
/* Merge private BFD information from the BFD @var{ibfd} to the
810
 
   the output file BFD @var{obfd} when linking.  Return <<TRUE>>
811
 
   on success, <<FALSE>> on error.  Possible error returns are:
812
 
 
813
 
   o <<bfd_error_no_memory>> -
814
 
     Not enough memory exists to create private data for @var{obfd}.  */
815
 
 
816
 
static bfd_boolean
817
 
vms_bfd_merge_private_bfd_data (bfd * ibfd ATTRIBUTE_UNUSED,
818
 
                                bfd * obfd ATTRIBUTE_UNUSED)
819
 
{
820
 
#if VMS_DEBUG
821
 
  vms_debug (1,"vms_bfd_merge_private_bfd_data (%p, %p)\n", ibfd, obfd);
822
 
#endif
823
 
  return TRUE;
824
 
}
825
 
 
826
 
/* Set private BFD flag information in the BFD @var{abfd}.
827
 
   Return <<TRUE>> on success, <<FALSE>> on error.  Possible error
828
 
   returns are:
829
 
 
830
 
   o <<bfd_error_no_memory>> -
831
 
     Not enough memory exists to create private data for @var{obfd}.  */
832
 
 
833
 
static bfd_boolean
834
 
vms_bfd_set_private_flags (bfd * abfd ATTRIBUTE_UNUSED,
835
 
                           flagword flags ATTRIBUTE_UNUSED)
836
 
{
837
 
#if VMS_DEBUG
838
 
  vms_debug (1,"vms_bfd_set_private_flags (%p, %lx)\n", abfd, (long)flags);
839
 
#endif
840
 
  return TRUE;
841
 
}
842
 
 
843
 
/* Called to copy BFD private section data from one object file
844
 
   to another.  */
845
 
 
846
 
static bfd_boolean
847
 
vms_bfd_copy_private_section_data (bfd *srcbfd ATTRIBUTE_UNUSED,
848
 
                                   asection *srcsec ATTRIBUTE_UNUSED,
849
 
                                   bfd *dstbfd ATTRIBUTE_UNUSED,
850
 
                                   asection *dstsec ATTRIBUTE_UNUSED)
851
 
{
852
 
#if VMS_DEBUG
853
 
  vms_debug (1, "vms_bfd_copy_private_section_data (%p, %s, %p, %s)\n",
854
 
                 srcbfd, srcsec->name, dstbfd, dstsec->name);
855
 
#endif
856
 
  return TRUE;
857
 
}
858
 
 
859
 
/* Called to copy BFD private symbol data from one object file
860
 
   to another.  */
861
 
 
862
 
static bfd_boolean
863
 
vms_bfd_copy_private_symbol_data (bfd *ibfd ATTRIBUTE_UNUSED,
864
 
                                  asymbol *isym ATTRIBUTE_UNUSED,
865
 
                                  bfd *obfd ATTRIBUTE_UNUSED,
866
 
                                  asymbol *osym ATTRIBUTE_UNUSED)
867
 
{
868
 
#if VMS_DEBUG
869
 
  vms_debug (1, "vms_bfd_copy_private_symbol_data (%p, %s, %p, %s)\n",
870
 
                 ibfd, isym->name, obfd, osym->name);
871
 
#endif
872
 
  return TRUE;
873
 
}
874
 
 
875
 
/* Part 4.3, core file.  */
876
 
 
877
 
/* Return a read-only string explaining which program was running
878
 
   when it failed and produced the core file abfd.  */
879
 
 
880
 
static char *
881
 
vms_core_file_failing_command (bfd * abfd ATTRIBUTE_UNUSED)
882
 
{
883
 
#if VMS_DEBUG
884
 
  vms_debug (1, "vms_core_file_failing_command (%p)\n", abfd);
885
 
#endif
886
 
  return NULL;
887
 
}
888
 
 
889
 
/* Returns the signal number which caused the core dump which
890
 
   generated the file the BFD abfd is attached to.  */
891
 
 
892
 
static int
893
 
vms_core_file_failing_signal (bfd * abfd ATTRIBUTE_UNUSED)
894
 
{
895
 
#if VMS_DEBUG
896
 
  vms_debug (1, "vms_core_file_failing_signal (%p)\n", abfd);
897
 
#endif
898
 
  return 0;
899
 
}
900
 
 
901
 
/* Return TRUE if the core file attached to core_bfd was generated
902
 
   by a run of the executable file attached to exec_bfd, FALSE otherwise.  */
903
 
 
904
 
static bfd_boolean
905
 
vms_core_file_matches_executable_p (bfd * abfd ATTRIBUTE_UNUSED,
906
 
                                    bfd *bbfd ATTRIBUTE_UNUSED)
907
 
{
908
 
#if VMS_DEBUG
909
 
  vms_debug (1, "vms_core_file_matches_executable_p (%p, %p)\n", abfd, bbfd);
910
 
#endif
911
 
  return FALSE;
912
 
}
913
 
 
914
 
/* Part 4.4, archive.  */
915
 
 
916
 
/* ???  do something with an archive map.
917
 
   Return FALSE on error, TRUE otherwise.  */
918
 
 
919
 
static bfd_boolean
920
 
vms_slurp_armap (bfd * abfd ATTRIBUTE_UNUSED)
921
 
{
922
 
#if VMS_DEBUG
923
 
  vms_debug (1, "vms_slurp_armap (%p)\n", abfd);
924
 
#endif
925
 
  return FALSE;
926
 
}
927
 
 
928
 
/* ???  do something with an extended name table.
929
 
   Return FALSE on error, TRUE otherwise.  */
930
 
 
931
 
static bfd_boolean
932
 
vms_slurp_extended_name_table (bfd * abfd ATTRIBUTE_UNUSED)
933
 
{
934
 
#if VMS_DEBUG
935
 
  vms_debug (1, "vms_slurp_extended_name_table (%p)\n", abfd);
936
 
#endif
937
 
  return FALSE;
938
 
}
939
 
 
940
 
/* ???  do something with an extended name table.
941
 
   Return FALSE on error, TRUE otherwise.  */
942
 
 
943
 
static bfd_boolean
944
 
vms_construct_extended_name_table (bfd * abfd ATTRIBUTE_UNUSED,
945
 
                                   char **tabloc ATTRIBUTE_UNUSED,
946
 
                                   bfd_size_type *tablen ATTRIBUTE_UNUSED,
947
 
                                   const char **name ATTRIBUTE_UNUSED)
948
 
{
949
 
#if VMS_DEBUG
950
 
  vms_debug (1, "vms_construct_extended_name_table (%p)\n", abfd);
951
 
#endif
952
 
  return FALSE;
953
 
}
954
 
 
955
 
/* Truncate the name of an archive to match system-dependent restrictions.  */
956
 
 
957
 
static void
958
 
vms_truncate_arname (bfd * abfd ATTRIBUTE_UNUSED,
959
 
                     const char *pathname ATTRIBUTE_UNUSED,
960
 
                     char *arhdr ATTRIBUTE_UNUSED)
961
 
{
962
 
#if VMS_DEBUG
963
 
  vms_debug (1, "vms_truncate_arname (%p, %s, %s)\n", abfd, pathname, arhdr);
964
 
#endif
965
 
}
966
 
 
967
 
/* ???  write archive map.  */
968
 
 
969
 
static bfd_boolean
970
 
vms_write_armap (bfd *arch ATTRIBUTE_UNUSED,
971
 
                 unsigned int elength ATTRIBUTE_UNUSED,
972
 
                 struct orl *map ATTRIBUTE_UNUSED,
973
 
                 unsigned int orl_count ATTRIBUTE_UNUSED,
974
 
                 int stridx ATTRIBUTE_UNUSED)
975
 
{
976
 
#if VMS_DEBUG
977
 
  vms_debug (1, "vms_write_armap (%p, %d, %p, %d %d)\n",
978
 
        arch, elength, map, orl_count, stridx);
979
 
#endif
980
 
  return TRUE;
981
 
}
982
 
 
983
 
/* Read archive header ???  */
984
 
 
985
 
static void *
986
 
vms_read_ar_hdr (bfd * abfd ATTRIBUTE_UNUSED)
987
 
{
988
 
#if VMS_DEBUG
989
 
  vms_debug (1, "vms_read_ar_hdr (%p)\n", abfd);
990
 
#endif
991
 
  return NULL;
992
 
}
993
 
 
994
 
/* Provided a BFD, @var{archive}, containing an archive and NULL, open
995
 
   an input BFD on the first contained element and returns that.
996
 
   Subsequent calls should pass the archive and the previous return value
997
 
   to return a created BFD to the next contained element.
998
 
   NULL is returned when there are no more.  */
999
 
 
1000
 
static bfd *
1001
 
vms_openr_next_archived_file (bfd *arch ATTRIBUTE_UNUSED,
1002
 
                              bfd *prev ATTRIBUTE_UNUSED)
1003
 
{
1004
 
#if VMS_DEBUG
1005
 
  vms_debug (1, "vms_openr_next_archived_file (%p, %p)\n", arch, prev);
1006
 
#endif
1007
 
  return NULL;
1008
 
}
1009
 
 
1010
 
/* Return the BFD which is referenced by the symbol in ABFD indexed by
1011
 
   INDEX.  INDEX should have been returned by bfd_get_next_mapent.  */
1012
 
 
1013
 
static bfd *
1014
 
vms_get_elt_at_index (bfd * abfd, symindex index)
1015
 
{
1016
 
#if VMS_DEBUG
1017
 
  vms_debug (1, "vms_get_elt_at_index (%p, %p)\n", abfd, index);
1018
 
#endif
1019
 
  return _bfd_generic_get_elt_at_index (abfd, index);
1020
 
}
1021
 
 
1022
 
/* ???
1023
 
   -> bfd_generic_stat_arch_elt.  */
1024
 
 
1025
 
static int
1026
 
vms_generic_stat_arch_elt (bfd * abfd, struct stat *st)
1027
 
{
1028
 
#if VMS_DEBUG
1029
 
  vms_debug (1, "vms_generic_stat_arch_elt (%p, %p)\n", abfd, st);
1030
 
#endif
1031
 
  return bfd_generic_stat_arch_elt (abfd, st);
1032
 
}
1033
 
 
1034
 
/* This is a new function in bfd 2.5.  */
1035
 
 
1036
 
static bfd_boolean
1037
 
vms_update_armap_timestamp (bfd * abfd ATTRIBUTE_UNUSED)
1038
 
{
1039
 
#if VMS_DEBUG
1040
 
  vms_debug (1, "vms_update_armap_timestamp (%p)\n", abfd);
1041
 
#endif
1042
 
  return TRUE;
1043
 
}
1044
 
 
1045
674
/* Part 4.5, symbols.  */
1046
675
 
1047
676
/* Return the number of bytes required to store a vector of pointers
1052
681
static long
1053
682
vms_get_symtab_upper_bound (bfd * abfd)
1054
683
{
1055
 
#if VMS_DEBUG
1056
 
  vms_debug (1, "vms_get_symtab_upper_bound (%p), %d symbols\n", abfd, PRIV (gsd_sym_count));
1057
 
#endif
 
684
  vms_debug2 ((1, "vms_get_symtab_upper_bound (%p), %d symbols\n",
 
685
               abfd, PRIV (gsd_sym_count)));
 
686
 
1058
687
  return (PRIV (gsd_sym_count) + 1) * sizeof (asymbol *);
1059
688
}
1060
689
 
1084
713
static long
1085
714
vms_canonicalize_symtab (bfd * abfd, asymbol **symbols)
1086
715
{
1087
 
#if VMS_DEBUG
1088
 
  vms_debug (1, "vms_canonicalize_symtab (%p, <ret>)\n", abfd);
1089
 
#endif
 
716
  vms_debug2 ((1, "vms_canonicalize_symtab (%p, <ret>)\n", abfd));
1090
717
 
1091
718
  /* Init counter.  */
1092
719
  copy_symbols (NULL, abfd);
1111
738
                  asymbol *symbol,
1112
739
                  bfd_print_symbol_type how)
1113
740
{
1114
 
#if VMS_DEBUG
1115
 
  vms_debug (1, "vms_print_symbol (%p, %p, %p, %d)\n", abfd, file, symbol, how);
1116
 
#endif
 
741
  vms_debug2 ((1, "vms_print_symbol (%p, %p, %p, %d)\n",
 
742
               abfd, file, symbol, how));
1117
743
 
1118
744
  switch (how)
1119
745
    {
1155
781
{
1156
782
  asection *sec;
1157
783
 
1158
 
#if VMS_DEBUG
1159
 
  vms_debug (1, "vms_get_symbol_info (%p, %p, %p)\n", abfd, symbol, ret);
1160
 
#endif
 
784
  vms_debug2 ((1, "vms_get_symbol_info (%p, %p, %p)\n", abfd, symbol, ret));
1161
785
 
1162
786
  sec = symbol->section;
1163
787
 
1197
821
vms_bfd_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED,
1198
822
                             const char *name)
1199
823
{
1200
 
#if VMS_DEBUG
1201
 
  vms_debug (1, "vms_bfd_is_local_label_name (%p, %s)\n", abfd, name);
1202
 
#endif
 
824
  vms_debug2 ((1, "vms_bfd_is_local_label_name (%p, %s)\n", abfd, name));
1203
825
  return name[0] == '$';
1204
826
}
1205
827
 
1206
 
/* Get source line number for symbol.  */
1207
 
 
1208
 
static alent *
1209
 
vms_get_lineno (bfd * abfd ATTRIBUTE_UNUSED,
1210
 
                asymbol *symbol ATTRIBUTE_UNUSED)
1211
 
{
1212
 
#if VMS_DEBUG
1213
 
  vms_debug (1, "vms_get_lineno (%p, %p)\n", abfd, symbol);
1214
 
#endif
1215
 
  return NULL;
1216
 
}
1217
 
 
1218
828
/* Provided a BFD, a section and an offset into the section, calculate and
1219
829
   return the name of the source file and the line nearest to the wanted
1220
830
   location.  */
1228
838
                       const char **func ATTRIBUTE_UNUSED,
1229
839
                       unsigned int *line ATTRIBUTE_UNUSED)
1230
840
{
1231
 
#if VMS_DEBUG
1232
 
  vms_debug (1, "vms_find_nearest_line (%p, %s, %p, %ld, <ret>, <ret>, <ret>)\n",
1233
 
              abfd, section->name, symbols, (long int)offset);
1234
 
#endif
 
841
  vms_debug2 ((1, "vms_find_nearest_line (%p, %s, %p, %ld, ...)\n",
 
842
               abfd, section->name, symbols, (long int)offset));
1235
843
  return _bfd_vms_find_nearest_dst_line (abfd, section, symbols, offset, file, func, line);
1236
844
}
1237
845
 
1238
 
static bfd_boolean
1239
 
vms_find_inliner_info (bfd * abfd ATTRIBUTE_UNUSED,
1240
 
                       const char **file ATTRIBUTE_UNUSED,
1241
 
                       const char **func ATTRIBUTE_UNUSED,
1242
 
                       unsigned int *line ATTRIBUTE_UNUSED)
1243
 
{
1244
 
#if VMS_DEBUG
1245
 
  vms_debug (1, "vms_find_inliner_info (%p, <ret>, <ret>, <ret>)\n",
1246
 
             abfd);
1247
 
#endif
1248
 
  return FALSE;
1249
 
}
1250
 
 
1251
 
/* Back-door to allow format-aware applications to create debug symbols
1252
 
   while using BFD for everything else.  Currently used by the assembler
1253
 
   when creating COFF files.  */
1254
 
 
1255
 
static asymbol *
1256
 
vms_bfd_make_debug_symbol (bfd * abfd ATTRIBUTE_UNUSED,
1257
 
                           void *ptr ATTRIBUTE_UNUSED,
1258
 
                           unsigned long size ATTRIBUTE_UNUSED)
1259
 
{
1260
 
#if VMS_DEBUG
1261
 
  vms_debug (1, "vms_bfd_make_debug_symbol (%p, %p, %ld)\n", abfd, ptr, size);
1262
 
#endif
1263
 
  return NULL;
1264
 
}
1265
 
 
1266
 
/* Read minisymbols.  For minisymbols, we use the unmodified a.out
1267
 
   symbols.  The minisymbol_to_symbol function translates these into
1268
 
   BFD asymbol structures.  */
1269
 
 
1270
 
static long
1271
 
vms_read_minisymbols (bfd * abfd,
1272
 
                      bfd_boolean dynamic,
1273
 
                      void * *minisymsp,
1274
 
                      unsigned int *sizep)
1275
 
{
1276
 
#if VMS_DEBUG
1277
 
  vms_debug (1, "vms_read_minisymbols (%p, %d, %p, %d)\n", abfd, dynamic, minisymsp, *sizep);
1278
 
#endif
1279
 
  return _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep);
1280
 
}
1281
 
 
1282
 
/* Convert a minisymbol to a BFD asymbol.  A minisymbol is just an
1283
 
   unmodified a.out symbol.  The SYM argument is a structure returned
1284
 
   by bfd_make_empty_symbol, which we fill in here.  */
1285
 
 
1286
 
static asymbol *
1287
 
vms_minisymbol_to_symbol (bfd * abfd,
1288
 
                          bfd_boolean dynamic,
1289
 
                          const void * minisym,
1290
 
                          asymbol *sym)
1291
 
{
1292
 
#if VMS_DEBUG
1293
 
  vms_debug (1, "vms_minisymbol_to_symbol (%p, %d, %p, %p)\n", abfd, dynamic, minisym, sym);
1294
 
#endif
1295
 
  return _bfd_generic_minisymbol_to_symbol (abfd, dynamic, minisym, sym);
1296
 
}
1297
 
 
1298
846
/* Part 4.6, relocations.  */
1299
847
 
1300
848
/* Allocate the reloc buffer for the specified section.  */
1388
936
          err = _bfd_vms_slurp_relocs (abfd);
1389
937
          if (err != 0)
1390
938
            {
1391
 
#if VMS_DEBUG
1392
 
              vms_debug (2, "slurp relocs failed with %d\n", err);
1393
 
#endif
 
939
              vms_debug2 ((2, "slurp relocs failed with %d\n", err));
1394
940
              return FALSE;
1395
941
            }
1396
942
        }
1406
952
  err = _bfd_vms_decode_relocs (abfd, internal_relocs, section, symbols);
1407
953
  if (err != 0)
1408
954
    {
1409
 
#if VMS_DEBUG
1410
 
      vms_debug (2, "decode relocs failed with %d\n", err);
1411
 
#endif
 
955
      vms_debug2 ((2, "decode relocs failed with %d\n", err));
1412
956
      return FALSE;
1413
957
    }
1414
958
 
1427
971
static long
1428
972
vms_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED, asection *section)
1429
973
{
1430
 
  return (section->reloc_count + 1) * sizeof (arelent *);  
 
974
  return (section->reloc_count + 1) * sizeof (arelent *);
1431
975
}
1432
976
 
1433
977
/* Convert relocations from VMS (external) form into BFD internal
1770
1314
{
1771
1315
  int alpha_type;
1772
1316
 
1773
 
#if VMS_DEBUG
1774
 
  vms_debug (1, "vms_bfd_reloc_type_lookup (%p, %d)\t", abfd, code);
1775
 
#endif
 
1317
  vms_debug2 ((1, "vms_bfd_reloc_type_lookup (%p, %d)\t", abfd, code));
1776
1318
 
1777
1319
  switch (code)
1778
1320
    {
1795
1337
        (*_bfd_error_handler) ("reloc (%d) is *UNKNOWN*", code);
1796
1338
        return NULL;
1797
1339
    }
1798
 
#if VMS_DEBUG
1799
 
  vms_debug (2, "reloc is %s\n", alpha_howto_table[alpha_type].name);
1800
 
#endif
 
1340
  vms_debug2 ((2, "reloc is %s\n", alpha_howto_table[alpha_type].name));
1801
1341
  return & alpha_howto_table[alpha_type];
1802
1342
}
1803
1343
 
1828
1368
                   enum bfd_architecture arch ATTRIBUTE_UNUSED,
1829
1369
                   unsigned long mach ATTRIBUTE_UNUSED)
1830
1370
{
1831
 
#if VMS_DEBUG
1832
 
  vms_debug (1, "vms_set_arch_mach (%p, %d, %ld)\n", abfd, arch, mach);
1833
 
#endif
 
1371
  vms_debug2 ((1, "vms_set_arch_mach (%p, %d, %ld)\n", abfd, arch, mach));
1834
1372
 
1835
1373
  if (arch != bfd_arch_alpha
1836
1374
      && arch != bfd_arch_vax
1873
1411
  return TRUE;
1874
1412
}
1875
1413
 
1876
 
/* Part 4.8, linker.  */
1877
 
 
1878
 
/* Get the size of the section headers.  */
1879
 
 
1880
 
static int
1881
 
vms_sizeof_headers (bfd * abfd ATTRIBUTE_UNUSED,
1882
 
                    struct bfd_link_info *info ATTRIBUTE_UNUSED)
1883
 
{
1884
 
#if VMS_DEBUG
1885
 
  vms_debug (1, "vms_sizeof_headers (%p, %s)\n", abfd, (reloc)?"True":"False");
1886
 
#endif
1887
 
  return 0;
1888
 
}
1889
 
 
1890
 
/* Provides default handling of relocation effort for back ends
1891
 
   which can't be bothered to do it efficiently.  */
1892
 
 
1893
 
static bfd_byte *
1894
 
vms_bfd_get_relocated_section_contents (bfd * abfd ATTRIBUTE_UNUSED,
1895
 
                                        struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
1896
 
                                        struct bfd_link_order *link_order ATTRIBUTE_UNUSED,
1897
 
                                        bfd_byte *data ATTRIBUTE_UNUSED,
1898
 
                                        bfd_boolean relocatable ATTRIBUTE_UNUSED,
1899
 
                                        asymbol **symbols ATTRIBUTE_UNUSED)
1900
 
{
1901
 
#if VMS_DEBUG
1902
 
  vms_debug (1, "vms_bfd_get_relocated_section_contents (%p, %p, %p, %p, %s, %p)\n",
1903
 
             abfd, link_info, link_order, data, (relocatable)?"True":"False", symbols);
1904
 
#endif
1905
 
  return NULL;
1906
 
}
1907
 
 
1908
 
/* ???  */
1909
 
 
1910
 
static bfd_boolean
1911
 
vms_bfd_relax_section (bfd * abfd ATTRIBUTE_UNUSED,
1912
 
                       asection *section ATTRIBUTE_UNUSED,
1913
 
                       struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
1914
 
                       bfd_boolean *again ATTRIBUTE_UNUSED)
1915
 
{
1916
 
  if (link_info->relocatable)
1917
 
    (*link_info->callbacks->einfo)
1918
 
      (_("%P%F: --relax and -r may not be used together\n"));
1919
 
 
1920
 
#if VMS_DEBUG
1921
 
  vms_debug (1, "vms_bfd_relax_section (%p, %s, %p, <ret>)\n",
1922
 
             abfd, section->name, link_info);
1923
 
#endif
1924
 
  return TRUE;
1925
 
}
1926
 
 
1927
 
static bfd_boolean
1928
 
vms_bfd_gc_sections (bfd * abfd ATTRIBUTE_UNUSED,
1929
 
                     struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
1930
 
{
1931
 
#if VMS_DEBUG
1932
 
  vms_debug (1, "vms_bfd_gc_sections (%p, %p)\n", abfd, link_info);
1933
 
#endif
1934
 
  return TRUE;
1935
 
}
1936
 
 
1937
 
static bfd_boolean
1938
 
vms_bfd_merge_sections (bfd * abfd ATTRIBUTE_UNUSED,
1939
 
                        struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
1940
 
{
1941
 
#if VMS_DEBUG
1942
 
  vms_debug (1, "vms_bfd_merge_sections (%p, %p)\n", abfd, link_info);
1943
 
#endif
1944
 
  return TRUE;
1945
 
}
1946
 
 
1947
 
/* Create a hash table for the linker.  Different backends store
1948
 
   different information in this table.  */
1949
 
 
1950
 
static struct bfd_link_hash_table *
1951
 
vms_bfd_link_hash_table_create (bfd * abfd ATTRIBUTE_UNUSED)
1952
 
{
1953
 
#if VMS_DEBUG
1954
 
  vms_debug (1, "vms_bfd_link_hash_table_create (%p)\n", abfd);
1955
 
#endif
1956
 
  return NULL;
1957
 
}
1958
 
 
1959
 
/* Free a linker hash table.  */
1960
 
 
1961
 
static void
1962
 
vms_bfd_link_hash_table_free (struct bfd_link_hash_table *hash ATTRIBUTE_UNUSED)
1963
 
{
1964
 
#if VMS_DEBUG
1965
 
  vms_debug (1, "vms_bfd_link_hash_table_free (%p)\n", abfd);
1966
 
#endif
1967
 
}
1968
 
 
1969
 
/* Add symbols from this object file into the hash table.  */
1970
 
 
1971
 
static bfd_boolean
1972
 
vms_bfd_link_add_symbols (bfd * abfd ATTRIBUTE_UNUSED,
1973
 
                          struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
1974
 
{
1975
 
#if VMS_DEBUG
1976
 
  vms_debug (1, "vms_bfd_link_add_symbols (%p, %p)\n", abfd, link_info);
1977
 
#endif
1978
 
  return FALSE;
1979
 
}
1980
 
 
1981
 
/* Do a link based on the link_order structures attached to each
1982
 
   section of the BFD.  */
1983
 
 
1984
 
static bfd_boolean
1985
 
vms_bfd_final_link (bfd * abfd ATTRIBUTE_UNUSED,
1986
 
                    struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
1987
 
{
1988
 
#if VMS_DEBUG
1989
 
  vms_debug (1, "vms_bfd_final_link (%p, %p)\n", abfd, link_info);
1990
 
#endif
1991
 
  return TRUE;
1992
 
}
1993
 
 
1994
 
/* Should this section be split up into smaller pieces during linking.  */
1995
 
 
1996
 
static bfd_boolean
1997
 
vms_bfd_link_split_section (bfd * abfd ATTRIBUTE_UNUSED,
1998
 
                            asection *section ATTRIBUTE_UNUSED)
1999
 
{
2000
 
#if VMS_DEBUG
2001
 
  vms_debug (1, "vms_bfd_link_split_section (%p, %s)\n", abfd, section->name);
2002
 
#endif
2003
 
  return FALSE;
2004
 
}
2005
 
 
2006
 
/* Part 4.9, dynamic symbols and relocations.  */
2007
 
 
2008
 
/* Get the amount of memory required to hold the dynamic symbols.  */
2009
 
 
2010
 
static long
2011
 
vms_get_dynamic_symtab_upper_bound (bfd * abfd ATTRIBUTE_UNUSED)
2012
 
{
2013
 
#if VMS_DEBUG
2014
 
  vms_debug (1, "vms_get_dynamic_symtab_upper_bound (%p)\n", abfd);
2015
 
#endif
2016
 
  return 0L;
2017
 
}
2018
 
 
2019
 
static bfd_boolean
2020
 
vms_bfd_print_private_bfd_data (bfd * abfd ATTRIBUTE_UNUSED,
2021
 
                                void *file ATTRIBUTE_UNUSED)
2022
 
{
2023
 
#if VMS_DEBUG
2024
 
  vms_debug (1, "vms_bfd_print_private_bfd_data (%p)\n", abfd);
2025
 
#endif
2026
 
  return FALSE;
2027
 
}
2028
 
 
2029
 
/* Read in the dynamic symbols.  */
2030
 
 
2031
 
static long
2032
 
vms_canonicalize_dynamic_symtab (bfd * abfd ATTRIBUTE_UNUSED,
2033
 
                                 asymbol **symbols ATTRIBUTE_UNUSED)
2034
 
{
2035
 
#if VMS_DEBUG
2036
 
  vms_debug (1, "vms_canonicalize_dynamic_symtab (%p, <ret>)\n", abfd);
2037
 
#endif
2038
 
  return 0L;
2039
 
}
2040
 
 
2041
 
/* Get the amount of memory required to hold the dynamic relocs.  */
2042
 
 
2043
 
static long
2044
 
vms_get_dynamic_reloc_upper_bound (bfd * abfd ATTRIBUTE_UNUSED)
2045
 
{
2046
 
#if VMS_DEBUG
2047
 
  vms_debug (1, "vms_get_dynamic_reloc_upper_bound (%p)\n", abfd);
2048
 
#endif
2049
 
  return 0L;
2050
 
}
2051
 
 
2052
 
/* Read in the dynamic relocs.  */
2053
 
 
2054
 
static long
2055
 
vms_canonicalize_dynamic_reloc (bfd * abfd ATTRIBUTE_UNUSED,
2056
 
                                arelent **arel ATTRIBUTE_UNUSED,
2057
 
                                asymbol **symbols ATTRIBUTE_UNUSED)
2058
 
{
2059
 
#if VMS_DEBUG
2060
 
  vms_debug (1, "vms_canonicalize_dynamic_reloc (%p)\n", abfd);
2061
 
#endif
2062
 
  return 0L;
 
1414
static bfd_boolean
 
1415
vms_bfd_print_private_bfd_data (bfd *abfd, void *ptr)
 
1416
{
 
1417
  FILE *file = (FILE *)ptr;
 
1418
 
 
1419
  fprintf (file, _("structure level: %d\n"), PRIV(hdr_data.hdr_b_strlvl));
 
1420
  fprintf (file, _("module name    : %s\n"), PRIV(hdr_data.hdr_t_name));
 
1421
  fprintf (file, _("module version : %s\n"), PRIV(hdr_data.hdr_t_version));
 
1422
  fprintf (file, _("module date    : %s\n"), PRIV(hdr_data.hdr_t_date));
 
1423
  fprintf (file, _("language name  : %s\n"), PRIV(hdr_data.hdr_c_lnm));
 
1424
  fprintf (file, _("source files   : %s\n"), PRIV(hdr_data.hdr_c_src));
 
1425
  fprintf (file, _("title          : %s\n"), PRIV(hdr_data.hdr_c_ttl));
 
1426
 
 
1427
  return TRUE;
2063
1428
}
2064
1429
 
2065
1430
const bfd_target vms_alpha_vec =
2085
1450
  bfd_getl16, bfd_getl_signed_16, bfd_putl16,
2086
1451
 
2087
1452
  {_bfd_dummy_target, vms_object_p,             /* bfd_check_format.  */
2088
 
   vms_archive_p, _bfd_dummy_target},
 
1453
   _bfd_dummy_target, _bfd_dummy_target},
2089
1454
  {bfd_false, vms_mkobject,                     /* bfd_set_format.  */
2090
 
   _bfd_generic_mkarchive, bfd_false},
 
1455
   bfd_false, bfd_false},
2091
1456
  {bfd_false, vms_write_object_contents,        /* bfd_write_contents.  */
2092
 
   _bfd_write_archive_contents, bfd_false},
 
1457
   bfd_false, bfd_false},
2093
1458
 
2094
1459
  BFD_JUMP_TABLE_GENERIC (vms),
2095
1460
  BFD_JUMP_TABLE_COPY (vms),
2096
 
  BFD_JUMP_TABLE_CORE (vms),
2097
 
  BFD_JUMP_TABLE_ARCHIVE (vms),
 
1461
  BFD_JUMP_TABLE_CORE (_bfd_nocore),
 
1462
  BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
2098
1463
  BFD_JUMP_TABLE_SYMBOLS (vms),
2099
1464
  BFD_JUMP_TABLE_RELOCS (vms),
2100
1465
  BFD_JUMP_TABLE_WRITE (vms),
2101
 
  BFD_JUMP_TABLE_LINK (vms),
2102
 
  BFD_JUMP_TABLE_DYNAMIC (vms),
 
1466
  BFD_JUMP_TABLE_LINK (_bfd_nolink),
 
1467
  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
2103
1468
 
2104
1469
  NULL,
2105
1470
 
2131
1496
  bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Hdrs.  */
2132
1497
 
2133
1498
  {_bfd_dummy_target, vms_object_p,             /* bfd_check_format.  */
2134
 
   vms_archive_p, _bfd_dummy_target},
 
1499
   _bfd_dummy_target, _bfd_dummy_target},
2135
1500
  {bfd_false, vms_mkobject,                     /* bfd_set_format.  */
2136
 
   _bfd_generic_mkarchive, bfd_false},
 
1501
   bfd_false, bfd_false},
2137
1502
  {bfd_false, vms_write_object_contents,        /* bfd_write_contents.  */
2138
 
   _bfd_write_archive_contents, bfd_false},
 
1503
   bfd_false, bfd_false},
2139
1504
 
2140
1505
  BFD_JUMP_TABLE_GENERIC (vms),
2141
1506
  BFD_JUMP_TABLE_COPY (vms),
2142
 
  BFD_JUMP_TABLE_CORE (vms),
2143
 
  BFD_JUMP_TABLE_ARCHIVE (vms),
 
1507
  BFD_JUMP_TABLE_CORE (_bfd_nocore),
 
1508
  BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
2144
1509
  BFD_JUMP_TABLE_SYMBOLS (vms),
2145
1510
  BFD_JUMP_TABLE_RELOCS (vms),
2146
1511
  BFD_JUMP_TABLE_WRITE (vms),
2147
 
  BFD_JUMP_TABLE_LINK (vms),
2148
 
  BFD_JUMP_TABLE_DYNAMIC (vms),
 
1512
  BFD_JUMP_TABLE_LINK (_bfd_nolink),
 
1513
  BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
2149
1514
 
2150
1515
  NULL,
2151
1516