* possible bug in bfd/sunos.c
@ 1996-05-28 8:56 Joel Sherrill
1996-05-28 9:07 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Joel Sherrill @ 1996-05-28 8:56 UTC (permalink / raw)
To: gas2
Version binutils-2.6.
I am configured for sparc-rtems which is essentially the same as
sparc-aout with different CPP_PREDEFINES. I use the following assembly
file (cut down to the point of uselessness :) ):
.text
sethi %hi(stack_space + 16 * 1024), %g1
call _main
.comm stack_space, 16 * 1024
I then run this script on it:
sparc-rtems-as -o test.o test.s
sparc-rtems-ld test.o
and get the following message:
bfd assertion fail ../../src/bfd/sunos.c:1839
If I delete any line in the file other than the .text, the problem goes
away. Is this something I am doing which is stupid? Is this a real
problem? I looked at the source for this problem but (in my usual luck)
requires real expertise to even read.
I noticed that the assert in question has changed in the latest binutils
snapshot. Is this the bug? If so is there a simple patch for this
specific problem?
Any assistance is appreciated.
--joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: possible bug in bfd/sunos.c
1996-05-28 8:56 possible bug in bfd/sunos.c Joel Sherrill
@ 1996-05-28 9:07 ` Ian Lance Taylor
1996-05-28 12:14 ` Joel Sherrill
0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 1996-05-28 9:07 UTC (permalink / raw)
To: joel; +Cc: gas2
Date: Tue, 28 May 1996 10:50:25 -0500 (CDT)
From: Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
I am configured for sparc-rtems which is essentially the same as
sparc-aout with different CPP_PREDEFINES. I use the following assembly
file (cut down to the point of uselessness :) ):
.text
sethi %hi(stack_space + 16 * 1024), %g1
call _main
.comm stack_space, 16 * 1024
I then run this script on it:
sparc-rtems-as -o test.o test.s
sparc-rtems-ld test.o
and get the following message:
bfd assertion fail ../../src/bfd/sunos.c:1839
If you configure for a SunOS target, the linker will automatically
generate a shared library if there are any undefined symbols in the
link. This odd behaviour is for compatibility with the SunOS linker.
In the current snapshots, the sparc-aout target does not have this
behaviour, since shared libraries are not useful for embedded systems,
but in 2.6 the sparc-aout target is the same as SunOS.
In your example, the linker is created a shared library.
The assertion failure you are getting is, as you guessed, a bug in the
assertion condition. You can just replace the BFD_ASSERT with one
from a current snapshot to avoid it. It is likely, though, that you
do not want to create a shared library at all.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-05-28 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-28 8:56 possible bug in bfd/sunos.c Joel Sherrill
1996-05-28 9:07 ` Ian Lance Taylor
1996-05-28 12:14 ` 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).