* ld.h (parsing_defsym): Declare.
* ldlex.h (lex_string): Declare. * ldlex.l (lex_string): Define. * lexsup.c (parsing_defsym): Define. (parse_args): In OPTION_DEFSYM case, set lex_string before calling lex_redirect, and clear it after calling yyparse. Set parsing_defsym around call to yyparse. * ldmain.c (main): Set lex_string before calling lex_redirect, and clear it after calling yyparse. * ldmisc.c (vfinfo): For %S, handle --defsym arguments and built in linker scripts correctly. PR 8092.
This commit is contained in:
parent
a69bb1fa31
commit
630f4ac9c6
12
ld/ChangeLog
12
ld/ChangeLog
|
@ -1,5 +1,17 @@
|
||||||
Thu Sep 28 12:34:13 1995 Ian Lance Taylor <ian@cygnus.com>
|
Thu Sep 28 12:34:13 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* ld.h (parsing_defsym): Declare.
|
||||||
|
* ldlex.h (lex_string): Declare.
|
||||||
|
* ldlex.l (lex_string): Define.
|
||||||
|
* lexsup.c (parsing_defsym): Define.
|
||||||
|
(parse_args): In OPTION_DEFSYM case, set lex_string before calling
|
||||||
|
lex_redirect, and clear it after calling yyparse. Set
|
||||||
|
parsing_defsym around call to yyparse.
|
||||||
|
* ldmain.c (main): Set lex_string before calling lex_redirect, and
|
||||||
|
clear it after calling yyparse.
|
||||||
|
* ldmisc.c (vfinfo): For %S, handle --defsym arguments and built
|
||||||
|
in linker scripts correctly.
|
||||||
|
|
||||||
* scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other
|
* scripttempl/sparccoff.sc: Add .ctors/.dtors handling like other
|
||||||
COFF targets, allowing for the leading underscore used on SPARC
|
COFF targets, allowing for the leading underscore used on SPARC
|
||||||
COFF.
|
COFF.
|
||||||
|
|
|
@ -47,6 +47,8 @@ unsigned long strtoul ();
|
||||||
static void set_default_dirlist PARAMS ((char *dirlist_ptr));
|
static void set_default_dirlist PARAMS ((char *dirlist_ptr));
|
||||||
static void set_section_start PARAMS ((char *sect, char *valstr));
|
static void set_section_start PARAMS ((char *sect, char *valstr));
|
||||||
|
|
||||||
|
/* Non-zero if we are processing a --defsym from the command line. */
|
||||||
|
int parsing_defsym = 0;
|
||||||
|
|
||||||
void
|
void
|
||||||
parse_args (argc, argv)
|
parse_args (argc, argv)
|
||||||
|
@ -260,9 +262,13 @@ parse_args (argc, argv)
|
||||||
command_line.force_common_definition = true;
|
command_line.force_common_definition = true;
|
||||||
break;
|
break;
|
||||||
case OPTION_DEFSYM:
|
case OPTION_DEFSYM:
|
||||||
|
lex_string = optarg;
|
||||||
lex_redirect (optarg);
|
lex_redirect (optarg);
|
||||||
parser_input = input_defsym;
|
parser_input = input_defsym;
|
||||||
|
parsing_defsym = 1;
|
||||||
yyparse ();
|
yyparse ();
|
||||||
|
parsing_defsym = 0;
|
||||||
|
lex_string = NULL;
|
||||||
break;
|
break;
|
||||||
case OPTION_DYNAMIC_LINKER:
|
case OPTION_DYNAMIC_LINKER:
|
||||||
command_line.interpreter = optarg;
|
command_line.interpreter = optarg;
|
||||||
|
|
Loading…
Reference in New Issue