ignore invalid DOF provider sections
[binutils-gdb.git] / ld / lexsup.c
index 4a71ba41cb05e0a8df46bc49e39695e1643433ac..28541341f3c1214ff6b1354f73767ba2c99d0fcb 100644 (file)
@@ -212,6 +212,9 @@ static const struct ld_option ld_options[] =
   { {"undefined", required_argument, NULL, 'u'},
     'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"),
     TWO_DASHES },
+  { {"require-defined", required_argument, NULL, OPTION_REQUIRE_DEFINED_SYMBOL},
+    '\0', N_("SYMBOL"), N_("Require SYMBOL be defined in the final output"),
+    TWO_DASHES },
   { {"unique", optional_argument, NULL, OPTION_UNIQUE},
     '\0', N_("[=SECTION]"),
     N_("Don't merge input [SECTION | orphan] sections"), TWO_DASHES },
@@ -523,6 +526,8 @@ static const struct ld_option ld_options[] =
   { {"pop-state", no_argument, NULL, OPTION_POP_STATE},
     '\0', NULL, N_("Pop state of flags governing input file handling"),
     TWO_DASHES },
+  { {"print-memory-usage", no_argument, NULL, OPTION_PRINT_MEMORY_USAGE},
+    '\0', NULL, N_("Report target memory usage"), TWO_DASHES },
 };
 
 #define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1245,6 +1250,9 @@ parse_args (unsigned argc, char **argv)
        case 'u':
          ldlang_add_undef (optarg, TRUE);
          break;
+        case OPTION_REQUIRE_DEFINED_SYMBOL:
+          ldlang_add_require_defined (optarg);
+         break;
        case OPTION_UNIQUE:
          if (optarg != NULL)
            lang_add_unique (optarg);
@@ -1490,6 +1498,10 @@ parse_args (unsigned argc, char **argv)
              free (oldp);
            }
          break;
+
+       case OPTION_PRINT_MEMORY_USAGE:
+         command_line.print_memory_usage = TRUE;
+         break;
        }
     }
 
@@ -1572,7 +1584,7 @@ parse_args (unsigned argc, char **argv)
        einfo (_("%P%F: -f may not be used without -shared\n"));
     }
 
-  if (! link_info.shared || link_info.pie)
+  if ((! link_info.shared && ! link_info.relocatable) || link_info.pie)
     link_info.executable = TRUE;
 
   /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols).  I
@@ -1722,6 +1734,9 @@ elf_static_list_options (FILE *file)
   fprintf (file, _("\
   --build-id[=STYLE]          Generate build ID note\n"));
   fprintf (file, _("\
+  --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]\n\
+                              Compress DWARF debug sections using zlib\n"));
+  fprintf (file, _("\
   -z common-page-size=SIZE    Set common page size to SIZE\n"));
   fprintf (file, _("\
   -z max-page-size=SIZE       Set maximum page size to SIZE\n"));