Prefer object over notype symbols when disassembling
[deliverable/binutils-gdb.git] / bfd / elf32-pj.c
index 01dc73c13962f3a164e7237bce2490e944e15eea..14ccf5f7267cabc5e6f02333a66fbaeac0757f98 100644 (file)
@@ -1,5 +1,5 @@
 /* picoJava specific support for 32-bit ELF
-   Copyright (C) 1999-2017 Free Software Foundation, Inc.
+   Copyright (C) 1999-2019 Free Software Foundation, Inc.
    Contributed by Steve Chamberlan of Transmeta (sac@pobox.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -54,6 +54,7 @@ pj_elf_reloc (bfd *abfd,
     }
 
   if (symbol_in != NULL
+      && (symbol_in->flags & BSF_WEAK) == 0
       && bfd_is_und_section (symbol_in->section))
     return bfd_reloc_undefined;
 
@@ -310,8 +311,8 @@ pj_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
 
 /* Given an ELF reloc, fill in the howto field of a relent.  */
 
-static void
-pj_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+static bfd_boolean
+pj_elf_info_to_howto (bfd *abfd,
                      arelent *cache_ptr,
                      Elf_Internal_Rela *dst)
 {
@@ -322,24 +323,25 @@ pj_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
   if (r >= R_PJ_max)
     {
       /* xgettext:c-format */
-      _bfd_error_handler (_("%B: unrecognised PicoJava reloc number: %d"),
+      _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
                          abfd, r);
       bfd_set_error (bfd_error_bad_value);
-      r = R_PJ_NONE;
+      return FALSE;
     }
 
   cache_ptr->howto = &pj_elf_howto_table[r];
+  return TRUE;
 }
 
 /* Take this moment to fill in the special picoJava bits in the
    e_flags field.  */
 
-static void
-pj_elf_final_write_processing (bfd *abfd,
-                              bfd_boolean linker ATTRIBUTE_UNUSED)
+static bfd_boolean
+pj_elf_final_write_processing (bfd *abfd)
 {
   elf_elfheader (abfd)->e_flags |= EF_PICOJAVA_ARCH;
   elf_elfheader (abfd)->e_flags |= EF_PICOJAVA_GNUCALLS;
+  return _bfd_elf_final_write_processing (abfd);
 }
 
 #define TARGET_BIG_SYM         pj_elf32_vec
This page took 0.026019 seconds and 4 git commands to generate.