Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf32-m32r.c
index edc95b5d63a824edaae2c18400aedeb9c3eb0808..598fbe5633b648f74962a93dfc936d08bb291536 100644 (file)
@@ -2551,12 +2551,12 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                   && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
            ;
          else if (!bfd_link_relocatable (info))
-           (*info->callbacks->undefined_symbol)
-             (info, h->root.root.string, input_bfd,
-              input_section, offset,
-              (info->unresolved_syms_in_objects == RM_GENERATE_ERROR
-               || ELF_ST_VISIBILITY (h->other)));
-       }
+            info->callbacks->undefined_symbol
+             (info, h->root.root.string, input_bfd, input_section, offset,
+              (info->unresolved_syms_in_objects == RM_DIAGNOSE
+               && !info->warn_unresolved_syms)
+              || ELF_ST_VISIBILITY (h->other));
+        }
 
       if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
@@ -3827,6 +3827,18 @@ static const struct bfd_elf_special_section m32r_elf_special_sections[] =
   { NULL,                    0,  0, 0,            0 }
 };
 
+static bfd_boolean
+m32r_elf_section_flags (const Elf_Internal_Shdr *hdr)
+{
+  const char *name = hdr->bfd_section->name;
+
+  if (strncmp (name, ".sbss", 5) == 0
+      || strncmp (name, ".sdata", 6) == 0)
+    hdr->bfd_section->flags |= SEC_SMALL_DATA;
+
+  return TRUE;
+}
+
 static enum elf_reloc_type_class
 m32r_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
                           const asection *rel_sec ATTRIBUTE_UNUSED,
@@ -3897,6 +3909,7 @@ m32r_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 #define bfd_elf32_bfd_set_private_flags                m32r_elf_set_private_flags
 #define bfd_elf32_bfd_print_private_bfd_data   m32r_elf_print_private_bfd_data
 #define elf_backend_special_sections           m32r_elf_special_sections
+#define elf_backend_section_flags              m32r_elf_section_flags
 
 #define elf_backend_linux_prpsinfo32_ugid16    TRUE
 
This page took 0.033879 seconds and 4 git commands to generate.