aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-01-13 22:10:36 +0000
committerNick Clifton <nickc@redhat.com>2000-01-13 22:10:36 +0000
commit9a968f43323ca8e2e800d0382bac9fbf9ad9b396 (patch)
treee849045af355b8a60a7a21fea3575bafcf380ec3 /bfd/linker.c
parentf45fbf876deab0568bd359788dbdaeabf4f22967 (diff)
downloadgdb-9a968f43323ca8e2e800d0382bac9fbf9ad9b396.zip
gdb-9a968f43323ca8e2e800d0382bac9fbf9ad9b396.tar.gz
gdb-9a968f43323ca8e2e800d0382bac9fbf9ad9b396.tar.bz2
Apply Tim walls octest vs bytes patch
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index edf96fe..cd7c4e1 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -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;