X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ld%2Fldlex.l;h=ea6fa9948ac81ef858469a39c1fb8a09a3dbcb76;hb=6efba98792ca1c59e2b4ad94ad2b20ecc5715413;hp=c0a85217bc06ff88388e6ffc8d072d300b644bda;hpb=0841712ea90a7633d54bbc1f00fa82e068815b66;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/ldlex.l b/ld/ldlex.l index c0a85217bc..ea6fa9948a 100644 --- a/ld/ldlex.l +++ b/ld/ldlex.l @@ -1,24 +1,24 @@ %{ /* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -This file is part of GLD, the Gnu Linker. + This file is part of GLD, the Gnu Linker. -GLD is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. + GLD is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. -GLD is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. + GLD is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -You should have received a copy of the GNU General Public License -along with GLD; see the file COPYING. If not, write to the Free -Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. */ + You should have received a copy of the GNU General Public License + along with GLD; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ /* This was written by steve chamberlain @@ -65,6 +65,8 @@ const char *lex_string = NULL; #undef YY_INPUT #define YY_INPUT(buf,result,max_size) yy_input (buf, &result, max_size) +#define YY_NO_UNPUT + #define MAX_INCLUDE_DEPTH 10 static YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH]; static const char *file_name_stack[MAX_INCLUDE_DEPTH]; @@ -234,62 +236,66 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)* "/" { RTOKEN('/');} "%" { RTOKEN('%');} "<" { RTOKEN('<');} -"=" { RTOKEN('=');} -"}" { RTOKEN('}') ; } -"{" { RTOKEN('{'); } -")" { RTOKEN(')');} -"(" { RTOKEN('(');} +"=" { RTOKEN('=');} +"}" { RTOKEN('}') ; } +"{" { RTOKEN('{'); } +")" { RTOKEN(')');} +"(" { RTOKEN('(');} ":" { RTOKEN(':'); } ";" { RTOKEN(';');} -"MEMORY" { RTOKEN(MEMORY);} -"ORIGIN" { RTOKEN(ORIGIN);} -"VERSION" { RTOKEN(VERSIONK);} +"MEMORY" { RTOKEN(MEMORY);} +"ORIGIN" { RTOKEN(ORIGIN);} +"VERSION" { RTOKEN(VERSIONK);} "BLOCK" { RTOKEN(BLOCK);} "BIND" { RTOKEN(BIND);} -"LENGTH" { RTOKEN(LENGTH);} -"ALIGN" { RTOKEN(ALIGN_K);} +"LENGTH" { RTOKEN(LENGTH);} +"ALIGN" { RTOKEN(ALIGN_K);} "DATA_SEGMENT_ALIGN" { RTOKEN(DATA_SEGMENT_ALIGN);} "DATA_SEGMENT_RELRO_END" { RTOKEN(DATA_SEGMENT_RELRO_END);} "DATA_SEGMENT_END" { RTOKEN(DATA_SEGMENT_END);} -"ADDR" { RTOKEN(ADDR);} -"LOADADDR" { RTOKEN(LOADADDR);} +"ADDR" { RTOKEN(ADDR);} +"LOADADDR" { RTOKEN(LOADADDR);} "MAX" { RTOKEN(MAX_K); } "MIN" { RTOKEN(MIN_K); } "ASSERT" { RTOKEN(ASSERT_K); } "ENTRY" { RTOKEN(ENTRY);} "EXTERN" { RTOKEN(EXTERN);} -"NEXT" { RTOKEN(NEXT);} +"NEXT" { RTOKEN(NEXT);} "sizeof_headers" { RTOKEN(SIZEOF_HEADERS);} "SIZEOF_HEADERS" { RTOKEN(SIZEOF_HEADERS);} +"SEGMENT_START" { RTOKEN(SEGMENT_START);} "MAP" { RTOKEN(MAP);} -"SIZEOF" { RTOKEN(SIZEOF);} -"TARGET" { RTOKEN(TARGET_K);} +"SIZEOF" { RTOKEN(SIZEOF);} +"TARGET" { RTOKEN(TARGET_K);} "SEARCH_DIR" { RTOKEN(SEARCH_DIR);} -"OUTPUT" { RTOKEN(OUTPUT);} +"OUTPUT" { RTOKEN(OUTPUT);} "INPUT" { RTOKEN(INPUT);} "GROUP" { RTOKEN(GROUP);} -"DEFINED" { RTOKEN(DEFINED);} +"AS_NEEDED" { RTOKEN(AS_NEEDED);} +"DEFINED" { RTOKEN(DEFINED);} "CREATE_OBJECT_SYMBOLS" { RTOKEN(CREATE_OBJECT_SYMBOLS);} "CONSTRUCTORS" { RTOKEN( CONSTRUCTORS);} -"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);} +"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);} "INHIBIT_COMMON_ALLOCATION" { RTOKEN(INHIBIT_COMMON_ALLOCATION);} -"SECTIONS" { RTOKEN(SECTIONS);} +"SECTIONS" { RTOKEN(SECTIONS);} "FILL" { RTOKEN(FILL);} -"STARTUP" { RTOKEN(STARTUP);} +"STARTUP" { RTOKEN(STARTUP);} "OUTPUT_FORMAT" { RTOKEN(OUTPUT_FORMAT);} "OUTPUT_ARCH" { RTOKEN( OUTPUT_ARCH);} "HLL" { RTOKEN(HLL);} -"SYSLIB" { RTOKEN(SYSLIB);} +"SYSLIB" { RTOKEN(SYSLIB);} "FLOAT" { RTOKEN(FLOAT);} "QUAD" { RTOKEN( QUAD);} "SQUAD" { RTOKEN( SQUAD);} "LONG" { RTOKEN( LONG);} "SHORT" { RTOKEN( SHORT);} "BYTE" { RTOKEN( BYTE);} -"NOFLOAT" { RTOKEN(NOFLOAT);} +"NOFLOAT" { RTOKEN(NOFLOAT);} "NOCROSSREFS" { RTOKEN(NOCROSSREFS);} "OVERLAY" { RTOKEN(OVERLAY); } -"SORT" { RTOKEN(SORT); } +"SORT_BY_NAME" { RTOKEN(SORT_BY_NAME); } +"SORT_BY_ALIGNMENT" { RTOKEN(SORT_BY_ALIGNMENT); } +"SORT" { RTOKEN(SORT_BY_NAME); } "NOLOAD" { RTOKEN(NOLOAD);} "DSECT" { RTOKEN(DSECT);} "COPY" { RTOKEN(COPY);} @@ -303,22 +309,22 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)* "len" { RTOKEN( LENGTH);} "INCLUDE" { RTOKEN(INCLUDE);} "PHDRS" { RTOKEN (PHDRS); } -"AT" { RTOKEN(AT);} -"SUBALIGN" { RTOKEN(SUBALIGN);} -"PROVIDE" { RTOKEN(PROVIDE); } +"AT" { RTOKEN(AT);} +"SUBALIGN" { RTOKEN(SUBALIGN);} +"PROVIDE" { RTOKEN(PROVIDE); } "KEEP" { RTOKEN(KEEP); } -"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); } +"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); } "#".*\n? { ++ lineno; } "\n" { ++ lineno; RTOKEN(NEWLINE); } "*".* { /* Mri comment line */ } ";".* { /* Mri comment line */ } "END" { RTOKEN(ENDWORD); } -"ALIGNMOD" { RTOKEN(ALIGNMOD);} -"ALIGN" { RTOKEN(ALIGN_K);} +"ALIGNMOD" { RTOKEN(ALIGNMOD);} +"ALIGN" { RTOKEN(ALIGN_K);} "CHIP" { RTOKEN(CHIP); } "BASE" { RTOKEN(BASE); } -"ALIAS" { RTOKEN(ALIAS); } -"TRUNCATE" { RTOKEN(TRUNCATE); } +"ALIAS" { RTOKEN(ALIAS); } +"TRUNCATE" { RTOKEN(TRUNCATE); } "LOAD" { RTOKEN(LOAD); } "PUBLIC" { RTOKEN(PUBLIC); } "ORDER" { RTOKEN(ORDER); } @@ -330,12 +336,12 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)* "SECT" { RTOKEN(SECT); } "ABSOLUTE" { RTOKEN(ABSOLUTE); } "end" { RTOKEN(ENDWORD); } -"alignmod" { RTOKEN(ALIGNMOD);} -"align" { RTOKEN(ALIGN_K);} +"alignmod" { RTOKEN(ALIGNMOD);} +"align" { RTOKEN(ALIGN_K);} "chip" { RTOKEN(CHIP); } "base" { RTOKEN(BASE); } -"alias" { RTOKEN(ALIAS); } -"truncate" { RTOKEN(TRUNCATE); } +"alias" { RTOKEN(ALIAS); } +"truncate" { RTOKEN(TRUNCATE); } "load" { RTOKEN(LOAD); } "public" { RTOKEN(PUBLIC); } "order" { RTOKEN(ORDER); }