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 73cabd8e750689cd047d449081c1273c41326517..2fd5efe20d813a09e1db5fe1d2b29309f3e81d7a 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 8f69c529e5f08576ffa5ead5089ab3b4e446baa8..685ac9b1fe5449d6a837ff772d4b804fc5143b64 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 efb713cbc2d191a9f5675105c7864f44faf2fe60..bcc118808a50d73bbd297e0a85db6851c2eb96f1 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 e145b26b43f47b297afcbb22d070aec75aa5e32a..2c634740668de180405f62a44081bb3fa12729c8 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 1fab847bc4ff0bd974445c228e8d46ba053d0c90..c2e2f706c24db18997ecdf5639f6f9f74ee59cb9 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 b4d305dc16bf8a9b4a78d2155962ccb93d9a25c7..83783ae888ba36263782289f2eda860e49ce22a1 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 849bfe8fb18ad2dcceb214f4d69151bc0445874b..90609c5c08b9b79014049bed2e6c0cc59ec602ea 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 5d729effaf0654a4ac3bc18455a7261424d460f9..21fdd9d06d59db04e2240018e67291b2c29d4107 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 31adf3baffe7d9af13f454f9d9efcd2c40e4c39d..e8c276b194174bf7851461fb54206b714d713a1a 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 b2ca72618f4e763444aeba0cad61a9d3abaa3991..294d643088c0739cce9e6aa5bbf08839df692d0d 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 7cd1bdcb94ed27b77dcd68a308d618899dc5a636..04df5d6a8b40b9bf5e8fd2cddaab968b0a2697ab 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 51b1b59d941e820b8a43f11833096c87cf2ec176..b5456831e9978e70713f32357e36df1d5d47141f 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);