2000-07-20 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 20 Jul 2000 21:18:23 +0000 (21:18 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 20 Jul 2000 21:18:23 +0000 (21:18 +0000)
* ld.texinfo: Add documentation for --disable-new-dtags and
--enable-new-dtags.

* ldmain.c (main): Initialize link_info.new_dtags to false.

* emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
--disable-new-dtags and --enable-new-dtags.
(gld_${EMULATION_NAME}_list_options): Likewise.

ld/ChangeLog
ld/emultempl/elf32.em
ld/ld.texinfo
ld/ldmain.c

index 508b605eaa9b38bea785f4f95d64ea5ead51cae5..c3a3acf290acbdab52aad09a86b94716783f6b0c 100644 (file)
@@ -1,3 +1,14 @@
+2000-07-20  H.J. Lu  <hjl@gnu.org>
+
+       * ld.texinfo: Add documentation for --disable-new-dtags and
+       --enable-new-dtags.
+
+       * ldmain.c (main): Initialize link_info.new_dtags to false.
+
+       * emultempl/elf32.em (gld_${EMULATION_NAME}_parse_args): Add
+       --disable-new-dtags and --enable-new-dtags.
+       (gld_${EMULATION_NAME}_list_options): Likewise.
+
 2000-07-05  Kenneth Block  <krblock@computer.org>
 
         * ld/lexsup.c: Add optional style to demangle switch
index 25101487a8adc1b2bc21cc32c662bb98c0d945ec..0662e221afe421f5a1d9ba2de2a9936657d8993e 100644 (file)
@@ -1213,6 +1213,9 @@ cat >>e${EMULATION_NAME}.c <<EOF
 
 #include "getopt.h"
 
+#define OPTION_DISABLE_NEW_DTAGS       (400)
+#define OPTION_ENABLE_NEW_DTAGS                (OPTION_DISABLE_NEW_DTAGS + 1)
+
 static struct option longopts[] =
 {
 EOF
@@ -1220,7 +1223,8 @@ fi
 
 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
 cat >>e${EMULATION_NAME}.c <<EOF
-  {NULL, required_argument, NULL, 'z'},
+  {"disable-new-dtags", no_argument, NULL, OPTION_DISABLE_NEW_DTAGS},
+  {"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
 EOF
 fi
 
@@ -1260,11 +1264,20 @@ gld_${EMULATION_NAME}_parse_args (argc, argv)
        xexit (1);
       optind =  prevoptind;
       return 0;
+
 EOF
 fi
 
 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
 cat >>e${EMULATION_NAME}.c <<EOF
+    case OPTION_DISABLE_NEW_DTAGS:
+      link_info.new_dtags = false;
+      break;
+
+    case OPTION_ENABLE_NEW_DTAGS:
+      link_info.new_dtags = true;
+      break;
+
     case 'z':
       if (strcmp (optarg, "initfirst") == 0)
        link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
@@ -1291,7 +1304,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
          link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
        }
       /* What about the other Solaris -z options? FIXME.  */
-    break;
+      break;
 EOF
 fi
 
@@ -1317,6 +1330,8 @@ fi
 
 if test x"$GENERATE_SHLIB_SCRIPT" = xyes; then
 cat >>e${EMULATION_NAME}.c <<EOF
+  fprintf (file, _("  --disable-new-dtags\tDisable new dynamic tags\n"));
+  fprintf (file, _("  --enable-new-dtags\tEnable new dynamic tags\n"));
   fprintf (file, _("  -z initfirst\t\tMark DSO to be initialized first at rutime\n"));
   fprintf (file, _("  -z interpose\t\tMark object to interpose all DSOs but execuable\n"));
   fprintf (file, _("  -z loadfltr\t\tMark object requiring immediate process\n"));
index 6ca94328926c792938982fb6c446467f47d69df7..cce83222fd93dca03eec6069def5449515ca4623 100644 (file)
@@ -1375,6 +1375,17 @@ you should not put the definition of @code{__real_malloc} in the same
 file as @code{__wrap_malloc}; if you do, the assembler may resolve the
 call before the linker has a chance to wrap it to @code{malloc}.
 
+@kindex --enable-new-dtags
+@kindex --disable-new-dtags
+@item --enable-new-dtags
+@itemx --disable-new-dtags
+This linker can create the new dynamic tags in ELF. But the older ELF
+systems may not understand them. If you specify
+@code{--enable-new-dtags}, the dynamic tags will be created as needed.
+If you specify @code{--disable-new-dtags}, no new dynamic tags will be
+created. By default, the new dynamic tags are not created. Note that
+those options are only available for ELF systems.
+
 @end table
 
 @subsection Options specific to i386 PE targets
index 9f84456c1b911bdebb01288769e754ee501cc846..22d77a4b7cc37c12041a6227ad681465fa9fef63 100644 (file)
@@ -237,6 +237,7 @@ main (argc, argv)
      and _fini symbols.  We are compatible.  */
   link_info.init_function = "_init";
   link_info.fini_function = "_fini";
+  link_info.new_dtags = false;
   link_info.flags = (bfd_vma) 0;
   link_info.flags_1 = (bfd_vma) 0;
 
This page took 0.044615 seconds and 4 git commands to generate.