[ECOS] Section garbage collection and function addresses

Chris Morrow cmorrow@YottaYotta.com
Thu Aug 10 12:51:00 GMT 2000


Things work for me with the tools mentioned in my message below. CFLAGS
are set to

-mips4 -EB -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual -g -O2 -fno-rtti -fno-exceptions -fvtable-gc
-finit-priorit

Linker flags are set to

-mips4 -EB -g -nostdlib -Wl,--gc-sections -Wl,-static

The -mips4 flag my not be appropriate for your board.

I'm gone tomorrow for a week, so I won't be of much more help.

Ling Su wrote:
> 
> Hi, Chris,
> 
> Have you successfully got the mips64 toolchain work now? I may meet the same
> problem as you, I use gdb5.0, egcs-2000-5-30, and binutils 2.10, I can not
> succeed in try to debugging since the main funciton has an address 0x0. I
> turned off the -gc-sections option, and tried to run it in simulation
> target, I still met some problem for accessing some wrong address. It is
> really strange, since I knew at least Jifl and Charles use the MIPS
> evaluation baord Vr4373 quite well, I almost applied the some version
> binutils, gcc and gdb, how come I can not overcome that.
> 
> Hi, Bart,
> 
> If I buy the customer support from RedHat, it is possible the toolchain
> problem will be solved?
> 
> Regards,
> -Ling
> 
> >
> > This is appears to be a compiler issue, but I thought some people here
> > might find this
> > of interest.
> >
> > I'm using gdb 4.18, gcc 2.95 and binutils 2.10, all configured as
> > mips64-unknown-elf.
> >
> > Examining a linked program with objdump show nothing out of the
> > ordinary. Using gdb
> > on the linked file in elf format mostly works, however some functions
> > are reported
> > as having an address of 0. Functions towards the start of the text
> > section are okay,
> > but after some point every function has an address of zero.
> >
> > Turning off -gc-sections on the linker removes this problem.
> >
> > Objdump -g also appears to be broken.
> >
> > --
> > Chris Morrow YottaYotta Inc.
> > email: cmorrow@yottayotta.com
> > phone: (780) 439 9000 ext 227
> > web: http://www.yottayotta.com
> >

-- 
Chris Morrow	YottaYotta Inc.
email:		cmorrow@yottayotta.com
phone:		(780) 439 9000 ext 227
web:		http://www.yottayotta.com


More information about the Ecos-discuss mailing list