This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello Kristof, On Wednesday 18 October 2006 10:53, Kristof Provost wrote: > Valentin Longchamp schreef: > > Hello, > > > > I am working with an arm-none-linux-gnueabi toolchain I built using > > crosstool-0.42 with Martin Guy's pathes. Here is my config script so that > > you > > > > > > When I add the -ffunction-sections -fdata-sections to my static builds in > > order to have small and easily distributable binaries for the platform, I > > still get the same huge binary, like if the whole glibc was included. > > > > Do I need to put some extra toolchain build config information to get the > > wanted result ? > > > > A couple of ideas: > Did you remember to use -gc-sections when linking? > Did you strip the binary? Yes I did use the -gc-sections option when linking. What do you mean by "strip the binary" ? > > What's your output data format? Are you creating ELF files? Not all > output formats support arbitraty sections. > Yep, I'm creating ELF files. Is it a problem to do it with ELF files ? I wouldn't think so. By the way, I thought that if my toolchain isn't compiled with both -ffunction-sections -fdata-section options, it isn't going to be "separated" at the beginning and that's why I always get the same huge binary when I compile my program static with or without the section options. So I added the following option to my crosstool script: > 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 ? Thank you Valentin
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |