powerpc relax_section and section contents cache
[deliverable/binutils-gdb.git] / bfd / elflink.c
index 88967c835fa7dc7d164e70ade4093c6c079a7bb1..af4f6bb190d0bf275559ed59dc4aa7f0efb8ef9d 100644 (file)
@@ -9549,7 +9549,16 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
         file, so the contents field will not have been set by any of
         the routines which work on output files.  */
       if (elf_section_data (o)->this_hdr.contents != NULL)
-       contents = elf_section_data (o)->this_hdr.contents;
+       {
+         contents = elf_section_data (o)->this_hdr.contents;
+         if (bed->caches_rawsize
+             && o->rawsize != 0
+             && o->rawsize < o->size)
+           {
+             memcpy (flinfo->contents, contents, o->rawsize);
+             contents = flinfo->contents;
+           }
+       }
       else
        {
          contents = flinfo->contents;
This page took 0.02725 seconds and 4 git commands to generate.