aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 99526a0..a83385e 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -190,6 +190,17 @@ main (argc, argv)
}
ldemul_after_parse();
+ if (config.map_filename)
+ {
+ config.map_file = fopen(config.map_filename, FOPEN_WT);
+ if (config.map_file == (FILE *)NULL)
+ {
+ einfo("%P%F: can't open map file %s\n",
+ config.map_filename);
+ }
+ }
+ else config.map_file = stdout;
+
lang_process();
/* Print error messages for any missing symbols, for any warning