* elf32-i386.c (elf_i386_relocate_section): Don't complain about
authorAlan Modra <amodra@gmail.com>
Thu, 11 Jul 2002 05:33:28 +0000 (05:33 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 11 Jul 2002 05:33:28 +0000 (05:33 +0000)
unresolved debugging relocs in dynamic applications.
* elf32-s390.c (elf_s390_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
* elf64-s390.c (elf_s390_relocate_section): Likewise.
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.

bfd/ChangeLog
bfd/elf32-i386.c
bfd/elf32-s390.c
bfd/elf32-sparc.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sparc.c
bfd/elf64-x86-64.c

index 126085fc81f5b959d82abcc9dbe21a635b17ffc4..3dc0f25408c13de7fd1edd7c01ab0b95de44b75d 100644 (file)
@@ -1,3 +1,14 @@
+2002-07-11  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf32-i386.c (elf_i386_relocate_section): Don't complain about
+       unresolved debugging relocs in dynamic applications.
+       * elf32-s390.c (elf_s390_relocate_section): Likewise.
+       * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+       * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+       * elf64-s390.c (elf_s390_relocate_section): Likewise.
+       * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+
 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
 
        * elf64-ppc.c (ONES): Define.
index 1e886a593350b5f30640a752d0f8889d1ed89e3c..f8b64d577ab9599434235be8d671862036bb34ac 100644 (file)
@@ -2737,14 +2737,11 @@ elf_i386_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
        }
 
-      /* FIXME: Why do we allow debugging sections to escape this error?
-        More importantly, why do we not emit dynamic relocs for
-        R_386_32 above in debugging sections (which are ! SEC_ALLOC)?
-        If we had emitted the dynamic reloc, we could remove the
-        fudge here.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+        because such sections are not SEC_ALLOC and thus ld.so will
+        not process them.  */
       if (unresolved_reloc
-         && !(info->shared
-              && (input_section->flags & SEC_DEBUGGING) != 0
+         && !((input_section->flags & SEC_DEBUGGING) != 0
               && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
        (*_bfd_error_handler)
          (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
index d6d7adaf5138d2acc27a10170000e4183719e32e..5879995164fbd53b1aa300e46905b28ff9ed46b2 100644 (file)
@@ -1971,9 +1971,11 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
        }
 
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+        because such sections are not SEC_ALLOC and thus ld.so will
+        not process them.  */
       if (unresolved_reloc
-         && !(info->shared
-              && (input_section->flags & SEC_DEBUGGING) != 0
+         && !((input_section->flags & SEC_DEBUGGING) != 0
               && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
        (*_bfd_error_handler)
          (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
index 3a78f5f758a811f49afca2b2c151f1afb085e3d5..38200dc04bff6371e880a23fcb1c748e53ac7eac 100644 (file)
@@ -1561,10 +1561,11 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
        }
 
-      /* ??? Copied from elf32-i386.c, debugging section check and all.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+        because such sections are not SEC_ALLOC and thus ld.so will
+        not process them.  */
       if (unresolved_reloc
-         && !(info->shared
-              && (input_section->flags & SEC_DEBUGGING) != 0
+         && !((input_section->flags & SEC_DEBUGGING) != 0
               && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
        (*_bfd_error_handler)
          (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
index 43126207b8173e355009a3980fa998fb359b805d..9ed037f5279c8debb90595dd6e3601f63def78fc 100644 (file)
@@ -5907,13 +5907,11 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
        }
 
-      /* FIXME: Why do we allow debugging sections to escape this error?
-        More importantly, why do we not emit dynamic relocs above in
-        debugging sections (which are ! SEC_ALLOC)?  If we had
-        emitted the dynamic reloc, we could remove the fudge here.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+        because such sections are not SEC_ALLOC and thus ld.so will
+        not process them.  */
       if (unresolved_reloc
-         && !(info->shared
-              && (input_section->flags & SEC_DEBUGGING) != 0
+         && !((input_section->flags & SEC_DEBUGGING) != 0
               && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
        {
          (*_bfd_error_handler)
index c4e4f6891f98302a24fd143eec85433984e4a948..6e7b5d94c201fab308c175f98ee35e816cbd4901 100644 (file)
@@ -1935,9 +1935,11 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
           break;
         }
 
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+        because such sections are not SEC_ALLOC and thus ld.so will
+        not process them.  */
       if (unresolved_reloc
-         && !(info->shared
-              && (input_section->flags & SEC_DEBUGGING) != 0
+         && !((input_section->flags & SEC_DEBUGGING) != 0
               && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
        (*_bfd_error_handler)
          (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
index 7dd51f76172e6dade17e210b12e6d36f04740c8e..def93c41fe093f249c495a8f11ab84acd875c9f5 100644 (file)
@@ -2568,9 +2568,11 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
        }
 
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+        because such sections are not SEC_ALLOC and thus ld.so will
+        not process them.  */
       if (unresolved_reloc
-         && !(info->shared
-              && (input_section->flags & SEC_DEBUGGING) != 0
+         && !((input_section->flags & SEC_DEBUGGING) != 0
               && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
        (*_bfd_error_handler)
          (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
index 8b4276f248baa3d62c660cd3703b1d2b227e5344..8016bd5efe06983008d561b09b3ac5aee6d69c97 100644 (file)
@@ -1938,14 +1938,11 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
          break;
        }
 
-      /* FIXME: Why do we allow debugging sections to escape this error?
-        More importantly, why do we not emit dynamic relocs for
-        R_386_32 above in debugging sections (which are ! SEC_ALLOC)?
-        If we had emitted the dynamic reloc, we could remove the
-        fudge here.  */
+      /* Dynamic relocs are not propagated for SEC_DEBUGGING sections
+        because such sections are not SEC_ALLOC and thus ld.so will
+        not process them.  */
       if (unresolved_reloc
-         && !(info->shared
-              && (input_section->flags & SEC_DEBUGGING) != 0
+         && !((input_section->flags & SEC_DEBUGGING) != 0
               && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
        (*_bfd_error_handler)
          (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
This page took 0.035563 seconds and 4 git commands to generate.