Hi Mehmet,
We have a global variable which is initialized to 1 and named AMLogging.
When we compile our source it does not cause any problem but when we change
AMLogging = 0;
and compile, if at run time we try to access to this variable it is causing
system to crash with a floating point exception to 4-byte aligned address.
Is it really a "floating point" exception ? I would assume, based on
the name of the variable and the values you are using to initialise it,
that it is an integer variable and that there would not be any accesses
of it as a floating point value.
gcc version 3.4.3
It is possible that this is a gcc bug, not a binutils one. If gcc is
emitting the assembler code to create your AMLogging variable without
also emitting the assembler code to ensure its correct alignment, then
this would cause the problem.
.globl AMLoggingClearedAlarms
.section .bss
.align 2
.type AMLoggingClearedAlarms, @object
.size AMLoggingClearedAlarms, 4
AMLoggingClearedAlarms:
.space 4
This appears to be correct. The ".align 2" directive will ensure that
the location counter is aligned to the next 4 byte boundary before the
".space 4" directive creates a four byte entry for the
AMLoggingClearedAlarms object.
Do you have a small, simple test case that reproduces the problem ?
Cheers
Nick
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils