1 /* Copyright (C) 1991 Free Software Foundation, Inc.
2 Written by Steve Chamberlain steve@cygnus.com
4 This file is part of GLD, the Gnu Linker.
6 GLD is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GLD is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GLD; see the file COPYING. If not, write to
18 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
41 extern boolean lang_has_input_file
;
42 extern boolean trace_files
;
47 char *output_filename
= "a.out";
49 /* Name this program was invoked by. */
52 /* The file that we're creating */
55 extern boolean option_v
;
57 /* set if -y on the command line */
60 /* The local symbol prefix */
63 /* Set by -G argument, for MIPS ECOFF target. */
64 int g_switch_value
= 8;
66 /* Count the number of global symbols multiply defined. */
67 int multiple_def_count
;
69 /* Count the number of symbols defined through common declarations.
70 This count is referenced in symdef_library, linear_library, and
71 modified by enter_global_ref.
73 It is incremented when a symbol is created as a common, and
74 decremented when the common declaration is overridden
76 Another way of thinking of it is that this is a count of
77 all ldsym_types with a ->scoms field */
79 unsigned int commons_pending
;
81 /* Count the number of global symbols referenced and not defined.
82 common symbols are not included in this count. */
84 unsigned int undefined_global_sym_count
;
86 /* Count the number of warning symbols encountered. */
89 /* have we had a load script ? */
90 extern boolean had_script
;
92 /* Nonzero means print names of input files as processed. */
95 /* 1 => write load map. */
99 /* Indicates whether output file will be b.out (default) or coff */
100 enum target_flavour output_flavor
= BFD_BOUT_FORMAT
;
104 /* Force the make_executable to be output, even if there are non-fatal
106 boolean force_make_executable
;
108 /* A count of the total number of local symbols ever seen - by adding
109 the symbol_count field of each newly read afile.*/
111 unsigned int total_symbols_seen
;
113 /* A count of the number of read files - the same as the number of elements
116 unsigned int total_files_seen
;
118 args_type command_line
;
120 ld_config_type config
;
130 program_name
= argv
[0];
134 /* We need to find any explicitly given emulation before we initialize the
135 state that's needed by the lex&yacc argument parser (parse_args). */
138 check_v960 (argc
, argv
);
139 emulation
= "gld960";
140 for (i
= 1; i
< argc
; i
++)
142 if (!strcmp (argv
[i
], "-Fcoff"))
144 emulation
= "lnk960";
145 output_flavor
= BFD_COFF_FORMAT
;
150 emulation
= (char *) getenv (EMULATION_ENVIRON
);
153 for (i
= 1; i
< argc
; i
++)
155 if (!strncmp (argv
[i
], "-m", 2))
157 if (argv
[i
][2] == '\0')
162 emulation
= argv
[i
+ 1];
167 einfo("%P%F missing argument to -m\n");
173 emulation
= &argv
[i
][2];
178 /* Initialize the data about options. */
183 config
.relocateable_output
= false;
184 command_line
.force_common_definition
= false;
186 init_bfd_error_vector ();
188 ldfile_add_arch ("");
190 /* Set the default directory for finding script files.
191 Libraries will be searched for here too, but we want
192 them to be, anyway. */
193 ldfile_add_library_path (SCRIPTDIR
);
195 config
.make_executable
= true;
196 force_make_executable
= false;
199 /* Initialize the cumulative counts of symbols. */
200 undefined_global_sym_count
= 0;
202 multiple_def_count
= 0;
205 config
.magic_demand_paged
= true;
206 config
.text_read_only
= true;
207 config
.make_executable
= true;
208 if (emulation
== (char *) NULL
)
210 emulation
= DEFAULT_EMULATION
;
213 ldemul_choose_mode (emulation
);
214 default_target
= ldemul_choose_target ();
216 ldemul_before_parse ();
217 lang_has_input_file
= false;
218 parse_args (argc
, argv
);
220 if (config
.relocateable_output
&& command_line
.relax
)
222 einfo ("%P%F: -relax and -r may not be used together\n");
228 info ("%P: mode %s\n", emulation
);
230 if (lang_has_input_file
== false)
232 einfo ("%P%F: No input files\n");
235 ldemul_after_parse ();
238 if (config
.map_filename
)
240 if (strcmp (config
.map_filename
, "-") == 0)
242 config
.map_file
= stdout
;
246 config
.map_file
= fopen (config
.map_filename
, FOPEN_WT
);
247 if (config
.map_file
== (FILE *) NULL
)
249 einfo ("%P%F: can't open map file %s\n",
250 config
.map_filename
);
258 /* Print error messages for any missing symbols, for any warning
259 symbols, and possibly multiple definitions */
262 if (config
.text_read_only
)
264 /* Look for a text section and mark the readonly attribute in it */
265 asection
*found
= bfd_get_section_by_name (output_bfd
, ".text");
267 if (found
!= (asection
*) NULL
)
269 found
->flags
|= SEC_READONLY
;
273 if (config
.relocateable_output
)
274 output_bfd
->flags
&= ~EXEC_P
;
276 output_bfd
->flags
|= EXEC_P
;
280 /* Even if we're producing relocateable output, some non-fatal errors should
281 be reported in the exit status. (What non-fatal errors, if any, do we
282 want to ignore for relocateable output?) */
284 if (config
.make_executable
== false && force_make_executable
== false)
286 if (trace_files
== true)
288 einfo ("%P: Link errors found, deleting executable `%s'\n",
292 if (output_bfd
->iostream
)
293 fclose ((FILE *) (output_bfd
->iostream
));
295 unlink (output_filename
);
300 bfd_close (output_bfd
);
307 Q_read_entry_symbols (desc
, entry
)
309 struct lang_input_statement_struct
*entry
;
311 if (entry
->asymbols
== (asymbol
**) NULL
)
313 bfd_size_type table_size
= get_symtab_upper_bound (desc
);
315 entry
->asymbols
= (asymbol
**) ldmalloc (table_size
);
316 entry
->symbol_count
= bfd_canonicalize_symtab (desc
, entry
->asymbols
);
321 * turn this item into a reference
328 asymbol
*sym
= *nlist_p
;
332 sym
->section
= &bfd_und_section
;
333 sym
->udata
= (PTR
) (sp
->srefs_chain
);
334 sp
->srefs_chain
= nlist_p
;
338 This function is called for each name which is seen which has a global
339 scope. It enters the name into the global symbol table in the correct
340 symbol on the correct chain. Remember that each ldsym_type has three
341 chains attatched, one of all definitions of a symbol, one of all
342 references of a symbol and one of all common definitions of a symbol.
344 When the function is over, the supplied is left connected to the bfd
345 to which is was born, with its udata field pointing to the next member
346 on the chain in which it has been inserted.
348 A certain amount of jigery pokery is necessary since commons come
349 along and upset things, we only keep one item in the common chain; the
350 one with the biggest size seen sofar. When another common comes along
351 it either bumps the previous definition into the ref chain, since it
352 is bigger, or gets turned into a ref on the spot since the one on the
353 common chain is already bigger. If a real definition comes along then
354 the common gets bumped off anyway.
356 Whilst all this is going on we keep a count of the number of multiple
357 definitions seen, undefined global symbols and pending commons.
360 extern boolean relaxing
;
363 Q_enter_global_ref (nlist_p
, name
)
364 asymbol
** nlist_p
; /* pointer into symbol table from incoming bfd */
365 CONST
char *name
; /* name of symbol in linker table */
367 asymbol
*sym
= *nlist_p
;
370 /* Lookup the name from the incoming bfd's symbol table in the
371 linker's global symbol table */
374 flagword this_symbol_flags
= sym
->flags
;
376 sp
= ldsym_get (name
);
379 /* If this symbol already has udata, it means that something strange
382 The strange thing is that we've had an undefined symbol resolved by
383 an alias, but the thing the alias defined wasn't in the file. So
384 the symbol got a udata entry, but the file wasn't loaded. Then
385 later on the file was loaded, but we don't need to do this
393 if (flag_is_constructor (this_symbol_flags
))
395 /* Add this constructor to the list we keep */
396 ldlang_add_constructor (sp
);
397 /* Turn any commons into refs */
398 if (sp
->scoms_chain
!= (asymbol
**) NULL
)
400 refize (sp
, sp
->scoms_chain
);
408 if (bfd_is_com_section (sym
->section
))
410 /* If we have a definition of this symbol already then
411 this common turns into a reference. Also we only
412 ever point to the largest common, so if we
413 have a common, but it's bigger that the new symbol
414 the turn this into a reference too. */
417 /* This is a common symbol, but we already have a definition
418 for it, so just link it into the ref chain as if
419 it were a reference */
420 refize (sp
, nlist_p
);
422 else if (sp
->scoms_chain
)
424 /* If we have a previous common, keep only the biggest */
425 if ((*(sp
->scoms_chain
))->value
> sym
->value
)
427 /* other common is bigger, throw this one away */
428 refize (sp
, nlist_p
);
430 else if (sp
->scoms_chain
!= nlist_p
)
432 /* other common is smaller, throw that away */
433 refize (sp
, sp
->scoms_chain
);
434 sp
->scoms_chain
= nlist_p
;
439 /* This is the first time we've seen a common, so remember it
440 - if it was undefined before, we know it's defined now. If
441 the symbol has been marked as really being a constructor,
442 then treat this as a ref
444 if (sp
->flags
& SYM_CONSTRUCTOR
)
446 /* Turn this into a ref */
447 refize (sp
, nlist_p
);
451 /* treat like a common */
453 undefined_global_sym_count
--;
456 sp
->scoms_chain
= nlist_p
;
461 else if (sym
->section
!= &bfd_und_section
)
463 /* This is the definition of a symbol, add to def chain */
464 if (sp
->sdefs_chain
&& (*(sp
->sdefs_chain
))->section
!= sym
->section
)
466 /* Multiple definition */
467 asymbol
*sy
= *(sp
->sdefs_chain
);
468 lang_input_statement_type
*stat
=
469 (lang_input_statement_type
*) bfd_asymbol_bfd (sy
)->usrdata
;
470 lang_input_statement_type
*stat1
=
471 (lang_input_statement_type
*) bfd_asymbol_bfd (sym
)->usrdata
;
472 asymbol
**stat1_symbols
= stat1
? stat1
->asymbols
: 0;
473 asymbol
**stat_symbols
= stat
? stat
->asymbols
: 0;
475 multiple_def_count
++;
476 einfo ("%X%C: multiple definition of `%T'\n",
477 bfd_asymbol_bfd (sym
), sym
->section
, stat1_symbols
, sym
->value
, sym
);
479 einfo ("%X%C: first seen here\n",
480 bfd_asymbol_bfd (sy
), sy
->section
, stat_symbols
, sy
->value
);
484 sym
->udata
= (PTR
) (sp
->sdefs_chain
);
485 sp
->sdefs_chain
= nlist_p
;
487 /* A definition overrides a common symbol */
490 refize (sp
, sp
->scoms_chain
);
494 else if (sp
->srefs_chain
&& relaxing
== false)
496 /* If previously was undefined, then remember as defined */
497 undefined_global_sym_count
--;
502 if (sp
->scoms_chain
== (asymbol
**) NULL
503 && sp
->srefs_chain
== (asymbol
**) NULL
504 && sp
->sdefs_chain
== (asymbol
**) NULL
)
506 /* And it's the first time we've seen it */
507 undefined_global_sym_count
++;
511 refize (sp
, nlist_p
);
515 ASSERT (sp
->sdefs_chain
== 0 || sp
->scoms_chain
== 0);
516 ASSERT (sp
->scoms_chain
== 0 || (*(sp
->scoms_chain
))->udata
== 0);
522 Q_enter_file_symbols (entry
)
523 lang_input_statement_type
*entry
;
527 entry
->common_section
=
528 bfd_make_section_old_way (entry
->the_bfd
, "COMMON");
529 entry
->common_section
->flags
= SEC_NEVER_LOAD
;
530 ldlang_add_file (entry
);
533 if (trace_files
|| option_v
)
535 info ("%I\n", entry
);
538 total_symbols_seen
+= entry
->symbol_count
;
540 if (entry
->symbol_count
)
542 for (q
= entry
->asymbols
; *q
; q
++)
546 if (had_y
&& p
->name
)
548 /* look up the symbol anyway to see if the trace bit was
550 ldsym_type
*s
= ldsym_get (p
->name
);
551 if (s
->flags
& SYM_Y
)
553 einfo ("%B: %s %T\n", entry
->the_bfd
,
554 p
->section
== &bfd_und_section
? "reference to" : "definition of ",
559 if (p
->section
== &bfd_ind_section
)
563 else if (p
->flags
& BSF_WARNING
)
567 else if (p
->section
== &bfd_und_section
568 || (p
->flags
& BSF_GLOBAL
)
569 || bfd_is_com_section (p
->section
)
570 || (p
->flags
& BSF_CONSTRUCTOR
))
576 if (p
->flags
& BSF_INDIRECT
)
580 else if (p
->flags
& BSF_WARNING
)
584 else if (p
->section
== &bfd_und_section
585 || (p
->flags
& BSF_GLOBAL
)
586 || bfd_is_com_section (p
->section
)
587 || (p
->flags
& BSF_CONSTRUCTOR
))
589 Q_enter_global_ref (q
, p
->name
);
599 /* Searching libraries */
601 struct lang_input_statement_struct
*decode_library_subfile ();
602 void linear_library (), symdef_library ();
604 /* Search the library ENTRY, already open on descriptor DESC.
605 This means deciding which library members to load,
606 making a chain of `struct lang_input_statement_struct' for those members,
607 and entering their global symbols in the hash table. */
610 search_library (entry
)
611 struct lang_input_statement_struct
*entry
;
614 /* No need to load a library if no undefined symbols */
615 if (!undefined_global_sym_count
)
618 if (bfd_has_map (entry
->the_bfd
))
619 symdef_library (entry
);
621 linear_library (entry
);
628 gnu960_check_format (abfd
, format
)
634 if ((bfd_check_format (abfd
, format
) == true)
635 && (abfd
->xvec
->flavour
== output_flavor
))
647 ldmain_open_file_read_symbol (entry
)
648 struct lang_input_statement_struct
*entry
;
650 if (entry
->asymbols
== (asymbol
**) NULL
651 && entry
->real
== true
652 && entry
->filename
!= (char *) NULL
)
654 ldfile_open_file (entry
);
658 if (gnu960_check_format (entry
->the_bfd
, bfd_object
))
660 if (bfd_check_format (entry
->the_bfd
, bfd_object
))
663 entry
->the_bfd
->usrdata
= (PTR
) entry
;
666 Q_read_entry_symbols (entry
->the_bfd
, entry
);
668 /* look through the sections in the file and see if any of them
670 ldlang_check_for_constructors (entry
);
672 Q_enter_file_symbols (entry
);
675 else if (gnu960_check_format (entry
->the_bfd
, bfd_archive
))
677 else if (bfd_check_format (entry
->the_bfd
, bfd_archive
))
680 entry
->the_bfd
->usrdata
= (PTR
) entry
;
682 entry
->subfiles
= (lang_input_statement_type
*) NULL
;
683 search_library (entry
);
687 einfo ("%F%B: malformed input file (not rel or archive) \n",
694 /* Construct and return a lang_input_statement_struct for a library member.
695 The library's lang_input_statement_struct is library_entry,
696 and the library is open on DESC.
697 SUBFILE_OFFSET is the byte index in the library of this member's header.
698 We store the length of the member into *LENGTH_LOC. */
700 lang_input_statement_type
*
701 decode_library_subfile (library_entry
, subfile_offset
)
702 struct lang_input_statement_struct
*library_entry
;
705 register struct lang_input_statement_struct
*subentry
;
708 /* First, check if we already have a loaded
709 lang_input_statement_struct for this library subfile. If so,
710 just return it. Otherwise, allocate some space and build a new one. */
712 if (subfile_offset
->usrdata
713 && ((struct lang_input_statement_struct
*) subfile_offset
->usrdata
)->
716 subentry
= (struct lang_input_statement_struct
*) subfile_offset
->usrdata
;
721 (struct lang_input_statement_struct
*)
722 ldmalloc ((bfd_size_type
) (sizeof (struct lang_input_statement_struct
)));
724 subentry
->filename
= subfile_offset
->filename
;
725 subentry
->local_sym_name
= subfile_offset
->filename
;
726 subentry
->asymbols
= 0;
727 subentry
->the_bfd
= subfile_offset
;
728 subentry
->subfiles
= 0;
730 subentry
->superfile
= library_entry
;
731 subentry
->is_archive
= false;
733 subentry
->just_syms_flag
= false;
734 subentry
->loaded
= false;
740 boolean
subfile_wanted_p ();
742 clear_syms (entry
, offset
)
743 struct lang_input_statement_struct
*entry
;
747 unsigned long indx
= bfd_get_next_mapent (entry
->the_bfd
,
751 while (indx
!= BFD_NO_MORE_SYMBOLS
)
753 if (car
->file_offset
== offset
)
757 indx
= bfd_get_next_mapent (entry
->the_bfd
, indx
, &car
);
762 /* Search a library that has a map
765 symdef_library (entry
)
766 struct lang_input_statement_struct
*entry
;
769 register struct lang_input_statement_struct
*prev
= 0;
771 boolean not_finished
= true;
773 while (not_finished
== true)
775 carsym
*exported_library_name
;
776 bfd
*prev_archive_member_bfd
= 0;
778 int idx
= bfd_get_next_mapent (entry
->the_bfd
,
780 &exported_library_name
);
782 not_finished
= false;
784 while (idx
!= BFD_NO_MORE_SYMBOLS
&& undefined_global_sym_count
)
787 if (exported_library_name
->name
)
790 ldsym_type
*sp
= ldsym_get_soft (exported_library_name
->name
);
792 /* If we find a symbol that appears to be needed, think carefully
793 about the archive member that the symbol is in. */
794 /* So - if it exists, and is referenced somewhere and is
796 if (sp
&& sp
->srefs_chain
&& !sp
->sdefs_chain
)
798 bfd
*archive_member_bfd
= bfd_get_elt_at_index (entry
->the_bfd
, idx
);
799 struct lang_input_statement_struct
*archive_member_lang_input_statement_struct
;
802 if (archive_member_bfd
&& gnu960_check_format (archive_member_bfd
, bfd_object
))
804 if (archive_member_bfd
&& bfd_check_format (archive_member_bfd
, bfd_object
))
808 /* Don't think carefully about any archive member
809 more than once in a given pass. */
810 if (prev_archive_member_bfd
!= archive_member_bfd
)
813 prev_archive_member_bfd
= archive_member_bfd
;
815 /* Read the symbol table of the archive member. */
817 if (archive_member_bfd
->usrdata
!= (PTR
) NULL
)
820 archive_member_lang_input_statement_struct
= (lang_input_statement_type
*) archive_member_bfd
->usrdata
;
825 archive_member_lang_input_statement_struct
=
826 decode_library_subfile (entry
, archive_member_bfd
);
827 archive_member_bfd
->usrdata
= (PTR
) archive_member_lang_input_statement_struct
;
831 if (archive_member_lang_input_statement_struct
== 0)
833 einfo ("%F%I contains invalid archive member %s\n",
837 if (archive_member_lang_input_statement_struct
->loaded
== false)
840 Q_read_entry_symbols (archive_member_bfd
, archive_member_lang_input_statement_struct
);
841 /* Now scan the symbol table and decide whether to load. */
844 if (subfile_wanted_p (archive_member_lang_input_statement_struct
) == true)
847 /* This member is needed; load it.
848 Since we are loading something on this pass,
849 we must make another pass through the symdef data. */
853 Q_enter_file_symbols (archive_member_lang_input_statement_struct
);
856 prev
->chain
= archive_member_lang_input_statement_struct
;
858 entry
->subfiles
= archive_member_lang_input_statement_struct
;
861 prev
= archive_member_lang_input_statement_struct
;
864 /* Clear out this member's symbols from the symdef data
865 so that following passes won't waste time on them. */
866 clear_syms (entry
, exported_library_name
->file_offset
);
867 archive_member_lang_input_statement_struct
->loaded
= true;
874 idx
= bfd_get_next_mapent (entry
->the_bfd
, idx
, &exported_library_name
);
880 linear_library (entry
)
881 struct lang_input_statement_struct
*entry
;
883 boolean more_to_do
= true;
884 register struct lang_input_statement_struct
*prev
= 0;
886 if (entry
->complained
== false)
888 if (entry
->the_bfd
->xvec
->flavour
!= bfd_target_ieee_flavour
)
891 /* IEEE can use table of contents, so this message is bogus */
892 einfo ("%P: library %s has bad table of contents, rerun ranlib\n",
893 entry
->the_bfd
->filename
);
895 entry
->complained
= true;
901 bfd
*archive
= bfd_openr_next_archived_file (entry
->the_bfd
, 0);
906 /* Don't check this file if it's already been read in
909 if (!archive
->usrdata
||
910 !((lang_input_statement_type
*) (archive
->usrdata
))->loaded
)
913 if (gnu960_check_format (archive
, bfd_object
))
915 if (bfd_check_format (archive
, bfd_object
))
918 register struct lang_input_statement_struct
*subentry
;
920 subentry
= decode_library_subfile (entry
,
923 archive
->usrdata
= (PTR
) subentry
;
926 if (subentry
->loaded
== false)
928 Q_read_entry_symbols (archive
, subentry
);
930 if (subfile_wanted_p (subentry
) == true)
932 Q_enter_file_symbols (subentry
);
935 prev
->chain
= subentry
;
937 entry
->subfiles
= subentry
;
941 subentry
->loaded
= true;
946 archive
= bfd_openr_next_archived_file (entry
->the_bfd
, archive
);
953 /* ENTRY is an entry for a file inside an archive
954 Its symbols have been read into core, but not entered into the
956 Return nonzero if we ought to load this file */
959 subfile_wanted_p (entry
)
960 struct lang_input_statement_struct
*entry
;
964 if (entry
->symbol_count
== 0)
967 for (q
= entry
->asymbols
; *q
; q
++)
971 /* If the symbol has an interesting definition, we could
972 potentially want it. */
974 if (p
->flags
& BSF_INDIRECT
)
976 /** add_indirect(q);*/
979 if (bfd_is_com_section (p
->section
)
980 || (p
->flags
& BSF_GLOBAL
)
981 || (p
->flags
& BSF_INDIRECT
))
983 register ldsym_type
*sp
= ldsym_get_soft (p
->name
);
985 /* If this symbol has not been hashed,
986 we can't be looking for it. */
987 if (sp
!= (ldsym_type
*) NULL
988 && sp
->sdefs_chain
== (asymbol
**) NULL
)
990 if (sp
->srefs_chain
!= (asymbol
**) NULL
991 || sp
->scoms_chain
!= (asymbol
**) NULL
)
993 /* This is a symbol we are looking for. It is
994 either not yet defined or common. If this is a
995 common symbol, then if the symbol in the object
996 file is common, we need to combine sizes. But if
997 we already have a common symbol, and the symbol
998 in the object file is not common, we don't want
999 the object file: it is providing a definition for
1000 a symbol that we already have a definition for
1001 (this is the else condition below). */
1002 if (bfd_is_com_section (p
->section
))
1005 /* If the symbol in the table is a constructor, we won't to
1006 anything fancy with it */
1007 if ((sp
->flags
& SYM_CONSTRUCTOR
) == 0)
1009 /* This libary member has something to
1010 say about this element. We should
1011 remember if its a new size */
1012 /* Move something from the ref list to the com list */
1013 if (sp
->scoms_chain
)
1015 /* Already a common symbol, maybe update it */
1016 if (p
->value
> (*(sp
->scoms_chain
))->value
)
1018 (*(sp
->scoms_chain
))->value
= p
->value
;
1023 /* Take a value from the ref chain
1024 Here we are moving a symbol from the owning bfd
1025 to another bfd. We must set up the
1026 common_section portion of the bfd thing */
1030 sp
->scoms_chain
= sp
->srefs_chain
;
1032 (asymbol
**) ((*(sp
->srefs_chain
))->udata
);
1033 (*(sp
->scoms_chain
))->udata
= (PTR
) NULL
;
1035 (*(sp
->scoms_chain
))->section
= p
->section
;
1036 (*(sp
->scoms_chain
))->flags
= 0;
1037 /* Remember the size of this item */
1038 sp
->scoms_chain
[0]->value
= p
->value
;
1040 undefined_global_sym_count
--;
1043 asymbol
*com
= *(sp
->scoms_chain
);
1045 if (((lang_input_statement_type
*)
1046 (bfd_asymbol_bfd (com
)->usrdata
))->common_section
==
1049 ((lang_input_statement_type
*)
1050 (bfd_asymbol_bfd (com
)->usrdata
))->common_section
=
1051 bfd_make_section_old_way (bfd_asymbol_bfd (com
), "COMMON");
1055 ASSERT (p
->udata
== 0);
1057 else if (sp
->scoms_chain
== (asymbol
**) NULL
)
1061 info ("%I needed due to %s\n", entry
, sp
->name
);
1077 ldsym_type
*lookup
= ldsym_get (text
);
1078 lookup
->flags
|= SYM_Y
;