+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
#include "getopt.h"
+#define OPTION_DISABLE_NEW_DTAGS (400)
+#define OPTION_ENABLE_NEW_DTAGS (OPTION_DISABLE_NEW_DTAGS + 1)
+
static struct option longopts[] =
{
EOF
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
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;
link_info.flags_1 |= (bfd_vma) DF_1_ORIGIN;
}
/* What about the other Solaris -z options? FIXME. */
- break;
+ break;
EOF
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"));
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
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;