summaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2008-10-09 09:00:08 +0000
committerKai Tietz <kai.tietz@onevision.com>2008-10-09 09:00:08 +0000
commita2989a2045d44cf421085d76b62acaa75c7ac414 (patch)
treec8d5f98344b297831f8b002b1ca19fffcf8747a2 /bfd/cofflink.c
parentd5198ad5cd8f237e6e6489f6022bf95f498433e6 (diff)
downloadbinutils-redhat-a2989a2045d44cf421085d76b62acaa75c7ac414.tar.gz
binutils/
2008-10-09 Kai Tietz <kai.tietz@onevision.com> * dlltool.c (PAGE_SIZE): Make sure it has bfd_vma type. (PAGE_MASK): Likewise. (sfunc): Change to address size of bfd_vma for base-file. (flush_page): Likewise. (gen_exp_file): Likewise. bfd/ 2008-10-09 Kai Tietz <kai.tietz@onevision.com> * cofflink.c (_bfd_coff_generic_relocate_section): Dump bfd_vma sized addresses instead of long sized.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 19a7dd2b69..d771168269 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -2985,16 +2985,16 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
absolute. We output the address here to a file.
This file is then read by dlltool when generating the
reloc section. Note that the base file is not
- portable between systems. We write out a long here,
- and dlltool reads in a long. */
- long addr = (rel->r_vaddr
+ portable between systems. We write out a bfd_vma here,
+ and dlltool reads in a bfd_vma. */
+ bfd_vma addr = (rel->r_vaddr
- input_section->vma
+ input_section->output_offset
+ input_section->output_section->vma);
if (coff_data (output_bfd)->pe)
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
- if (fwrite (&addr, 1, sizeof (long), (FILE *) info->base_file)
- != sizeof (long))
+ if (fwrite (&addr, 1, sizeof (bfd_vma), (FILE *) info->base_file)
+ != sizeof (bfd_vma))
{
bfd_set_error (bfd_error_system_call);
return FALSE;