Use address mapping levels for 68hc11 simulator (kill overlap hack)
[deliverable/binutils-gdb.git] / bfd / linker.c
index edf96fe7efdf68d3f2a0f55aa6f0cd953fe70525..6e9ee65581b1a3eceaca902db117ed72fd2321ac 100644 (file)
@@ -2524,7 +2524,9 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
          break;
        }
       ok = bfd_set_section_contents (abfd, sec, (PTR) buf,
-                                    (file_ptr) link_order->offset, size);
+                                    (file_ptr) 
+                                     (link_order->offset *
+                                      bfd_octets_per_byte (abfd)), size);
       free (buf);
       if (! ok)
        return false;
@@ -2592,7 +2594,9 @@ _bfd_default_link_order (abfd, info, sec, link_order)
     case bfd_data_link_order:
       return bfd_set_section_contents (abfd, sec,
                                       (PTR) link_order->u.data.contents,
-                                      (file_ptr) link_order->offset,
+                                      (file_ptr) 
+                                       (link_order->offset *
+                                        bfd_octets_per_byte (abfd)),
                                       link_order->size);
     }
 }
@@ -2626,7 +2630,9 @@ default_fill_link_order (abfd, info, sec, link_order)
   for (i = 1; i < size; i += 2)
     space[i] = fill;
   result = bfd_set_section_contents (abfd, sec, space,
-                                    (file_ptr) link_order->offset,
+                                    (file_ptr) 
+                                     (link_order->offset * 
+                                      bfd_octets_per_byte (abfd)),
                                     link_order->size);
   free (space);
   return result;
@@ -2743,7 +2749,10 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
   /* Output the section contents.  */
   if (! bfd_set_section_contents (output_bfd, output_section,
                                  (PTR) new_contents,
-                                 link_order->offset, link_order->size))
+                                 (file_ptr)
+                                  (link_order->offset * 
+                                   bfd_octets_per_byte (output_bfd)), 
+                                  link_order->size))
     goto error_return;
 
   if (contents != NULL)
This page took 0.024955 seconds and 4 git commands to generate.