Check !executable instead of shared for PIE.
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 21 Mar 2010 23:26:33 +0000 (23:26 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 21 Mar 2010 23:26:33 +0000 (23:26 +0000)
2010-03-21  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/11413
* elflink.c (_bfd_elf_add_default_symbol): Check !executable
instead of shared.

bfd/ChangeLog
bfd/elflink.c

index 155888337deaa10e1e45a374ac5e38986b87ce22..e48165e42781ee48a0f9d26728a0e3184ef35e48 100644 (file)
@@ -1,3 +1,9 @@
+2010-03-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/11413
+       * elflink.c (_bfd_elf_add_default_symbol): Check !executable
+       instead of shared.
+
 2010-03-19  Jie Zhang  <jie@codesourcery.com>
 
        * elf32-arm.c (struct section_list): Remove.
index 8f6b5f44056136ec0573c1d84acb22642ab4a1a2..98ea753579630ebaffefcac0abc0ba384164dc49 100644 (file)
@@ -1715,7 +1715,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
        {
          if (! dynamic)
            {
-             if (info->shared
+             if (! info->executable
                  || hi->ref_dynamic)
                *dynsym = TRUE;
            }
@@ -1784,7 +1784,7 @@ nondefault:
            {
              if (! dynamic)
                {
-                 if (info->shared
+                 if (! info->executable
                      || hi->ref_dynamic)
                    *dynsym = TRUE;
                }