Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf32-hppa.c
index 921706d8ed1d5fbfc6e39056b89d472a1ee14f5c..699d02a58282a4f3edb0f527964c8e0c42c72bf0 100644 (file)
@@ -3245,6 +3245,8 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
 static bfd_boolean
 elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
 {
+  struct stat buf;
+
   /* Invoke the regular ELF linker to do all the work.  */
   if (!bfd_elf_final_link (abfd, info))
     return FALSE;
@@ -3254,6 +3256,13 @@ elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
   if (bfd_link_relocatable (info))
     return TRUE;
 
+  /* Do not attempt to sort non-regular files.  This is here
+     especially for configure scripts and kernel builds which run
+     tests with "ld [...] -o /dev/null".  */
+  if (stat (abfd->filename, &buf) != 0
+      || !S_ISREG(buf.st_mode))
+    return TRUE;
+
   return elf_hppa_sort_unwind (abfd);
 }
 
This page took 0.023974 seconds and 4 git commands to generate.