Use bfd_get_filename throughout bfd
[deliverable/binutils-gdb.git] / bfd / elf32-hppa.c
index 9760b751612b6dde409316e53b9d257f1e6622bd..4b76f941adf9d2832d7e7ea75135a7d3350e08fd 100644 (file)
@@ -735,12 +735,10 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
         section.  The user should fix his linker script.  */
       if (hsh->target_section->output_section == NULL
          && info->non_contiguous_regions)
-       {
-         _bfd_error_handler (_("Could not assign '%pA' to an output section. "
-                               "Retry without --enable-non-contiguous-regions.\n"),
-                             hsh->target_section);
-         abort();
-    }
+       info->callbacks->einfo (_("%F%P: Could not assign '%pA' to an output "
+                                 "section. Retry without "
+                                 "--enable-non-contiguous-regions.\n"),
+                               hsh->target_section);
 
       /* Create the long branch.  A long branch is formed with "ldil"
         loading the upper bits of the target address into a register,
@@ -766,12 +764,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
         section.  The user should fix his linker script.  */
       if (hsh->target_section->output_section == NULL
          && info->non_contiguous_regions)
-       {
-         _bfd_error_handler (_("Could not assign %pA to an output section. "
-                               "Retry without --enable-non-contiguous-regions.\n"),
-                             hsh->target_section);
-         abort();
-    }
+       info->callbacks->einfo (_("%F%P: Could not assign %pA to an output "
+                                 "section. Retry without "
+                                 "--enable-non-contiguous-regions.\n"),
+                               hsh->target_section);
+
       /* Branches are relative.  This is where we are going to.  */
       sym_value = (hsh->target_value
                   + hsh->target_section->output_offset
@@ -848,12 +845,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg)
         section.  The user should fix his linker script.  */
       if (hsh->target_section->output_section == NULL
          && info->non_contiguous_regions)
-       {
-         _bfd_error_handler (_("Could not assign %pA to an output section. "
-                               "Retry without --enable-non-contiguous-regions.\n"),
-                             hsh->target_section);
-         abort();
-    }
+       info->callbacks->einfo (_("%F%P: Could not assign %pA to an output "
+                                 "section. Retry without "
+                                 "--enable-non-contiguous-regions.\n"),
+                               hsh->target_section);
+
       /* Branches are relative.  This is where we are going to.  */
       sym_value = (hsh->target_value
                   + hsh->target_section->output_offset
@@ -3200,7 +3196,7 @@ elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info)
   /* 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
+  if (stat (bfd_get_filename (abfd), &buf) != 0
       || !S_ISREG(buf.st_mode))
     return TRUE;
 
This page took 0.023491 seconds and 4 git commands to generate.