[ld/ChangeLog]
authorChris Demetriou <cgd@google.com>
Wed, 29 Apr 2009 17:24:27 +0000 (17:24 +0000)
committerChris Demetriou <cgd@google.com>
Wed, 29 Apr 2009 17:24:27 +0000 (17:24 +0000)
2009-04-29  Chris Demetriou  <cgd@google.com>

        * lexsup.c (option_values): Add OPTION_NO_EXPORT_DYNAMIC.
        (ld_options): Likewise.
        (parse_args): Likewise.
        * ld.texinfo: Document --no-export-dynamic.
        * NEWS: Mention --no-export-dynamic.

[ld/testsuite/ChangeLog]
2009-04-29  Chris Demetriou  <cgd@google.com>

        * ld-elfvers/vers.exp (vers4b): New test to verify that
        --no-export-dynamic undoes --export-dynamic.

ld/ChangeLog
ld/NEWS
ld/ld.texinfo
ld/lexsup.c
ld/testsuite/ChangeLog
ld/testsuite/ld-elfvers/vers.exp

index bfb91af810230442d1eb73baf8388636d525bcb0..a5c60ce7ab2b02f4694b90c2426fed76d037251b 100644 (file)
@@ -1,3 +1,11 @@
+2009-04-29  Chris Demetriou  <cgd@google.com>
+
+       * lexsup.c (option_values): Add OPTION_NO_EXPORT_DYNAMIC.
+       (ld_options): Likewise.
+       (parse_args): Likewise.
+       * ld.texinfo: Document --no-export-dynamic.
+       * NEWS: Mention --no-export-dynamic.
+
 2009-04-29  Alan Modra  <amodra@bigpond.net.au>
 
        * deffilep.y (STACKSIZE_K): Rename from STACKSIZE.
diff --git a/ld/NEWS b/ld/NEWS
index 621b489331c5cb216a48813b25dc3fbfa4ce10e8..99d5d8543c90d669d7bbc74a7f13d1672746a41e 100644 (file)
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,8 @@
 -*- text -*-
 
+* New option --no-export-dynamic to undo the effect of the -E and
+  --export-dynamic options.
+
 * ELF: --warn-alternate-em option to warn if an object has alternate
   ELF machine code.
 
index 5a8824241fd06d79053ec9821bc5e18484984422..77846d5a545a8d9f6aa3cdadd064098c43183bf5 100644 (file)
@@ -491,15 +491,19 @@ regardless of this option.
 @cindex dynamic symbol table
 @kindex -E
 @kindex --export-dynamic
+@kindex --no-export-dynamic
 @item -E
 @itemx --export-dynamic
-When creating a dynamically linked executable, add all symbols to the
-dynamic symbol table.  The dynamic symbol table is the set of symbols
-which are visible from dynamic objects at run time.
-
-If you do not use this option, the dynamic symbol table will normally
-contain only those symbols which are referenced by some dynamic object
-mentioned in the link.
+@itemx --no-export-dynamic
+When creating a dynamically linked executable, using the @option{-E}
+option or the @option{--export-dynamic} option causes the linker to add
+all symbols to the dynamic symbol table.  The dynamic symbol table is the
+set of symbols which are visible from dynamic objects at run time.
+
+If you do not use either of these options (or use the
+@option{--no-export-dynamic} option to restore the default behavior), the
+dynamic symbol table will normally contain only those symbols which are
+referenced by some dynamic object mentioned in the link.
 
 If you use @code{dlopen} to load a dynamic object which needs to refer
 back to the symbols defined by the program, rather than some other
index f1b5b4c0ffe11e832f9da872655f9f1538bcf9f8..a9a26890dfa8564d88f808fdc506b0d98f426b9f 100644 (file)
@@ -77,6 +77,7 @@ enum option_values
   OPTION_EL,
   OPTION_EMBEDDED_RELOCS,
   OPTION_EXPORT_DYNAMIC,
+  OPTION_NO_EXPORT_DYNAMIC,
   OPTION_HELP,
   OPTION_IGNORE,
   OPTION_MAP,
@@ -222,6 +223,8 @@ static const struct ld_option ld_options[] =
     'e', N_("ADDRESS"), N_("Set start address"), TWO_DASHES },
   { {"export-dynamic", no_argument, NULL, OPTION_EXPORT_DYNAMIC},
     'E', NULL, N_("Export all dynamic symbols"), TWO_DASHES },
+  { {"no-export-dynamic", no_argument, NULL, OPTION_NO_EXPORT_DYNAMIC},
+    '\0', NULL, N_("Undo the effect of --export-dynamic"), TWO_DASHES },
   { {"EB", no_argument, NULL, OPTION_EB},
     '\0', NULL, N_("Link big-endian objects"), ONE_DASH },
   { {"EL", no_argument, NULL, OPTION_EL},
@@ -820,6 +823,9 @@ parse_args (unsigned argc, char **argv)
        case 'E': /* HP/UX compatibility.  */
          link_info.export_dynamic = TRUE;
          break;
+       case OPTION_NO_EXPORT_DYNAMIC:
+         link_info.export_dynamic = FALSE;
+         break;
        case 'e':
          lang_add_entry (optarg, TRUE);
          ldlang_add_undef (optarg);
index 929a2172b3b520641d79481d998855e3ccdfdddc..dec4cbba102bc724ed83efa84d8c7fa88e12a432 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-29  Chris Demetriou  <cgd@google.com>
+
+       * ld-elfvers/vers.exp (vers4b): New test to verify that
+       --no-export-dynamic undoes --export-dynamic.
+
 2009-04-28  Nathan Sidwell  <nathan@codesourcery.com>
 
        * ld-i386/vxworks1-lib.dd: Adjust expected disassembly.
index e2f658dac75c5b00a5b9815f47bc94d9a3f66e90..31a5e38ac1583e2dfc0c7e53c33657ce78942f38 100644 (file)
@@ -804,6 +804,10 @@ build_exec "vers4" vers4.c vers4 "" "" "" "" vers4.sym
 
 build_exec "vers4a" vers4.c vers4a "-export-dynamic" "" vers4a.ver vers4a.dsym vers4a.sym
 
+# Verify that --no-export-dynamic undoes the effect of --export-dynamic.
+setup_xfail "mips*-*-*"
+build_exec "vers4b" vers4.c vers4b "-export-dynamic -Wl,--no-export-dynamic" "" "" "" vers4.sym
+
 
 #
 # Try multiple definitions foo@BAR and foo@@BAR and make sure the linker
This page took 0.034643 seconds and 4 git commands to generate.