Add --compress-debug-sections=[none|zlib|zlib-gnu|zlib-gabi]
[deliverable/binutils-gdb.git] / ld / emultempl / elf32.em
index dc643b6a88a8d8a28a1f67adea37b6fe52ec6c32..0802d763c91061f0d56b4a8d0d08633be47bed41 100644 (file)
@@ -2110,6 +2110,7 @@ fragment <<EOF
 #define OPTION_HASH_STYLE              (OPTION_EXCLUDE_LIBS + 1)
 #define OPTION_BUILD_ID                        (OPTION_HASH_STYLE + 1)
 #define OPTION_AUDIT                   (OPTION_BUILD_ID + 1)
+#define OPTION_COMPRESS_DEBUG          (OPTION_AUDIT + 1)
 
 static void
 gld${EMULATION_NAME}_add_options
@@ -2137,6 +2138,7 @@ EOF
 fi
 fragment <<EOF
     {"build-id", optional_argument, NULL, OPTION_BUILD_ID},
+    {"compress-debug-sections", required_argument, NULL, OPTION_COMPRESS_DEBUG},
 EOF
 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
 fragment <<EOF
@@ -2186,6 +2188,19 @@ gld${EMULATION_NAME}_handle_option (int optc)
        emit_note_gnu_build_id = xstrdup (optarg);
       break;
 
+    case OPTION_COMPRESS_DEBUG:
+      if (strcasecmp (optarg, "none") == 0)
+       link_info.compress_debug = COMPRESS_DEBUG_NONE;
+      else if (strcasecmp (optarg, "zlib") == 0)
+       link_info.compress_debug = COMPRESS_DEBUG_ZLIB;
+      else if (strcasecmp (optarg, "zlib-gnu") == 0)
+       link_info.compress_debug = COMPRESS_DEBUG_GNU_ZLIB;
+      else if (strcasecmp (optarg, "zlib-gabi") == 0)
+       link_info.compress_debug = COMPRESS_DEBUG_GABI_ZLIB;
+      else
+       einfo (_("%P%F: invalid --compress-debug-sections option: \`%s'\n"),
+              optarg);
+      break;
 EOF
 
 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
@@ -2286,13 +2301,6 @@ fragment <<EOF
        }
 EOF
 
-if test x"$BNDPLT" = xyes; then
-fragment <<EOF
-      else if (strcmp (optarg, "bndplt") == 0)
-       link_info.bndplt = TRUE;
-EOF
-fi
-
 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
 fragment <<EOF
       else if (strcmp (optarg, "global") == 0)
@@ -2345,6 +2353,12 @@ fragment <<EOF
 EOF
 fi
 
+if test -n "$PARSE_AND_LIST_ARGS_CASE_Z" ; then
+fragment <<EOF
+ $PARSE_AND_LIST_ARGS_CASE_Z
+EOF
+fi
+
 fragment <<EOF
       else
        einfo (_("%P: warning: -z %s ignored.\n"), optarg);
@@ -2367,7 +2381,7 @@ EOF
 
 if test x"$LDEMUL_LIST_OPTIONS" != xgld"$EMULATION_NAME"_list_options; then
 gld_list_options="gld${EMULATION_NAME}_list_options"
-if test -n "$PARSE_AND_LIST_OPTIONS" || test x"$BNDPLT" = xyes; then
+if test -n "$PARSE_AND_LIST_OPTIONS"; then
 fragment <<EOF
 
 static void
@@ -2375,13 +2389,6 @@ gld${EMULATION_NAME}_list_options (FILE * file)
 {
 EOF
 
-if test x"$BNDPLT" = xyes; then
-fragment <<EOF
-  fprintf (file, _("\
-  -z bndplt                   Always generate BND prefix in PLT entries\n"));
-EOF
-fi
-
 if test -n "$PARSE_AND_LIST_OPTIONS" ; then
 fragment <<EOF
  $PARSE_AND_LIST_OPTIONS
This page took 0.02451 seconds and 4 git commands to generate.