1 /* vms-misc.c -- BFD back-end for VMS/VAX (openVMS/VAX) and
2 EVAX (openVMS/Alpha) files.
3 Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
4 2007, 2008, 2009 Free Software Foundation, Inc.
6 Miscellaneous functions.
8 Written by Klaus K"ampf (kkaempf@rmi.de)
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23 MA 02110-1301, USA. */
36 #define MIN(a,b) ((a) < (b) ? (a) : (b))
38 static int hash_string
PARAMS ((const char *));
39 static asymbol
*new_symbol
PARAMS ((bfd
*, char *));
40 static void maybe_adjust_record_pointer_for_object
PARAMS ((bfd
*));
41 static int vms_get_remaining_object_record
PARAMS ((bfd
*, int ));
42 static int vms_get_remaining_image_record
PARAMS ((bfd
*, int ));
45 /* Debug functions. */
47 /* Debug function for all vms extensions evaluates environment
48 variable VMS_DEBUG for a numerical value on the first call all
49 error levels below this value are printed:
52 1 toplevel bfd calls (functions from the bfd vector)
53 2 functions called by bfd calls
57 Level is also indentation level. Indentation is performed
61 _bfd_vms_debug (int level
, char *format
, ...)
63 static int min_level
= -1;
64 static FILE *output
= NULL
;
67 int abslvl
= (level
> 0) ? level
: - level
;
71 if ((eptr
= getenv ("VMS_DEBUG")) != NULL
)
73 min_level
= atoi (eptr
);
81 if (abslvl
> min_level
)
85 fprintf (output
, " ");
86 va_start (args
, format
);
87 vfprintf (output
, format
, args
);
93 hex dump 'size' bytes starting at 'ptr'. */
96 _bfd_hexdump (int level
,
101 unsigned char *lptr
= ptr
;
108 vms_debug (level
, "%08lx:", start
);
109 vms_debug (-level
, " %02x", *ptr
++);
114 while ((count
%16) != 0)
116 vms_debug (-level
, " ");
122 vms_debug (-level
, " ");
125 vms_debug (-level
, "%c", (*lptr
< 32)?'.':*lptr
);
128 vms_debug (-level
, "\n");
132 vms_debug (-level
, "\n");
138 These are needed when reading an object file. */
140 /* Allocate new vms_hash_entry
141 keep the symbol name and a pointer to the bfd symbol in the table. */
143 struct bfd_hash_entry
*
144 _bfd_vms_hash_newfunc (struct bfd_hash_entry
*entry
,
145 struct bfd_hash_table
*table
,
148 vms_symbol_entry
*ret
;
151 vms_debug (5, "_bfd_vms_hash_newfunc (%p, %p, %s)\n", entry
, table
, string
);
156 ret
= (vms_symbol_entry
*)
157 bfd_hash_allocate (table
, sizeof (vms_symbol_entry
));
160 bfd_set_error (bfd_error_no_memory
);
163 entry
= (struct bfd_hash_entry
*) ret
;
166 /* Call the allocation method of the base class. */
167 ret
= (vms_symbol_entry
*) bfd_hash_newfunc (entry
, table
, string
);
169 vms_debug (6, "_bfd_vms_hash_newfunc ret %p\n", ret
);
174 return (struct bfd_hash_entry
*)ret
;
177 /* Object file input functions. */
179 /* Return type and size from record header (buf) on Alpha. */
182 _bfd_vms_get_header_values (bfd
* abfd ATTRIBUTE_UNUSED
,
188 *type
= bfd_getl16 (buf
);
191 *size
= bfd_getl16 (buf
+2);
194 vms_debug (10, "_bfd_vms_get_header_values type %x, size %x\n",
195 type
? *type
: 0, size
? *size
: 0);
199 /* Get next record from object file to vms_buf.
200 Set PRIV(buf_size) and return it
202 This is a little tricky since it should be portable.
204 The openVMS object file has 'variable length' which means that
205 read() returns data in chunks of (hopefully) correct and expected
206 size. The linker (and other tools on VMS) depend on that. Unix
207 doesn't know about 'formatted' files, so reading and writing such
208 an object file in a Unix environment is not trivial.
210 With the tool 'file' (available on all VMS FTP sites), one
211 can view and change the attributes of a file. Changing from
212 'variable length' to 'fixed length, 512 bytes' reveals the
213 record size at the first 2 bytes of every record. The same
214 may happen during the transfer of object files from VMS to Unix,
215 at least with UCX, the DEC implementation of TCP/IP.
217 The VMS format repeats the size at bytes 2 & 3 of every record.
219 On the first call (file_format == FF_UNKNOWN) we check if
220 the first and the third byte pair (!) of the record match.
221 If they do it's an object file in an Unix environment or with
222 wrong attributes (FF_FOREIGN), else we should be in a VMS
223 environment where read() returns the record size (FF_NATIVE).
225 Reading is always done in 2 steps:
226 1. first just the record header is read and the size extracted,
227 2. then the read buffer is adjusted and the remaining bytes are
230 All file I/O is done on even file positions. */
232 #define VMS_OBJECT_ADJUSTMENT 2
235 maybe_adjust_record_pointer_for_object (bfd
*abfd
)
237 /* Set the file format once for all on the first invocation. */
238 if (PRIV (file_format
) == FF_UNKNOWN
)
240 if (PRIV (vms_rec
)[0] == PRIV (vms_rec
)[4]
241 && PRIV (vms_rec
)[1] == PRIV (vms_rec
)[5])
242 PRIV (file_format
) = FF_FOREIGN
;
244 PRIV (file_format
) = FF_NATIVE
;
247 /* The adjustment is needed only in an Unix environment. */
248 if (PRIV (file_format
) == FF_FOREIGN
)
249 PRIV (vms_rec
) += VMS_OBJECT_ADJUSTMENT
;
252 /* Get first record from file and return the file type. */
255 _bfd_vms_get_first_record (bfd
*abfd
)
257 unsigned int test_len
;
260 vms_debug (8, "_bfd_vms_get_first_record\n");
266 /* Minimum is 6 bytes for objects (2 bytes size, 2 bytes record id,
267 2 bytes size repeated) and 12 bytes for images (4 bytes major id,
268 4 bytes minor id, 4 bytes length). */
271 /* Size the main buffer. */
272 if (PRIV (buf_size
) == 0)
274 /* On VAX there's no size information in the record, so
275 start with OBJ_S_C_MAXRECSIZ. */
276 bfd_size_type amt
= (test_len
? test_len
: OBJ_S_C_MAXRECSIZ
);
277 PRIV (vms_buf
) = (unsigned char *) bfd_malloc (amt
);
278 PRIV (buf_size
) = amt
;
281 /* Initialize the record pointer. */
282 PRIV (vms_rec
) = PRIV (vms_buf
);
284 /* We only support modules on VAX. */
287 if (vms_get_remaining_object_record (abfd
, test_len
) <= 0)
291 vms_debug (2, "file type is VAX module\n");
297 if (bfd_bread (PRIV (vms_buf
), test_len
, abfd
) != test_len
)
299 bfd_set_error (bfd_error_file_truncated
);
303 /* Is it an image? */
304 if ((bfd_getl32 (PRIV (vms_rec
)) == EIHD_S_K_MAJORID
)
305 && (bfd_getl32 (PRIV (vms_rec
) + 4) == EIHD_S_K_MINORID
))
307 if (vms_get_remaining_image_record (abfd
, test_len
) <= 0)
311 vms_debug (2, "file type is image\n");
317 /* Assume it's a module and adjust record pointer if necessary. */
318 maybe_adjust_record_pointer_for_object (abfd
);
320 /* But is it really a module? */
321 if (bfd_getl16 (PRIV (vms_rec
)) <= EOBJ_S_C_MAXRECTYP
322 && bfd_getl16 (PRIV (vms_rec
) + 2) <= EOBJ_S_C_MAXRECSIZ
)
324 if (vms_get_remaining_object_record (abfd
, test_len
) <= 0)
328 vms_debug (2, "file type is module\n");
335 vms_debug (2, "file type is unknown\n");
341 /* Implement step #1 of the object record reading procedure.
342 Return the record type or -1 on failure. */
345 _bfd_vms_get_object_record (bfd
*abfd
)
347 unsigned int test_len
;
351 vms_debug (8, "_bfd_vms_get_obj_record\n");
360 /* See _bfd_vms_get_first_record. */
363 /* Skip odd alignment byte. */
364 if (bfd_tell (abfd
) & 1)
366 if (bfd_bread (PRIV (vms_buf
), 1, abfd
) != 1)
368 bfd_set_error (bfd_error_file_truncated
);
371 /* Alignment byte may be present or not. This is not easy to
372 detect but all object record types are not 0 (on Alpha VMS).
373 We also hope that pad byte is 0. */
374 if (PRIV (vms_buf
)[0])
378 /* Read the record header */
379 if (bfd_bread (PRIV (vms_buf
) + off
, test_len
- off
, abfd
)
382 bfd_set_error (bfd_error_file_truncated
);
386 /* Reset the record pointer. */
387 PRIV (vms_rec
) = PRIV (vms_buf
);
388 maybe_adjust_record_pointer_for_object (abfd
);
391 if (vms_get_remaining_object_record (abfd
, test_len
) <= 0)
395 type
= PRIV (vms_rec
) [0];
397 type
= bfd_getl16 (PRIV (vms_rec
));
400 vms_debug (8, "_bfd_vms_get_obj_record: rec %p, size %d, type %d\n",
401 PRIV (vms_rec
), PRIV (rec_size
), type
);
407 /* Implement step #2 of the object record reading procedure.
408 Return the size of the record or 0 on failure. */
411 vms_get_remaining_object_record (bfd
*abfd
, int read_so_far
)
414 vms_debug (8, "vms_get_remaining_obj_record\n");
419 if (read_so_far
!= 0)
422 PRIV (rec_size
) = bfd_bread (PRIV (vms_buf
), PRIV (buf_size
), abfd
);
424 if (PRIV (rec_size
) <= 0)
426 bfd_set_error (bfd_error_file_truncated
);
430 /* Reset the record pointer. */
431 PRIV (vms_rec
) = PRIV (vms_buf
);
435 unsigned int to_read
;
437 /* Extract record size. */
438 PRIV (rec_size
) = bfd_getl16 (PRIV (vms_rec
) + 2);
440 if (PRIV (rec_size
) <= 0)
442 bfd_set_error (bfd_error_file_truncated
);
446 /* That's what the linker manual says. */
447 if (PRIV (rec_size
) > EOBJ_S_C_MAXRECSIZ
)
449 bfd_set_error (bfd_error_file_truncated
);
453 /* Take into account object adjustment. */
454 to_read
= PRIV (rec_size
);
455 if (PRIV (file_format
) == FF_FOREIGN
)
456 to_read
+= VMS_OBJECT_ADJUSTMENT
;
458 /* Adjust the buffer. */
459 if (to_read
> PRIV (buf_size
))
462 = (unsigned char *) bfd_realloc (PRIV (vms_buf
), to_read
);
463 if (PRIV (vms_buf
) == NULL
)
465 PRIV (buf_size
) = to_read
;
468 /* Read the remaining record. */
469 to_read
-= read_so_far
;
472 vms_debug (8, "vms_get_remaining_obj_record: to_read %d\n", to_read
);
475 if (bfd_bread (PRIV (vms_buf
) + read_so_far
, to_read
, abfd
) != to_read
)
477 bfd_set_error (bfd_error_file_truncated
);
481 /* Reset the record pointer. */
482 PRIV (vms_rec
) = PRIV (vms_buf
);
483 maybe_adjust_record_pointer_for_object (abfd
);
487 vms_debug (8, "vms_get_remaining_obj_record: size %d\n", PRIV (rec_size
));
490 return PRIV (rec_size
);
493 /* Implement step #2 of the record reading procedure for images.
494 Return the size of the record or 0 on failure. */
497 vms_get_remaining_image_record (bfd
*abfd
, int read_so_far
)
499 unsigned int to_read
;
502 /* Extract record size. */
503 PRIV (rec_size
) = bfd_getl32 (PRIV (vms_rec
) + EIHD_S_L_SIZE
);
505 if (PRIV (rec_size
) > PRIV (buf_size
))
507 PRIV (vms_buf
) = bfd_realloc (PRIV (vms_buf
), PRIV (rec_size
));
509 if (PRIV (vms_buf
) == NULL
)
511 bfd_set_error (bfd_error_no_memory
);
515 PRIV (buf_size
) = PRIV (rec_size
);
518 /* Read the remaining record. */
519 remaining
= PRIV (rec_size
) - read_so_far
;
520 to_read
= MIN (VMS_BLOCK_SIZE
- read_so_far
, remaining
);
522 while (remaining
> 0)
524 if (bfd_bread (PRIV (vms_buf
) + read_so_far
, to_read
, abfd
) != to_read
)
526 bfd_set_error (bfd_error_file_truncated
);
530 read_so_far
+= to_read
;
531 remaining
-= to_read
;
533 /* Eat trailing 0xff's. */
535 while (PRIV (vms_buf
) [read_so_far
- 1] == 0xff)
538 to_read
= MIN (VMS_BLOCK_SIZE
, remaining
);
541 /* Reset the record pointer. */
542 PRIV (vms_rec
) = PRIV (vms_buf
);
544 return PRIV (rec_size
);
547 /* Copy sized string (string with fixed size) to new allocated area
548 size is string size (size of record) */
551 _bfd_vms_save_sized_string (unsigned char *str
, int size
)
553 char *newstr
= bfd_malloc ((bfd_size_type
) size
+ 1);
557 strncpy (newstr
, (char *) str
, (size_t) size
);
563 /* Copy counted string (string with size at first byte) to new allocated area
564 ptr points to size byte on entry */
567 _bfd_vms_save_counted_string (unsigned char *ptr
)
571 return _bfd_vms_save_sized_string (ptr
, len
);
574 /* Stack routines for vms ETIR commands. */
576 /* Push value and section index. */
579 _bfd_vms_push (bfd
* abfd
, uquad val
, int psect
)
581 static int last_psect
;
584 vms_debug (4, "<push %016lx (%d) at %d>\n", val
, psect
, PRIV (stackptr
));
590 PRIV (stack
[PRIV (stackptr
)]).value
= val
;
591 PRIV (stack
[PRIV (stackptr
)]).psect
= last_psect
;
593 if (PRIV (stackptr
) >= STACKSIZE
)
595 bfd_set_error (bfd_error_bad_value
);
596 (*_bfd_error_handler
) (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr
));
601 /* Pop value and section index. */
604 _bfd_vms_pop (bfd
* abfd
, int *psect
)
608 if (PRIV (stackptr
) == 0)
610 bfd_set_error (bfd_error_bad_value
);
611 (*_bfd_error_handler
) (_("Stack underflow in _bfd_vms_pop"));
615 value
= PRIV (stack
[PRIV (stackptr
)]).value
;
616 if ((psect
!= NULL
) && (PRIV (stack
[PRIV (stackptr
)]).psect
>= 0))
617 *psect
= PRIV (stack
[PRIV (stackptr
)]).psect
;
620 vms_debug (4, "<pop %016lx(%d)>\n", value
, PRIV (stack
[PRIV (stackptr
)]).psect
);
626 /* Object output routines. */
628 /* Begin new record or record header
629 write 2 bytes rectype
630 write 2 bytes record length (filled in at flush)
631 write 2 bytes header type (ommitted if rechead == -1). */
634 _bfd_vms_output_begin (bfd
* abfd
, int rectype
, int rechead
)
637 vms_debug (6, "_bfd_vms_output_begin (type %d, head %d)\n", rectype
,
641 _bfd_vms_output_short (abfd
, (unsigned int) rectype
);
643 /* Save current output position to fill in length later. */
645 if (PRIV (push_level
) > 0)
646 PRIV (length_pos
) = PRIV (output_size
);
649 vms_debug (6, "_bfd_vms_output_begin: length_pos = %d\n",
653 /* Placeholder for length. */
654 _bfd_vms_output_short (abfd
, 0);
657 _bfd_vms_output_short (abfd
, (unsigned int) rechead
);
660 /* Set record/subrecord alignment. */
663 _bfd_vms_output_alignment (bfd
* abfd
, int alignto
)
666 vms_debug (6, "_bfd_vms_output_alignment (%d)\n", alignto
);
669 PRIV (output_alignment
) = alignto
;
672 /* Prepare for subrecord fields. */
675 _bfd_vms_output_push (bfd
* abfd
)
678 vms_debug (6, "vms_output_push (pushed_size = %d)\n", PRIV (output_size
));
682 PRIV (pushed_size
) = PRIV (output_size
);
685 /* End of subrecord fields. */
688 _bfd_vms_output_pop (bfd
* abfd
)
691 vms_debug (6, "vms_output_pop (pushed_size = %d)\n", PRIV (pushed_size
));
694 _bfd_vms_output_flush (abfd
);
695 PRIV (length_pos
) = 2;
698 vms_debug (6, "vms_output_pop: length_pos = %d\n", PRIV (length_pos
));
701 PRIV (pushed_size
) = 0;
705 /* Flush unwritten output, ends current record. */
708 _bfd_vms_output_flush (bfd
* abfd
)
710 int real_size
= PRIV (output_size
);
715 vms_debug (6, "_bfd_vms_output_flush (real_size = %d, pushed_size %d at lenpos %d)\n",
716 real_size
, PRIV (pushed_size
), PRIV (length_pos
));
719 if (PRIV (push_level
) > 0)
720 length
= real_size
- PRIV (pushed_size
);
726 aligncount
= (PRIV (output_alignment
)
727 - (length
% PRIV (output_alignment
))) % PRIV (output_alignment
);
730 vms_debug (6, "align: adding %d bytes\n", aligncount
);
733 while (aligncount
-- > 0)
735 PRIV (output_buf
)[real_size
++] = 0;
739 /* Put length to buffer. */
740 PRIV (output_size
) = PRIV (length_pos
);
741 _bfd_vms_output_short (abfd
, (unsigned int) length
);
743 if (PRIV (push_level
) == 0)
745 /* File is open in undefined (UDF) format on VMS, but ultimately will be
746 converted to variable length (VAR) format. VAR format has a length
747 word first which must be explicitly output in UDF format. */
748 bfd_bwrite (PRIV (output_buf
) + 2, 2, abfd
);
749 bfd_bwrite (PRIV (output_buf
), (size_t) real_size
, abfd
);
750 PRIV (output_size
) = 0;
754 PRIV (output_size
) = real_size
;
755 PRIV (pushed_size
) = PRIV (output_size
);
759 /* End record output. */
762 _bfd_vms_output_end (bfd
* abfd
)
765 vms_debug (6, "_bfd_vms_output_end\n");
768 _bfd_vms_output_flush (abfd
);
771 /* Check remaining buffer size
773 Return what's left. */
776 _bfd_vms_output_check (bfd
* abfd
, int size
)
779 vms_debug (6, "_bfd_vms_output_check (%d)\n", size
);
782 return (MAX_OUTREC_SIZE
- (PRIV (output_size
) + size
+ MIN_OUTREC_LUFT
));
785 /* Output byte (8 bit) value. */
788 _bfd_vms_output_byte (bfd
* abfd
, unsigned int value
)
791 vms_debug (6, "_bfd_vms_output_byte (%02x)\n", value
);
794 bfd_put_8 (abfd
, value
& 0xff, PRIV (output_buf
) + PRIV (output_size
));
795 PRIV (output_size
) += 1;
798 /* Output short (16 bit) value. */
801 _bfd_vms_output_short (bfd
* abfd
, unsigned int value
)
804 vms_debug (6, "_bfd_vms_output_short (%04x)\n", value
);
807 bfd_put_16 (abfd
, (bfd_vma
) value
& 0xffff,
808 PRIV (output_buf
) + PRIV (output_size
));
809 PRIV (output_size
) += 2;
812 /* Output long (32 bit) value. */
815 _bfd_vms_output_long (bfd
* abfd
, unsigned long value
)
818 vms_debug (6, "_bfd_vms_output_long (%08lx)\n", value
);
821 bfd_put_32 (abfd
, (bfd_vma
) value
, PRIV (output_buf
) + PRIV (output_size
));
822 PRIV (output_size
) += 4;
825 /* Output quad (64 bit) value. */
828 _bfd_vms_output_quad (bfd
* abfd
, uquad value
)
831 vms_debug (6, "_bfd_vms_output_quad (%016lx)\n", value
);
834 bfd_put_64(abfd
, value
, PRIV (output_buf
) + PRIV (output_size
));
835 PRIV (output_size
) += 8;
838 /* Output c-string as counted string. */
841 _bfd_vms_output_counted (bfd
* abfd
, char *value
)
846 vms_debug (6, "_bfd_vms_output_counted (%s)\n", value
);
849 len
= strlen (value
);
852 (*_bfd_error_handler
) (_("_bfd_vms_output_counted called with zero bytes"));
857 (*_bfd_error_handler
) (_("_bfd_vms_output_counted called with too many bytes"));
860 _bfd_vms_output_byte (abfd
, (unsigned int) len
& 0xff);
861 _bfd_vms_output_dump (abfd
, (unsigned char *) value
, len
);
864 /* Output character area. */
867 _bfd_vms_output_dump (bfd
* abfd
,
872 vms_debug (6, "_bfd_vms_output_dump (%d)\n", length
);
878 memcpy (PRIV (output_buf
) + PRIV (output_size
), data
, (size_t) length
);
879 PRIV (output_size
) += length
;
882 /* Output count bytes of value. */
885 _bfd_vms_output_fill (bfd
* abfd
,
890 vms_debug (6, "_bfd_vms_output_fill (val %02x times %d)\n", value
, count
);
895 memset (PRIV (output_buf
) + PRIV (output_size
), value
, (size_t) count
);
896 PRIV (output_size
) += count
;
899 /* This hash routine borrowed from GNU-EMACS, and strengthened slightly. ERY. */
902 hash_string (const char *ptr
)
904 const unsigned char *p
= (unsigned char *) ptr
;
905 const unsigned char *end
= p
+ strlen (ptr
);
912 hash
= ((hash
<< 3) + (hash
<< 15) + (hash
>> 28) + c
);
917 /* Generate a length-hashed VMS symbol name (limited to maxlen chars). */
920 _bfd_vms_length_hash_symbol (bfd
* abfd
, const char *in
, int maxlen
)
922 unsigned long result
;
925 const char *old_name
;
927 static char outbuf
[EOBJ_S_C_SYMSIZ
+1];
931 vms_debug (4, "_bfd_vms_length_hash_symbol \"%s\"\n", in
);
934 if (maxlen
> EOBJ_S_C_SYMSIZ
)
935 maxlen
= EOBJ_S_C_SYMSIZ
;
937 /* Save this for later. */
940 /* We may need to truncate the symbol, save the hash for later. */
941 in_len
= strlen (in
);
943 result
= (in_len
> maxlen
) ? hash_string (in
) : 0;
947 /* Do the length checking. */
948 if (in_len
<= maxlen
)
952 if (PRIV (flag_hash_long_names
))
958 strncpy (out
, in
, (size_t) i
);
962 if ((in_len
> maxlen
)
963 && PRIV (flag_hash_long_names
))
964 sprintf (out
, "_%08lx", result
);
969 vms_debug (4, "--> [%d]\"%s\"\n", strlen (outbuf
), outbuf
);
973 && PRIV (flag_hash_long_names
)
974 && PRIV (flag_show_after_trunc
))
975 printf (_("Symbol %s replaced by %s\n"), old_name
, new_name
);
980 /* Allocate and initialize a new symbol. */
983 new_symbol (bfd
* abfd
, char *name
)
988 _bfd_vms_debug (7, "new_symbol %s\n", name
);
991 symbol
= bfd_make_empty_symbol (abfd
);
995 symbol
->section
= (asection
*)(unsigned long)-1;
1000 /* Allocate and enter a new private symbol. */
1003 _bfd_vms_enter_symbol (bfd
* abfd
, char *name
)
1005 vms_symbol_entry
*entry
;
1008 _bfd_vms_debug (6, "_bfd_vms_enter_symbol %s\n", name
);
1011 entry
= (vms_symbol_entry
*)
1012 bfd_hash_lookup (PRIV (vms_symbol_table
), name
, FALSE
, FALSE
);
1016 _bfd_vms_debug (8, "creating hash entry for %s\n", name
);
1018 entry
= (vms_symbol_entry
*) bfd_hash_lookup (PRIV (vms_symbol_table
),
1023 symbol
= new_symbol (abfd
, name
);
1026 entry
->symbol
= symbol
;
1027 PRIV (gsd_sym_count
)++;
1034 (*_bfd_error_handler
) (_("failed to enter %s"), name
);
1039 _bfd_vms_debug (8, "found hash entry for %s\n", name
);
1044 _bfd_vms_debug (7, "-> entry %p, entry->symbol %p\n", entry
, entry
->symbol
);