diff options
author | Steve Chamberlain <steve@cygnus> | 1991-05-20 23:15:15 +0000 |
---|---|---|
committer | Steve Chamberlain <steve@cygnus> | 1991-05-20 23:15:15 +0000 |
commit | fc5d60745615a903d4a149fc5753ea54d3606597 (patch) | |
tree | 9d76fc8dbfb061c00bd715ddff480fdbed2eb5be /binutils/copy.c | |
parent | bce4bf525feda14fd2eb6ee84590e032465d6976 (diff) | |
download | gdb-fc5d60745615a903d4a149fc5753ea54d3606597.zip gdb-fc5d60745615a903d4a149fc5753ea54d3606597.tar.gz gdb-fc5d60745615a903d4a149fc5753ea54d3606597.tar.bz2 |
Mon May 20 16:14:07 1991 Steve Chamberlain (steve at cygint.cygnus.com)
* Changed some types to work with 64 bit object files
Diffstat (limited to 'binutils/copy.c')
-rw-r--r-- | binutils/copy.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/binutils/copy.c b/binutils/copy.c index 9db6bf1..a11ddec 100644 --- a/binutils/copy.c +++ b/binutils/copy.c @@ -1,7 +1,9 @@ -/*** copy.c -- copy object file from input to output, optionally massaging it */ -#include "sysdep.h" +/*** copy.c -- copy object file from input to output, optionally + massaging it */ + #include "bfd.h" + asymbol **sympp; char *input_target = NULL; char *output_target = NULL; @@ -311,11 +313,11 @@ copy_sections(ibfd, isection, obfd) arelent **relpp; int relcount; sec_ptr osection; - unsigned long size; + bfd_size_type size; osection = bfd_get_section_by_name(obfd, bfd_section_name(ibfd, isection)); - size = bfd_section_size(ibfd, isection); + size = isection->size; if (size == 0) return; @@ -334,12 +336,12 @@ copy_sections(ibfd, isection, obfd) if (bfd_get_section_flags(ibfd, isection) & SEC_HAS_CONTENTS) { - unsigned char *memhunk = (unsigned char *) xmalloc(size); + PTR memhunk = (PTR) xmalloc((unsigned)size); - if (!bfd_get_section_contents(ibfd, isection, memhunk, 0, size)) + if (!bfd_get_section_contents(ibfd, isection, memhunk, (file_ptr) 0, size)) bfd_fatal(bfd_get_filename(ibfd)); - if (!bfd_set_section_contents(obfd, osection, memhunk, 0, size)) + if (!bfd_set_section_contents(obfd, osection, memhunk, (file_ptr)0, size)) bfd_fatal(bfd_get_filename(obfd)); free(memhunk); } |