ns32k port from Ian Dall
[binutils-gdb.git] / ld / ldgram.y
index 91875791273ce923815e35ed147eb7a1115cfee8..3e6ca0aed409fd20e83213357bbcec41c5071c3e 100644 (file)
@@ -37,8 +37,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "ldmisc.h"
 #include "ldmain.h"
 #include "mri.h"
-
-#define YYDEBUG 1
+#include "ldlex.h"
 
 static int typebits;
 
@@ -111,10 +110,6 @@ static int error_index;
 %token FORMAT PUBLIC DEFSYMEND BASE ALIAS TRUNCATE REL
 %token INPUT_SCRIPT INPUT_MRI_SCRIPT INPUT_DEFSYM
 
-%{
-/* For byacc, this has to come after INPUT_SCRIPT et al. are defined.  */
-#include "ldlex.h"
-%}
 %%
 
 file:  
@@ -158,7 +153,6 @@ mri_script_command:
                        einfo("%P%F: unrecognised keyword in MRI style script '%s'\n",$1);
                        }
        |       LIST    {
-                       write_map = true;
                        config.map_filename = "-";
                        }
         |       ORDER ordernamelist
@@ -245,7 +239,7 @@ ifile_p1:
        |       TARGET_K '(' NAME ')'
                { lang_add_target($3); }
        |       SEARCH_DIR '(' filename ')'
-               { ldfile_add_library_path($3); }
+               { ldfile_add_library_path ($3, false); }
        |       OUTPUT '(' filename ')'
                { lang_add_output($3, 1); }
         |      OUTPUT_FORMAT '(' NAME ')'
@@ -285,7 +279,7 @@ sec_or_group_p1:
 
 statement_anywhere:
                ENTRY '(' NAME ')'
-               { lang_add_entry($3); }
+               { lang_add_entry ($3, 0); }
        |       assignment end
        ;
 
@@ -588,10 +582,10 @@ section:  NAME            { ldlex_expression(); }
                        lang_enter_output_section_statement($1,$3,typebits,0,0,0,$4);
                        }
                statement_list_opt      
-               '}' {ldlex_expression();} fill_opt memspec_opt
+               '}' {ldlex_expression();} memspec_opt fill_opt
                {
                  ldlex_popstate();
-                 lang_leave_output_section_statement($11, $12);
+                 lang_leave_output_section_statement($12, $11);
                }
 opt_comma