On 2007-07-02, Juergen Schlinker <[email protected]> wrote:

>> The functions-sections option should work.  It has worked
>> since at least 3.2.3, but it generated a bogus compiler
>> warning about how it "may affect debugging". See this thread:
>>
>> http://thread.gmane.org/gmane.comp.hardware.texas-instruments.msp430.gcc.user/5945
>>
>> What happened when you tried to use -ffunction-sections?
>
> I used your patch for the binutils 2.17.50 and I seems to work now :-)
> I didn't try your patch for the compiler-warning as it should work without
> it (will do this next though).

Yes, it will work without disabling the warning.  However, I
don't allow code with warnings to ship.

> About the fdata-sections ... without your patch I get errors like these:
>
> /tmp/ccSm8GVY.s:5548: Error: junk at end of line, first unrecognized 
> character is `0'
> /tmp/ccSm8GVY.s:5549: Error: expected comma after name `' in .size directive
> /tmp/ccSm8GVY.s:5550: Error: junk at end of line, first unrecognized 
> character is `0'
> /tmp/ccSm8GVY.s:5553: Error: unrecognized symbol type ""

I've never seen anything like that before.

> However, when I want to use your patch I don't find the function
> unique_section in msp430.c

You're getting those errors after patching
mspgcc/gcc/gcc-3.3/gcc/config/msp430/* and building gccd 3.2.3?

> Checking the cvs repository it seems the function is only
> declared in msp430-protos.h and never defined for msp430. So,
> any suggestions on how to apply the patch?

I don't remember having any such issues when I made the
changes. In my copy of the mspgcc soruces, it's declared in
msp430-protos.h, which is apparently visible from within in
msp430.c:

$ grep -r unique_section mspgcc/gcc/gcc-3.3
mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430-protos.h:extern void   
unique_section               PARAMS ((tree decl, int reloc));
mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.c:unique_section (decl, reloc)
mspgcc/gcc/gcc-3.3/gcc/config/msp430/msp430.h:#define UNIQUE_SECTION(DECL, 
RELOC) unique_section (DECL, RELOC)

I just verified msp430-protos.h against CVS, and it's
unchanged.  You must have a broken source tree.

-- 
Grant Edwards                   grante             Yow! TONY RANDALL!  Is YOUR
                                  at               life a PATIO of FUN??
                               visi.com            


Reply via email to