Fw: Bug Report
Robert Vogl
development.mondial@aon.at
Wed Oct 13 10:53:00 GMT 1999
ÃÂ
-----Original Message----- From:
Robert Vogl < development.mondial@aon.at > To:
crossgcc@cygnus.com < crossgcc@cygnus.com > Date:
Wednesday, October 13, 1999 5:19 PM Subject: Bug
Report
Hello
ÃÂ
ÃÂ
I have a serios problem using float variables in
an application with the H8/300H.
ÃÂ
(1) If I define a global float variable var1 and
initialize it, the float variable var1is correctly defined and correctly
initialized.
ÃÂ
(2) But if I define a global float variable var2
without initializing it, and assign a constant value later to it (for example
1,5) the variable var2 has not got the right value.
ÃÂ
ÃÂ
What I
dedected:
ÃÂ
In (1) the constant value is fetch from the segment
data.
ÃÂ
In (2) the constant value is fetch from the segment rodata. (I
have not defined the segment rodata in my linkfile and dont know whats the use
of it!).ÃÂ The segment rodata starts at 0x00268008 as you can see in the
file main.x.
But the command to assign the constant to var2
is :
ÃÂ
ÃÂ ÃÂ ÃÂ mov.l @.LC0:16,er2ÃÂ ÃÂ
(as you can see in the Listfile xx.lst)
ÃÂ
and thats wrong because with this command you can reach only
the lower 16 bits of the right address.
ÃÂ
The right command should be
ÃÂ ÃÂ ÃÂ mov.l
@.LC0:24,er2
ÃÂ
So its possible to reach the address 0x00268008.
ÃÂ
Maybe I have used wrong compiler or linker switches, but I
have studdied the manuel for a long time and cant find any solution. Now I have
really reached a point where I need a little help.
ÃÂ
In the attachment you can find:
C SourceÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
filemain.c
MakefileÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
makefile
LinkfileÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
mondial.lnk
ObjektfileÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
main.x
ListfileÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
xx.lst
ÃÂ
ÃÂ ÃÂ ÃÂ
ÃÂ I have used the following versions of compiler and
linker:
ÃÂ
GNU C version 2.7-97r1a
(h8300-hms)
GNU ld version 2.7-97r1a (with BFD
2.7-97r1a)
ÃÂ
ÃÂ
Please answer back to development.mondial@aon.at
ÃÂ
ÃÂ
greetings
ÃÂ
Robert Vogl
ÃÂ
main.c
Main.x
mondial.lnk
xx.lst
makefile
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list