diff options
author | Steve Chamberlain <sac@cygnus> | 1992-03-06 15:00:57 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1992-03-06 15:00:57 +0000 |
commit | fe563ffeb75635b98930e9c87a42c1ca09dd61c0 (patch) | |
tree | b0cb9fabebd51846e1e031437dc1b434d8531b17 /ld/ldmain.c | |
parent | 56a56f4c15e4becf0ed7836abe0d46e5e9612081 (diff) | |
download | gdb-fe563ffeb75635b98930e9c87a42c1ca09dd61c0.zip gdb-fe563ffeb75635b98930e9c87a42c1ca09dd61c0.tar.gz gdb-fe563ffeb75635b98930e9c87a42c1ca09dd61c0.tar.bz2 |
* ldmain.c (Q_enter_file_symbols): now aliases work again
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 49 |
1 files changed, 26 insertions, 23 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index a185a9c..c42c208 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -133,10 +133,10 @@ main (argc, argv) int i; check_v960( argc, argv ); - emulation = GLD960_EMULATION_NAME; + emulation = "gld960"; for ( i = 1; i < argc; i++ ){ if ( !strcmp(argv[i],"-Fcoff") ){ - emulation = LNK960_EMULATION_NAME; + emulation = "lnk960"; output_flavor = BFD_COFF_FORMAT; break; } @@ -193,7 +193,7 @@ main (argc, argv) if (config.map_filename) { - if (strcmp(config.map_filename[0],"-") == 0) + if (strcmp(config.map_filename, "-") == 0) { config.map_file = stdout; } @@ -239,10 +239,10 @@ main (argc, argv) unlink(output_filename); } else { bfd_close(output_bfd); }; - return (!config.make_executable); + exit (!config.make_executable); } - return(0); + exit(0); } /* main() */ @@ -430,37 +430,40 @@ lang_input_statement_type *entry; asymbol **q ; entry->common_section = - bfd_make_section_old_way(entry->the_bfd, "COMMON"); + bfd_make_section_old_way(entry->the_bfd, "COMMON"); ldlang_add_file(entry); if (trace_files || option_v) { - info("%I\n", entry); - } + info("%I\n", entry); + } total_symbols_seen += entry->symbol_count; total_files_seen ++; for (q = entry->asymbols; *q; q++) + { + asymbol *p = *q; + + if (p->flags & BSF_INDIRECT) { - asymbol *p = *q; + add_indirect(q); + } + else if (p->flags & BSF_WARNING) + { + add_warning(p); + } - if (p->section == &bfd_und_section - || (p->flags & BSF_GLOBAL) - || p->section == &bfd_com_section - || (p->flags & BSF_CONSTRUCTOR)) - { - Q_enter_global_ref(q); - } - if (p->flags & BSF_INDIRECT) { - add_indirect(q); - } + else if (p->section == &bfd_und_section + || (p->flags & BSF_GLOBAL) + || p->section == &bfd_com_section + || (p->flags & BSF_CONSTRUCTOR)) + { + Q_enter_global_ref(q); + } - if (p->flags & BSF_WARNING) { - add_warning(p); - } - } + } } |