* elflink.h (bfd_elf,size_dynamic_sections): Don't export all
authorRichard Henderson <rth@redhat.com>
Wed, 29 Dec 1999 19:50:13 +0000 (19:50 +0000)
committerRichard Henderson <rth@redhat.com>
Wed, 29 Dec 1999 19:50:13 +0000 (19:50 +0000)
        if no dynamic sections created.

bfd/ChangeLog
bfd/elflink.h

index 83fb6c5821d26c3bc85bcf0d31d72ab68d55645f..9522755bd4c994e64a9e471fbbc5fa28592ab934 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-29  Richard Henderson  <rth@cygnus.com>
+
+       * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
+       if no dynamic sections created.
+
 1999-12-27  Nick Clifton  <nickc@cygnus.com>
 
        * peicode.h (pe_bfd_object_p): Only define for PE format
index 01cb6d47f616d1ec3f871de5f9a9b648f7a5a27e..1cf6be991e20d462f3c71052ef67513ed59355d9 100644 (file)
@@ -2803,20 +2803,6 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
   if (dynobj == NULL)
     return true;
 
-  /* If we are supposed to export all symbols into the dynamic symbol
-     table (this is not the normal case), then do so.  */
-  if (export_dynamic)
-    {
-      struct elf_info_failed eif;
-
-      eif.failed = false;
-      eif.info = info;
-      elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol,
-                             (PTR) &eif);
-      if (eif.failed)
-       return false;
-    }
-
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       struct elf_info_failed eif;
@@ -2879,6 +2865,20 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
            }
        }
 
+      /* If we are supposed to export all symbols into the dynamic symbol
+         table (this is not the normal case), then do so.  */
+      if (export_dynamic)
+       {
+         struct elf_info_failed eif;
+
+         eif.failed = false;
+         eif.info = info;
+         elf_link_hash_traverse (elf_hash_table (info), elf_export_symbol,
+                                 (PTR) &eif);
+         if (eif.failed)
+           return false;
+       }
+
       /* Attach all the symbols to their version information.  */
       asvinfo.output_bfd = output_bfd;
       asvinfo.info = info;