problem with gcc-4.3.3 on sh2a target

Fabio Giovagnini fabio.giovagnini at aurion-tech.com
Sat Jun 20 11:11:35 UTC 2009


Hi all,
This is what I have discovered working around the gcc-4.3.3 form Code Surgery.
This is the linker I'm using:
OUTPUT_FORMAT("elf32-sh")
OUTPUT_ARCH(sh2a)
SEARCH_DIR("/usr/local/gcc-4.3-codesur/sh-elf/lib/m2a");
ENTRY("_start")

This is the linker path I'm using:
/usr/local/gcc-4.3-codesur/bin/sh-elf-ld -Map test-megameter.map 
-Trom.sh2a.7286.ld -o 
test-megameter.elf /home/fgiovagnini/acts/megameter3/test-megameter/.obj/crt0.o.... 
-L/usr/local/gcc-4.3-codesur/sh-elf/lib/m2a     ------------>                   m2a 
-L/usr/local/gcc-4.3-codesur/lib/gcc/sh-elf/4.3.3/m2 -lgcc -lc---->     m2                                      
/usr/local/gcc-4.3-codesur/bin/sh-elf-objcopy -I elf32-sh -O srec 
--remove-section=.comment test-megameter.elf test-megameter.a37

Under the abouve conditions
unsigned char TSTdbsize;
float TSTfloat;
        TSTdbsize = sizeof(float);
        TSTfloat = TSTdbsize;
        TSTfloat *=     3.14;

works properly

When I use
/usr/local/gcc-4.3-codesur/bin/sh-elf-ld -Map test-megameter.map 
-Trom.sh2a.7286.ld -o 
test-megameter.elf /home/fgiovagnini/acts/megameter3/test-megameter/.obj/crt0.o.... 
-L/usr/local/gcc-4.3-codesur/sh-elf/lib/m2a     ------------>                   m2a 
-L/usr/local/gcc-4.3-codesur/lib/gcc/sh-elf/4.3.3/m2a -lgcc -lc---->    m2a                                     
/usr/local/gcc-4.3-codesur/bin/sh-elf-objcopy -I elf32-sh -O srec 
--remove-section=.comment test-megameter.elf test-megameter.a37
The same set of instructions doesn't work.
I have discovered that calling __floatunsisf crashes the program; while using 
m2 libgcc works fine.
I think that m2a libgcc is complied only for fpu support so also __floatunsisf 
is compiled with fpu instructions. It is stranga but it seems so.
Where can I go deeper into this aspects?
Anyone hs more infos about?
-- 
Fabio Giovagnini

Aurion s.r.l.
Tel. +39.335.8350919

www.aurion-tech.com

account telefono VoIP skype (www.skype.com):
aurion.giovagnini


More information about the superh-gnu-discuss mailing list