mmix-mmo set SEC_DATA for .data section
[deliverable/binutils-gdb.git] / bfd / mmo.c
index d175befd0db3b1dc7a6745fdfd3ee1953606dc2f..073c37c0acdcb6916e53ea46ed0425f72a1f0fdf 100644 (file)
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -1,5 +1,5 @@
 /* BFD back-end for mmo objects (MMIX-specific object-format).
-   Copyright (C) 2001-2019 Free Software Foundation, Inc.
+   Copyright (C) 2001-2020 Free Software Foundation, Inc.
    Written by Hans-Peter Nilsson (hp@bitrange.com).
    Infrastructure and other bits originally copied from srec.c and
    binary.c.
@@ -579,7 +579,7 @@ mmo_mkobject (bfd *abfd)
 
       /* All fields are zero-initialized, so we don't have to explicitly
         initialize most.  */
-      tdata_type *tdata = (tdata_type *) bfd_zmalloc (sizeof (tdata_type));
+      tdata_type *tdata = (tdata_type *) bfd_zalloc (abfd, sizeof (tdata_type));
       if (tdata == NULL)
        return FALSE;
 
@@ -2074,7 +2074,7 @@ mmo_scan (bfd *abfd)
   if (sec != NULL
       && (bfd_section_flags (sec) & SEC_HAS_CONTENTS)
       && !bfd_set_section_flags (sec, (bfd_section_flags (sec)
-                                      | SEC_ALLOC | SEC_LOAD)))
+                                      | SEC_ALLOC | SEC_LOAD | SEC_DATA)))
     error = TRUE;
 
   /* Free whatever resources we took.  */
This page took 0.025606 seconds and 4 git commands to generate.