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 happens 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");
358 /* See _bfd_vms_get_first_record. */
361 /* Skip odd alignment byte. */
362 if (bfd_tell (abfd
) & 1)
364 if (bfd_bread (PRIV (vms_buf
), 1, abfd
) != 1)
366 bfd_set_error (bfd_error_file_truncated
);
371 /* Read the record header */
372 if (bfd_bread (PRIV (vms_buf
), test_len
, abfd
) != test_len
)
374 bfd_set_error (bfd_error_file_truncated
);
378 /* Reset the record pointer. */
379 PRIV (vms_rec
) = PRIV (vms_buf
);
380 maybe_adjust_record_pointer_for_object (abfd
);
383 if (vms_get_remaining_object_record (abfd
, test_len
) <= 0)
387 type
= PRIV (vms_rec
) [0];
389 type
= bfd_getl16 (PRIV (vms_rec
));
392 vms_debug (8, "_bfd_vms_get_obj_record: rec %p, size %d, type %d\n",
393 PRIV (vms_rec
), PRIV (rec_size
), type
);
399 /* Implement step #2 of the object record reading procedure.
400 Return the size of the record or 0 on failure. */
403 vms_get_remaining_object_record (bfd
*abfd
, int read_so_far
)
406 vms_debug (8, "vms_get_remaining_obj_record\n");
411 if (read_so_far
!= 0)
414 PRIV (rec_size
) = bfd_bread (PRIV (vms_buf
), PRIV (buf_size
), abfd
);
416 if (PRIV (rec_size
) <= 0)
418 bfd_set_error (bfd_error_file_truncated
);
422 /* Reset the record pointer. */
423 PRIV (vms_rec
) = PRIV (vms_buf
);
427 unsigned int to_read
;
429 /* Extract record size. */
430 PRIV (rec_size
) = bfd_getl16 (PRIV (vms_rec
) + 2);
432 if (PRIV (rec_size
) <= 0)
434 bfd_set_error (bfd_error_file_truncated
);
438 /* That's what the linker manual says. */
439 if (PRIV (rec_size
) > EOBJ_S_C_MAXRECSIZ
)
441 bfd_set_error (bfd_error_file_truncated
);
445 /* Take into account object adjustment. */
446 to_read
= PRIV (rec_size
);
447 if (PRIV (file_format
) == FF_FOREIGN
)
448 to_read
+= VMS_OBJECT_ADJUSTMENT
;
450 /* Adjust the buffer. */
451 if (to_read
> PRIV (buf_size
))
454 = (unsigned char *) bfd_realloc (PRIV (vms_buf
), to_read
);
455 if (PRIV (vms_buf
) == NULL
)
457 PRIV (buf_size
) = to_read
;
460 /* Read the remaining record. */
461 to_read
-= read_so_far
;
464 vms_debug (8, "vms_get_remaining_obj_record: to_read %d\n", to_read
);
467 if (bfd_bread (PRIV (vms_buf
) + read_so_far
, to_read
, abfd
) != to_read
)
469 bfd_set_error (bfd_error_file_truncated
);
473 /* Reset the record pointer. */
474 PRIV (vms_rec
) = PRIV (vms_buf
);
475 maybe_adjust_record_pointer_for_object (abfd
);
479 vms_debug (8, "vms_get_remaining_obj_record: size %d\n", PRIV (rec_size
));
482 return PRIV (rec_size
);
485 /* Implement step #2 of the record reading procedure for images.
486 Return the size of the record or 0 on failure. */
489 vms_get_remaining_image_record (bfd
*abfd
, int read_so_far
)
491 unsigned int to_read
;
494 /* Extract record size. */
495 PRIV (rec_size
) = bfd_getl32 (PRIV (vms_rec
) + EIHD_S_L_SIZE
);
497 if (PRIV (rec_size
) > PRIV (buf_size
))
499 PRIV (vms_buf
) = bfd_realloc (PRIV (vms_buf
), PRIV (rec_size
));
501 if (PRIV (vms_buf
) == NULL
)
503 bfd_set_error (bfd_error_no_memory
);
507 PRIV (buf_size
) = PRIV (rec_size
);
510 /* Read the remaining record. */
511 remaining
= PRIV (rec_size
) - read_so_far
;
512 to_read
= MIN (VMS_BLOCK_SIZE
- read_so_far
, remaining
);
514 while (remaining
> 0)
516 if (bfd_bread (PRIV (vms_buf
) + read_so_far
, to_read
, abfd
) != to_read
)
518 bfd_set_error (bfd_error_file_truncated
);
522 read_so_far
+= to_read
;
523 remaining
-= to_read
;
525 /* Eat trailing 0xff's. */
527 while (PRIV (vms_buf
) [read_so_far
- 1] == 0xff)
530 to_read
= MIN (VMS_BLOCK_SIZE
, remaining
);
533 /* Reset the record pointer. */
534 PRIV (vms_rec
) = PRIV (vms_buf
);
536 return PRIV (rec_size
);
539 /* Copy sized string (string with fixed size) to new allocated area
540 size is string size (size of record) */
543 _bfd_vms_save_sized_string (unsigned char *str
, int size
)
545 char *newstr
= bfd_malloc ((bfd_size_type
) size
+ 1);
549 strncpy (newstr
, (char *) str
, (size_t) size
);
555 /* Copy counted string (string with size at first byte) to new allocated area
556 ptr points to size byte on entry */
559 _bfd_vms_save_counted_string (unsigned char *ptr
)
563 return _bfd_vms_save_sized_string (ptr
, len
);
566 /* Stack routines for vms ETIR commands. */
568 /* Push value and section index. */
571 _bfd_vms_push (bfd
* abfd
, uquad val
, int psect
)
573 static int last_psect
;
576 vms_debug (4, "<push %016lx (%d) at %d>\n", val
, psect
, PRIV (stackptr
));
582 PRIV (stack
[PRIV (stackptr
)]).value
= val
;
583 PRIV (stack
[PRIV (stackptr
)]).psect
= last_psect
;
585 if (PRIV (stackptr
) >= STACKSIZE
)
587 bfd_set_error (bfd_error_bad_value
);
588 (*_bfd_error_handler
) (_("Stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr
));
593 /* Pop value and section index. */
596 _bfd_vms_pop (bfd
* abfd
, int *psect
)
600 if (PRIV (stackptr
) == 0)
602 bfd_set_error (bfd_error_bad_value
);
603 (*_bfd_error_handler
) (_("Stack underflow in _bfd_vms_pop"));
607 value
= PRIV (stack
[PRIV (stackptr
)]).value
;
608 if ((psect
!= NULL
) && (PRIV (stack
[PRIV (stackptr
)]).psect
>= 0))
609 *psect
= PRIV (stack
[PRIV (stackptr
)]).psect
;
612 vms_debug (4, "<pop %016lx(%d)>\n", value
, PRIV (stack
[PRIV (stackptr
)]).psect
);
618 /* Object output routines. */
620 /* Begin new record or record header
621 write 2 bytes rectype
622 write 2 bytes record length (filled in at flush)
623 write 2 bytes header type (ommitted if rechead == -1). */
626 _bfd_vms_output_begin (bfd
* abfd
, int rectype
, int rechead
)
629 vms_debug (6, "_bfd_vms_output_begin (type %d, head %d)\n", rectype
,
633 _bfd_vms_output_short (abfd
, (unsigned int) rectype
);
635 /* Save current output position to fill in length later. */
637 if (PRIV (push_level
) > 0)
638 PRIV (length_pos
) = PRIV (output_size
);
641 vms_debug (6, "_bfd_vms_output_begin: length_pos = %d\n",
645 /* Placeholder for length. */
646 _bfd_vms_output_short (abfd
, 0);
649 _bfd_vms_output_short (abfd
, (unsigned int) rechead
);
652 /* Set record/subrecord alignment. */
655 _bfd_vms_output_alignment (bfd
* abfd
, int alignto
)
658 vms_debug (6, "_bfd_vms_output_alignment (%d)\n", alignto
);
661 PRIV (output_alignment
) = alignto
;
664 /* Prepare for subrecord fields. */
667 _bfd_vms_output_push (bfd
* abfd
)
670 vms_debug (6, "vms_output_push (pushed_size = %d)\n", PRIV (output_size
));
674 PRIV (pushed_size
) = PRIV (output_size
);
677 /* End of subrecord fields. */
680 _bfd_vms_output_pop (bfd
* abfd
)
683 vms_debug (6, "vms_output_pop (pushed_size = %d)\n", PRIV (pushed_size
));
686 _bfd_vms_output_flush (abfd
);
687 PRIV (length_pos
) = 2;
690 vms_debug (6, "vms_output_pop: length_pos = %d\n", PRIV (length_pos
));
693 PRIV (pushed_size
) = 0;
697 /* Flush unwritten output, ends current record. */
700 _bfd_vms_output_flush (bfd
* abfd
)
702 int real_size
= PRIV (output_size
);
707 vms_debug (6, "_bfd_vms_output_flush (real_size = %d, pushed_size %d at lenpos %d)\n",
708 real_size
, PRIV (pushed_size
), PRIV (length_pos
));
711 if (PRIV (push_level
) > 0)
712 length
= real_size
- PRIV (pushed_size
);
718 aligncount
= (PRIV (output_alignment
)
719 - (length
% PRIV (output_alignment
))) % PRIV (output_alignment
);
722 vms_debug (6, "align: adding %d bytes\n", aligncount
);
725 while (aligncount
-- > 0)
727 PRIV (output_buf
)[real_size
++] = 0;
731 /* Put length to buffer. */
732 PRIV (output_size
) = PRIV (length_pos
);
733 _bfd_vms_output_short (abfd
, (unsigned int) length
);
735 if (PRIV (push_level
) == 0)
737 /* File is open in undefined (UDF) format on VMS, but ultimately will be
738 converted to variable length (VAR) format. VAR format has a length
739 word first which must be explicitly output in UDF format. */
740 bfd_bwrite (PRIV (output_buf
) + 2, 2, abfd
);
741 bfd_bwrite (PRIV (output_buf
), (size_t) real_size
, abfd
);
742 PRIV (output_size
) = 0;
746 PRIV (output_size
) = real_size
;
747 PRIV (pushed_size
) = PRIV (output_size
);
751 /* End record output. */
754 _bfd_vms_output_end (bfd
* abfd
)
757 vms_debug (6, "_bfd_vms_output_end\n");
760 _bfd_vms_output_flush (abfd
);
763 /* Check remaining buffer size
765 Return what's left. */
768 _bfd_vms_output_check (bfd
* abfd
, int size
)
771 vms_debug (6, "_bfd_vms_output_check (%d)\n", size
);
774 return (MAX_OUTREC_SIZE
- (PRIV (output_size
) + size
+ MIN_OUTREC_LUFT
));
777 /* Output byte (8 bit) value. */
780 _bfd_vms_output_byte (bfd
* abfd
, unsigned int value
)
783 vms_debug (6, "_bfd_vms_output_byte (%02x)\n", value
);
786 bfd_put_8 (abfd
, value
& 0xff, PRIV (output_buf
) + PRIV (output_size
));
787 PRIV (output_size
) += 1;
790 /* Output short (16 bit) value. */
793 _bfd_vms_output_short (bfd
* abfd
, unsigned int value
)
796 vms_debug (6, "_bfd_vms_output_short (%04x)\n", value
);
799 bfd_put_16 (abfd
, (bfd_vma
) value
& 0xffff,
800 PRIV (output_buf
) + PRIV (output_size
));
801 PRIV (output_size
) += 2;
804 /* Output long (32 bit) value. */
807 _bfd_vms_output_long (bfd
* abfd
, unsigned long value
)
810 vms_debug (6, "_bfd_vms_output_long (%08lx)\n", value
);
813 bfd_put_32 (abfd
, (bfd_vma
) value
, PRIV (output_buf
) + PRIV (output_size
));
814 PRIV (output_size
) += 4;
817 /* Output quad (64 bit) value. */
820 _bfd_vms_output_quad (bfd
* abfd
, uquad value
)
823 vms_debug (6, "_bfd_vms_output_quad (%016lx)\n", value
);
826 bfd_put_64(abfd
, value
, PRIV (output_buf
) + PRIV (output_size
));
827 PRIV (output_size
) += 8;
830 /* Output c-string as counted string. */
833 _bfd_vms_output_counted (bfd
* abfd
, char *value
)
838 vms_debug (6, "_bfd_vms_output_counted (%s)\n", value
);
841 len
= strlen (value
);
844 (*_bfd_error_handler
) (_("_bfd_vms_output_counted called with zero bytes"));
849 (*_bfd_error_handler
) (_("_bfd_vms_output_counted called with too many bytes"));
852 _bfd_vms_output_byte (abfd
, (unsigned int) len
& 0xff);
853 _bfd_vms_output_dump (abfd
, (unsigned char *) value
, len
);
856 /* Output character area. */
859 _bfd_vms_output_dump (bfd
* abfd
,
864 vms_debug (6, "_bfd_vms_output_dump (%d)\n", length
);
870 memcpy (PRIV (output_buf
) + PRIV (output_size
), data
, (size_t) length
);
871 PRIV (output_size
) += length
;
874 /* Output count bytes of value. */
877 _bfd_vms_output_fill (bfd
* abfd
,
882 vms_debug (6, "_bfd_vms_output_fill (val %02x times %d)\n", value
, count
);
887 memset (PRIV (output_buf
) + PRIV (output_size
), value
, (size_t) count
);
888 PRIV (output_size
) += count
;
891 /* This hash routine borrowed from GNU-EMACS, and strengthened slightly. ERY. */
894 hash_string (const char *ptr
)
896 const unsigned char *p
= (unsigned char *) ptr
;
897 const unsigned char *end
= p
+ strlen (ptr
);
904 hash
= ((hash
<< 3) + (hash
<< 15) + (hash
>> 28) + c
);
909 /* Generate a length-hashed VMS symbol name (limited to maxlen chars). */
912 _bfd_vms_length_hash_symbol (bfd
* abfd
, const char *in
, int maxlen
)
914 unsigned long result
;
917 const char *old_name
;
919 static char outbuf
[EOBJ_S_C_SYMSIZ
+1];
923 vms_debug (4, "_bfd_vms_length_hash_symbol \"%s\"\n", in
);
926 if (maxlen
> EOBJ_S_C_SYMSIZ
)
927 maxlen
= EOBJ_S_C_SYMSIZ
;
929 /* Save this for later. */
932 /* We may need to truncate the symbol, save the hash for later. */
933 in_len
= strlen (in
);
935 result
= (in_len
> maxlen
) ? hash_string (in
) : 0;
939 /* Do the length checking. */
940 if (in_len
<= maxlen
)
944 if (PRIV (flag_hash_long_names
))
950 strncpy (out
, in
, (size_t) i
);
954 if ((in_len
> maxlen
)
955 && PRIV (flag_hash_long_names
))
956 sprintf (out
, "_%08lx", result
);
961 vms_debug (4, "--> [%d]\"%s\"\n", strlen (outbuf
), outbuf
);
965 && PRIV (flag_hash_long_names
)
966 && PRIV (flag_show_after_trunc
))
967 printf (_("Symbol %s replaced by %s\n"), old_name
, new_name
);
972 /* Allocate and initialize a new symbol. */
975 new_symbol (bfd
* abfd
, char *name
)
980 _bfd_vms_debug (7, "new_symbol %s\n", name
);
983 symbol
= bfd_make_empty_symbol (abfd
);
987 symbol
->section
= (asection
*)(unsigned long)-1;
992 /* Allocate and enter a new private symbol. */
995 _bfd_vms_enter_symbol (bfd
* abfd
, char *name
)
997 vms_symbol_entry
*entry
;
1000 _bfd_vms_debug (6, "_bfd_vms_enter_symbol %s\n", name
);
1003 entry
= (vms_symbol_entry
*)
1004 bfd_hash_lookup (PRIV (vms_symbol_table
), name
, FALSE
, FALSE
);
1008 _bfd_vms_debug (8, "creating hash entry for %s\n", name
);
1010 entry
= (vms_symbol_entry
*) bfd_hash_lookup (PRIV (vms_symbol_table
),
1015 symbol
= new_symbol (abfd
, name
);
1018 entry
->symbol
= symbol
;
1019 PRIV (gsd_sym_count
)++;
1026 (*_bfd_error_handler
) (_("failed to enter %s"), name
);
1031 _bfd_vms_debug (8, "found hash entry for %s\n", name
);
1036 _bfd_vms_debug (7, "-> entry %p, entry->symbol %p\n", entry
, entry
->symbol
);