[arm-gnu] Some symbols computation does not work right in LD
Bruno Richard
bruno.richard.fr at gmail.com
Fri Mar 23 09:21:01 UTC 2012
I found a problem in the ARM-EABI linker:
In .ld files, when some symbols are computed, their results when computed
by LD look invalid.
This problem was not showing on GCC versions up to 4.5.2, and is present
with 4.6.1.
To show the problem, use the following command line:
arm-none-eabi-ld.exe" -T test.ld main.o -o main.elf -Map main.map
Here is an excerpt of the linker file that shows the problem:
_eidata1 = (_sidata + _edata) - _sdata ; /* 0x08000004 in map
file */
_eidata2 = _sidata + (_edata - _sdata); /* 0x08000004 in map
file */
same = (_eidata1 == _eidata2) ? 0x1 : 0x0; /* 0x00000000 in map
file !!!*/
The "same" Symbol should be 1, not 0.
I attach a zip file containing the files necessary to reproduce the problem.
--
Bruno Richard +33 (6) 03 60 66 95
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/arm-gnu/attachments/20120323/1b8912e7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ARM_BUG_LD_operator.zip
Type: application/zip
Size: 3909 bytes
Desc: not available
URL: <http://sourcerytools.com/pipermail/arm-gnu/attachments/20120323/1b8912e7/attachment.zip>
More information about the arm-gnu
mailing list