* binutils-2.9 objcopy fails (fwd)
@ 1998-04-14 12:49 Joel Sherrill
1998-04-14 13:18 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 1998-04-14 12:49 UTC (permalink / raw)
To: gas2
A failure in m68k-rtems objcopy.
--joel
---------- Forwarded message ----------
Date: Tue, 14 Apr 98 13:20:47 -0600
From: Eric Norum <eric@skatter.USask.Ca>
To: rtems-snapshots@oarcorp.com
Subject: binutils-2.9 objcopy fails
I downloaded and installed the latest binutils. Now I can't
generate prom images any more.
Background:
I've got two types of 68360 systems here. One uses a single 8-bit
bootstrap prom and the other uses 4 8-bit bootstrap proms as a 32-bit
prom. I use a script to generate the S-record images for my prom
burner.
Here are the salient lines from the script:
m68k-rtems-objcopy --output-target=srec prom.exe prom.hex
for byte in 0 1 2 3
do
m68k-rtems-objcopy --interleave=4 --byte=$byte
--output-target=srec prom.exe prom$byte.hex
done
Problem:
The first objcopy works fine to build the 8-bit bootstrap prom
image, but when I try to split the executable into the 4 images for
the 32-bit prom, I get:
+ m68k-rtems-objcopy --output-target=srec prom.exe prom.hex
+ m68k-rtems-objcopy --interleave=4 --byte=0 --output-target=srec
prom.exe prom0.hex
m68k-rtems-objcopy: prom0.hex: Invalid operation
Any ideas?
---
Eric Norum eric@skatter.usask.ca
Saskatchewan Accelerator Laboratory Phone: (306) 966-6308
University of Saskatchewan FAX: (306) 966-6058
Saskatoon, Canada.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: binutils-2.9 objcopy fails (fwd)
1998-04-14 12:49 binutils-2.9 objcopy fails (fwd) Joel Sherrill
@ 1998-04-14 13:18 ` Ian Lance Taylor
0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 1998-04-14 13:18 UTC (permalink / raw)
To: joel, eric; +Cc: gas2
Date: Tue, 14 Apr 1998 14:23:14 -0500 (CDT)
From: Joel Sherrill <joel@OARcorp.com>
---------- Forwarded message ----------
Date: Tue, 14 Apr 98 13:20:47 -0600
From: Eric Norum <eric@skatter.USask.Ca>
I downloaded and installed the latest binutils. Now I can't
generate prom images any more.
Background:
I've got two types of 68360 systems here. One uses a single 8-bit
bootstrap prom and the other uses 4 8-bit bootstrap proms as a 32-bit
prom. I use a script to generate the S-record images for my prom
burner.
Here are the salient lines from the script:
m68k-rtems-objcopy --output-target=srec prom.exe prom.hex
for byte in 0 1 2 3
do
m68k-rtems-objcopy --interleave=4 --byte=$byte
--output-target=srec prom.exe prom$byte.hex
done
Problem:
The first objcopy works fine to build the 8-bit bootstrap prom
image, but when I try to split the executable into the 4 images for
the 32-bit prom, I get:
+ m68k-rtems-objcopy --output-target=srec prom.exe prom.hex
+ m68k-rtems-objcopy --interleave=4 --byte=0 --output-target=srec
prom.exe prom0.hex
m68k-rtems-objcopy: prom0.hex: Invalid operation
I can recreate this problem, but what's odd is that all of the code is
old. What version of the binutils were you using before? I can
recreate the problem using an binutils 2.6 I have lying around.
The problem I'm seeing is this call in copy_section in
binutils/objcopy.c:
/* The section has gotten smaller. */
if (!bfd_set_section_size (obfd, osection, size))
nonfatal (bfd_get_filename (obfd));
This is trying to set the section size after objcopy has already
started to write to the sections. This needs to be handled
differently.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: binutils-2.9 objcopy fails (fwd)
@ 1998-04-14 13:18 Joel Sherrill
0 siblings, 0 replies; 3+ messages in thread
From: Joel Sherrill @ 1998-04-14 13:18 UTC (permalink / raw)
To: gas2
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 <eric@skatter.usask.ca>
To: Joel Sherrill <joel@oarcorp.com>
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1998-04-14 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-14 12:49 binutils-2.9 objcopy fails (fwd) Joel Sherrill
1998-04-14 13:18 ` Ian Lance Taylor
1998-04-14 13:18 Joel Sherrill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).