-command_line_option:
- OPTION_Bstatic { }
- | OPTION_help
- {
- help ();
- exit (0);
- }
- | OPTION_v
- {
- ldversion(0);
- }
- | OPTION_V
- {
- ldversion(1);
- trace_file_tries = true;
- }
- | OPTION_version
- {
- ldversion(0);
- exit(0);
- }
- | OPTION_t {
- trace_files = true;
- }
- | OPTION_Map NAME
- {
- write_map = true;
- config.map_filename = $2;
- }
- | OPTION_m NAME
- {
- /* Ignore. */
- }
- | OPTION_memul
- {
- /* Ignore. */
- }
- | OPTION_M
- {
- config.map_filename = "-";
- }
- | OPTION_n {
- config.magic_demand_paged = false;
- }
- | OPTION_N {
- config.text_read_only = false;
- config.magic_demand_paged = false;
- }
- | OPTION_s {
- strip_symbols = STRIP_ALL;
- }
- | OPTION_S {
- strip_symbols = STRIP_DEBUGGER;
- }
- | OPTION_u NAME {
- ldlang_add_undef($2);
- }
-
- | OPTION_r {
- config.relocateable_output = true;
- config.build_constructors = false;
- config.magic_demand_paged = false;
- config.text_read_only = false;
- }
- | OPTION_Ur {
- config.relocateable_output = true;
- config.build_constructors = true;
- config.magic_demand_paged = false;
- config.text_read_only = false;
- }
- | OPTION_o filename
- {
- lang_add_output($2, 0);
- }
- | OPTION_e NAME
- { lang_add_entry($2);
- }
- | OPTION_X {
- discard_locals = DISCARD_L;
- }
- | OPTION_x {
- discard_locals = DISCARD_ALL;
- }
-
- | OPTION_noinhibit_exec
- {
- force_make_executable = true;
- }
- | OPTION_sort_common
- {
- config.sort_common = true;
- }
- | OPTION_warn_common
- {
- config.warn_common = true;
- }
- | OPTION_d {
- command_line.force_common_definition = true;
- }
-
- | OPTION_relax {
- command_line.relax = true;
- }
- | OPTION_dc
- {
- command_line.force_common_definition = true;
- }
- | OPTION_g
- {
- /* Ignored */
- }
- | OPTION_dp
- {
- command_line.force_common_definition = true;
- }
- | OPTION_format NAME
- {
- lang_add_target($2);
- }
- | OPTION_oformat NAME
- {
- lang_add_output_format($2, 0);
- }
- | OPTION_Texp
- { ldlex_expression();
- hex_mode = 16;
- }
- INT
- { ldlex_popstate();
- lang_section_start($1,exp_intop($3));
- hex_mode = 0;
- }
- | OPTION_y
- {
- add_ysym($1);
- }
- | OPTION_Aarch
- {
- ldfile_add_arch($1);
- }
- | OPTION_b NAME
- {
- lang_add_target($2);
- }
- | OPTION_L NAME
- {
- ldfile_add_library_path($2);
- }
- | OPTION_Lfile
- {
- ldfile_add_library_path($1);
- }
- | OPTION_F
- {
- /* Ignore */
- }
- | OPTION_c filename
- {ldfile_open_command_file($2); }
- mri_script_file END { ldlex_command();}