aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-02-05 07:03:48 +0000
committerJeff Law <law@redhat.com>1994-02-05 07:03:48 +0000
commit9dd7d585d66f2fb63fba12abdc59d25a889a8a9a (patch)
tree863f4d1313a440ddd3e051ab8b6756a289888ad2 /ld/emultempl
parent9b39ed6bfa5aa39d4bfe8ddd7fb9ded74ef34847 (diff)
downloadgdb-9dd7d585d66f2fb63fba12abdc59d25a889a8a9a.zip
gdb-9dd7d585d66f2fb63fba12abdc59d25a889a8a9a.tar.gz
gdb-9dd7d585d66f2fb63fba12abdc59d25a889a8a9a.tar.bz2
* ldlang.h (LANG_FOR_EACH_{INPUT,OUTPUT}_SECTION): Delete (unused)
GNU C specific macros. * emultempl/hppaosf.em (hppaosf_finish): Expand the only remaining call to LANG_FOR_EACH_INPUT_SECTION.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/hppaosf.em74
1 files changed, 41 insertions, 33 deletions
diff --git a/ld/emultempl/hppaosf.em b/ld/emultempl/hppaosf.em
index e363722..fe98f4f 100644
--- a/ld/emultempl/hppaosf.em
+++ b/ld/emultempl/hppaosf.em
@@ -103,41 +103,49 @@ hppaosf_finish()
if (link_info.relocateable == false)
{
/* check for needed stubs */
- LANG_FOR_EACH_INPUT_SECTION
- (statement, abfd, section,
- (
- {
- int new_sym_cnt = 0;
- int i,j;
- asymbol *syms = hppa_look_for_stubs_in_section (stub_file->the_bfd,
- abfd,
- output_bfd,
- section,
- statement->asymbols,
- &new_sym_cnt,
- &link_info);
-
- if ( (new_sym_cnt > 0) && syms )
- {
- struct symbol_cache_entry **old_asymbols = stub_file->asymbols;
-
- stub_file->asymbols = ldmalloc((stub_file->symbol_count + new_sym_cnt) * sizeof(asymbol *));
-
- for ( j = 0; j < stub_file->symbol_count; j++ )
- stub_file->asymbols[j] = old_asymbols[j];
-
- for ( j = 0, i = stub_file->symbol_count; j < new_sym_cnt; j++, i++ )
- stub_file->asymbols[i] = &syms[j];
-
- stub_file->symbol_count += new_sym_cnt;
- /* Now, attach the contents of the new linker stub(s) */
- /* to the linker stub input section. */
+ extern lang_statement_list_type file_chain;
+ lang_input_statement_type *statement;
+
+ for (statement = (lang_input_statement_type *)file_chain.head;
+ statement != (lang_input_statement_type *)NULL;
+ statement = (lang_input_statement_type *)statement->next)
+ {
+ asection *section;
+ bfd *abfd = statement->the_bfd;
+ for (section = abfd->sections;
+ section != (asection *)NULL;
+ section = section ->next)
+ {
+ int new_sym_cnt = 0;
+ int i,j;
+ asymbol *syms;
+
+ syms = hppa_look_for_stubs_in_section (stub_file->the_bfd,
+ abfd,
+ output_bfd,
+ section,
+ statement->asymbols,
+ &new_sym_cnt,
+ &link_info);
+ if ( (new_sym_cnt > 0) && syms )
+ {
+ struct symbol_cache_entry **old_asymbols;
+
+ old_asymbols = stub_file->asymbols;
+
+ stub_file->asymbols = ldmalloc((stub_file->symbol_count + new_sym_cnt) * sizeof(asymbol *));
+
+ for ( j = 0; j < stub_file->symbol_count; j++ )
+ stub_file->asymbols[j] = old_asymbols[j];
- }
- }
- )
- )
+ for ( j = 0, i = stub_file->symbol_count; j < new_sym_cnt; j++, i++ )
+ stub_file->asymbols[i] = &syms[j];
+
+ stub_file->symbol_count += new_sym_cnt;
+ }
+ }
+ }
/* Add a statement to get the linker stubs included in the output */
lang_add_wild(".hppa_linker_stubs",NULL);