* elf.c (bfd_section_from_shdr): Don't check for reloc sections
authorIan Lance Taylor <ian@airs.com>
Mon, 16 Dec 1996 19:39:39 +0000 (19:39 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 16 Dec 1996 19:39:39 +0000 (19:39 +0000)
against SEC_DEBUGGING sections here (revert patch of December 5).
* elfcode.h (elf_object_p): Check for them here, instead.

bfd/ChangeLog
bfd/elf.c

index 3fe46ffbc6c775ce7a51c427003fe9e264c64e26..df7a14806f55e44732346119a0f3193caf172253 100644 (file)
@@ -1,3 +1,9 @@
+Mon Dec 16 14:38:39 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * elf.c (bfd_section_from_shdr): Don't check for reloc sections
+       against SEC_DEBUGGING sections here (revert patch of December 5).
+       * elfcode.h (elf_object_p): Check for them here, instead.
+
 Sun Dec 15 14:46:06 1996  Ian Lance Taylor  <ian@cygnus.com>
 
        * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
index 94d953f5a9fd9e0bc658159135d0d8eba780762a..70d36a59a1d7ec1b6285c2ef7b07652b24fcabba 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -864,20 +864,7 @@ bfd_section_from_shdr (abfd, shindex)
           represent such a section, so at least for now, we don't
           try.  We just present it as a normal section.  */
        if (hdr->sh_link != elf_onesymtab (abfd))
-         {
-           if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
-             return false;
-           if (hdr->bfd_section != NULL
-               && hdr->sh_info > 0
-               && bfd_section_from_shdr (abfd, hdr->sh_info))
-             {
-               target_sect = bfd_section_from_elf_index (abfd, hdr->sh_info);
-               if (target_sect != NULL
-                   && (target_sect->flags & SEC_DEBUGGING) != 0)
-                 hdr->bfd_section->flags |= SEC_DEBUGGING;
-             }
-           return true;
-         }
+         return _bfd_elf_make_section_from_shdr (abfd, hdr, name);
 
        if (! bfd_section_from_shdr (abfd, hdr->sh_info))
          return false;