Remove BNDPLT and add PARSE_AND_LIST_ARGS_CASE_Z
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 9 Apr 2015 14:46:21 +0000 (07:46 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 9 Apr 2015 14:53:00 +0000 (07:53 -0700)
* emulparams/elf_x86_64.sh (BNDPLT): Removed.
(PARSE_AND_LIST_OPTIONS): New.
(PARSE_AND_LIST_ARGS_CASE_Z): Likewise.
* emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Remove
BNDPLT check.  Handle PARSE_AND_LIST_ARGS_CASE_Z.
(gld${EMULATION_NAME}_list_options): Remove BNDPLT check.

ld/ChangeLog
ld/emulparams/elf_x86_64.sh
ld/emultempl/elf32.em

index 1bbd4d501ccbcdca240daff6136bcbcc0d25331e..9e79980a4a497e82993cefba645a63425028c7c3 100644 (file)
@@ -1,3 +1,12 @@
+2015-04-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * emulparams/elf_x86_64.sh (BNDPLT): Removed.
+       (PARSE_AND_LIST_OPTIONS): New.
+       (PARSE_AND_LIST_ARGS_CASE_Z): Likewise.
+       * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Remove
+       BNDPLT check.  Handle PARSE_AND_LIST_ARGS_CASE_Z.
+       (gld${EMULATION_NAME}_list_options): Remove BNDPLT check.
+
 2015-04-09  Nick Clifton  <nickc@redhat.com>
 
        * po/fr.po: Updated French translation.
index aa26a1b4f0a33a04efd9d52ebdbf8a7626bbac98..984e5e92c460c6d39812442d9bf70e3d3df8cce2 100644 (file)
@@ -36,7 +36,14 @@ case "$target" in
     case "$EMULATION_NAME" in
       *64*)
         LIBPATH_SUFFIX=64
-        BNDPLT=yes
+       PARSE_AND_LIST_OPTIONS='
+  fprintf (file, _("\
+  -z bndplt                   Always generate BND prefix in PLT entries\n"));
+'
+       PARSE_AND_LIST_ARGS_CASE_Z='
+      else if (strcmp (optarg, "bndplt") == 0)
+       link_info.bndplt = TRUE;
+'
         ;;
     esac
     ;;
index dc643b6a88a8d8a28a1f67adea37b6fe52ec6c32..5db5a93c671bf6f51357d1eb98e70dbdf1799bf9 100644 (file)
@@ -2286,13 +2286,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 +2338,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 +2366,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 +2374,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.03965 seconds and 4 git commands to generate.