From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Sherrill To: gas2@cygnus.com Subject: Re: binutils-2.9 objcopy fails (fwd) Date: Tue, 14 Apr 1998 13:18:00 -0000 Message-id: X-SW-Source: 1998/msg00122.html I went ahead and asked the obvious questions on the m68k-rtems objcopy failure. I hope it helps. ---------- Forwarded message ---------- Date: Tue, 14 Apr 98 14:09:46 -0600 From: Eric Norum To: Joel Sherrill Subject: Re: binutils-2.9 objcopy fails You wrote: > I have forwarded this to the binutils list. What version of > binutils did you upgrade from? Thanks. Perhaps you could forward this, too? It's been so long since I had to make a 32-bit bootstrap prom that I don't remember which version I used to use. :-( > > I have breakages in powerpc-rtems and mips64orion-rtems. There is > some known shared library problem. Are you building with > --enabled-shared? I just built with whatever `bit' does. I'm pretty sure that I'm not trying to build anything with shared libraries. Just for the heck of it, I tried running this under gdb. I found that the text segment of prom.exe seems to be copied with no problem, but the data segment fails: Breakpoint 3, copy_section (ibfd=0xe61a0, isection=0xe6994, obfdarg=0xe9220) at ../../src/binutils/../../src/binutils/objcopy.c:1287 1287 if (!bfd_set_section_size (obfd, osection, size)) (gdb) step 1288 nonfatal (bfd_get_filename (obfd)); (gdb) print size $5 = 1900 The fact that this fails the second time through is not too surprising, given the code at the beginning of bfd_set_section_size........ boolean bfd_set_section_size (abfd, ptr, val) bfd *abfd; sec_ptr ptr; bfd_size_type val; { /* Once you've started writing to any section you cannot create or change the size of any others. */ if (abfd->output_has_begun) { bfd_set_error (bfd_error_invalid_operation); return false; } --- Eric Norum eric@skatter.usask.ca Saskatchewan Accelerator Laboratory Phone: (306) 966-6308 University of Saskatchewan FAX: (306) 966-6058 Saskatoon, Canada.