* config/tc-mn10300.c (set_arch_mach): Change argument type to
[deliverable/binutils-gdb.git] / bfd / aoutx.h
index 9b87de9528bdd2289dc8f92fd76a1e306504d209..d8b465c47b8c2a3ba0148b01e7f6df25d73c3613 100644 (file)
@@ -1287,11 +1287,17 @@ NAME(aout,set_section_contents) (abfd, section, location, offset, count)
   if (section != obj_textsec (abfd)
       && section != obj_datasec (abfd))
     {
-      (*_bfd_error_handler)
-       (_("%s: can not represent section `%s' in a.out object file format"),
-        bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
-      bfd_set_error (bfd_error_nonrepresentable_section);
-      return FALSE;
+      if (aout_section_merge_with_text_p (abfd, section))
+       section->filepos = obj_textsec (abfd)->filepos +
+                          (section->vma - obj_textsec (abfd)->vma);
+      else
+       {
+          (*_bfd_error_handler)
+          (_("%s: can not represent section `%s' in a.out object file format"),
+            bfd_get_filename (abfd), bfd_get_section_name (abfd, section));
+          bfd_set_error (bfd_error_nonrepresentable_section);
+          return FALSE;
+       }
     }
 
   if (count != 0)
@@ -1703,11 +1709,16 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
     sym_pointer->e_type[0] = N_UNDF | N_EXT;
   else
     {
-      (*_bfd_error_handler)
-       (_("%s: can not represent section `%s' in a.out object file format"),
-        bfd_get_filename (abfd), bfd_get_section_name (abfd, sec));
-      bfd_set_error (bfd_error_nonrepresentable_section);
-      return FALSE;
+      if (aout_section_merge_with_text_p (abfd, sec))
+       sym_pointer->e_type[0] |= N_TEXT;
+      else
+       {
+          (*_bfd_error_handler)
+          (_("%s: can not represent section `%s' in a.out object file format"),
+            bfd_get_filename (abfd), bfd_get_section_name (abfd, sec));
+          bfd_set_error (bfd_error_nonrepresentable_section);
+          return FALSE;
+       }
     }
 
   /* Turn the symbol from section relative to absolute again.  */
This page took 0.024212 seconds and 4 git commands to generate.