diff options
author | Jason Molenda <crash@cygnus> | 1994-05-11 01:28:18 +0000 |
---|---|---|
committer | Jason Molenda <crash@cygnus> | 1994-05-11 01:28:18 +0000 |
commit | 6f9077cdc11936918c8a6b7be2e0bfba3d42b11d (patch) | |
tree | 077826f0518b6aee6265ba846e0dabd082f685c4 /binutils | |
parent | 91ecc8efa9b9fd0811b2c194b76a8e3200dcf8c4 (diff) | |
download | gdb-6f9077cdc11936918c8a6b7be2e0bfba3d42b11d.zip gdb-6f9077cdc11936918c8a6b7be2e0bfba3d42b11d.tar.gz gdb-6f9077cdc11936918c8a6b7be2e0bfba3d42b11d.tar.bz2 |
Tue May 10 18:22:06 1994 Jason Molenda (crash@sendai.cygnus.com)
* objcopy.c (copy_section): Set section size correctly if using
interleave.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 24 | ||||
-rw-r--r-- | binutils/objcopy.c | 33 |
2 files changed, 44 insertions, 13 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index f932e4d..ce0677f 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,27 @@ +Tue May 10 18:22:06 1994 Jason Molenda (crash@sendai.cygnus.com) + + * objcopy.c (copy_section): Set section size correctly if using + interleave. + +Sat May 7 16:49:36 1994 Steve Chamberlain (sac@cygnus.com) + + * Makefile.in: Add rule for sysinfo.h + +Fri May 6 12:18:33 1994 Steve Chamberlain (sac@cygnus.com) + + * Makefile.in (SRCONV_PROG): Define. + (PROGS): Use $(SRCONV_PROG) too. + +Thu May 5 19:41:43 1994 Ken Raeburn (raeburn@cujo.cygnus.com) + + * Makefile.in (DISTSTUFF): Add sysinfo.c, syslex.c, in case + someone configures with `targets=all'. + (distclean): Remove y.*. + (syslex.o): Depend on sysinfo.h. + (sysinfo.c): Rename y.tab.h to sysinfo.h. + (install-info): Don't try to install into $(infodir)/$(srcdir). + * syslex.l: Include sysinfo.h, not y.tab.h. + Thu May 5 11:50:55 1994 Ken Raeburn (raeburn@kr-pc.cygnus.com) * syslex.l (yywrap): Define as function if not defined as a macro. diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 4572626..2700207 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -267,17 +267,6 @@ copy_object (ibfd, obfd) if (osympp != isympp) free (osympp); - /* Allow the BFD backend to copy any private data it understands - from the input BFD to the output BFD. */ - if (!bfd_copy_private_bfd_data (ibfd, obfd)) - { - fprintf (stderr, "%s: %s: error copying private BFD data: %s\n", - program_name, bfd_get_filename (obfd), - bfd_errmsg (bfd_get_error ())); - status = 1; - return; - } - /* bfd mandates that all output sections be created and sizes set before any output is done. Thus, we traverse all sections multiple times. */ bfd_map_over_sections (ibfd, setup_section, (void *) obfd); @@ -328,6 +317,19 @@ copy_object (ibfd, obfd) /* This has to happen after the symbol table has been set. */ bfd_map_over_sections (ibfd, copy_section, (void *) obfd); + + /* Allow the BFD backend to copy any private data it understands + from the input BFD to the output BFD. This is done last to + permit the routine to look at the filtered symbol table, which is + important for the ECOFF code at least. */ + if (!bfd_copy_private_bfd_data (ibfd, obfd)) + { + fprintf (stderr, "%s: %s: error copying private BFD data: %s\n", + program_name, bfd_get_filename (obfd), + bfd_errmsg (bfd_get_error ())); + status = 1; + return; + } } static char * @@ -629,8 +631,13 @@ copy_section (ibfd, isection, obfd) nonfatal (bfd_get_filename (ibfd)); } - if (copy_byte >= 0) - filter_bytes (memhunk, &size); + if (copy_byte >= 0) + { + filter_bytes (memhunk, &size); + /* The section has gotten smaller. */ + if (!bfd_set_section_size (obfd, osection, size)) + nonfatal (bfd_get_filename (obfd)); + } if (!bfd_set_section_contents (obfd, osection, memhunk, (file_ptr) 0, size)) |