aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 23e2d37..7dfa75b 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -22,6 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "bfd.h"
#include "sysdep.h"
#include <stdio.h>
+#include "libiberty.h"
#include "bfdlink.h"
#include "config.h"
@@ -205,16 +206,11 @@ main (argc, argv)
char *s = ldemul_get_script (&isfile);
if (isfile)
- {
- /* sizeof counts the terminating NUL. */
- size_t size = strlen (s) + sizeof ("-T ");
- char *buf = (char *) xmalloc(size);
- sprintf (buf, "-T %s", s);
- parse_line (buf, 0);
- free (buf);
- }
+ ldfile_open_command_file (s);
else
- parse_line (s, 1);
+ lex_redirect (s);
+ parser_input = input_script;
+ yyparse ();
}
if (link_info.relocateable && command_line.relax)