diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2000-07-20 21:18:23 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2000-07-20 21:18:23 +0000 |
commit | 6c1439be2121d3d9140b458194e3c0fd1618a9b0 (patch) | |
tree | 0ef752bc90408d6eec2412a614956c5ebbd5a0d7 | |
parent | c25373b76aea96ee3be21f06938518f8faa7d5dc (diff) | |
download | gdb-6c1439be2121d3d9140b458194e3c0fd1618a9b0.zip gdb-6c1439be2121d3d9140b458194e3c0fd1618a9b0.tar.gz gdb-6c1439be2121d3d9140b458194e3c0fd1618a9b0.tar.bz2 |
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.
-rw-r--r-- | ld/ChangeLog | 11 | ||||
-rw-r--r-- | ld/emultempl/elf32.em | 19 | ||||
-rw-r--r-- | ld/ld.texinfo | 11 | ||||
-rw-r--r-- | ld/ldmain.c | 1 |
4 files changed, 40 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 508b605..c3a3acf 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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 diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 2510148..0662e22 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -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")); diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 6ca9432..cce8322 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -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 diff --git a/ld/ldmain.c b/ld/ldmain.c index 9f84456..22d77a4 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -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; |