Fix decision about when a .interp section should exist
authorNick Clifton <nickc@redhat.com>
Tue, 11 Nov 2003 13:32:38 +0000 (13:32 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 11 Nov 2003 13:32:38 +0000 (13:32 +0000)
12 files changed:
bfd/ChangeLog
bfd/elf-m10300.c
bfd/elf32-arm.h
bfd/elf32-cris.c
bfd/elf32-hppa.c
bfd/elf32-i370.c
bfd/elf32-m68k.c
bfd/elf32-vax.c
bfd/elf32-xtensa.c
bfd/elf64-hppa.c
bfd/elflink.h
bfd/elfxx-mips.c

index 73cabd8..2fd5efe 100644 (file)
@@ -1,3 +1,19 @@
+2003-11-11  Nick Clifton  <nickc@redhat.com>
+
+       * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
+       info->executable not info->shared to decide if a .interp section
+       should be present.
+       * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
+       * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
+       * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
+       * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
+       * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+       * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
+       * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
+       * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+       * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
+       * elflink.h (size_dynamic_sections): Likewise.
+
 2003-11-10  Jonathan Wilson <jonwil@tpgi.com.au>
 
        * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
index 8f69c52..685ac9b 100644 (file)
@@ -4351,7 +4351,7 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
index efb713c..bcc1188 100644 (file)
@@ -3523,7 +3523,7 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
index e145b26..2c63474 100644 (file)
@@ -2638,7 +2638,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (!info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
index 1fab847..c2e2f70 100644 (file)
@@ -2047,7 +2047,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
   if (htab->elf.dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          if (s == NULL)
index b4d305d..83783ae 100644 (file)
@@ -653,7 +653,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
index 849bfe8..90609c5 100644 (file)
@@ -1127,7 +1127,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (!info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
index 5d729ef..21fdd9d 100644 (file)
@@ -1149,7 +1149,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (!info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
index 31adf3b..e8c276b 100644 (file)
@@ -1176,7 +1176,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          if (s == NULL)
index b2ca726..294d643 100644 (file)
@@ -1642,7 +1642,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);
index 7cd1bdc..04df5d6 100644 (file)
@@ -1981,7 +1981,7 @@ NAME(bfd_elf,size_dynamic_sections) (bfd *output_bfd,
       bfd_boolean all_defined;
 
       *sinterpptr = bfd_get_section_by_name (dynobj, ".interp");
-      BFD_ASSERT (*sinterpptr != NULL || info->shared);
+      BFD_ASSERT (*sinterpptr != NULL || !info->executable);
 
       if (soname != NULL)
        {
index 51b1b59..b545683 100644 (file)
@@ -5871,7 +5871,7 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
   if (elf_hash_table (info)->dynamic_sections_created)
     {
       /* Set the contents of the .interp section to the interpreter.  */
-      if (! info->shared)
+      if (info->executable)
        {
          s = bfd_get_section_by_name (dynobj, ".interp");
          BFD_ASSERT (s != NULL);