-ffunction-sections -fdata-sections have no effect

Valentin Longchamp valentin.longchamp@epfl.ch
Wed Oct 18 09:44:00 GMT 2006


On Wednesday 18 October 2006 11:29, Brian Dessent wrote:
> Valentin Longchamp wrote:
> > > EXTRA_TARGET_CFLAGS="-mabi=aapcs-linux -ffunction-section
> > > -fdata-section" export EXTRA_TARGET_CFLAGS
> >
> > However, using this, I get segfaulting binaries. Where should I add these
> > options so that my glibc is built with these options ? Maybe I should add
> > it to the GLIBC_EXTRA_CONFIG variable ?
>
> I think you've got a typo there, they should be plural
> (-ffunction-sections and -fdata-sections.)  See
> <http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ffunction_00
>2dsections-582>.

Yeah you're right. I've a typo. But only in the email, I made the typo when 
rewriting the config option in the email, I just checked the my crosstool 
config script and it is correct. It would have been sooo cool that it only 
wasn't a typo.

>
> You might also consider trying a different C library like uClibc if
> final binary size is a concern, given that glibc is not exactly designed
> for this use case and has tons of inter-dependencies that can cause all
> sorts of stuff to be pulled in even for the most trivial program.
>

Yes, it is something we are considering too. We have to see how is the support 
for our vfp ARM11 processor, but if it is well supported, it's going to be 
much better than the huge glibc for our embedded system for sure. Thanks for 
the hint !

Valentin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20061018/3206eb19/attachment.sig>


More information about the crossgcc mailing list