Re: [Mspgcc-users] eliminate unused function

2003-12-16 Thread Hunter Ware
Is there a reason -ffunction-sections causes msp430-gcc to emit the warning: "cc1: warning: -ffunction-sections may affect debugging on some targets" This warning doesn't show on the x86-linux and arm-elf target gcc's so I figure it is port specific. The reason that I ask is that

Re: [Mspgcc-users] eliminate unused function

2003-12-15 Thread Matthias Weingart
Oh sorry, I misunderstood you. I need to have the option -uInterruptVector! Good to know, something for the docs. M. On Mon, Dec 15, 2003 at 12:02:56PM +0300, Dmitry wrote: > Again, do not forget -Wl,-uInterruptVector !!! > I just tried: > msp430-gcc m.c -mmcu=msp430x149 -O2 -ffunction-sec

Re: [Mspgcc-users] eliminate unused function

2003-12-15 Thread Dmitry
Again, do not forget -Wl,-uInterruptVector !!! I just tried: msp430-gcc m.c -mmcu=msp430x149 -O2 -ffunction-sections -Wl,--gc-sections -Wl,-uInterruptVectors -o main.elf -g And it works fine. ~d On Monday 15 Dece

Re: [Mspgcc-users] eliminate unused function

2003-12-15 Thread Matthias Weingart
On Mon, Dec 15, 2003 at 11:26:14AM +0300, Dmitry wrote: > > As simple as: > -ffunction-sections -Wl,--gc-sections -Wl,-uInterruptVectors Thx ~d, I tried the first options, but as I wrote in a previous posting there must be something wrong. The failure is in the elf-file. The debugger cannot load

Re: [Mspgcc-users] eliminate unused function

2003-12-15 Thread Dmitry
As simple as: -ffunction-sections -Wl,--gc-sections -Wl,-uInterruptVectors BUT... use with care. If you miss third option to gcc, you lose all interrupt functions and a startup code. Also, if you're playing with c++, all global constructors/destructors will be eliminated. ~d On Sunday 14 De

[Mspgcc-users] eliminate unused function

2003-12-14 Thread Matthias Weingart
How can I tell mcpgcc not to link unused functions into the target? example: func1() { } func2() { } main() { func1(); } func2 should not appear in the elf-file, because it is never called. I found some gcc options that would do that -fvtable-gc Emit special relocations for vtables and virt