[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Re: Removal of unused functions
From: |
Johannes Bauer |
Subject: |
[avr-gcc-list] Re: Removal of unused functions |
Date: |
Mon, 21 Aug 2006 15:48:10 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.7 (X11/20051015) |
Björn Haase wrote:
>>Hello people,
>>
>>I've read quite a bit about the removal of unused functions when using
>>avr-gcc. In particular I've read Jörg's remarks about the automatic
>>removal feature being useless and I think this might very well be
>>correct.
>
> Joerg's statement used to be correct but no longer is. In fact there was a
> problem for older versions of binutils. The problem that you have encountered
> is fixed in the most recent cvs version of the binutils. If you don't know
> how to use cvs, you might use some recent snapshot.
Thank you, I've switched to the CVS version of binutils and everything
works as expected now.
>>He also made a remark about the feature being hardly maintained
>>and that it might break with future versions of GCC - this again might
>>hold true (if I'm not making something wrong).
>
> I don't consider it to be hardly maintained and I don't see any problem that
> might show up with future versions of gcc.
Cool. I consider it to be a neat, useful feature: Not only can you by
split up libraries by function, not by functions - you can also use it
to track where in your program is code you've never used. Excellent.
Splitting up a library into many C-files for every C-function is a bad
idea IMHO - splitting up into many C-files which have the same semantic
and are related to each other is a good idea IMHO. I don't see why the
code for a free() should be included in my final binary when I use
malloc() - however, as malloc() and free() are closely related I believe
it makes a lot of sense to pack them into one C-file.
> , but that's a feature (removal of unused global static variables) where I
> have strong reasons to expect it to work, but that I never tried myself.
I'll use that just for tracking. Global static variables which are
unsued should'nt ever happen I think. At least in my code they don't ;-)
> That's exactly what I happens for older versions of avr-ld version that do
> not
> include my fix for --gc-sections.
Fixed in the CVS! :-)
Thanks for your help!
Greetings,
Johannes
- Re: [avr-gcc-list] Re: Removal of unused functions, (continued)
- Re: [avr-gcc-list] Re: Removal of unused functions, Anatoly Sokolov, 2006/08/19
- Re: [avr-gcc-list] Re: Removal of unused functions, Joerg Wunsch, 2006/08/21
- Re: [avr-gcc-list] Re: Removal of unused functions, Bernd Trog, 2006/08/21
- Re: [avr-gcc-list] Re: Removal of unused functions, Joerg Wunsch, 2006/08/22
- Re: [avr-gcc-list] Re: Removal of unused functions, Bernd Trog, 2006/08/25
- RE: [avr-gcc-list] Re: Removal of unused functions, Eric Weddington, 2006/08/25
- RE: [avr-gcc-list] Re: Removal of unused functions, Bernd Trog, 2006/08/27
- Re: [avr-gcc-list] Re: Removal of unused functions, Joerg Wunsch, 2006/08/27
- RE: [avr-gcc-list] Re: Removal of unused functions, Eric Weddington, 2006/08/28
- Re: [avr-gcc-list] Re: Removal of unused functions, Anatoly Sokolov, 2006/08/22
[avr-gcc-list] Re: Removal of unused functions,
Johannes Bauer <=