Add support for ELF files which contain multiple reloc sections which all target...
[deliverable/binutils-gdb.git] / bfd / elf64-alpha.c
index ae4be9f07464051950724a0867d410566b2c1a38..ca15944e608da0138e36e6713422c5a6d09ac344 100644 (file)
@@ -1136,9 +1136,7 @@ elf64_alpha_info_to_howto (bfd *abfd, arelent *cache_ptr,
 \f
 /* Handle an Alpha specific section when reading an object file.  This
    is called when bfd_section_from_shdr finds a section with an unknown
-   type.
-   FIXME: We need to handle the SHF_ALPHA_GPREL flag, but I'm not sure
-   how to.  */
+   type.  */
 
 static bfd_boolean
 elf64_alpha_section_from_shdr (bfd *abfd,
@@ -1180,10 +1178,10 @@ elf64_alpha_section_from_shdr (bfd *abfd,
 /* Convert Alpha specific section flags to bfd internal section flags.  */
 
 static bfd_boolean
-elf64_alpha_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr)
+elf64_alpha_section_flags (const Elf_Internal_Shdr *hdr)
 {
   if (hdr->sh_flags & SHF_ALPHA_GPREL)
-    *flags |= SEC_SMALL_DATA;
+    hdr->bfd_section->flags |= SEC_SMALL_DATA;
 
   return TRUE;
 }
@@ -1398,11 +1396,10 @@ elf64_alpha_read_ecoff_info (bfd *abfd, asection *section,
          bfd_set_error (bfd_error_file_too_big);                       \
          goto error_return;                                            \
        }                                                               \
-      debug->ptr = (type) bfd_malloc (amt);                            \
-      if (debug->ptr == NULL)                                          \
+      if (bfd_seek (abfd, symhdr->offset, SEEK_SET) != 0)              \
        goto error_return;                                              \
-      if (bfd_seek (abfd, (file_ptr) symhdr->offset, SEEK_SET) != 0    \
-         || bfd_bread (debug->ptr, amt, abfd) != amt)                  \
+      debug->ptr = (type) _bfd_malloc_and_read (abfd, amt, amt);       \
+      if (debug->ptr == NULL)                                          \
        goto error_return;                                              \
     } while (0)
 
This page took 0.023522 seconds and 4 git commands to generate.