[superh-gnu-discuss] problem with gcc-4.3.3 on sh2a target
Andrew Stubbs
ams at codesourcery.com
Mon Jun 22 08:32:45 UTC 2009
Hi Fabio,
On 20/06/09 12:11, Fabio Giovagnini wrote:
> Hi all,
> This is what I have discovered working around the gcc-4.3.3 form Code
Surgery.
We're a little confused about which CodeSourcery toolchain you have. We
have never released an sh-elf toolchain, and have never made an SH2A
lite release. Did you build it yourself?
How does your compiler identify itself? Please run "sh-elf-gcc -v" and
post the result.
> 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
I do not know what the specific problem is, in this case. However, it is
always important that all modules in a link use the same calling
conventions, so mixing multilibs is never a good idea.
For this reason it is always recommended that you link with gcc, and
allow that to call ld with the proper -L options.
You can pass your linker-specific parameters through gcc using -Wl.
E.g.:
sh-elf-gcc -Wl,-Map,test-megameter.map ....
... -Wl,--remove-section=.comment ........
Hope that helps
Andrew
CodeSourcery
More information about the superh-gnu-discuss
mailing list