RE problem with gcc3.2 compiler
Jonathan Larmour
jifl@eCosCentric.com
Mon Oct 27 02:12:00 GMT 2003
[ Keep this on the list - personal support is something eCosCentric charge
for ]
Ottawa Guy wrote:
> Hi Jifl
> Yes, when I use "--gc-section" with gcc2.95 my program
> works. I am not sure what special thing happening with
> ""--gc-section" flag.
>
> Do you have any idea why this "-Wl,--gc-sections"
> might have some effect.
I'm not familiar with the details of the sparc port, but I'd hazard a
guess that in fact it's the compiler runtime inserting objects into the
image. Generate a linker map for a version with or without gc-sections and
compare the objects. Alternatively "simply" try debugging it, if necessary
with diag_printf's or LED twiddling to see how far through the startup it
gets (if any).
> Regarding the gcc3.x load. When I jump to 0x40001300
> my system halts.
Is that the right address? That was only given below as what the tools
assumed. You should use the address of the symbol "reset_vector".
Jifl
> --- Jonathan Larmour <jifl@eCosCentric.com> wrote:
>
>>Ottawa Guy wrote:
>>
>>>Thanks Jifl for your response. With the warning
>>
>>when I
>>
>>>try to run my code, my system hangs. That mean
>>>"--gc-sections" flag must be cleaning up something
>>>else.
>>
>>You mean it works when you use -Wl,--gc-sections?
>>
>>
>>>Do you any chance have "sparc-elf" for gcc3.x
>>
>>toolset
>>
>>>for a linux machine. I compiled the tool set on my
>>>linux machine, I still have the same
>>>problem(constructor ordering).
>>
>>Sorry I don't. We've recommended Jiri's site for
>>those tools since this is
>>his port.
>>
>>
>>>I downloaded the "sparc-elf" binary file from
>>>"www.gaisler.com" website. I get the following
>>
>>error.
>>
>>>root@ssc045 examples]# sparc-rtems-gcc hello.c
>>
>>-I./ -o
>>
>>>hello.out
>>>-I/tmp/ecos/install/include
>>
>>-L/tmp/ecos/install/lib
>>
>>>-nostdlib
>>>-Wl,--gc-sections -Ttarget.ld
>>>
>>
> /opt/rtems/lib/gcc-lib/sparc-rtems/3.2.3/../../../../sparc-rtems/bin/ld:
>
>>>warning: cannot find entry symbol start;
>>
>>defaulting to
>>
>>>40001300
>>
>>That may be benign, however it's meant to get the
>>start information from
>>target.ld, e.g. in
>>hal/sparc/arch/current/src/sparc.ld:
>>
>>ENTRY(reset_vector)
>>
>>Jifl
>>--
>>eCosCentric http://www.eCosCentric.com/ The
>>eCos and RedBoot experts
>>--["No sense being pessimistic, it wouldn't work
>>anyway"]-- Opinions==mine
>>
>
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine
More information about the Ecos-devel
mailing list