diff options
author | Steve Chamberlain <sac@cygnus> | 1992-01-24 22:34:34 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1992-01-24 22:34:34 +0000 |
commit | 2e2bf962db00b2e23a222687e4bc3c5971c645b7 (patch) | |
tree | 0eceb10d2d00f8f32ad14ea539129ee894d7f1e9 /ld/ldexp.c | |
parent | 2cbe4c5f9e97dff6786352e1867c3c6afd383258 (diff) | |
download | gdb-2e2bf962db00b2e23a222687e4bc3c5971c645b7.zip gdb-2e2bf962db00b2e23a222687e4bc3c5971c645b7.tar.gz gdb-2e2bf962db00b2e23a222687e4bc3c5971c645b7.tar.bz2 |
* Makefile.in: added relax, also made three stage go through a
partial link stage.
* relax.c : added
* config.h: if GNU960 defined, then default emulation mode is
GLD960
* ldexp.h, ldexp.c: map to file hooks
* ldlang.c: map to file hooks
* ldgram.y: added -Map -relax
* ldlex.l: added -relax, -Map
* ldmain.c: open map file
* ldmisc.c: support for map file
* ldwrite.c: new relax magic
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r-- | ld/ldexp.c | 52 |
1 files changed, 25 insertions, 27 deletions
@@ -55,8 +55,7 @@ extern bfd_vma print_dot; static void -DEFUN(exp_print_token,(outfile, code), - FILE *outfile AND +DEFUN(exp_print_token,( code), token_code_type code) { static struct { @@ -110,12 +109,12 @@ DEFUN(exp_print_token,(outfile, code), unsigned int idx; for (idx = 0; table[idx].name != (char*)NULL; idx++) { if (table[idx].code == code) { - fprintf(outfile, "%s", table[idx].name); + fprintf(config.map_file, "%s", table[idx].name); return; } } /* Not in table, just print it alone */ - fprintf(outfile, "%c",code); + fprintf(config.map_file, "%c",code); } static void @@ -710,8 +709,7 @@ DEFUN(exp_assop,(code, dst, src), } void -DEFUN(exp_print_tree,(outfile, tree), - FILE *outfile AND +DEFUN(exp_print_tree,(tree), etree_type *tree) { switch (tree->type.node_class) { @@ -722,45 +720,45 @@ DEFUN(exp_print_tree,(outfile, tree), case etree_assign: #if 0 if (tree->assign.dst->sdefs != (asymbol *)NULL){ - fprintf(outfile,"%s (%x) ",tree->assign.dst->name, + fprintf(config.map_file,"%s (%x) ",tree->assign.dst->name, tree->assign.dst->sdefs->value); } else { - fprintf(outfile,"%s (UNDEFINED)",tree->assign.dst->name); + fprintf(config.map_file,"%s (UNDEFINED)",tree->assign.dst->name); } #endif - fprintf(outfile,"%s ",tree->assign.dst); - exp_print_token(outfile,tree->type.node_code); - exp_print_tree(outfile,tree->assign.src); + fprintf(config.map_file,"%s ",tree->assign.dst); + exp_print_token(tree->type.node_code); + exp_print_tree(tree->assign.src); break; case etree_binary: - exp_print_tree(outfile,tree->binary.lhs); - exp_print_token(outfile,tree->type.node_code); - exp_print_tree(outfile,tree->binary.rhs); + exp_print_tree(tree->binary.lhs); + exp_print_token(tree->type.node_code); + exp_print_tree(tree->binary.rhs); break; case etree_trinary: - exp_print_tree(outfile,tree->trinary.cond); - fprintf(outfile,"?"); - exp_print_tree(outfile,tree->trinary.lhs); - fprintf(outfile,":"); - exp_print_tree(outfile,tree->trinary.rhs); + exp_print_tree(tree->trinary.cond); + fprintf(config.map_file,"?"); + exp_print_tree(tree->trinary.lhs); + fprintf(config.map_file,":"); + exp_print_tree(tree->trinary.rhs); break; case etree_unary: - exp_print_token(outfile,tree->unary.type.node_code); - fprintf(outfile,"("); - exp_print_tree(outfile,tree->unary.child); - fprintf(outfile,")"); + exp_print_token(tree->unary.type.node_code); + fprintf(config.map_file,"("); + exp_print_tree(tree->unary.child); + fprintf(config.map_file,")"); break; case etree_undef: - fprintf(outfile,"????????"); + fprintf(config.map_file,"????????"); break; case etree_name: if (tree->type.node_code == NAME) { - fprintf(outfile,"%s", tree->name.name); + fprintf(config.map_file,"%s", tree->name.name); } else { - exp_print_token(outfile,tree->type.node_code); - fprintf(outfile,"(%s)", tree->name.name); + exp_print_token(tree->type.node_code); + fprintf(config.map_file,"(%s)", tree->name.name); } break; default: |