OSDN Git Service

Check !executable instead of shared for PIE.
authorhjl <hjl>
Sun, 21 Mar 2010 23:26:31 +0000 (23:26 +0000)
committerhjl <hjl>
Sun, 21 Mar 2010 23:26:31 +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 1558883..e48165e 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 8f6b5f4..98ea753 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;
                }