diff options
author | Kai Tietz <kai.tietz@onevision.com> | 2008-10-09 09:00:08 +0000 |
---|---|---|
committer | Kai Tietz <kai.tietz@onevision.com> | 2008-10-09 09:00:08 +0000 |
commit | d078078ddb99e3b2c63f093cb1d898cd7f36960a (patch) | |
tree | 0d4f960c5e6933a7b201b9bb2905b312ef419605 /bfd/cofflink.c | |
parent | c8d104ad6940c4f094193620122d26d8d2ff4167 (diff) | |
download | gdb-d078078ddb99e3b2c63f093cb1d898cd7f36960a.zip gdb-d078078ddb99e3b2c63f093cb1d898cd7f36960a.tar.gz gdb-d078078ddb99e3b2c63f093cb1d898cd7f36960a.tar.bz2 |
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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 19a7dd2..d771168 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; |