Line 1... |
Line 1... |
/* A YACC grammar to parse a superset of the AT&T linker scripting language.
|
/* A YACC grammar to parse a superset of the AT&T linker scripting language.
|
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
|
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
|
|
|
This file is part of the GNU Binutils.
|
This file is part of the GNU Binutils.
|
|
|
Line 627... |
Line 627... |
struct wildcard_spec tmp;
|
struct wildcard_spec tmp;
|
tmp.name = NULL;
|
tmp.name = NULL;
|
tmp.exclude_name_list = NULL;
|
tmp.exclude_name_list = NULL;
|
tmp.sorted = none;
|
tmp.sorted = none;
|
tmp.section_flag_list = $1;
|
tmp.section_flag_list = $1;
|
lang_add_wild (NULL, $3, ldgram_had_keep);
|
lang_add_wild (&tmp, $3, ldgram_had_keep);
|
}
|
}
|
| wildcard_spec '(' file_NAME_list ')'
|
| wildcard_spec '(' file_NAME_list ')'
|
{
|
{
|
lang_add_wild (&$1, $3, ldgram_had_keep);
|
lang_add_wild (&$1, $3, ldgram_had_keep);
|
}
|
}
|
Line 1217... |
Line 1217... |
$$ = exp_intop (0x6474e551);
|
$$ = exp_intop (0x6474e551);
|
else
|
else
|
{
|
{
|
einfo (_("\
|
einfo (_("\
|
%X%P:%S: unknown phdr type `%s' (try integer literal)\n"),
|
%X%P:%S: unknown phdr type `%s' (try integer literal)\n"),
|
s);
|
NULL, s);
|
$$ = exp_intop (0);
|
$$ = exp_intop (0);
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
Line 1240... |
Line 1240... |
else if (strcmp ($1, "PHDRS") == 0 && $2 == NULL)
|
else if (strcmp ($1, "PHDRS") == 0 && $2 == NULL)
|
$$.phdrs = TRUE;
|
$$.phdrs = TRUE;
|
else if (strcmp ($1, "FLAGS") == 0 && $2 != NULL)
|
else if (strcmp ($1, "FLAGS") == 0 && $2 != NULL)
|
$$.flags = $2;
|
$$.flags = $2;
|
else
|
else
|
einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"), $1);
|
einfo (_("%X%P:%S: PHDRS syntax error at `%s'\n"),
|
|
NULL, $1);
|
}
|
}
|
| AT '(' exp ')' phdr_qualifiers
|
| AT '(' exp ')' phdr_qualifiers
|
{
|
{
|
$$ = $5;
|
$$ = $5;
|
$$.at = $3;
|
$$.at = $3;
|
Line 1446... |
Line 1447... |
yyerror(arg)
|
yyerror(arg)
|
const char *arg;
|
const char *arg;
|
{
|
{
|
if (ldfile_assumed_script)
|
if (ldfile_assumed_script)
|
einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
|
einfo (_("%P:%s: file format not recognized; treating as linker script\n"),
|
ldfile_input_filename);
|
ldlex_filename ());
|
if (error_index > 0 && error_index < ERROR_NAME_MAX)
|
if (error_index > 0 && error_index < ERROR_NAME_MAX)
|
einfo ("%P%F:%S: %s in %s\n", arg, error_names[error_index-1]);
|
einfo ("%P%F:%S: %s in %s\n", NULL, arg, error_names[error_index - 1]);
|
else
|
else
|
einfo ("%P%F:%S: %s\n", arg);
|
einfo ("%P%F:%S: %s\n", NULL, arg);
|
}
|
}
|