]> Git Repo - binutils.git/blobdiff - ld/lexsup.c
* elfcode.h (elf_bfd_final_link): If trying to generate a shared
[binutils.git] / ld / lexsup.c
index bf2365cc114085de1419f80d9a579c60391a71d8..4a0aad42e5dfdf0da21b701096d868f9724419aa 100644 (file)
@@ -55,55 +55,62 @@ parse_args (argc, argv)
 
   /* 150 isn't special; it's just an arbitrary non-ASCII char value.  */
 
+#define OPTION_CALL_SHARED             150
+#define OPTION_DEFSYM                  (OPTION_CALL_SHARED + 1)
+#define OPTION_DYNAMIC_LINKER          (OPTION_DEFSYM + 1)
+#define OPTION_EB                      (OPTION_DYNAMIC_LINKER + 1)
+#define OPTION_EL                      (OPTION_EB + 1)
+#define OPTION_HELP                    (OPTION_EL + 1)
+#define OPTION_IGNORE                  (OPTION_HELP + 1)
+#define OPTION_MAP                     (OPTION_IGNORE + 1)
+#define OPTION_NO_KEEP_MEMORY          (OPTION_MAP + 1)
+#define OPTION_NOINHIBIT_EXEC          (OPTION_NO_KEEP_MEMORY + 1)
+#define OPTION_NON_SHARED              (OPTION_NOINHIBIT_EXEC + 1)
+#define OPTION_OFORMAT                 (OPTION_NON_SHARED + 1)
+#define OPTION_RELAX                   (OPTION_OFORMAT + 1)
+#define OPTION_RETAIN_SYMBOLS_FILE     (OPTION_RELAX + 1)
+#define OPTION_SORT_COMMON             (OPTION_RETAIN_SYMBOLS_FILE + 1)
+#define OPTION_STATS                   (OPTION_SORT_COMMON + 1)
+#define OPTION_TBSS                    (OPTION_STATS + 1)
+#define OPTION_TDATA                   (OPTION_TBSS + 1)
+#define OPTION_TTEXT                   (OPTION_TDATA + 1)
+#define OPTION_TRADITIONAL_FORMAT      (OPTION_TTEXT + 1)
+#define OPTION_UR                      (OPTION_TRADITIONAL_FORMAT + 1)
+#define OPTION_VERSION                 (OPTION_UR + 1)
+#define OPTION_WARN_COMMON             (OPTION_VERSION + 1)
+
   static struct option longopts[] = {
-#define OPTION_CALL_SHARED 150
-#define OPTION_NON_SHARED 151
     {"call_shared", no_argument, NULL, OPTION_CALL_SHARED},
     {"dc", no_argument, NULL, 'd'},
-#define OPTION_DEFSYM 152
     {"defsym", required_argument, NULL, OPTION_DEFSYM},
     {"dn", no_argument, NULL, OPTION_NON_SHARED},
     {"dp", no_argument, NULL, 'd'},
     {"dy", no_argument, NULL, OPTION_CALL_SHARED},
-#define OPTION_EB 153
+    {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
     {"EB", no_argument, NULL, OPTION_EB},
-#define OPTION_EL 154
     {"EL", no_argument, NULL, OPTION_EL},
     {"format", required_argument, NULL, 'b'},
-#define OPTION_HELP 155
     {"help", no_argument, NULL, OPTION_HELP},
-#define OPTION_MAP 156
     {"Map", required_argument, NULL, OPTION_MAP},
-#define OPTION_NO_KEEP_MEMORY 157
     {"no-keep-memory", no_argument, NULL, OPTION_NO_KEEP_MEMORY},
-#define OPTION_NOINHIBIT_EXEC 158
     {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
     {"noinhibit_exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
     {"non_shared", no_argument, NULL, OPTION_NON_SHARED},
-#define OPTION_OFORMAT 159
     {"oformat", required_argument, NULL, OPTION_OFORMAT},
-#define OPTION_IGNORE 160
     {"Qy", no_argument, NULL, OPTION_IGNORE},
-#define OPTION_RELAX 161
+    {"qmagic", no_argument, NULL, OPTION_IGNORE}, /* Linux compatibility.  */
     {"relax", no_argument, NULL, OPTION_RELAX},
-#define OPTION_RETAIN_SYMBOLS_FILE 162
     {"retain-symbols-file", no_argument, NULL, OPTION_RETAIN_SYMBOLS_FILE},
-#define OPTION_SORT_COMMON 163
     {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
     {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
-#define OPTION_STATS 164
     {"stats", no_argument, NULL, OPTION_STATS},
-#define OPTION_TBSS 165
+    {"static", no_argument, NULL, OPTION_NON_SHARED},
     {"Tbss", required_argument, NULL, OPTION_TBSS},
-#define OPTION_TDATA 166
     {"Tdata", required_argument, NULL, OPTION_TDATA},
-#define OPTION_TTEXT 167
     {"Ttext", required_argument, NULL, OPTION_TTEXT},
-#define OPTION_UR 168
+    {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
     {"Ur", no_argument, NULL, OPTION_UR},
-#define OPTION_VERSION 169
     {"version", no_argument, NULL, OPTION_VERSION},
-#define OPTION_WARN_COMMON 170
     {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
     {NULL, no_argument, NULL, 0}
   };
@@ -157,6 +164,9 @@ parse_args (argc, argv)
          parser_input = input_defsym;
          yyparse ();
          break;
+       case OPTION_DYNAMIC_LINKER:
+         command_line.interpreter = optarg;
+         break;
        case OPTION_EB:
          /* FIXME: This is currently ignored.  It means
             ``produce a big-endian object file''.  It could
@@ -231,6 +241,7 @@ parse_args (argc, argv)
        case OPTION_OFORMAT:
          lang_add_output_format (optarg, 0);
          break;
+       case 'i':
        case 'r':
          link_info.relocateable = true;
          config.build_constructors = false;
@@ -278,6 +289,9 @@ parse_args (argc, argv)
        case OPTION_TTEXT:
          set_section_start (".text", optarg);
          break;
+       case OPTION_TRADITIONAL_FORMAT:
+         config.traditional_format = true;
+         break;
        case OPTION_UR:
          link_info.relocateable = true;
          config.build_constructors = true;
This page took 0.025821 seconds and 4 git commands to generate.